Typedefs for a Scanner
* The defined token types for this sample grammar.
* These are recognized and returned by the scanner.
T_SEMI, T_EQUAL, T_EOF, T_ERR,
T_IDENT, T_STRING, T_INTEGER,
T_PLUS, T_MINUS, T_MUL, T_DIV,
* The structure holding the (lexeme,value) pair.
* A union is used to handle different lexeme types.
TypeList type; /* enum of types */
char *string; /* for strings */
long integer; /* for integers */
/* other types go here as needed
*/
* The global current token, set by scanner().
* scanner() may return a pointer to this global
* for coding convenience. This storage is declared
* in either main() or in the scanner (never in a
TokenType lex_token; /* GLOBAL */