2 |
7u83 |
1 |
/*
|
6 |
7u83 |
2 |
* Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
|
|
|
3 |
* All rights reserved.
|
|
|
4 |
*
|
|
|
5 |
* Redistribution and use in source and binary forms, with or without
|
|
|
6 |
* modification, are permitted provided that the following conditions are met:
|
|
|
7 |
*
|
|
|
8 |
* 1. Redistributions of source code must retain the above copyright notice,
|
|
|
9 |
* this list of conditions and the following disclaimer.
|
|
|
10 |
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
|
11 |
* this list of conditions and the following disclaimer in the documentation
|
|
|
12 |
* and/or other materials provided with the distribution.
|
|
|
13 |
* 3. Neither the name of The TenDRA Project nor the names of its contributors
|
|
|
14 |
* may be used to endorse or promote products derived from this software
|
|
|
15 |
* without specific, prior written permission.
|
|
|
16 |
*
|
|
|
17 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
|
|
|
18 |
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
|
|
19 |
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
20 |
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
|
|
|
21 |
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
|
22 |
* EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
23 |
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
|
24 |
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
25 |
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
|
26 |
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
|
27 |
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
28 |
*
|
|
|
29 |
* $Id$
|
|
|
30 |
*/
|
|
|
31 |
/*
|
2 |
7u83 |
32 |
Crown Copyright (c) 1997
|
6 |
7u83 |
33 |
|
2 |
7u83 |
34 |
This TenDRA(r) Computer Program is subject to Copyright
|
|
|
35 |
owned by the United Kingdom Secretary of State for Defence
|
|
|
36 |
acting through the Defence Evaluation and Research Agency
|
|
|
37 |
(DERA). It is made available to Recipients with a
|
|
|
38 |
royalty-free licence for its use, reproduction, transfer
|
|
|
39 |
to other parties and amendment for any purpose not excluding
|
|
|
40 |
product development provided that any such use et cetera
|
|
|
41 |
shall be deemed to be acceptance of the following conditions:-
|
6 |
7u83 |
42 |
|
2 |
7u83 |
43 |
(1) Its Recipients shall ensure that this Notice is
|
|
|
44 |
reproduced upon any copies or amended versions of it;
|
6 |
7u83 |
45 |
|
2 |
7u83 |
46 |
(2) Any amended version of it shall be clearly marked to
|
|
|
47 |
show both the nature of and the organisation responsible
|
|
|
48 |
for the relevant amendment or amendments;
|
6 |
7u83 |
49 |
|
2 |
7u83 |
50 |
(3) Its onward transfer from a recipient to another
|
|
|
51 |
party shall be deemed to be that party's acceptance of
|
|
|
52 |
these conditions;
|
6 |
7u83 |
53 |
|
2 |
7u83 |
54 |
(4) DERA gives no warranty or assurance as to its
|
|
|
55 |
quality or suitability for any purpose and DERA accepts
|
|
|
56 |
no liability whatsoever in relation to any use to which
|
|
|
57 |
it may be put.
|
|
|
58 |
*/
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
/*
|
|
|
62 |
LEXICAL TOKEN TABLES
|
|
|
63 |
|
|
|
64 |
This file gives the list of lexical tokens. It is included from several
|
|
|
65 |
points with the macro LEX_TOKEN defined so as to extract the desired
|
|
|
66 |
information. The arguments are as follows:
|
|
|
67 |
|
|
|
68 |
1. The token number, corresponding to the values given in syntax.h.
|
|
|
69 |
2. The associated token name, if any.
|
|
|
70 |
3. A value indicating the semantic class the token is likely to
|
|
|
71 |
start (see predict.c).
|
|
|
72 |
|
|
|
73 |
The list of tokens in the grammars, syntax.sid and psyntax.sid, need
|
|
|
74 |
to kept in step with this list.
|
|
|
75 |
*/
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
#ifdef LEX_TOKEN
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
/*
|
|
|
82 |
MISCELLANEOUS TOKENS
|
|
|
83 |
|
|
|
84 |
These tokens describe the identifiers, literals and other miscellaneous
|
|
|
85 |
lexical tokens. The target dependent conditionals are included in this
|
|
|
86 |
group because they have an associated value.
|
|
|
87 |
*/
|
|
|
88 |
|
6 |
7u83 |
89 |
LEX_TOKEN(lex_unknown, "<unknown>", TOK_NONE)
|
2 |
7u83 |
90 |
|
6 |
7u83 |
91 |
LEX_TOKEN(lex_identifier, "<id>", TOK_EXP)
|
|
|
92 |
LEX_TOKEN(lex_type_Hname, "<type>", TOK_TYPE)
|
|
|
93 |
LEX_TOKEN(lex_namespace_Hname, "<namespace>", TOK_NONE)
|
|
|
94 |
LEX_TOKEN(lex_statement_Hname, "<stmt>", TOK_STATEMENT)
|
|
|
95 |
LEX_TOKEN(lex_destructor_Hname, "<destructor>", TOK_EXP)
|
|
|
96 |
LEX_TOKEN(lex_template_Hid, "<id>", TOK_EXP)
|
|
|
97 |
LEX_TOKEN(lex_template_Htype, "<type>", TOK_TYPE)
|
2 |
7u83 |
98 |
|
6 |
7u83 |
99 |
LEX_TOKEN(lex_nested_Hname, "<name>::", TOK_NESTED_NAME)
|
|
|
100 |
LEX_TOKEN(lex_full_Hname, "::<name>::", TOK_FULL_NAME)
|
|
|
101 |
LEX_TOKEN(lex_nested_Hname_Hstar, "<class>::*", TOK_NONE)
|
|
|
102 |
LEX_TOKEN(lex_full_Hname_Hstar, "::<class>::*", TOK_NONE)
|
2 |
7u83 |
103 |
|
6 |
7u83 |
104 |
LEX_TOKEN(lex_char_Hlit, "<char>", TOK_EXP)
|
|
|
105 |
LEX_TOKEN(lex_wchar_Hlit, "<wchar>", TOK_EXP)
|
|
|
106 |
LEX_TOKEN(lex_string_Hlit, "<string>", TOK_EXP)
|
|
|
107 |
LEX_TOKEN(lex_wstring_Hlit, "<wstring>", TOK_EXP)
|
|
|
108 |
LEX_TOKEN(lex_integer_Hlit, "<int>", TOK_EXP)
|
2 |
7u83 |
109 |
|
6 |
7u83 |
110 |
LEX_TOKEN(lex_char_Hexp, "<char>", TOK_EXP)
|
|
|
111 |
LEX_TOKEN(lex_wchar_Hexp, "<wchar>", TOK_EXP)
|
|
|
112 |
LEX_TOKEN(lex_string_Hexp, "<string>", TOK_EXP)
|
|
|
113 |
LEX_TOKEN(lex_wstring_Hexp, "<wstring>", TOK_EXP)
|
|
|
114 |
LEX_TOKEN(lex_integer_Hexp, "<int>", TOK_EXP)
|
|
|
115 |
LEX_TOKEN(lex_floating_Hexp, "<float>", TOK_EXP)
|
2 |
7u83 |
116 |
|
6 |
7u83 |
117 |
LEX_TOKEN(lex_complex_Hexp, "<exp>", TOK_EXP)
|
|
|
118 |
LEX_TOKEN(lex_complex_Hstmt, "<stmt>", TOK_STATEMENT)
|
|
|
119 |
LEX_TOKEN(lex_complex_Htype, "<type>", TOK_TYPE)
|
2 |
7u83 |
120 |
|
6 |
7u83 |
121 |
LEX_TOKEN(lex_hash_Hif, "#if", TOK_STATEMENT)
|
|
|
122 |
LEX_TOKEN(lex_hash_Helif, "#elif", TOK_STATEMENT)
|
|
|
123 |
LEX_TOKEN(lex_hash_Helse, "#else", TOK_STATEMENT)
|
|
|
124 |
LEX_TOKEN(lex_hash_Hendif, "#endif", TOK_STATEMENT)
|
|
|
125 |
LEX_TOKEN(lex_hash_Hpragma, "#pragma", TOK_DECLARATION)
|
2 |
7u83 |
126 |
|
6 |
7u83 |
127 |
LEX_TOKEN(lex_newline, "<newline>", TOK_NONE)
|
|
|
128 |
LEX_TOKEN(lex_eof, "<eof>", TOK_NONE)
|
2 |
7u83 |
129 |
|
|
|
130 |
|
|
|
131 |
/*
|
|
|
132 |
C SYMBOL TOKENS
|
|
|
133 |
|
|
|
134 |
These tokens describe the C symbols and punctuation.
|
|
|
135 |
*/
|
|
|
136 |
|
6 |
7u83 |
137 |
LEX_TOKEN(lex_and_H1, "&", TOK_EXP)
|
|
|
138 |
LEX_TOKEN(lex_and_Heq_H1, "&=", TOK_NONE)
|
|
|
139 |
LEX_TOKEN(lex_arrow, "->", TOK_NONE)
|
|
|
140 |
LEX_TOKEN(lex_assign, "=", TOK_NONE)
|
|
|
141 |
LEX_TOKEN(lex_backslash, "\\", TOK_NONE)
|
|
|
142 |
LEX_TOKEN(lex_close_Hbrace_H1, "}", TOK_NONE)
|
|
|
143 |
LEX_TOKEN(lex_close_Hround, ")", TOK_NONE)
|
|
|
144 |
LEX_TOKEN(lex_close_Hsquare_H1, "]", TOK_NONE)
|
|
|
145 |
LEX_TOKEN(lex_colon, ":", TOK_NONE)
|
|
|
146 |
LEX_TOKEN(lex_comma, ",", TOK_NONE)
|
|
|
147 |
LEX_TOKEN(lex_compl_H1, "~", TOK_EXP)
|
|
|
148 |
LEX_TOKEN(lex_div, "/", TOK_NONE)
|
|
|
149 |
LEX_TOKEN(lex_div_Heq, "/=", TOK_NONE)
|
|
|
150 |
LEX_TOKEN(lex_dot, ".", TOK_NONE)
|
|
|
151 |
LEX_TOKEN(lex_ellipsis, "...", TOK_NONE)
|
|
|
152 |
LEX_TOKEN(lex_eq, "==", TOK_NONE)
|
|
|
153 |
LEX_TOKEN(lex_greater, ">", TOK_NONE)
|
|
|
154 |
LEX_TOKEN(lex_greater_Heq, ">=", TOK_NONE)
|
|
|
155 |
LEX_TOKEN(lex_hash_H1, "#", TOK_NONE)
|
|
|
156 |
LEX_TOKEN(lex_hash_Hhash_H1, "##", TOK_NONE)
|
|
|
157 |
LEX_TOKEN(lex_less, "<", TOK_NONE)
|
|
|
158 |
LEX_TOKEN(lex_less_Heq, "<=", TOK_NONE)
|
|
|
159 |
LEX_TOKEN(lex_logical_Hand_H1, "&&", TOK_NONE)
|
|
|
160 |
LEX_TOKEN(lex_logical_Hor_H1, "||", TOK_NONE)
|
|
|
161 |
LEX_TOKEN(lex_lshift, "<<", TOK_NONE)
|
|
|
162 |
LEX_TOKEN(lex_lshift_Heq, "<<=", TOK_NONE)
|
|
|
163 |
LEX_TOKEN(lex_minus, "-", TOK_EXP)
|
|
|
164 |
LEX_TOKEN(lex_minus_Heq, "-=", TOK_NONE)
|
|
|
165 |
LEX_TOKEN(lex_minus_Hminus, "--", TOK_EXP)
|
|
|
166 |
LEX_TOKEN(lex_not_H1, "!", TOK_EXP)
|
|
|
167 |
LEX_TOKEN(lex_not_Heq_H1, "!=", TOK_NONE)
|
|
|
168 |
LEX_TOKEN(lex_open_Hbrace_H1, "{", TOK_NONE)
|
|
|
169 |
LEX_TOKEN(lex_open_Hround, "(", TOK_NONE)
|
|
|
170 |
LEX_TOKEN(lex_open_Hsquare_H1, "[", TOK_NONE)
|
|
|
171 |
LEX_TOKEN(lex_or_H1, "|", TOK_NONE)
|
|
|
172 |
LEX_TOKEN(lex_or_Heq_H1, "|=", TOK_NONE)
|
|
|
173 |
LEX_TOKEN(lex_plus, "+", TOK_EXP)
|
|
|
174 |
LEX_TOKEN(lex_plus_Heq, "+=", TOK_NONE)
|
|
|
175 |
LEX_TOKEN(lex_plus_Hplus, "++", TOK_EXP)
|
|
|
176 |
LEX_TOKEN(lex_question, "?", TOK_NONE)
|
|
|
177 |
LEX_TOKEN(lex_rem, "%", TOK_NONE)
|
|
|
178 |
LEX_TOKEN(lex_rem_Heq, "%=", TOK_NONE)
|
|
|
179 |
LEX_TOKEN(lex_rshift, ">>", TOK_NONE)
|
|
|
180 |
LEX_TOKEN(lex_rshift_Heq, ">>=", TOK_NONE)
|
|
|
181 |
LEX_TOKEN(lex_semicolon, ";", TOK_NONE)
|
|
|
182 |
LEX_TOKEN(lex_star, "*", TOK_EXP)
|
|
|
183 |
LEX_TOKEN(lex_star_Heq, "*=", TOK_NONE)
|
|
|
184 |
LEX_TOKEN(lex_xor_H1, "^", TOK_NONE)
|
|
|
185 |
LEX_TOKEN(lex_xor_Heq_H1, "^=", TOK_NONE)
|
2 |
7u83 |
186 |
|
|
|
187 |
|
|
|
188 |
/*
|
|
|
189 |
ADDITIONAL C++ SYMBOL TOKENS
|
|
|
190 |
|
|
|
191 |
These tokens describe the additional C++ symbols.
|
|
|
192 |
*/
|
|
|
193 |
|
6 |
7u83 |
194 |
LEX_TOKEN(lex_arrow_Hstar, "->*", TOK_NONE)
|
|
|
195 |
LEX_TOKEN(lex_colon_Hcolon, "::", TOK_FULL_NAME)
|
|
|
196 |
LEX_TOKEN(lex_dot_Hstar, ".*", TOK_NONE)
|
2 |
7u83 |
197 |
|
|
|
198 |
|
|
|
199 |
/*
|
|
|
200 |
ADDITIONAL SYMBOL TOKENS
|
|
|
201 |
|
|
|
202 |
These tokens describe the additional extension symbols.
|
|
|
203 |
*/
|
|
|
204 |
|
6 |
7u83 |
205 |
LEX_TOKEN(lex_abs, "+?", TOK_EXP)
|
|
|
206 |
LEX_TOKEN(lex_max, ">?", TOK_NONE)
|
|
|
207 |
LEX_TOKEN(lex_min, "<?", TOK_NONE)
|
2 |
7u83 |
208 |
|
|
|
209 |
|
|
|
210 |
/*
|
|
|
211 |
DIGRAPH TOKENS
|
|
|
212 |
|
|
|
213 |
These tokens describe the digraphs.
|
|
|
214 |
*/
|
|
|
215 |
|
6 |
7u83 |
216 |
LEX_TOKEN(lex_close_Hbrace_H2, "%>", TOK_NONE)
|
|
|
217 |
LEX_TOKEN(lex_close_Hsquare_H2, ":>", TOK_NONE)
|
|
|
218 |
LEX_TOKEN(lex_hash_H2, "%:", TOK_NONE)
|
|
|
219 |
LEX_TOKEN(lex_hash_Hhash_H2, "%:%:", TOK_NONE)
|
|
|
220 |
LEX_TOKEN(lex_open_Hbrace_H2, "<%", TOK_NONE)
|
|
|
221 |
LEX_TOKEN(lex_open_Hsquare_H2, "<:", TOK_NONE)
|
2 |
7u83 |
222 |
|
|
|
223 |
|
|
|
224 |
/*
|
|
|
225 |
C KEYWORD TOKENS
|
|
|
226 |
|
|
|
227 |
These tokens describe the C keywords.
|
|
|
228 |
*/
|
|
|
229 |
|
6 |
7u83 |
230 |
LEX_TOKEN(lex_auto, "auto", TOK_DECL_SPEC)
|
|
|
231 |
LEX_TOKEN(lex_break, "break", TOK_STATEMENT)
|
|
|
232 |
LEX_TOKEN(lex_case, "case", TOK_STATEMENT)
|
|
|
233 |
LEX_TOKEN(lex_char, "char", TOK_SIMPLE_TYPE)
|
|
|
234 |
LEX_TOKEN(lex_const, "const", TOK_TYPE_SPEC)
|
|
|
235 |
LEX_TOKEN(lex_continue, "continue", TOK_STATEMENT)
|
|
|
236 |
LEX_TOKEN(lex_default, "default", TOK_STATEMENT)
|
|
|
237 |
LEX_TOKEN(lex_do, "do", TOK_STATEMENT)
|
|
|
238 |
LEX_TOKEN(lex_double, "double", TOK_SIMPLE_TYPE)
|
|
|
239 |
LEX_TOKEN(lex_else, "else", TOK_STATEMENT)
|
|
|
240 |
LEX_TOKEN(lex_enum, "enum", TOK_TYPE_KEY)
|
|
|
241 |
LEX_TOKEN(lex_extern, "extern", TOK_EXTERN)
|
|
|
242 |
LEX_TOKEN(lex_float, "float", TOK_SIMPLE_TYPE)
|
|
|
243 |
LEX_TOKEN(lex_for, "for", TOK_STATEMENT)
|
|
|
244 |
LEX_TOKEN(lex_goto, "goto", TOK_STATEMENT)
|
|
|
245 |
LEX_TOKEN(lex_if, "if", TOK_STATEMENT)
|
|
|
246 |
LEX_TOKEN(lex_int, "int", TOK_SIMPLE_TYPE)
|
|
|
247 |
LEX_TOKEN(lex_long, "long", TOK_SIMPLE_TYPE)
|
|
|
248 |
LEX_TOKEN(lex_register, "register", TOK_DECL_SPEC)
|
|
|
249 |
LEX_TOKEN(lex_return, "return", TOK_STATEMENT)
|
|
|
250 |
LEX_TOKEN(lex_short, "short", TOK_SIMPLE_TYPE)
|
|
|
251 |
LEX_TOKEN(lex_signed, "signed", TOK_SIMPLE_TYPE)
|
|
|
252 |
LEX_TOKEN(lex_sizeof, "sizeof", TOK_EXP)
|
|
|
253 |
LEX_TOKEN(lex_static, "static", TOK_DECL_SPEC)
|
|
|
254 |
LEX_TOKEN(lex_struct, "struct", TOK_TYPE_KEY)
|
|
|
255 |
LEX_TOKEN(lex_switch, "switch", TOK_STATEMENT)
|
|
|
256 |
LEX_TOKEN(lex_typedef, "typedef", TOK_DECL_SPEC)
|
|
|
257 |
LEX_TOKEN(lex_union, "union", TOK_TYPE_KEY)
|
|
|
258 |
LEX_TOKEN(lex_unsigned, "unsigned", TOK_SIMPLE_TYPE)
|
|
|
259 |
LEX_TOKEN(lex_void, "void", TOK_SIMPLE_TYPE)
|
|
|
260 |
LEX_TOKEN(lex_volatile, "volatile", TOK_TYPE_SPEC)
|
|
|
261 |
LEX_TOKEN(lex_while, "while", TOK_STATEMENT)
|
2 |
7u83 |
262 |
|
|
|
263 |
|
|
|
264 |
/*
|
|
|
265 |
ADDITIONAL C++ KEYWORD TOKENS
|
|
|
266 |
|
|
|
267 |
These tokens describe the additional C++ keywords.
|
|
|
268 |
*/
|
|
|
269 |
|
6 |
7u83 |
270 |
LEX_TOKEN(lex_asm, "asm", TOK_ASM)
|
|
|
271 |
LEX_TOKEN(lex_bool, "bool", TOK_SIMPLE_TYPE)
|
|
|
272 |
LEX_TOKEN(lex_catch, "catch", TOK_STATEMENT)
|
|
|
273 |
LEX_TOKEN(lex_class, "class", TOK_TYPE_KEY)
|
|
|
274 |
LEX_TOKEN(lex_const_Hcast, "const_cast", TOK_EXP)
|
|
|
275 |
LEX_TOKEN(lex_delete, "delete", TOK_EXP)
|
|
|
276 |
LEX_TOKEN(lex_dynamic_Hcast, "dynamic_cast", TOK_EXP)
|
|
|
277 |
LEX_TOKEN(lex_explicit, "explicit", TOK_DECL_SPEC)
|
|
|
278 |
LEX_TOKEN(lex_export, "export", TOK_DECLARATION)
|
|
|
279 |
LEX_TOKEN(lex_false, "false", TOK_EXP)
|
|
|
280 |
LEX_TOKEN(lex_friend, "friend", TOK_DECL_SPEC)
|
|
|
281 |
LEX_TOKEN(lex_inline, "inline", TOK_DECL_SPEC)
|
|
|
282 |
LEX_TOKEN(lex_mutable, "mutable", TOK_DECL_SPEC)
|
|
|
283 |
LEX_TOKEN(lex_namespace, "namespace", TOK_DECLARATION)
|
|
|
284 |
LEX_TOKEN(lex_new, "new", TOK_EXP)
|
|
|
285 |
LEX_TOKEN(lex_operator, "operator", TOK_EXP)
|
|
|
286 |
LEX_TOKEN(lex_private, "private", TOK_NONE)
|
|
|
287 |
LEX_TOKEN(lex_protected, "protected", TOK_NONE)
|
|
|
288 |
LEX_TOKEN(lex_public, "public", TOK_NONE)
|
|
|
289 |
LEX_TOKEN(lex_reinterpret_Hcast, "reinterpret_cast", TOK_EXP)
|
|
|
290 |
LEX_TOKEN(lex_static_Hcast, "static_cast", TOK_EXP)
|
|
|
291 |
LEX_TOKEN(lex_template, "template", TOK_DECLARATION)
|
|
|
292 |
LEX_TOKEN(lex_this, "this", TOK_EXP)
|
|
|
293 |
LEX_TOKEN(lex_throw, "throw", TOK_NONE)
|
|
|
294 |
LEX_TOKEN(lex_true, "true", TOK_EXP)
|
|
|
295 |
LEX_TOKEN(lex_try, "try", TOK_STATEMENT)
|
|
|
296 |
LEX_TOKEN(lex_typeid, "typeid", TOK_EXP)
|
|
|
297 |
LEX_TOKEN(lex_typename, "typename", TOK_TYPE_KEY)
|
|
|
298 |
LEX_TOKEN(lex_using, "using", TOK_DECLARATION)
|
|
|
299 |
LEX_TOKEN(lex_virtual, "virtual", TOK_DECL_SPEC)
|
|
|
300 |
LEX_TOKEN(lex_wchar_Ht, "wchar_t", TOK_SIMPLE_TYPE)
|
2 |
7u83 |
301 |
|
|
|
302 |
|
|
|
303 |
/*
|
|
|
304 |
ISO KEYWORD TOKENS
|
|
|
305 |
|
|
|
306 |
These tokens describe the ISO keywords which give alternative
|
|
|
307 |
representations of various symbols.
|
|
|
308 |
*/
|
|
|
309 |
|
6 |
7u83 |
310 |
LEX_TOKEN(lex_and_H2, "bitand", TOK_EXP)
|
|
|
311 |
LEX_TOKEN(lex_and_Heq_H2, "and_eq", TOK_NONE)
|
|
|
312 |
LEX_TOKEN(lex_compl_H2, "compl", TOK_EXP)
|
|
|
313 |
LEX_TOKEN(lex_logical_Hand_H2, "and", TOK_NONE)
|
|
|
314 |
LEX_TOKEN(lex_logical_Hor_H2, "or", TOK_NONE)
|
|
|
315 |
LEX_TOKEN(lex_not_H2, "not", TOK_EXP)
|
|
|
316 |
LEX_TOKEN(lex_not_Heq_H2, "not_eq", TOK_NONE)
|
|
|
317 |
LEX_TOKEN(lex_or_H2, "bitor", TOK_NONE)
|
|
|
318 |
LEX_TOKEN(lex_or_Heq_H2, "or_eq", TOK_NONE)
|
|
|
319 |
LEX_TOKEN(lex_xor_H2, "xor", TOK_NONE)
|
|
|
320 |
LEX_TOKEN(lex_xor_Heq_H2, "xor_eq", TOK_NONE)
|
2 |
7u83 |
321 |
|
|
|
322 |
|
|
|
323 |
/*
|
|
|
324 |
NON-STANDARD KEYWORD TOKENS
|
|
|
325 |
|
|
|
326 |
These keywords represent the non-standard keywords.
|
|
|
327 |
*/
|
|
|
328 |
|
6 |
7u83 |
329 |
LEX_TOKEN(lex_accept, "accept", TOK_NONE)
|
|
|
330 |
LEX_TOKEN(lex_after, "after", TOK_NONE)
|
|
|
331 |
LEX_TOKEN(lex_alignof, "alignof", TOK_EXP)
|
|
|
332 |
LEX_TOKEN(lex_all, "all", TOK_NONE)
|
|
|
333 |
LEX_TOKEN(lex_allow, "allow", TOK_NONE)
|
|
|
334 |
LEX_TOKEN(lex_ambiguous, "ambiguous", TOK_NONE)
|
|
|
335 |
LEX_TOKEN(lex_analysis, "analysis", TOK_NONE)
|
|
|
336 |
LEX_TOKEN(lex_argument, "argument", TOK_NONE)
|
|
|
337 |
LEX_TOKEN(lex_arith_Hcap, "ARITHMETIC", TOK_NONE)
|
|
|
338 |
LEX_TOKEN(lex_array, "array", TOK_NONE)
|
|
|
339 |
LEX_TOKEN(lex_as, "as", TOK_NONE)
|
|
|
340 |
LEX_TOKEN(lex_assert, "assert", TOK_NONE)
|
|
|
341 |
LEX_TOKEN(lex_assignment, "assignment", TOK_NONE)
|
|
|
342 |
LEX_TOKEN(lex_begin, "begin", TOK_NONE)
|
|
|
343 |
LEX_TOKEN(lex_bitfield, "bitfield", TOK_NONE)
|
|
|
344 |
LEX_TOKEN(lex_block, "block", TOK_NONE)
|
|
|
345 |
LEX_TOKEN(lex_bottom, "bottom", TOK_SIMPLE_TYPE)
|
|
|
346 |
LEX_TOKEN(lex_cast, "cast", TOK_NONE)
|
|
|
347 |
LEX_TOKEN(lex_character, "character", TOK_NONE)
|
|
|
348 |
LEX_TOKEN(lex_class_Hcap, "CLASS", TOK_NONE)
|
|
|
349 |
LEX_TOKEN(lex_code, "code", TOK_NONE)
|
|
|
350 |
LEX_TOKEN(lex_comment, "comment", TOK_NONE)
|
|
|
351 |
LEX_TOKEN(lex_compatible, "compatible", TOK_NONE)
|
|
|
352 |
LEX_TOKEN(lex_complete, "complete", TOK_NONE)
|
|
|
353 |
LEX_TOKEN(lex_compute, "compute", TOK_NONE)
|
|
|
354 |
LEX_TOKEN(lex_conditional, "conditional", TOK_NONE)
|
|
|
355 |
LEX_TOKEN(lex_conversion, "conversion", TOK_NONE)
|
|
|
356 |
LEX_TOKEN(lex_decimal, "decimal", TOK_NONE)
|
|
|
357 |
LEX_TOKEN(lex_decl, "declaration", TOK_NONE)
|
|
|
358 |
LEX_TOKEN(lex_define, "define", TOK_NONE)
|
|
|
359 |
LEX_TOKEN(lex_define_Hcap, "DEFINE", TOK_NONE)
|
|
|
360 |
LEX_TOKEN(lex_defined, "defined", TOK_EXP)
|
|
|
361 |
LEX_TOKEN(lex_definition, "definition", TOK_NONE)
|
|
|
362 |
LEX_TOKEN(lex_depth, "depth", TOK_NONE)
|
|
|
363 |
LEX_TOKEN(lex_directive, "directive", TOK_NONE)
|
|
|
364 |
LEX_TOKEN(lex_directory, "directory", TOK_NONE)
|
|
|
365 |
LEX_TOKEN(lex_disallow, "disallow", TOK_NONE)
|
|
|
366 |
LEX_TOKEN(lex_discard, "discard", TOK_EXP)
|
|
|
367 |
LEX_TOKEN(lex_dollar, "dollar", TOK_NONE)
|
|
|
368 |
LEX_TOKEN(lex_either, "either", TOK_NONE)
|
|
|
369 |
LEX_TOKEN(lex_elif, "elif", TOK_EXP)
|
|
|
370 |
LEX_TOKEN(lex_ellipsis_Hexp, "...", TOK_NONE)
|
|
|
371 |
LEX_TOKEN(lex_end, "end", TOK_NONE)
|
|
|
372 |
LEX_TOKEN(lex_endif, "endif", TOK_EXP)
|
|
|
373 |
LEX_TOKEN(lex_environment, "environment", TOK_NONE)
|
|
|
374 |
LEX_TOKEN(lex_equality, "equality", TOK_NONE)
|
|
|
375 |
LEX_TOKEN(lex_error, "error", TOK_NONE)
|
|
|
376 |
LEX_TOKEN(lex_escape, "escape", TOK_NONE)
|
|
|
377 |
LEX_TOKEN(lex_exhaustive, "exhaustive", TOK_NONE)
|
|
|
378 |
LEX_TOKEN(lex_exp_Hcap, "EXP", TOK_NONE)
|
|
|
379 |
LEX_TOKEN(lex_explain, "explain", TOK_DECLARATION)
|
|
|
380 |
LEX_TOKEN(lex_extend, "extend", TOK_NONE)
|
|
|
381 |
LEX_TOKEN(lex_external, "external", TOK_NONE)
|
|
|
382 |
LEX_TOKEN(lex_extra, "extra", TOK_NONE)
|
|
|
383 |
LEX_TOKEN(lex_fall, "fall", TOK_NONE)
|
|
|
384 |
LEX_TOKEN(lex_file, "file", TOK_NONE)
|
|
|
385 |
LEX_TOKEN(lex_float_Hcap, "FLOAT", TOK_NONE)
|
|
|
386 |
LEX_TOKEN(lex_forward, "forward", TOK_NONE)
|
|
|
387 |
LEX_TOKEN(lex_func_Hcap, "FUNC", TOK_NONE)
|
|
|
388 |
LEX_TOKEN(lex_function, "function", TOK_NONE)
|
|
|
389 |
LEX_TOKEN(lex_hexadecimal, "hexadecimal", TOK_NONE)
|
|
|
390 |
LEX_TOKEN(lex_hiding, "hiding", TOK_NONE)
|
|
|
391 |
LEX_TOKEN(lex_ident, "ident", TOK_NONE)
|
|
|
392 |
LEX_TOKEN(lex_identif, "identifier", TOK_NONE)
|
|
|
393 |
LEX_TOKEN(lex_ifdef, "ifdef", TOK_EXP)
|
|
|
394 |
LEX_TOKEN(lex_ifndef, "ifndef", TOK_EXP)
|
|
|
395 |
LEX_TOKEN(lex_ignore, "ignore", TOK_NONE)
|
|
|
396 |
LEX_TOKEN(lex_implement, "implement", TOK_NONE)
|
|
|
397 |
LEX_TOKEN(lex_implicit, "implicit", TOK_NONE)
|
|
|
398 |
LEX_TOKEN(lex_import, "import", TOK_NONE)
|
|
|
399 |
LEX_TOKEN(lex_include, "include", TOK_NONE)
|
|
|
400 |
LEX_TOKEN(lex_includes, "includes", TOK_NONE)
|
|
|
401 |
LEX_TOKEN(lex_include_Hnext, "include_next", TOK_NONE)
|
|
|
402 |
LEX_TOKEN(lex_incompatible, "incompatible", TOK_NONE)
|
|
|
403 |
LEX_TOKEN(lex_incomplete, "incomplete", TOK_NONE)
|
|
|
404 |
LEX_TOKEN(lex_indented, "indented", TOK_NONE)
|
|
|
405 |
LEX_TOKEN(lex_initialization, "initialization", TOK_NONE)
|
|
|
406 |
LEX_TOKEN(lex_integer, "integer", TOK_NONE)
|
|
|
407 |
LEX_TOKEN(lex_interface, "interface", TOK_NONE)
|
|
|
408 |
LEX_TOKEN(lex_internal, "internal", TOK_NONE)
|
|
|
409 |
LEX_TOKEN(lex_into, "into", TOK_NONE)
|
|
|
410 |
LEX_TOKEN(lex_int_Hcap, "INTEGER", TOK_NONE)
|
|
|
411 |
LEX_TOKEN(lex_keyword, "keyword", TOK_NONE)
|
|
|
412 |
LEX_TOKEN(lex_limit, "limit", TOK_NONE)
|
|
|
413 |
LEX_TOKEN(lex_line, "line", TOK_NONE)
|
|
|
414 |
LEX_TOKEN(lex_linkage, "linkage", TOK_NONE)
|
|
|
415 |
LEX_TOKEN(lex_lit, "literal", TOK_NONE)
|
|
|
416 |
LEX_TOKEN(lex_longlong, "longlong", TOK_NONE)
|
|
|
417 |
LEX_TOKEN(lex_lvalue, "lvalue", TOK_NONE)
|
|
|
418 |
LEX_TOKEN(lex_macro, "macro", TOK_NONE)
|
|
|
419 |
LEX_TOKEN(lex_main, "main", TOK_NONE)
|
|
|
420 |
LEX_TOKEN(lex_member, "member", TOK_NONE)
|
|
|
421 |
LEX_TOKEN(lex_member_Hcap, "MEMBER", TOK_NONE)
|
|
|
422 |
LEX_TOKEN(lex_name, "name", TOK_NONE)
|
|
|
423 |
LEX_TOKEN(lex_nat_Hcap, "NAT", TOK_NONE)
|
|
|
424 |
LEX_TOKEN(lex_nested, "nested", TOK_NONE)
|
|
|
425 |
LEX_TOKEN(lex_nline, "nline", TOK_NONE)
|
|
|
426 |
LEX_TOKEN(lex_no, "no", TOK_NONE)
|
|
|
427 |
LEX_TOKEN(lex_no_Hdef, "no_def", TOK_NONE)
|
|
|
428 |
LEX_TOKEN(lex_object, "object", TOK_NONE)
|
|
|
429 |
LEX_TOKEN(lex_octal, "octal", TOK_NONE)
|
|
|
430 |
LEX_TOKEN(lex_of, "of", TOK_NONE)
|
|
|
431 |
LEX_TOKEN(lex_off, "off", TOK_NONE)
|
|
|
432 |
LEX_TOKEN(lex_on, "on", TOK_NONE)
|
|
|
433 |
LEX_TOKEN(lex_option, "option", TOK_NONE)
|
|
|
434 |
LEX_TOKEN(lex_overflow, "overflow", TOK_NONE)
|
|
|
435 |
LEX_TOKEN(lex_overload, "overload", TOK_DECL_SPEC)
|
|
|
436 |
LEX_TOKEN(lex_pointer, "pointer", TOK_NONE)
|
|
|
437 |
LEX_TOKEN(lex_postpone, "postpone", TOK_NONE)
|
|
|
438 |
LEX_TOKEN(lex_pragma, "pragma", TOK_NONE)
|
|
|
439 |
LEX_TOKEN(lex_precedence, "precedence", TOK_NONE)
|
|
|
440 |
LEX_TOKEN(lex_preserve, "preserve", TOK_NONE)
|
|
|
441 |
LEX_TOKEN(lex_printf, "printf", TOK_NONE)
|
|
|
442 |
LEX_TOKEN(lex_proc_Hcap, "PROC", TOK_NONE)
|
|
|
443 |
LEX_TOKEN(lex_promote, "promote", TOK_NONE)
|
|
|
444 |
LEX_TOKEN(lex_promoted, "promoted", TOK_NONE)
|
|
|
445 |
LEX_TOKEN(lex_prototype, "prototype", TOK_NONE)
|
|
|
446 |
LEX_TOKEN(lex_ptrdiff_Ht, "ptrdiff_t", TOK_SIMPLE_TYPE)
|
|
|
447 |
LEX_TOKEN(lex_qualifier, "qualifier", TOK_NONE)
|
|
|
448 |
LEX_TOKEN(lex_quote, "quote", TOK_NONE)
|
|
|
449 |
LEX_TOKEN(lex_reachable, "reachable", TOK_STATEMENT)
|
|
|
450 |
LEX_TOKEN(lex_reference, "reference", TOK_NONE)
|
|
|
451 |
LEX_TOKEN(lex_reject, "reject", TOK_NONE)
|
|
|
452 |
LEX_TOKEN(lex_representation, "representation", TOK_NONE)
|
|
|
453 |
LEX_TOKEN(lex_reset, "reset", TOK_NONE)
|
|
|
454 |
LEX_TOKEN(lex_resolution, "resolution", TOK_NONE)
|
|
|
455 |
LEX_TOKEN(lex_rvalue, "rvalue", TOK_NONE)
|
|
|
456 |
LEX_TOKEN(lex_scalar_Hcap, "SCALAR", TOK_NONE)
|
|
|
457 |
LEX_TOKEN(lex_scanf, "scanf", TOK_NONE)
|
|
|
458 |
LEX_TOKEN(lex_set, "set", TOK_EXP)
|
|
|
459 |
LEX_TOKEN(lex_size_Ht, "size_t", TOK_SIMPLE_TYPE)
|
|
|
460 |
LEX_TOKEN(lex_size_Ht_H2, "__size_t", TOK_SIMPLE_TYPE)
|
|
|
461 |
LEX_TOKEN(lex_sort, "sort", TOK_NONE)
|
|
|
462 |
LEX_TOKEN(lex_std, "std", TOK_NONE)
|
|
|
463 |
LEX_TOKEN(lex_stmt_Hcap, "STATEMENT", TOK_NONE)
|
|
|
464 |
LEX_TOKEN(lex_string, "string", TOK_NONE)
|
|
|
465 |
LEX_TOKEN(lex_struct_Hcap, "STRUCT", TOK_NONE)
|
|
|
466 |
LEX_TOKEN(lex_suspend, "suspend", TOK_NONE)
|
|
|
467 |
LEX_TOKEN(lex_tag, "tag", TOK_NONE)
|
|
|
468 |
LEX_TOKEN(lex_tag_Hcap, "TAG", TOK_NONE)
|
|
|
469 |
LEX_TOKEN(lex_tendra, "TenDRA", TOK_NONE)
|
|
|
470 |
LEX_TOKEN(lex_text, "text", TOK_NONE)
|
|
|
471 |
LEX_TOKEN(lex_this_Hname, "<this>", TOK_EXP)
|
|
|
472 |
LEX_TOKEN(lex_token, "token", TOK_NONE)
|
|
|
473 |
LEX_TOKEN(lex_type, "type", TOK_NONE)
|
|
|
474 |
LEX_TOKEN(lex_type_Hcap, "TYPE", TOK_NONE)
|
|
|
475 |
LEX_TOKEN(lex_typeof, "typeof", TOK_NONE)
|
|
|
476 |
LEX_TOKEN(lex_un_Hknown, "unknown", TOK_NONE)
|
|
|
477 |
LEX_TOKEN(lex_unassert, "unassert", TOK_NONE)
|
|
|
478 |
LEX_TOKEN(lex_undef, "undef", TOK_NONE)
|
|
|
479 |
LEX_TOKEN(lex_unify, "unify", TOK_NONE)
|
|
|
480 |
LEX_TOKEN(lex_union_Hcap, "UNION", TOK_NONE)
|
|
|
481 |
LEX_TOKEN(lex_unmatched, "unmatched", TOK_NONE)
|
|
|
482 |
LEX_TOKEN(lex_unpostpone, "unpostpone", TOK_NONE)
|
|
|
483 |
LEX_TOKEN(lex_unreachable, "unreachable", TOK_STATEMENT)
|
|
|
484 |
LEX_TOKEN(lex_unused, "unused", TOK_EXP)
|
|
|
485 |
LEX_TOKEN(lex_use, "use", TOK_NONE)
|
|
|
486 |
LEX_TOKEN(lex_value, "value", TOK_NONE)
|
|
|
487 |
LEX_TOKEN(lex_variable, "variable", TOK_NONE)
|
|
|
488 |
LEX_TOKEN(lex_variety_Hcap, "VARIETY", TOK_NONE)
|
|
|
489 |
LEX_TOKEN(lex_volatile_Ht, "volatile_t", TOK_NONE)
|
|
|
490 |
LEX_TOKEN(lex_vtable, "vtable", TOK_EXP)
|
|
|
491 |
LEX_TOKEN(lex_warning, "warning", TOK_NONE)
|
|
|
492 |
LEX_TOKEN(lex_weak, "weak", TOK_NONE)
|
|
|
493 |
LEX_TOKEN(lex_writeable, "writeable", TOK_NONE)
|
|
|
494 |
LEX_TOKEN(lex_zzzz, "<dummy>", TOK_NONE)
|
2 |
7u83 |
495 |
|
|
|
496 |
|
|
|
497 |
/*
|
|
|
498 |
MISCELLANEOUS SYMBOLS
|
|
|
499 |
|
|
|
500 |
These tokens describe certain symbols which are used in various
|
|
|
501 |
circumstances.
|
|
|
502 |
*/
|
|
|
503 |
|
6 |
7u83 |
504 |
LEX_TOKEN(lex_array_Hop, "[]", TOK_NONE)
|
|
|
505 |
LEX_TOKEN(lex_builtin_Hfile, "#file", TOK_NONE)
|
|
|
506 |
LEX_TOKEN(lex_builtin_Hline, "#line", TOK_NONE)
|
|
|
507 |
LEX_TOKEN(lex_close_Htemplate, ">", TOK_NONE)
|
|
|
508 |
LEX_TOKEN(lex_cond_Hop, "?:", TOK_NONE)
|
|
|
509 |
LEX_TOKEN(lex_delete_Hfull, "::delete", TOK_NONE)
|
|
|
510 |
LEX_TOKEN(lex_delete_Harray, "delete[]", TOK_NONE)
|
|
|
511 |
LEX_TOKEN(lex_delete_Harray_Hfull, "::delete[]", TOK_NONE)
|
|
|
512 |
LEX_TOKEN(lex_func_Hop, "()", TOK_NONE)
|
|
|
513 |
LEX_TOKEN(lex_hash_Hop, "#", TOK_NONE)
|
|
|
514 |
LEX_TOKEN(lex_hash_Hhash_Hop, "##", TOK_NONE)
|
|
|
515 |
LEX_TOKEN(lex_inset_Hstart, "#pragma", TOK_NONE)
|
|
|
516 |
LEX_TOKEN(lex_inset_Hend, "<newline>", TOK_NONE)
|
|
|
517 |
LEX_TOKEN(lex_macro_Harg, "<argument>", TOK_NONE)
|
|
|
518 |
LEX_TOKEN(lex_new_Hfull, "::new", TOK_NONE)
|
|
|
519 |
LEX_TOKEN(lex_new_Harray, "new[]", TOK_NONE)
|
|
|
520 |
LEX_TOKEN(lex_new_Harray_Hfull, "::new[]", TOK_NONE)
|
|
|
521 |
LEX_TOKEN(lex_open_Hinit, "(", TOK_NONE)
|
|
|
522 |
LEX_TOKEN(lex_open_Htemplate, "<", TOK_NONE)
|
|
|
523 |
LEX_TOKEN(lex_zzzzzz, "<dummy>", TOK_NONE)
|
2 |
7u83 |
524 |
|
|
|
525 |
|
|
|
526 |
#endif /* LEX_TOKEN */
|
|
|
527 |
|
|
|
528 |
|
|
|
529 |
/*
|
|
|
530 |
TOKEN GROUPS
|
|
|
531 |
|
|
|
532 |
These macros give the bounds for the various groups of tokens.
|
|
|
533 |
*/
|
|
|
534 |
|
|
|
535 |
#ifndef FIRST_TOKEN
|
|
|
536 |
|
|
|
537 |
#define FIRST_TOKEN lex_unknown
|
|
|
538 |
#define LAST_TOKEN lex_zzzzzz
|
|
|
539 |
|
|
|
540 |
#define FIRST_SYMBOL lex_and_H1
|
|
|
541 |
#define LAST_SYMBOL lex_open_Hsquare_H2
|
|
|
542 |
|
|
|
543 |
#define FIRST_C_SYMBOL lex_and_H1
|
|
|
544 |
#define LAST_C_SYMBOL lex_xor_Heq_H1
|
|
|
545 |
|
|
|
546 |
#define FIRST_CPP_SYMBOL lex_arrow_Hstar
|
|
|
547 |
#define LAST_CPP_SYMBOL lex_dot_Hstar
|
|
|
548 |
|
|
|
549 |
#define FIRST_EXTRA_SYMBOL lex_abs
|
|
|
550 |
#define LAST_EXTRA_SYMBOL lex_min
|
|
|
551 |
|
|
|
552 |
#define FIRST_DIGRAPH lex_close_Hbrace_H2
|
|
|
553 |
#define LAST_DIGRAPH lex_open_Hsquare_H2
|
|
|
554 |
|
|
|
555 |
#define FIRST_C_KEYWORD lex_auto
|
|
|
556 |
#define LAST_C_KEYWORD lex_while
|
|
|
557 |
|
|
|
558 |
#define FIRST_CPP_KEYWORD lex_asm
|
|
|
559 |
#define LAST_CPP_KEYWORD lex_wchar_Ht
|
|
|
560 |
|
|
|
561 |
#define FIRST_ISO_KEYWORD lex_and_H2
|
|
|
562 |
#define LAST_ISO_KEYWORD lex_xor_Heq_H2
|
|
|
563 |
|
|
|
564 |
#define FIRST_PP_KEYWORD lex_hash_Hif
|
|
|
565 |
#define LAST_PP_KEYWORD lex_hash_Hpragma
|
|
|
566 |
|
|
|
567 |
#define FIRST_KEYWORD lex_auto
|
|
|
568 |
#define LAST_KEYWORD lex_zzzz
|
|
|
569 |
|
|
|
570 |
#define FIRST_COMPLEX_TOKEN lex_unknown
|
|
|
571 |
#define LAST_COMPLEX_TOKEN lex_hash_Hpragma
|
|
|
572 |
|
|
|
573 |
#endif /* FIRST_TOKEN */
|