slr.h (326B)
1 #ifndef SLR_H_ 2 #define SLR_H_ 3 4 typedef enum { 5 INT, 6 KEYWORD, 7 SEPARATOR, 8 END_OF_TOKENS, 9 } TokenType; 10 11 typedef struct { 12 TokenType type; 13 char *value; 14 } Token; 15 16 void print_token(Token token); 17 Token *generate_number(char *current, int *current_index); 18 Token *generate_keyword(char *current, int *current_index); 19 20 #endif