8 #define IDENT_HASH_SIZE 64
11 struct ident
*hash_prev
;
27 struct token next_tok
; // tok pushed with lex_unget_tok
29 struct ident
*ident_hashtab
[IDENT_HASH_SIZE
];
32 void token_dup(struct token
*src
, struct token
*dest
);
33 void token_free(struct token
*token
);
35 void lex_create(struct lexer
*lex
);
36 void lex_delete(struct lexer
*lex
);
37 void lex_next(struct lexer
*lex
);
38 void lex_unget_tok(struct lexer
*lex
, struct token
*token
);
39 char *lex_get_tok_str(struct lexer
*lex
, tok_t tok
, char *tok_str
);
40 void lex_start(struct lexer
*lex
);
41 bool lex_is_ident(struct lexer
*lex
, tok_t tok
);
47 #define DEF(x) TOK_ ## x,
53 TOK_FIRST_PUNCT
= 0x100,
54 #define PUNCT(x, str) TOK_ ## x,