lexer.h (336B)
1 /* See LICENSE file for copyright and license details. */ 2 enum toktype { 3 TError = -2, 4 TEof = -1, 5 TIdentifier, 6 TBoolean, 7 TInteger, 8 TCharacter, 9 TString, 10 TLparen, 11 TRparen, 12 TQuote, 13 TDot 14 }; 15 16 struct tok { 17 enum toktype type; 18 char *s; 19 char *e; 20 }; 21 22 struct tok gettok(FILE *fp); 23 char *lexeme(struct tok *); 24 void puttok(struct tok);