/* Token-type codes. */
typedef enum token_e
{
+ tok_undef, /* Not defined. Used to initial token_t vars. */
tok_eof,
tok_identifier,
tok_comma,
tok_percent_left_curly,
tok_token,
tok_nterm,
- tok_guard,
tok_type,
tok_union,
tok_start,
tok_typename,
tok_number,
tok_expect,
- tok_thong,
+ tok_define,
+ tok_skel,
tok_noop,
- tok_setopt,
+ /* A directive that sets to true its associated variable. */
+ tok_intopt,
+ /* A directive that sets its associated variable to the string
+ argument. */
+ tok_stropt,
tok_illegal,
tok_obsolete
} token_t;
-extern char *token_buffer;
-extern bucket *symval;
+extern const char *token_buffer;
+extern symbol_t *symval;
extern int numval;
-void init_lex PARAMS ((void));
+void lex_init PARAMS ((void));
+void lex_free PARAMS ((void));
int skip_white_space PARAMS ((void));
-void unlex PARAMS ((int));
+void unlex PARAMS ((token_t));
void read_type_name PARAMS ((FILE *fin));
+int xgetc PARAMS ((FILE *fin));
/* Return one of the token-type codes. When an identifier is seen,
the code IDENTIFIER is returned and the name is looked up in the
entry found. */
token_t lex PARAMS ((void));
+char literalchar PARAMS ((void));
-int parse_percent_token PARAMS ((void));
+token_t parse_percent_token PARAMS ((void));
#endif /* !LEX_H_ */