update
[tinycc.git] / tcctok.h
blobfd617449b96a32b14bfc79a69db71fed6de13a76
1 /* keywords */
2 DEF(TOK_INT, "int")
3 DEF(TOK_VOID, "void")
4 DEF(TOK_CHAR, "char")
5 DEF(TOK_IF, "if")
6 DEF(TOK_ELSE, "else")
7 DEF(TOK_WHILE, "while")
8 DEF(TOK_BREAK, "break")
9 DEF(TOK_RETURN, "return")
10 DEF(TOK_FOR, "for")
11 DEF(TOK_EXTERN, "extern")
12 DEF(TOK_STATIC, "static")
13 DEF(TOK_UNSIGNED, "unsigned")
14 DEF(TOK_GOTO, "goto")
15 DEF(TOK_DO, "do")
16 DEF(TOK_CONTINUE, "continue")
17 DEF(TOK_SWITCH, "switch")
18 DEF(TOK_CASE, "case")
20 /* ignored types Must have contiguous values */
21 DEF(TOK_CONST, "const")
22 DEF(TOK_VOLATILE, "volatile")
23 DEF(TOK_LONG, "long")
24 DEF(TOK_REGISTER, "register")
25 DEF(TOK_SIGNED, "signed")
26 DEF(TOK___SIGNED__, "__signed__") /* gcc keyword */
27 DEF(TOK_AUTO, "auto")
28 DEF(TOK_INLINE, "inline")
29 DEF(TOK___INLINE__, "__inline__") /* gcc keyword */
30 DEF(TOK_RESTRICT, "restrict")
32 DEF(TOK_FLOAT, "float")
33 DEF(TOK_DOUBLE, "double")
34 DEF(TOK_BOOL, "_Bool")
35 DEF(TOK_SHORT, "short")
36 DEF(TOK_STRUCT, "struct")
37 DEF(TOK_UNION, "union")
38 DEF(TOK_TYPEDEF, "typedef")
39 DEF(TOK_DEFAULT, "default")
40 DEF(TOK_ENUM, "enum")
41 DEF(TOK_SIZEOF, "sizeof")
42 DEF(TOK___ATTRIBUTE__, "__attribute__")
43 DEF(TOK_ALIGNOF, "__alignof__")
44 DEF(TOK_TYPEOF, "typeof")
46 /*********************************************************************/
47 /* the following are not keywords. They are included to ease parsing */
48 /* preprocessor only */
49 DEF(TOK_DEFINE, "define")
50 DEF(TOK_INCLUDE, "include")
51 DEF(TOK_IFDEF, "ifdef")
52 DEF(TOK_IFNDEF, "ifndef")
53 DEF(TOK_ELIF, "elif")
54 DEF(TOK_ENDIF, "endif")
55 DEF(TOK_DEFINED, "defined")
56 DEF(TOK_UNDEF, "undef")
57 DEF(TOK_ERROR, "error")
58 DEF(TOK_WARNING, "warning")
59 DEF(TOK_LINE, "line")
60 DEF(TOK_PRAGMA, "pragma")
61 DEF(TOK___LINE__, "__LINE__")
62 DEF(TOK___FILE__, "__FILE__")
63 DEF(TOK___DATE__, "__DATE__")
64 DEF(TOK___TIME__, "__TIME__")
65 DEF(TOK___FUNCTION__, "__FUNCTION__")
66 DEF(TOK___VA_ARGS__, "__VA_ARGS__")
68 /* special identifiers */
69 DEF(TOK___FUNC__, "__func__")
71 /* attribute identifiers */
72 DEF(TOK_SECTION, "section")
73 DEF(TOK___SECTION__, "__section__")
74 DEF(TOK_ALIGNED, "aligned")
75 DEF(TOK___ALIGNED__, "__aligned__")
76 DEF(TOK_UNUSED, "unused")
77 DEF(TOK___UNUSED__, "__unused__")
78 DEF(TOK_CDECL, "cdecl")
79 DEF(TOK___CDECL, "__cdecl")
80 DEF(TOK___CDECL__, "__cdecl__")
81 DEF(TOK_STDCALL, "stdcall")
82 DEF(TOK___STDCALL, "__stdcall")
83 DEF(TOK___STDCALL__, "__stdcall__")
84 DEF(TOK_NORETURN, "noreturn")
85 DEF(TOK___NORETURN__, "__noreturn__")
87 /* builtin functions or variables */
88 DEF(TOK_memcpy, "memcpy")
89 DEF(TOK_memset, "memset")
90 DEF(TOK_alloca, "alloca")
91 DEF(TOK___divdi3, "__divdi3")
92 DEF(TOK___moddi3, "__moddi3")
93 DEF(TOK___udivdi3, "__udivdi3")
94 DEF(TOK___umoddi3, "__umoddi3")
95 DEF(TOK___sardi3, "__sardi3")
96 DEF(TOK___shrdi3, "__shrdi3")
97 DEF(TOK___shldi3, "__shldi3")
98 DEF(TOK___tcc_int_fpu_control, "__tcc_int_fpu_control")
99 DEF(TOK___tcc_fpu_control, "__tcc_fpu_control")
100 DEF(TOK___ulltof, "__ulltof")
101 DEF(TOK___ulltod, "__ulltod")
102 DEF(TOK___ulltold, "__ulltold")
103 DEF(TOK___fixunssfdi, "__fixunssfdi")
104 DEF(TOK___fixunsdfdi, "__fixunsdfdi")
105 DEF(TOK___fixunsxfdi, "__fixunsxfdi")
107 /* bound checking symbols */
108 #ifdef CONFIG_TCC_BCHECK
109 DEF(TOK___bound_ptr_add, "__bound_ptr_add")
110 DEF(TOK___bound_ptr_indir1, "__bound_ptr_indir1")
111 DEF(TOK___bound_ptr_indir2, "__bound_ptr_indir2")
112 DEF(TOK___bound_ptr_indir4, "__bound_ptr_indir4")
113 DEF(TOK___bound_ptr_indir8, "__bound_ptr_indir8")
114 DEF(TOK___bound_ptr_indir12, "__bound_ptr_indir12")
115 DEF(TOK___bound_ptr_indir16, "__bound_ptr_indir16")
116 DEF(TOK___bound_local_new, "__bound_local_new")
117 DEF(TOK___bound_local_delete, "__bound_local_delete")
118 DEF(TOK_malloc, "malloc")
119 DEF(TOK_free, "free")
120 DEF(TOK_realloc, "realloc")
121 DEF(TOK_memalign, "memalign")
122 DEF(TOK_calloc, "calloc")
123 DEF(TOK_memmove, "memmove")
124 DEF(TOK_strlen, "strlen")
125 DEF(TOK_strcpy, "strcpy")
126 #endif