-
Notifications
You must be signed in to change notification settings - Fork 0
/
tokens.h
88 lines (61 loc) · 994 Bytes
/
tokens.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
76
77
78
79
80
81
82
83
84
85
86
87
88
/* All available tokens are defined here.
* ET or emit token is a multipurpose macro
* which should be defined before the point
* where this file is included.
*/
// ,
ET(comma)
// .
ET(dot)
// :
ET(colon)
// !
ET(not)
// +
ET(plus)
// -
ET(minus)
// ^
ET(cap)
// /
ET(backslash)
// *
ET(star)
// {
ET(brace_open)
// }
ET(brace_close)
// (
ET(paranthesis_open)
// )
ET(paranthesis_close)
// >
ET(greater)
// >=
ET(greater_equal)
// <
ET(lesser)
// <=
ET(lesser_equal)
// =
ET(equal)
// ==
ET(equal_equal)
// !=
ET(not_equal)
// any consecutive sequence of integers with a decimal point in the middle
ET(number)
// any consecutive sequence of integers
ET(integer)
// end of file marker
ET(eof)
// any unknown token
ET(unknown)
// any consecutive sequence of characters between two "s
ET(string)
// any consecutive set of alphabets and/or numbers preceding with an alphabet
ET(identifier)
// keywords
#define KEYWORD(x, a) ET(x)
#include "keywords.h"
#undef KEYWORD