VPR-6.0
|
00001 /** 00002 * @file 00003 * 00004 * Jason Luu 00005 * July 22, 2009 00006 * Tokenizer 00007 */ 00008 00009 #ifndef TOKEN_H 00010 #define TOKEN_H 00011 00012 enum e_token_type 00013 { TOKEN_NULL, TOKEN_STRING, TOKEN_INT, 00014 TOKEN_OPEN_SQUARE_BRACKET, TOKEN_CLOSE_SQUARE_BRACKET, 00015 TOKEN_OPEN_SQUIG_BRACKET, TOKEN_CLOSE_SQUIG_BRACKET, 00016 TOKEN_COLON, TOKEN_DOT }; 00017 00018 struct s_token { 00019 enum e_token_type type; 00020 char *data; 00021 }; 00022 typedef struct s_token t_token; 00023 00024 t_token *GetTokensFromString(INP const char* inString, OUTP int * num_tokens); 00025 00026 void freeTokens(INP t_token *tokens, INP int num_tokens); 00027 00028 00029 boolean checkTokenType(INP t_token token, OUTP enum e_token_type token_type); 00030 00031 void my_atof_2D(INOUTP float **matrix, INP int max_i, INP int max_j, INP char *instring); 00032 00033 #endif 00034