-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLexer.h
75 lines (70 loc) · 1.39 KB
/
Lexer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef VERIPYTHON_LEXER__
#define VERIPYTHON_LEXER__
enum VeriPythonTokens {
TOKEN_module = -1024,
TOKEN_endmodule,
TOKEN_output,
TOKEN_input,
TOKEN_assign,
TOKEN_wire,
TOKEN_always,
TOKEN_posedge,
TOKEN_negedge,
TOKEN_senslist_or,
TOKEN_begin,
TOKEN_end,
TOKEN_case,
TOKEN_casez,
TOKEN_casex,
TOKEN_endcase,
TOKEN_if,
TOKEN_else,
TOKEN_reg,
TOKEN_comma,
TOKEN_semicolon,
TOKEN_colon,
TOKEN_question,
TOKEN_identifier,
TOKEN_const_number,
TOKEN_sized_number,
TOKEN_lparen,
TOKEN_rparen,
TOKEN_lbrace,
TOKEN_rbrace,
TOKEN_lbracket,
TOKEN_rbracket,
TOKEN_op_add,
TOKEN_op_sub,
TOKEN_op_mul,
TOKEN_op_div,
TOKEN_op_mod,
TOKEN_arith_lshift,
TOKEN_logical_lshift,
TOKEN_arith_rshift,
TOKEN_logical_rshift,
TOKEN_cond_eq,
TOKEN_cond_ne,
TOKEN_cond_ge,
TOKEN_cond_gt,
TOKEN_cond_le,
TOKEN_cond_lt,
TOKEN_single_eq,
TOKEN_bitwise_and,
TOKEN_bitwise_or,
TOKEN_bitwise_not,
TOKEN_bitwise_xor,
TOKEN_logical_and,
TOKEN_logical_or,
TOKEN_logical_not,
TOKEN_at,
TOKEN_single_line_comment,
TOKEN_single_line_comment_end,
TOKEN_multi_line_comment_start,
TOKEN_multi_line_comment_end,
};
union LEXER_VALUE {
/* 需要手动释放 */
char *str;
};
extern union LEXER_VALUE yylval;
#endif