Commit | Line | Data |
---|---|---|
866e5b51 FC |
1 | // $ANTLR !Unknown version! Grammar/CTFParser.g 2012-03-09 14:59:18 |
2 | ||
63bfc685 MK |
3 | package org.eclipse.linuxtools.ctf.parser; |
4 | ||
866e5b51 FC |
5 | import java.util.HashSet; |
6 | import java.util.Set; | |
7 | import java.util.Stack; | |
8 | ||
9 | import org.antlr.runtime.BaseRecognizer; | |
10 | import org.antlr.runtime.BitSet; | |
11 | import org.antlr.runtime.DFA; | |
12 | import org.antlr.runtime.EarlyExitException; | |
13 | import org.antlr.runtime.FailedPredicateException; | |
14 | import org.antlr.runtime.IntStream; | |
15 | import org.antlr.runtime.MismatchedSetException; | |
16 | import org.antlr.runtime.MismatchedTokenException; | |
17 | import org.antlr.runtime.NoViableAltException; | |
18 | import org.antlr.runtime.Parser; | |
19 | import org.antlr.runtime.ParserRuleReturnScope; | |
20 | import org.antlr.runtime.RecognitionException; | |
21 | import org.antlr.runtime.RecognizerSharedState; | |
22 | import org.antlr.runtime.Token; | |
23 | import org.antlr.runtime.TokenStream; | |
24 | import org.antlr.runtime.tree.CommonTree; | |
25 | import org.antlr.runtime.tree.CommonTreeAdaptor; | |
26 | import org.antlr.runtime.tree.RewriteEarlyExitException; | |
27 | import org.antlr.runtime.tree.RewriteRuleSubtreeStream; | |
28 | import org.antlr.runtime.tree.RewriteRuleTokenStream; | |
29 | import org.antlr.runtime.tree.TreeAdaptor; | |
30 | ||
63bfc685 | 31 | @SuppressWarnings({ "nls", "unused", "unchecked", "rawtypes", "null" }) |
866e5b51 | 32 | public class CTFParser extends Parser { |
63bfc685 MK |
33 | public static final String[] tokenNames = new String[] { "<invalid>", |
34 | "<EOR>", "<DOWN>", "<UP>", "ALIGNTOK", "CONSTTOK", "CHARTOK", | |
35 | "DOUBLETOK", "ENUMTOK", "EVENTTOK", "FLOATINGPOINTTOK", "FLOATTOK", | |
36 | "INTEGERTOK", "INTTOK", "LONGTOK", "SHORTTOK", "SIGNEDTOK", | |
37 | "STREAMTOK", "STRINGTOK", "STRUCTTOK", "TRACETOK", "TYPEALIASTOK", | |
38 | "TYPEDEFTOK", "UNSIGNEDTOK", "VARIANTTOK", "VOIDTOK", "BOOLTOK", | |
39 | "COMPLEXTOK", "IMAGINARYTOK", "ENVTOK", "CLOCKTOK", "NANNUMBERTOK", | |
40 | "INFINITYTOK", "NINFINITYTOK", "SEPARATOR", "COLON", "ELIPSES", | |
41 | "ASSIGNMENT", "TYPE_ASSIGNMENT", "LT", "GT", "OPENBRAC", | |
42 | "CLOSEBRAC", "LPAREN", "RPAREN", "LCURL", "RCURL", "TERM", | |
43 | "POINTER", "SIGN", "ARROW", "DOT", "BACKSLASH", | |
44 | "INTEGER_TYPES_SUFFIX", "OCTAL_LITERAL", "DIGIT", | |
45 | "DECIMAL_LITERAL", "HEX_PREFIX", "HEX_DIGIT", "HEX_LITERAL", | |
46 | "NONZERO_DIGIT", "OCTAL_ESCAPE", "UNICODE_ESCAPE", | |
47 | "HEXADECIMAL_ESCAPE", "ESCAPE_SEQUENCE", "STRINGPREFIX", | |
48 | "SINGLEQUOTE", "CHAR_CONTENT", "CHARACTER_LITERAL", "DOUBLEQUOTE", | |
49 | "STRING_CONTENT", "STRING_LITERAL", "WS", "COMMENT_OPEN", | |
50 | "COMMENT_CLOSE", "COMMENT", "LINE_COMMENT", "NONDIGIT", | |
51 | "IDENTIFIER", "ROOT", "EVENT", "STREAM", "TRACE", "ENV", "CLOCK", | |
52 | "DECLARATION", "SV_DECLARATION", "TYPE_SPECIFIER_LIST", | |
53 | "TYPE_DECLARATOR_LIST", "TYPE_DECLARATOR", "STRUCT", "STRUCT_NAME", | |
54 | "STRUCT_BODY", "ALIGN", "CTF_EXPRESSION_TYPE", | |
55 | "CTF_EXPRESSION_VAL", "CTF_LEFT", "CTF_RIGHT", | |
56 | "UNARY_EXPRESSION_STRING", "UNARY_EXPRESSION_STRING_QUOTES", | |
57 | "UNARY_EXPRESSION_DEC", "UNARY_EXPRESSION_HEX", | |
58 | "UNARY_EXPRESSION_OCT", "LENGTH", "TYPEDEF", "TYPEALIAS", | |
59 | "TYPEALIAS_TARGET", "TYPEALIAS_ALIAS", "INTEGER", "STRING", | |
60 | "FLOATING_POINT", "ENUM", "ENUM_CONTAINER_TYPE", "ENUM_ENUMERATOR", | |
61 | "ENUM_NAME", "ENUM_VALUE", "ENUM_VALUE_RANGE", "ENUM_BODY", | |
62 | "VARIANT", "VARIANT_NAME", "VARIANT_TAG", "VARIANT_BODY", | |
63 | "DECLARATOR" }; | |
64 | public static final int SIGN = 49; | |
65 | public static final int LT = 39; | |
66 | public static final int TYPEDEFTOK = 22; | |
67 | public static final int VARIANT_NAME = 119; | |
68 | public static final int ENV = 83; | |
69 | public static final int INTEGER_TYPES_SUFFIX = 53; | |
70 | public static final int POINTER = 48; | |
71 | public static final int TRACE = 82; | |
72 | public static final int HEX_PREFIX = 57; | |
73 | public static final int INTTOK = 13; | |
74 | public static final int SEPARATOR = 34; | |
75 | public static final int ENUMTOK = 8; | |
76 | public static final int COMPLEXTOK = 27; | |
77 | public static final int IMAGINARYTOK = 28; | |
78 | public static final int STREAMTOK = 17; | |
79 | public static final int EOF = -1; | |
80 | public static final int UNARY_EXPRESSION_OCT = 102; | |
81 | public static final int ENUM_VALUE = 115; | |
82 | public static final int UNSIGNEDTOK = 23; | |
83 | public static final int ENUM_NAME = 114; | |
84 | public static final int RPAREN = 44; | |
85 | public static final int CHAR_CONTENT = 67; | |
86 | public static final int STRING_LITERAL = 71; | |
87 | public static final int UNARY_EXPRESSION_STRING_QUOTES = 99; | |
88 | public static final int ALIGNTOK = 4; | |
89 | public static final int FLOATTOK = 11; | |
90 | public static final int STRUCT_BODY = 92; | |
91 | public static final int ENUM_BODY = 117; | |
92 | public static final int COMMENT_CLOSE = 74; | |
93 | public static final int STRINGTOK = 18; | |
94 | public static final int COMMENT = 75; | |
95 | public static final int STREAM = 81; | |
96 | public static final int UNARY_EXPRESSION_HEX = 101; | |
97 | public static final int UNARY_EXPRESSION_DEC = 100; | |
98 | public static final int FLOATINGPOINTTOK = 10; | |
99 | public static final int LINE_COMMENT = 76; | |
100 | public static final int CTF_EXPRESSION_TYPE = 94; | |
101 | public static final int DOUBLETOK = 7; | |
102 | public static final int TYPE_DECLARATOR = 89; | |
103 | public static final int CHARACTER_LITERAL = 68; | |
104 | public static final int OCTAL_ESCAPE = 61; | |
105 | public static final int STRUCT_NAME = 91; | |
106 | public static final int VARIANT = 118; | |
107 | public static final int NANNUMBERTOK = 31; | |
108 | public static final int ENUM_ENUMERATOR = 113; | |
109 | public static final int FLOATING_POINT = 110; | |
110 | public static final int DECLARATOR = 122; | |
111 | public static final int SIGNEDTOK = 16; | |
112 | public static final int CHARTOK = 6; | |
113 | public static final int WS = 72; | |
114 | public static final int INTEGERTOK = 12; | |
115 | public static final int VARIANT_BODY = 121; | |
116 | public static final int NONDIGIT = 77; | |
117 | public static final int GT = 40; | |
118 | public static final int TYPEALIAS_TARGET = 106; | |
119 | public static final int DECIMAL_LITERAL = 56; | |
120 | public static final int BACKSLASH = 52; | |
121 | public static final int CLOSEBRAC = 42; | |
122 | public static final int TERM = 47; | |
123 | public static final int BOOLTOK = 26; | |
124 | public static final int CTF_RIGHT = 97; | |
125 | public static final int TYPE_DECLARATOR_LIST = 88; | |
126 | public static final int STRING_CONTENT = 70; | |
127 | public static final int TYPE_ASSIGNMENT = 38; | |
128 | public static final int ENUM_CONTAINER_TYPE = 112; | |
129 | public static final int DOUBLEQUOTE = 69; | |
130 | public static final int ENUM_VALUE_RANGE = 116; | |
131 | public static final int DECLARATION = 85; | |
132 | public static final int LENGTH = 103; | |
133 | public static final int LPAREN = 43; | |
134 | public static final int INFINITYTOK = 32; | |
135 | public static final int STRINGPREFIX = 65; | |
136 | public static final int CTF_EXPRESSION_VAL = 95; | |
137 | public static final int ESCAPE_SEQUENCE = 64; | |
138 | public static final int UNICODE_ESCAPE = 62; | |
139 | public static final int SINGLEQUOTE = 66; | |
140 | public static final int IDENTIFIER = 78; | |
141 | public static final int HEX_LITERAL = 59; | |
142 | public static final int ALIGN = 93; | |
143 | public static final int DIGIT = 55; | |
144 | public static final int DOT = 51; | |
145 | public static final int ENVTOK = 29; | |
146 | public static final int STRUCTTOK = 19; | |
147 | public static final int OPENBRAC = 41; | |
148 | public static final int TYPEALIASTOK = 21; | |
149 | public static final int CLOCK = 84; | |
150 | public static final int INTEGER = 108; | |
151 | public static final int TYPEALIAS = 105; | |
152 | public static final int EVENTTOK = 9; | |
153 | public static final int NINFINITYTOK = 33; | |
154 | public static final int TYPEDEF = 104; | |
155 | public static final int VOIDTOK = 25; | |
156 | public static final int TYPE_SPECIFIER_LIST = 87; | |
157 | public static final int OCTAL_LITERAL = 54; | |
158 | public static final int COMMENT_OPEN = 73; | |
159 | public static final int HEX_DIGIT = 58; | |
160 | public static final int STRUCT = 90; | |
161 | public static final int EVENT = 80; | |
162 | public static final int LONGTOK = 14; | |
163 | public static final int ROOT = 79; | |
164 | public static final int CTF_LEFT = 96; | |
165 | public static final int CLOCKTOK = 30; | |
166 | public static final int TRACETOK = 20; | |
167 | public static final int COLON = 35; | |
168 | public static final int HEXADECIMAL_ESCAPE = 63; | |
169 | public static final int LCURL = 45; | |
170 | public static final int VARIANTTOK = 24; | |
171 | public static final int VARIANT_TAG = 120; | |
172 | public static final int ENUM = 111; | |
173 | public static final int ELIPSES = 36; | |
174 | public static final int RCURL = 46; | |
175 | public static final int TYPEALIAS_ALIAS = 107; | |
176 | public static final int UNARY_EXPRESSION_STRING = 98; | |
177 | public static final int ARROW = 50; | |
178 | public static final int ASSIGNMENT = 37; | |
179 | public static final int SHORTTOK = 15; | |
180 | public static final int SV_DECLARATION = 86; | |
181 | public static final int NONZERO_DIGIT = 60; | |
182 | public static final int CONSTTOK = 5; | |
183 | public static final int STRING = 109; | |
866e5b51 FC |
184 | |
185 | // delegates | |
186 | // delegators | |
187 | ||
188 | protected static class Symbols_scope { | |
189 | Set<String> types; | |
190 | } | |
63bfc685 | 191 | |
866e5b51 FC |
192 | protected Stack Symbols_stack = new Stack(); |
193 | ||
63bfc685 MK |
194 | public CTFParser(TokenStream input) { |
195 | this(input, new RecognizerSharedState()); | |
196 | } | |
197 | ||
198 | public CTFParser(TokenStream input, RecognizerSharedState state) { | |
199 | super(input, state); | |
200 | ||
201 | } | |
866e5b51 | 202 | |
866e5b51 FC |
203 | protected TreeAdaptor adaptor = new CommonTreeAdaptor(); |
204 | ||
205 | public void setTreeAdaptor(TreeAdaptor adaptor) { | |
206 | this.adaptor = adaptor; | |
207 | } | |
63bfc685 | 208 | |
866e5b51 FC |
209 | public TreeAdaptor getTreeAdaptor() { |
210 | return adaptor; | |
211 | } | |
212 | ||
213 | @Override | |
63bfc685 MK |
214 | public String[] getTokenNames() { |
215 | return CTFParser.tokenNames; | |
216 | } | |
866e5b51 | 217 | |
63bfc685 MK |
218 | @Override |
219 | public String getGrammarFileName() { | |
220 | return "Grammar/CTFParser.g"; | |
221 | } | |
866e5b51 | 222 | |
63bfc685 | 223 | public CTFParser(TokenStream input, boolean verbose) { |
866e5b51 FC |
224 | this(input); |
225 | this.verbose = verbose; | |
63bfc685 | 226 | } |
866e5b51 | 227 | |
63bfc685 MK |
228 | /* |
229 | * To disable automatic error recovery. When we have a mismatched token, | |
230 | * simply throw an exception. | |
231 | */ | |
232 | @Override | |
233 | protected Object recoverFromMismatchedToken(IntStream input, int ttype, | |
234 | BitSet follow) throws RecognitionException { | |
866e5b51 | 235 | throw new MismatchedTokenException(ttype, input); |
63bfc685 MK |
236 | } |
237 | ||
238 | /** | |
239 | * Checks if a given name has been defined has a type. From: | |
240 | * http://www.antlr.org/grammar/1153358328744/C.g | |
241 | * | |
242 | * @param name | |
243 | * The name to check. | |
244 | * @return True if is is a type, false otherwise. | |
245 | */ | |
246 | boolean isTypeName(String name) { | |
866e5b51 | 247 | for (int i = Symbols_stack.size() - 1; i >= 0; i--) { |
63bfc685 MK |
248 | Symbols_scope scope = (Symbols_scope) Symbols_stack.get(i); |
249 | if (scope.types.contains(name)) { | |
250 | return true; | |
251 | } | |
866e5b51 FC |
252 | } |
253 | return false; | |
63bfc685 MK |
254 | } |
255 | ||
256 | void addTypeName(String name) { | |
257 | ((Symbols_scope) Symbols_stack.peek()).types.add(name); | |
866e5b51 | 258 | if (verbose) { |
63bfc685 | 259 | debug_print("New type: " + name); |
866e5b51 | 260 | } |
63bfc685 MK |
261 | } |
262 | ||
263 | boolean _inTypedef = false; | |
264 | ||
265 | void typedefOn() { | |
866e5b51 FC |
266 | debug_print("typedefOn"); |
267 | _inTypedef = true; | |
63bfc685 MK |
268 | } |
269 | ||
270 | void typedefOff() { | |
271 | debug_print("typedefOff"); | |
866e5b51 | 272 | _inTypedef = false; |
63bfc685 MK |
273 | } |
274 | ||
275 | boolean inTypedef() { | |
866e5b51 | 276 | return _inTypedef; |
63bfc685 MK |
277 | } |
278 | ||
279 | boolean _inTypealiasAlias = false; | |
280 | ||
281 | void typealiasAliasOn() { | |
282 | debug_print("typealiasAliasOn"); | |
866e5b51 | 283 | _inTypealiasAlias = true; |
63bfc685 MK |
284 | } |
285 | ||
286 | void typealiasAliasOff() { | |
287 | debug_print("typealiasAliasOff"); | |
866e5b51 | 288 | _inTypealiasAlias = false; |
63bfc685 MK |
289 | } |
290 | ||
291 | boolean inTypealiasAlias() { | |
866e5b51 | 292 | return _inTypealiasAlias; |
63bfc685 MK |
293 | } |
294 | ||
295 | static void print_tabs(int n) { | |
866e5b51 | 296 | for (int i = 0; i < n; i++) { |
63bfc685 MK |
297 | if(System.out != null) {//findbugs |
298 | System.out.print(" "); | |
299 | } | |
866e5b51 | 300 | } |
63bfc685 MK |
301 | } |
302 | ||
303 | void enter(String name) { | |
866e5b51 | 304 | if (verbose) { |
63bfc685 MK |
305 | if (state.backtracking == 0) { |
306 | print_tabs(depth); | |
307 | debug_print("+ " + name); | |
308 | depth++; | |
309 | } | |
310 | } | |
311 | } | |
312 | ||
313 | void exit(String name) { | |
866e5b51 | 314 | if (verbose) { |
63bfc685 MK |
315 | depth--; |
316 | print_tabs(depth); | |
317 | debug_print("- " + name); | |
318 | } | |
319 | } | |
320 | ||
321 | void debug_print(String str) { | |
866e5b51 | 322 | if (verbose) { |
63bfc685 MK |
323 | if(System.out != null) {//findbugs |
324 | System.out.println(str); | |
325 | } | |
866e5b51 | 326 | } |
63bfc685 | 327 | } |
866e5b51 | 328 | |
63bfc685 MK |
329 | int depth = 0; |
330 | ||
331 | /* Prints rule entry and exit while parsing */ | |
332 | boolean verbose = false; | |
866e5b51 FC |
333 | |
334 | public static class parse_return extends ParserRuleReturnScope { | |
335 | CommonTree tree; | |
63bfc685 | 336 | |
866e5b51 | 337 | @Override |
63bfc685 MK |
338 | public Object getTree() { |
339 | return tree; | |
340 | } | |
341 | } | |
866e5b51 FC |
342 | |
343 | // $ANTLR start "parse" | |
63bfc685 MK |
344 | // Grammar/CTFParser.g:198:1: parse : ( declaration )+ EOF -> ^( ROOT ( |
345 | // declaration )+ ) ; | |
866e5b51 FC |
346 | public final CTFParser.parse_return parse() throws RecognitionException { |
347 | Symbols_stack.push(new Symbols_scope()); | |
348 | ||
349 | CTFParser.parse_return retval = new CTFParser.parse_return(); | |
350 | retval.start = input.LT(1); | |
351 | ||
352 | CommonTree root_0 = null; | |
353 | ||
63bfc685 | 354 | Token EOF2 = null; |
866e5b51 FC |
355 | CTFParser.declaration_return declaration1 = null; |
356 | ||
63bfc685 MK |
357 | CommonTree EOF2_tree = null; |
358 | RewriteRuleTokenStream stream_EOF = new RewriteRuleTokenStream(adaptor, | |
359 | "token EOF"); | |
360 | RewriteRuleSubtreeStream stream_declaration = new RewriteRuleSubtreeStream( | |
361 | adaptor, "rule declaration"); | |
866e5b51 | 362 | |
63bfc685 MK |
363 | enter("parse"); |
364 | debug_print("Scope push " + Symbols_stack.size()); | |
365 | ((Symbols_scope) Symbols_stack.peek()).types = new HashSet<String>(); | |
866e5b51 FC |
366 | |
367 | try { | |
63bfc685 MK |
368 | // Grammar/CTFParser.g:211:1: ( ( declaration )+ EOF -> ^( ROOT ( |
369 | // declaration )+ ) ) | |
866e5b51 FC |
370 | // Grammar/CTFParser.g:212:3: ( declaration )+ EOF |
371 | { | |
63bfc685 MK |
372 | // Grammar/CTFParser.g:212:3: ( declaration )+ |
373 | int cnt1 = 0; | |
374 | loop1: do { | |
375 | int alt1 = 2; | |
376 | int LA1_0 = input.LA(1); | |
377 | ||
378 | if ((((LA1_0 >= CONSTTOK) && (LA1_0 <= ENUMTOK)) | |
379 | || ((LA1_0 >= FLOATINGPOINTTOK) && (LA1_0 <= SIGNEDTOK)) | |
380 | || ((LA1_0 >= STRINGTOK) && (LA1_0 <= STRUCTTOK)) || ((LA1_0 >= TYPEDEFTOK) && (LA1_0 <= IMAGINARYTOK)))) { | |
381 | alt1 = 1; | |
382 | } else if ((LA1_0 == IDENTIFIER) | |
383 | && ((inTypealiasAlias() || isTypeName(input.LT(1) | |
384 | .getText())))) { | |
385 | alt1 = 1; | |
386 | } else if (((LA1_0 == EVENTTOK) || (LA1_0 == STREAMTOK) | |
387 | || ((LA1_0 >= TRACETOK) && (LA1_0 <= TYPEALIASTOK)) || ((LA1_0 >= ENVTOK) && (LA1_0 <= CLOCKTOK)))) { | |
388 | alt1 = 1; | |
389 | } | |
390 | ||
391 | switch (alt1) { | |
392 | case 1: | |
393 | // Grammar/CTFParser.g:212:3: declaration | |
394 | { | |
395 | pushFollow(FOLLOW_declaration_in_parse321); | |
396 | declaration1 = declaration(); | |
397 | ||
398 | state._fsp--; | |
399 | if (state.failed) { | |
400 | return retval; | |
401 | } | |
402 | if (state.backtracking == 0) { | |
403 | stream_declaration.add(declaration1.getTree()); | |
404 | } | |
866e5b51 | 405 | |
63bfc685 MK |
406 | } |
407 | break; | |
866e5b51 | 408 | |
63bfc685 MK |
409 | default: |
410 | if (cnt1 >= 1) { | |
411 | break loop1; | |
412 | } | |
413 | if (state.backtracking > 0) { | |
414 | state.failed = true; | |
415 | return retval; | |
416 | } | |
417 | EarlyExitException eee = new EarlyExitException(1, | |
418 | input); | |
866e5b51 | 419 | throw eee; |
63bfc685 MK |
420 | } |
421 | cnt1++; | |
422 | } while (true); | |
866e5b51 | 423 | |
63bfc685 MK |
424 | EOF2 = (Token) match(input, EOF, FOLLOW_EOF_in_parse324); |
425 | if (state.failed) { | |
426 | return retval; | |
427 | } | |
428 | if (state.backtracking == 0) { | |
429 | stream_EOF.add(EOF2); | |
430 | } | |
866e5b51 | 431 | |
63bfc685 MK |
432 | // AST REWRITE |
433 | // elements: declaration | |
434 | // token labels: | |
435 | // rule labels: retval | |
436 | // token list labels: | |
437 | // rule list labels: | |
438 | // wildcard labels: | |
439 | if (state.backtracking == 0) { | |
440 | retval.tree = root_0; | |
441 | // RewriteRuleSubtreeStream stream_retval = | |
442 | new RewriteRuleSubtreeStream( | |
443 | adaptor, "rule retval", | |
444 | retval != null ? retval.tree : null); | |
866e5b51 | 445 | |
63bfc685 MK |
446 | root_0 = (CommonTree) adaptor.nil(); |
447 | // 212:20: -> ^( ROOT ( declaration )+ ) | |
448 | { | |
449 | // Grammar/CTFParser.g:212:23: ^( ROOT ( declaration )+ | |
450 | // ) | |
451 | { | |
452 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
453 | root_1 = (CommonTree) adaptor.becomeRoot( | |
454 | adaptor.create(ROOT, "ROOT"), root_1); | |
866e5b51 | 455 | |
63bfc685 MK |
456 | if (!(stream_declaration.hasNext())) { |
457 | throw new RewriteEarlyExitException(); | |
458 | } | |
459 | while (stream_declaration.hasNext()) { | |
460 | adaptor.addChild(root_1, | |
461 | stream_declaration.nextTree()); | |
866e5b51 | 462 | |
63bfc685 MK |
463 | } |
464 | stream_declaration.reset(); | |
866e5b51 | 465 | |
63bfc685 MK |
466 | adaptor.addChild(root_0, root_1); |
467 | } | |
866e5b51 | 468 | |
63bfc685 | 469 | } |
866e5b51 | 470 | |
63bfc685 | 471 | retval.tree = root_0; |
866e5b51 | 472 | } |
866e5b51 FC |
473 | } |
474 | ||
475 | retval.stop = input.LT(-1); | |
476 | ||
63bfc685 | 477 | if (state.backtracking == 0) { |
866e5b51 | 478 | |
63bfc685 MK |
479 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
480 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
481 | retval.stop); | |
866e5b51 | 482 | } |
63bfc685 | 483 | if (state.backtracking == 0) { |
866e5b51 FC |
484 | |
485 | debug_print("Scope pop " + Symbols_stack.size()); | |
486 | exit("parse"); | |
63bfc685 | 487 | |
866e5b51 FC |
488 | debug_print("Final depth, should be 0: " + depth); |
489 | ||
490 | } | |
491 | } | |
492 | ||
63bfc685 MK |
493 | catch (RecognitionException e) { |
494 | throw e; | |
495 | } finally { | |
866e5b51 FC |
496 | Symbols_stack.pop(); |
497 | ||
498 | } | |
499 | return retval; | |
500 | } | |
63bfc685 | 501 | |
866e5b51 FC |
502 | // $ANTLR end "parse" |
503 | ||
504 | public static class numberLiteral_return extends ParserRuleReturnScope { | |
505 | CommonTree tree; | |
63bfc685 | 506 | |
866e5b51 | 507 | @Override |
63bfc685 MK |
508 | public Object getTree() { |
509 | return tree; | |
510 | } | |
511 | } | |
866e5b51 FC |
512 | |
513 | // $ANTLR start "numberLiteral" | |
63bfc685 MK |
514 | // Grammar/CTFParser.g:215:1: numberLiteral : ( SIGN )* ( HEX_LITERAL -> ^( |
515 | // UNARY_EXPRESSION_HEX HEX_LITERAL ( SIGN )* ) | DECIMAL_LITERAL -> ^( | |
516 | // UNARY_EXPRESSION_DEC DECIMAL_LITERAL ( SIGN )* ) | OCTAL_LITERAL -> ^( | |
517 | // UNARY_EXPRESSION_OCT OCTAL_LITERAL ( SIGN )* ) ) ; | |
518 | public final CTFParser.numberLiteral_return numberLiteral() | |
519 | throws RecognitionException { | |
866e5b51 FC |
520 | CTFParser.numberLiteral_return retval = new CTFParser.numberLiteral_return(); |
521 | retval.start = input.LT(1); | |
522 | ||
523 | CommonTree root_0 = null; | |
524 | ||
63bfc685 MK |
525 | Token SIGN3 = null; |
526 | Token HEX_LITERAL4 = null; | |
527 | Token DECIMAL_LITERAL5 = null; | |
528 | Token OCTAL_LITERAL6 = null; | |
529 | ||
530 | CommonTree SIGN3_tree = null; | |
531 | CommonTree HEX_LITERAL4_tree = null; | |
532 | CommonTree DECIMAL_LITERAL5_tree = null; | |
533 | CommonTree OCTAL_LITERAL6_tree = null; | |
534 | RewriteRuleTokenStream stream_SIGN = new RewriteRuleTokenStream( | |
535 | adaptor, "token SIGN"); | |
536 | RewriteRuleTokenStream stream_OCTAL_LITERAL = new RewriteRuleTokenStream( | |
537 | adaptor, "token OCTAL_LITERAL"); | |
538 | RewriteRuleTokenStream stream_HEX_LITERAL = new RewriteRuleTokenStream( | |
539 | adaptor, "token HEX_LITERAL"); | |
540 | RewriteRuleTokenStream stream_DECIMAL_LITERAL = new RewriteRuleTokenStream( | |
541 | adaptor, "token DECIMAL_LITERAL"); | |
542 | ||
543 | enter("numberLiteral"); | |
866e5b51 FC |
544 | |
545 | try { | |
63bfc685 MK |
546 | // Grammar/CTFParser.g:223:1: ( ( SIGN )* ( HEX_LITERAL -> ^( |
547 | // UNARY_EXPRESSION_HEX HEX_LITERAL ( SIGN )* ) | DECIMAL_LITERAL -> | |
548 | // ^( UNARY_EXPRESSION_DEC DECIMAL_LITERAL ( SIGN )* ) | | |
549 | // OCTAL_LITERAL -> ^( UNARY_EXPRESSION_OCT OCTAL_LITERAL ( SIGN )* | |
550 | // ) ) ) | |
551 | // Grammar/CTFParser.g:224:3: ( SIGN )* ( HEX_LITERAL -> ^( | |
552 | // UNARY_EXPRESSION_HEX HEX_LITERAL ( SIGN )* ) | DECIMAL_LITERAL -> | |
553 | // ^( UNARY_EXPRESSION_DEC DECIMAL_LITERAL ( SIGN )* ) | | |
554 | // OCTAL_LITERAL -> ^( UNARY_EXPRESSION_OCT OCTAL_LITERAL ( SIGN )* | |
555 | // ) ) | |
866e5b51 | 556 | { |
63bfc685 MK |
557 | // Grammar/CTFParser.g:224:3: ( SIGN )* |
558 | loop2: do { | |
559 | int alt2 = 2; | |
560 | int LA2_0 = input.LA(1); | |
866e5b51 | 561 | |
63bfc685 MK |
562 | if ((LA2_0 == SIGN)) { |
563 | alt2 = 1; | |
564 | } | |
866e5b51 | 565 | |
63bfc685 MK |
566 | switch (alt2) { |
567 | case 1: | |
568 | // Grammar/CTFParser.g:224:3: SIGN | |
569 | { | |
570 | SIGN3 = (Token) match(input, SIGN, | |
571 | FOLLOW_SIGN_in_numberLiteral357); | |
572 | if (state.failed) { | |
573 | return retval; | |
574 | } | |
575 | if (state.backtracking == 0) { | |
576 | stream_SIGN.add(SIGN3); | |
577 | } | |
866e5b51 | 578 | |
63bfc685 MK |
579 | } |
580 | break; | |
866e5b51 | 581 | |
63bfc685 MK |
582 | default: |
583 | break loop2; | |
584 | } | |
585 | } while (true); | |
866e5b51 | 586 | |
63bfc685 MK |
587 | // Grammar/CTFParser.g:224:10: ( HEX_LITERAL -> ^( |
588 | // UNARY_EXPRESSION_HEX HEX_LITERAL ( SIGN )* ) | | |
589 | // DECIMAL_LITERAL -> ^( UNARY_EXPRESSION_DEC DECIMAL_LITERAL ( | |
590 | // SIGN )* ) | OCTAL_LITERAL -> ^( UNARY_EXPRESSION_OCT | |
591 | // OCTAL_LITERAL ( SIGN )* ) ) | |
592 | int alt3 = 3; | |
593 | switch (input.LA(1)) { | |
594 | case HEX_LITERAL: { | |
595 | alt3 = 1; | |
866e5b51 | 596 | } |
63bfc685 MK |
597 | break; |
598 | case DECIMAL_LITERAL: { | |
599 | alt3 = 2; | |
866e5b51 | 600 | } |
63bfc685 MK |
601 | break; |
602 | case OCTAL_LITERAL: { | |
603 | alt3 = 3; | |
866e5b51 | 604 | } |
63bfc685 MK |
605 | break; |
606 | default: | |
607 | if (state.backtracking > 0) { | |
608 | state.failed = true; | |
609 | return retval; | |
610 | } | |
611 | NoViableAltException nvae = new NoViableAltException("", 3, | |
612 | 0, input); | |
866e5b51 | 613 | |
63bfc685 MK |
614 | throw nvae; |
615 | } | |
866e5b51 | 616 | |
63bfc685 MK |
617 | switch (alt3) { |
618 | case 1: | |
619 | // Grammar/CTFParser.g:224:11: HEX_LITERAL | |
620 | { | |
621 | HEX_LITERAL4 = (Token) match(input, HEX_LITERAL, | |
622 | FOLLOW_HEX_LITERAL_in_numberLiteral362); | |
623 | if (state.failed) { | |
624 | return retval; | |
625 | } | |
626 | if (state.backtracking == 0) { | |
627 | stream_HEX_LITERAL.add(HEX_LITERAL4); | |
628 | } | |
866e5b51 FC |
629 | |
630 | // AST REWRITE | |
631 | // elements: SIGN, HEX_LITERAL | |
63bfc685 | 632 | // token labels: |
866e5b51 | 633 | // rule labels: retval |
63bfc685 MK |
634 | // token list labels: |
635 | // rule list labels: | |
636 | // wildcard labels: | |
637 | if (state.backtracking == 0) { | |
638 | retval.tree = root_0; | |
639 | // RewriteRuleSubtreeStream stream_retval = | |
640 | new RewriteRuleSubtreeStream( | |
641 | adaptor, "rule retval", | |
642 | retval != null ? retval.tree : null); | |
643 | ||
644 | root_0 = (CommonTree) adaptor.nil(); | |
645 | // 224:23: -> ^( UNARY_EXPRESSION_HEX HEX_LITERAL ( SIGN | |
646 | // )* ) | |
866e5b51 | 647 | { |
63bfc685 MK |
648 | // Grammar/CTFParser.g:224:26: ^( |
649 | // UNARY_EXPRESSION_HEX HEX_LITERAL ( SIGN )* ) | |
650 | { | |
651 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
652 | root_1 = (CommonTree) adaptor | |
653 | .becomeRoot(adaptor.create( | |
654 | UNARY_EXPRESSION_HEX, | |
655 | "UNARY_EXPRESSION_HEX"), root_1); | |
656 | ||
657 | adaptor.addChild(root_1, | |
658 | stream_HEX_LITERAL.nextNode()); | |
659 | // Grammar/CTFParser.g:224:61: ( SIGN )* | |
660 | while (stream_SIGN.hasNext()) { | |
661 | adaptor.addChild(root_1, | |
662 | stream_SIGN.nextNode()); | |
866e5b51 | 663 | |
63bfc685 MK |
664 | } |
665 | stream_SIGN.reset(); | |
866e5b51 | 666 | |
63bfc685 MK |
667 | adaptor.addChild(root_0, root_1); |
668 | } | |
866e5b51 | 669 | |
866e5b51 FC |
670 | } |
671 | ||
63bfc685 | 672 | retval.tree = root_0; |
866e5b51 | 673 | } |
63bfc685 | 674 | } |
866e5b51 | 675 | break; |
63bfc685 MK |
676 | case 2: |
677 | // Grammar/CTFParser.g:225:5: DECIMAL_LITERAL | |
678 | { | |
679 | DECIMAL_LITERAL5 = (Token) match(input, DECIMAL_LITERAL, | |
680 | FOLLOW_DECIMAL_LITERAL_in_numberLiteral379); | |
681 | if (state.failed) { | |
682 | return retval; | |
683 | } | |
684 | if (state.backtracking == 0) { | |
685 | stream_DECIMAL_LITERAL.add(DECIMAL_LITERAL5); | |
686 | } | |
866e5b51 FC |
687 | |
688 | // AST REWRITE | |
689 | // elements: DECIMAL_LITERAL, SIGN | |
63bfc685 | 690 | // token labels: |
866e5b51 | 691 | // rule labels: retval |
63bfc685 MK |
692 | // token list labels: |
693 | // rule list labels: | |
694 | // wildcard labels: | |
695 | if (state.backtracking == 0) { | |
696 | retval.tree = root_0; | |
697 | // RewriteRuleSubtreeStream stream_retval = | |
698 | new RewriteRuleSubtreeStream( | |
699 | adaptor, "rule retval", | |
700 | retval != null ? retval.tree : null); | |
701 | ||
702 | root_0 = (CommonTree) adaptor.nil(); | |
703 | // 225:21: -> ^( UNARY_EXPRESSION_DEC DECIMAL_LITERAL ( | |
704 | // SIGN )* ) | |
866e5b51 | 705 | { |
63bfc685 MK |
706 | // Grammar/CTFParser.g:225:24: ^( |
707 | // UNARY_EXPRESSION_DEC DECIMAL_LITERAL ( SIGN )* ) | |
708 | { | |
709 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
710 | root_1 = (CommonTree) adaptor | |
711 | .becomeRoot(adaptor.create( | |
712 | UNARY_EXPRESSION_DEC, | |
713 | "UNARY_EXPRESSION_DEC"), root_1); | |
714 | ||
715 | adaptor.addChild(root_1, | |
716 | stream_DECIMAL_LITERAL.nextNode()); | |
717 | // Grammar/CTFParser.g:225:63: ( SIGN )* | |
718 | while (stream_SIGN.hasNext()) { | |
719 | adaptor.addChild(root_1, | |
720 | stream_SIGN.nextNode()); | |
866e5b51 | 721 | |
63bfc685 MK |
722 | } |
723 | stream_SIGN.reset(); | |
866e5b51 | 724 | |
63bfc685 MK |
725 | adaptor.addChild(root_0, root_1); |
726 | } | |
866e5b51 | 727 | |
866e5b51 FC |
728 | } |
729 | ||
63bfc685 | 730 | retval.tree = root_0; |
866e5b51 | 731 | } |
63bfc685 | 732 | } |
866e5b51 | 733 | break; |
63bfc685 MK |
734 | case 3: |
735 | // Grammar/CTFParser.g:226:5: OCTAL_LITERAL | |
736 | { | |
737 | OCTAL_LITERAL6 = (Token) match(input, OCTAL_LITERAL, | |
738 | FOLLOW_OCTAL_LITERAL_in_numberLiteral396); | |
739 | if (state.failed) { | |
740 | return retval; | |
741 | } | |
742 | if (state.backtracking == 0) { | |
743 | stream_OCTAL_LITERAL.add(OCTAL_LITERAL6); | |
744 | } | |
866e5b51 FC |
745 | |
746 | // AST REWRITE | |
747 | // elements: SIGN, OCTAL_LITERAL | |
63bfc685 | 748 | // token labels: |
866e5b51 | 749 | // rule labels: retval |
63bfc685 MK |
750 | // token list labels: |
751 | // rule list labels: | |
752 | // wildcard labels: | |
753 | if (state.backtracking == 0) { | |
754 | retval.tree = root_0; | |
755 | // RewriteRuleSubtreeStream stream_retval = | |
756 | new RewriteRuleSubtreeStream( | |
757 | adaptor, "rule retval", | |
758 | retval != null ? retval.tree : null); | |
759 | ||
760 | root_0 = (CommonTree) adaptor.nil(); | |
761 | // 226:19: -> ^( UNARY_EXPRESSION_OCT OCTAL_LITERAL ( | |
762 | // SIGN )* ) | |
866e5b51 | 763 | { |
63bfc685 MK |
764 | // Grammar/CTFParser.g:226:22: ^( |
765 | // UNARY_EXPRESSION_OCT OCTAL_LITERAL ( SIGN )* ) | |
766 | { | |
767 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
768 | root_1 = (CommonTree) adaptor | |
769 | .becomeRoot(adaptor.create( | |
770 | UNARY_EXPRESSION_OCT, | |
771 | "UNARY_EXPRESSION_OCT"), root_1); | |
772 | ||
773 | adaptor.addChild(root_1, | |
774 | stream_OCTAL_LITERAL.nextNode()); | |
775 | // Grammar/CTFParser.g:226:59: ( SIGN )* | |
776 | while (stream_SIGN.hasNext()) { | |
777 | adaptor.addChild(root_1, | |
778 | stream_SIGN.nextNode()); | |
866e5b51 | 779 | |
63bfc685 MK |
780 | } |
781 | stream_SIGN.reset(); | |
866e5b51 | 782 | |
63bfc685 MK |
783 | adaptor.addChild(root_0, root_1); |
784 | } | |
866e5b51 | 785 | |
866e5b51 FC |
786 | } |
787 | ||
63bfc685 | 788 | retval.tree = root_0; |
866e5b51 | 789 | } |
63bfc685 | 790 | } |
866e5b51 FC |
791 | break; |
792 | ||
63bfc685 | 793 | } |
866e5b51 FC |
794 | |
795 | } | |
796 | ||
797 | retval.stop = input.LT(-1); | |
798 | ||
63bfc685 | 799 | if (state.backtracking == 0) { |
866e5b51 | 800 | |
63bfc685 MK |
801 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
802 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
803 | retval.stop); | |
866e5b51 | 804 | } |
63bfc685 | 805 | if (state.backtracking == 0) { |
866e5b51 | 806 | |
63bfc685 | 807 | debug_print(input.toString(retval.start, input.LT(-1))); |
866e5b51 FC |
808 | exit("numberLiteral"); |
809 | ||
810 | } | |
811 | } | |
812 | ||
63bfc685 MK |
813 | catch (RecognitionException e) { |
814 | throw e; | |
815 | ||
866e5b51 FC |
816 | } |
817 | return retval; | |
818 | } | |
63bfc685 | 819 | |
866e5b51 FC |
820 | // $ANTLR end "numberLiteral" |
821 | ||
822 | public static class constant_return extends ParserRuleReturnScope { | |
823 | CommonTree tree; | |
63bfc685 | 824 | |
866e5b51 | 825 | @Override |
63bfc685 MK |
826 | public Object getTree() { |
827 | return tree; | |
828 | } | |
829 | } | |
866e5b51 FC |
830 | |
831 | // $ANTLR start "constant" | |
63bfc685 MK |
832 | // Grammar/CTFParser.g:229:1: constant : ( numberLiteral | enumConstant | |
833 | // CHARACTER_LITERAL ); | |
834 | public final CTFParser.constant_return constant() | |
835 | throws RecognitionException { | |
866e5b51 FC |
836 | CTFParser.constant_return retval = new CTFParser.constant_return(); |
837 | retval.start = input.LT(1); | |
838 | ||
839 | CommonTree root_0 = null; | |
840 | ||
63bfc685 | 841 | Token CHARACTER_LITERAL9 = null; |
866e5b51 FC |
842 | CTFParser.numberLiteral_return numberLiteral7 = null; |
843 | ||
844 | CTFParser.enumConstant_return enumConstant8 = null; | |
845 | ||
63bfc685 | 846 | CommonTree CHARACTER_LITERAL9_tree = null; |
866e5b51 | 847 | |
63bfc685 | 848 | enter("constant"); |
866e5b51 FC |
849 | |
850 | try { | |
63bfc685 MK |
851 | // Grammar/CTFParser.g:236:1: ( numberLiteral | enumConstant | |
852 | // CHARACTER_LITERAL ) | |
853 | int alt4 = 3; | |
854 | switch (input.LA(1)) { | |
866e5b51 FC |
855 | case SIGN: |
856 | case OCTAL_LITERAL: | |
857 | case DECIMAL_LITERAL: | |
63bfc685 MK |
858 | case HEX_LITERAL: { |
859 | alt4 = 1; | |
860 | } | |
866e5b51 FC |
861 | break; |
862 | case ALIGNTOK: | |
863 | case EVENTTOK: | |
864 | case SIGNEDTOK: | |
865 | case STRINGTOK: | |
866 | case STRING_LITERAL: | |
63bfc685 MK |
867 | case IDENTIFIER: { |
868 | alt4 = 2; | |
869 | } | |
866e5b51 | 870 | break; |
63bfc685 MK |
871 | case CHARACTER_LITERAL: { |
872 | alt4 = 3; | |
873 | } | |
866e5b51 FC |
874 | break; |
875 | default: | |
63bfc685 MK |
876 | if (state.backtracking > 0) { |
877 | state.failed = true; | |
878 | return retval; | |
879 | } | |
880 | NoViableAltException nvae = new NoViableAltException("", 4, 0, | |
881 | input); | |
866e5b51 FC |
882 | |
883 | throw nvae; | |
884 | } | |
885 | ||
886 | switch (alt4) { | |
63bfc685 MK |
887 | case 1: |
888 | // Grammar/CTFParser.g:237:4: numberLiteral | |
889 | { | |
890 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 891 | |
63bfc685 MK |
892 | pushFollow(FOLLOW_numberLiteral_in_constant432); |
893 | numberLiteral7 = numberLiteral(); | |
866e5b51 | 894 | |
63bfc685 MK |
895 | state._fsp--; |
896 | if (state.failed) { | |
897 | return retval; | |
898 | } | |
899 | if (state.backtracking == 0) { | |
900 | adaptor.addChild(root_0, numberLiteral7.getTree()); | |
901 | } | |
866e5b51 | 902 | |
63bfc685 MK |
903 | } |
904 | break; | |
905 | case 2: | |
906 | // Grammar/CTFParser.g:238:5: enumConstant | |
907 | { | |
908 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 909 | |
63bfc685 MK |
910 | pushFollow(FOLLOW_enumConstant_in_constant438); |
911 | enumConstant8 = enumConstant(); | |
866e5b51 | 912 | |
63bfc685 MK |
913 | state._fsp--; |
914 | if (state.failed) { | |
915 | return retval; | |
916 | } | |
917 | if (state.backtracking == 0) { | |
918 | adaptor.addChild(root_0, enumConstant8.getTree()); | |
919 | } | |
866e5b51 | 920 | |
63bfc685 MK |
921 | } |
922 | break; | |
923 | case 3: | |
924 | // Grammar/CTFParser.g:239:5: CHARACTER_LITERAL | |
925 | { | |
926 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 927 | |
63bfc685 MK |
928 | CHARACTER_LITERAL9 = (Token) match(input, CHARACTER_LITERAL, |
929 | FOLLOW_CHARACTER_LITERAL_in_constant444); | |
930 | if (state.failed) { | |
931 | return retval; | |
932 | } | |
933 | if (state.backtracking == 0) { | |
934 | CHARACTER_LITERAL9_tree = (CommonTree) adaptor | |
935 | .create(CHARACTER_LITERAL9); | |
866e5b51 | 936 | adaptor.addChild(root_0, CHARACTER_LITERAL9_tree); |
63bfc685 | 937 | } |
866e5b51 | 938 | |
63bfc685 MK |
939 | } |
940 | break; | |
866e5b51 FC |
941 | |
942 | } | |
943 | retval.stop = input.LT(-1); | |
944 | ||
63bfc685 | 945 | if (state.backtracking == 0) { |
866e5b51 | 946 | |
63bfc685 MK |
947 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
948 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
949 | retval.stop); | |
866e5b51 | 950 | } |
63bfc685 | 951 | if (state.backtracking == 0) { |
866e5b51 FC |
952 | |
953 | exit("constant"); | |
954 | ||
955 | } | |
956 | } | |
957 | ||
63bfc685 MK |
958 | catch (RecognitionException e) { |
959 | throw e; | |
960 | ||
866e5b51 FC |
961 | } |
962 | return retval; | |
963 | } | |
63bfc685 | 964 | |
866e5b51 FC |
965 | // $ANTLR end "constant" |
966 | ||
967 | public static class primaryExpression_return extends ParserRuleReturnScope { | |
968 | CommonTree tree; | |
63bfc685 | 969 | |
866e5b51 | 970 | @Override |
63bfc685 MK |
971 | public Object getTree() { |
972 | return tree; | |
973 | } | |
974 | } | |
866e5b51 FC |
975 | |
976 | // $ANTLR start "primaryExpression" | |
63bfc685 MK |
977 | // Grammar/CTFParser.g:242:1: primaryExpression : ( ( IDENTIFIER )=> |
978 | // IDENTIFIER -> ^( UNARY_EXPRESSION_STRING IDENTIFIER ) | ( ctfKeyword )=> | |
979 | // ctfKeyword -> ^( UNARY_EXPRESSION_STRING ctfKeyword ) | ( STRING_LITERAL | |
980 | // )=> STRING_LITERAL -> ^( UNARY_EXPRESSION_STRING_QUOTES STRING_LITERAL ) | |
981 | // | constant ); | |
982 | public final CTFParser.primaryExpression_return primaryExpression() | |
983 | throws RecognitionException { | |
866e5b51 FC |
984 | CTFParser.primaryExpression_return retval = new CTFParser.primaryExpression_return(); |
985 | retval.start = input.LT(1); | |
986 | ||
987 | CommonTree root_0 = null; | |
988 | ||
63bfc685 MK |
989 | Token IDENTIFIER10 = null; |
990 | Token STRING_LITERAL12 = null; | |
866e5b51 FC |
991 | CTFParser.ctfKeyword_return ctfKeyword11 = null; |
992 | ||
993 | CTFParser.constant_return constant13 = null; | |
994 | ||
63bfc685 MK |
995 | CommonTree IDENTIFIER10_tree = null; |
996 | CommonTree STRING_LITERAL12_tree = null; | |
997 | RewriteRuleTokenStream stream_STRING_LITERAL = new RewriteRuleTokenStream( | |
998 | adaptor, "token STRING_LITERAL"); | |
999 | RewriteRuleTokenStream stream_IDENTIFIER = new RewriteRuleTokenStream( | |
1000 | adaptor, "token IDENTIFIER"); | |
1001 | RewriteRuleSubtreeStream stream_ctfKeyword = new RewriteRuleSubtreeStream( | |
1002 | adaptor, "rule ctfKeyword"); | |
866e5b51 | 1003 | |
63bfc685 | 1004 | enter("primaryExpression"); |
866e5b51 FC |
1005 | |
1006 | try { | |
63bfc685 MK |
1007 | // Grammar/CTFParser.g:249:1: ( ( IDENTIFIER )=> IDENTIFIER -> ^( |
1008 | // UNARY_EXPRESSION_STRING IDENTIFIER ) | ( ctfKeyword )=> | |
1009 | // ctfKeyword -> ^( UNARY_EXPRESSION_STRING ctfKeyword ) | ( | |
1010 | // STRING_LITERAL )=> STRING_LITERAL -> ^( | |
1011 | // UNARY_EXPRESSION_STRING_QUOTES STRING_LITERAL ) | constant ) | |
1012 | int alt5 = 4; | |
1013 | switch (input.LA(1)) { | |
1014 | case IDENTIFIER: { | |
866e5b51 FC |
1015 | int LA5_1 = input.LA(2); |
1016 | ||
63bfc685 MK |
1017 | if ((synpred1_CTFParser())) { |
1018 | alt5 = 1; | |
1019 | } else if ((true)) { | |
1020 | alt5 = 4; | |
1021 | } else { | |
1022 | if (state.backtracking > 0) { | |
1023 | state.failed = true; | |
1024 | return retval; | |
1025 | } | |
1026 | NoViableAltException nvae = new NoViableAltException("", 5, | |
1027 | 1, input); | |
866e5b51 FC |
1028 | |
1029 | throw nvae; | |
1030 | } | |
63bfc685 | 1031 | } |
866e5b51 FC |
1032 | break; |
1033 | case ALIGNTOK: | |
1034 | case EVENTTOK: | |
1035 | case SIGNEDTOK: | |
63bfc685 | 1036 | case STRINGTOK: { |
866e5b51 FC |
1037 | int LA5_2 = input.LA(2); |
1038 | ||
63bfc685 MK |
1039 | if ((synpred2_CTFParser())) { |
1040 | alt5 = 2; | |
1041 | } else if ((true)) { | |
1042 | alt5 = 4; | |
1043 | } else { | |
1044 | if (state.backtracking > 0) { | |
1045 | state.failed = true; | |
1046 | return retval; | |
1047 | } | |
1048 | NoViableAltException nvae = new NoViableAltException("", 5, | |
1049 | 2, input); | |
866e5b51 FC |
1050 | |
1051 | throw nvae; | |
1052 | } | |
63bfc685 | 1053 | } |
866e5b51 | 1054 | break; |
63bfc685 | 1055 | case STRING_LITERAL: { |
866e5b51 FC |
1056 | int LA5_3 = input.LA(2); |
1057 | ||
63bfc685 MK |
1058 | if ((synpred3_CTFParser())) { |
1059 | alt5 = 3; | |
1060 | } else if ((true)) { | |
1061 | alt5 = 4; | |
1062 | } else { | |
1063 | if (state.backtracking > 0) { | |
1064 | state.failed = true; | |
1065 | return retval; | |
1066 | } | |
1067 | NoViableAltException nvae = new NoViableAltException("", 5, | |
1068 | 3, input); | |
866e5b51 FC |
1069 | |
1070 | throw nvae; | |
1071 | } | |
63bfc685 | 1072 | } |
866e5b51 FC |
1073 | break; |
1074 | case SIGN: | |
1075 | case OCTAL_LITERAL: | |
1076 | case DECIMAL_LITERAL: | |
1077 | case HEX_LITERAL: | |
63bfc685 MK |
1078 | case CHARACTER_LITERAL: { |
1079 | alt5 = 4; | |
1080 | } | |
866e5b51 FC |
1081 | break; |
1082 | default: | |
63bfc685 MK |
1083 | if (state.backtracking > 0) { |
1084 | state.failed = true; | |
1085 | return retval; | |
1086 | } | |
1087 | NoViableAltException nvae = new NoViableAltException("", 5, 0, | |
1088 | input); | |
866e5b51 FC |
1089 | |
1090 | throw nvae; | |
1091 | } | |
1092 | ||
1093 | switch (alt5) { | |
63bfc685 MK |
1094 | case 1: |
1095 | // Grammar/CTFParser.g:250:5: ( IDENTIFIER )=> IDENTIFIER | |
1096 | { | |
1097 | IDENTIFIER10 = (Token) match(input, IDENTIFIER, | |
1098 | FOLLOW_IDENTIFIER_in_primaryExpression475); | |
1099 | if (state.failed) { | |
1100 | return retval; | |
1101 | } | |
1102 | if (state.backtracking == 0) { | |
1103 | stream_IDENTIFIER.add(IDENTIFIER10); | |
1104 | } | |
866e5b51 | 1105 | |
63bfc685 MK |
1106 | if (state.backtracking == 0) { |
1107 | debug_print("IDENTIFIER: " | |
1108 | + (IDENTIFIER10 != null ? IDENTIFIER10.getText() | |
1109 | : null)); | |
1110 | } | |
866e5b51 | 1111 | |
63bfc685 MK |
1112 | // AST REWRITE |
1113 | // elements: IDENTIFIER | |
1114 | // token labels: | |
1115 | // rule labels: retval | |
1116 | // token list labels: | |
1117 | // rule list labels: | |
1118 | // wildcard labels: | |
1119 | if (state.backtracking == 0) { | |
866e5b51 | 1120 | retval.tree = root_0; |
63bfc685 MK |
1121 | // RewriteRuleSubtreeStream stream_retval = |
1122 | new RewriteRuleSubtreeStream( | |
1123 | adaptor, "rule retval", | |
1124 | retval != null ? retval.tree : null); | |
866e5b51 | 1125 | |
63bfc685 | 1126 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 FC |
1127 | // 250:83: -> ^( UNARY_EXPRESSION_STRING IDENTIFIER ) |
1128 | { | |
63bfc685 MK |
1129 | // Grammar/CTFParser.g:250:86: ^( |
1130 | // UNARY_EXPRESSION_STRING IDENTIFIER ) | |
866e5b51 | 1131 | { |
63bfc685 MK |
1132 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
1133 | root_1 = (CommonTree) adaptor.becomeRoot(adaptor | |
1134 | .create(UNARY_EXPRESSION_STRING, | |
1135 | "UNARY_EXPRESSION_STRING"), root_1); | |
866e5b51 | 1136 | |
63bfc685 MK |
1137 | adaptor.addChild(root_1, |
1138 | stream_IDENTIFIER.nextNode()); | |
866e5b51 | 1139 | |
63bfc685 | 1140 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
1141 | } |
1142 | ||
1143 | } | |
1144 | ||
63bfc685 MK |
1145 | retval.tree = root_0; |
1146 | } | |
1147 | } | |
1148 | break; | |
1149 | case 2: | |
1150 | // Grammar/CTFParser.g:251:5: ( ctfKeyword )=> ctfKeyword | |
1151 | { | |
1152 | pushFollow(FOLLOW_ctfKeyword_in_primaryExpression497); | |
1153 | ctfKeyword11 = ctfKeyword(); | |
866e5b51 | 1154 | |
63bfc685 MK |
1155 | state._fsp--; |
1156 | if (state.failed) { | |
1157 | return retval; | |
1158 | } | |
1159 | if (state.backtracking == 0) { | |
1160 | stream_ctfKeyword.add(ctfKeyword11.getTree()); | |
1161 | } | |
866e5b51 | 1162 | |
63bfc685 MK |
1163 | // AST REWRITE |
1164 | // elements: ctfKeyword | |
1165 | // token labels: | |
1166 | // rule labels: retval | |
1167 | // token list labels: | |
1168 | // rule list labels: | |
1169 | // wildcard labels: | |
1170 | if (state.backtracking == 0) { | |
866e5b51 | 1171 | retval.tree = root_0; |
63bfc685 MK |
1172 | // RewriteRuleSubtreeStream stream_retval = |
1173 | new RewriteRuleSubtreeStream( | |
1174 | adaptor, "rule retval", | |
1175 | retval != null ? retval.tree : null); | |
866e5b51 | 1176 | |
63bfc685 | 1177 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 FC |
1178 | // 251:32: -> ^( UNARY_EXPRESSION_STRING ctfKeyword ) |
1179 | { | |
63bfc685 MK |
1180 | // Grammar/CTFParser.g:251:35: ^( |
1181 | // UNARY_EXPRESSION_STRING ctfKeyword ) | |
866e5b51 | 1182 | { |
63bfc685 MK |
1183 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
1184 | root_1 = (CommonTree) adaptor.becomeRoot(adaptor | |
1185 | .create(UNARY_EXPRESSION_STRING, | |
1186 | "UNARY_EXPRESSION_STRING"), root_1); | |
866e5b51 | 1187 | |
63bfc685 MK |
1188 | adaptor.addChild(root_1, |
1189 | stream_ctfKeyword.nextTree()); | |
866e5b51 | 1190 | |
63bfc685 | 1191 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
1192 | } |
1193 | ||
1194 | } | |
1195 | ||
63bfc685 MK |
1196 | retval.tree = root_0; |
1197 | } | |
1198 | } | |
1199 | break; | |
1200 | case 3: | |
1201 | // Grammar/CTFParser.g:252:5: ( STRING_LITERAL )=> STRING_LITERAL | |
1202 | { | |
1203 | STRING_LITERAL12 = (Token) match(input, STRING_LITERAL, | |
1204 | FOLLOW_STRING_LITERAL_in_primaryExpression517); | |
1205 | if (state.failed) { | |
1206 | return retval; | |
1207 | } | |
1208 | if (state.backtracking == 0) { | |
1209 | stream_STRING_LITERAL.add(STRING_LITERAL12); | |
1210 | } | |
866e5b51 | 1211 | |
63bfc685 MK |
1212 | if (state.backtracking == 0) { |
1213 | debug_print("STRING_LITERAL: " | |
1214 | + (STRING_LITERAL12 != null ? STRING_LITERAL12 | |
1215 | .getText() : null)); | |
1216 | } | |
866e5b51 | 1217 | |
63bfc685 MK |
1218 | // AST REWRITE |
1219 | // elements: STRING_LITERAL | |
1220 | // token labels: | |
1221 | // rule labels: retval | |
1222 | // token list labels: | |
1223 | // rule list labels: | |
1224 | // wildcard labels: | |
1225 | if (state.backtracking == 0) { | |
866e5b51 | 1226 | retval.tree = root_0; |
63bfc685 MK |
1227 | new RewriteRuleSubtreeStream( |
1228 | adaptor, "rule retval", | |
1229 | retval != null ? retval.tree : null); | |
866e5b51 | 1230 | |
63bfc685 MK |
1231 | root_0 = (CommonTree) adaptor.nil(); |
1232 | // 252:99: -> ^( UNARY_EXPRESSION_STRING_QUOTES | |
1233 | // STRING_LITERAL ) | |
866e5b51 | 1234 | { |
63bfc685 MK |
1235 | // Grammar/CTFParser.g:252:102: ^( |
1236 | // UNARY_EXPRESSION_STRING_QUOTES STRING_LITERAL ) | |
866e5b51 | 1237 | { |
63bfc685 MK |
1238 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
1239 | root_1 = (CommonTree) adaptor.becomeRoot(adaptor | |
1240 | .create(UNARY_EXPRESSION_STRING_QUOTES, | |
1241 | "UNARY_EXPRESSION_STRING_QUOTES"), | |
1242 | root_1); | |
866e5b51 | 1243 | |
63bfc685 MK |
1244 | adaptor.addChild(root_1, |
1245 | stream_STRING_LITERAL.nextNode()); | |
866e5b51 | 1246 | |
63bfc685 | 1247 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
1248 | } |
1249 | ||
1250 | } | |
1251 | ||
63bfc685 MK |
1252 | retval.tree = root_0; |
1253 | } | |
1254 | } | |
1255 | break; | |
1256 | case 4: | |
1257 | // Grammar/CTFParser.g:254:5: constant | |
1258 | { | |
1259 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 1260 | |
63bfc685 MK |
1261 | pushFollow(FOLLOW_constant_in_primaryExpression538); |
1262 | constant13 = constant(); | |
866e5b51 | 1263 | |
63bfc685 MK |
1264 | state._fsp--; |
1265 | if (state.failed) { | |
1266 | return retval; | |
1267 | } | |
1268 | if (state.backtracking == 0) { | |
1269 | adaptor.addChild(root_0, constant13.getTree()); | |
1270 | } | |
866e5b51 | 1271 | |
63bfc685 MK |
1272 | } |
1273 | break; | |
866e5b51 FC |
1274 | |
1275 | } | |
1276 | retval.stop = input.LT(-1); | |
1277 | ||
63bfc685 | 1278 | if (state.backtracking == 0) { |
866e5b51 | 1279 | |
63bfc685 MK |
1280 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
1281 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
1282 | retval.stop); | |
866e5b51 | 1283 | } |
63bfc685 | 1284 | if (state.backtracking == 0) { |
866e5b51 FC |
1285 | |
1286 | exit("primaryExpression"); | |
1287 | ||
1288 | } | |
1289 | } | |
1290 | ||
63bfc685 MK |
1291 | catch (RecognitionException e) { |
1292 | throw e; | |
866e5b51 FC |
1293 | } |
1294 | return retval; | |
1295 | } | |
63bfc685 | 1296 | |
866e5b51 FC |
1297 | // $ANTLR end "primaryExpression" |
1298 | ||
1299 | public static class reference_return extends ParserRuleReturnScope { | |
1300 | CommonTree tree; | |
63bfc685 | 1301 | |
866e5b51 | 1302 | @Override |
63bfc685 MK |
1303 | public Object getTree() { |
1304 | return tree; | |
1305 | } | |
1306 | } | |
866e5b51 FC |
1307 | |
1308 | // $ANTLR start "reference" | |
63bfc685 MK |
1309 | // Grammar/CTFParser.g:257:1: reference : (ref= DOT | ref= ARROW ) |
1310 | // IDENTIFIER -> ^( $ref ^( UNARY_EXPRESSION_STRING IDENTIFIER ) ) ; | |
1311 | public final CTFParser.reference_return reference() | |
1312 | throws RecognitionException { | |
866e5b51 FC |
1313 | CTFParser.reference_return retval = new CTFParser.reference_return(); |
1314 | retval.start = input.LT(1); | |
1315 | ||
1316 | CommonTree root_0 = null; | |
1317 | ||
63bfc685 MK |
1318 | Token ref = null; |
1319 | Token IDENTIFIER14 = null; | |
866e5b51 | 1320 | |
63bfc685 MK |
1321 | CommonTree ref_tree = null; |
1322 | CommonTree IDENTIFIER14_tree = null; | |
1323 | RewriteRuleTokenStream stream_ARROW = new RewriteRuleTokenStream( | |
1324 | adaptor, "token ARROW"); | |
1325 | RewriteRuleTokenStream stream_DOT = new RewriteRuleTokenStream(adaptor, | |
1326 | "token DOT"); | |
1327 | RewriteRuleTokenStream stream_IDENTIFIER = new RewriteRuleTokenStream( | |
1328 | adaptor, "token IDENTIFIER"); | |
866e5b51 | 1329 | |
63bfc685 | 1330 | enter("reference"); |
866e5b51 FC |
1331 | |
1332 | try { | |
63bfc685 MK |
1333 | // Grammar/CTFParser.g:265:1: ( (ref= DOT | ref= ARROW ) IDENTIFIER |
1334 | // -> ^( $ref ^( UNARY_EXPRESSION_STRING IDENTIFIER ) ) ) | |
866e5b51 FC |
1335 | // Grammar/CTFParser.g:266:3: (ref= DOT | ref= ARROW ) IDENTIFIER |
1336 | { | |
63bfc685 MK |
1337 | // Grammar/CTFParser.g:266:3: (ref= DOT | ref= ARROW ) |
1338 | int alt6 = 2; | |
1339 | int LA6_0 = input.LA(1); | |
1340 | ||
1341 | if ((LA6_0 == DOT)) { | |
1342 | alt6 = 1; | |
1343 | } else if ((LA6_0 == ARROW)) { | |
1344 | alt6 = 2; | |
1345 | } else { | |
1346 | if (state.backtracking > 0) { | |
1347 | state.failed = true; | |
1348 | return retval; | |
1349 | } | |
1350 | NoViableAltException nvae = new NoViableAltException("", 6, | |
1351 | 0, input); | |
866e5b51 | 1352 | |
63bfc685 MK |
1353 | throw nvae; |
1354 | } | |
1355 | switch (alt6) { | |
1356 | case 1: | |
1357 | // Grammar/CTFParser.g:266:4: ref= DOT | |
1358 | { | |
1359 | ref = (Token) match(input, DOT, FOLLOW_DOT_in_reference564); | |
1360 | if (state.failed) { | |
1361 | return retval; | |
866e5b51 | 1362 | } |
63bfc685 MK |
1363 | if (state.backtracking == 0) { |
1364 | stream_DOT.add(ref); | |
866e5b51 | 1365 | } |
63bfc685 MK |
1366 | |
1367 | } | |
866e5b51 | 1368 | break; |
63bfc685 MK |
1369 | case 2: |
1370 | // Grammar/CTFParser.g:266:14: ref= ARROW | |
1371 | { | |
1372 | ref = (Token) match(input, ARROW, | |
1373 | FOLLOW_ARROW_in_reference570); | |
1374 | if (state.failed) { | |
1375 | return retval; | |
1376 | } | |
1377 | if (state.backtracking == 0) { | |
1378 | stream_ARROW.add(ref); | |
1379 | } | |
866e5b51 | 1380 | |
63bfc685 MK |
1381 | } |
1382 | break; | |
866e5b51 | 1383 | |
63bfc685 | 1384 | } |
866e5b51 | 1385 | |
63bfc685 MK |
1386 | IDENTIFIER14 = (Token) match(input, IDENTIFIER, |
1387 | FOLLOW_IDENTIFIER_in_reference573); | |
1388 | if (state.failed) { | |
1389 | return retval; | |
1390 | } | |
1391 | if (state.backtracking == 0) { | |
1392 | stream_IDENTIFIER.add(IDENTIFIER14); | |
1393 | } | |
866e5b51 | 1394 | |
63bfc685 MK |
1395 | // AST REWRITE |
1396 | // elements: IDENTIFIER, ref | |
1397 | // token labels: ref | |
1398 | // rule labels: retval | |
1399 | // token list labels: | |
1400 | // rule list labels: | |
1401 | // wildcard labels: | |
1402 | if (state.backtracking == 0) { | |
1403 | retval.tree = root_0; | |
1404 | RewriteRuleTokenStream stream_ref = new RewriteRuleTokenStream( | |
1405 | adaptor, "token ref", ref); | |
1406 | // RewriteRuleSubtreeStream stream_retval = | |
1407 | new RewriteRuleSubtreeStream( | |
1408 | adaptor, "rule retval", | |
1409 | retval != null ? retval.tree : null); | |
1410 | ||
1411 | root_0 = (CommonTree) adaptor.nil(); | |
1412 | // 266:36: -> ^( $ref ^( UNARY_EXPRESSION_STRING IDENTIFIER | |
1413 | // ) ) | |
1414 | { | |
1415 | // Grammar/CTFParser.g:266:39: ^( $ref ^( | |
1416 | // UNARY_EXPRESSION_STRING IDENTIFIER ) ) | |
1417 | { | |
1418 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
1419 | root_1 = (CommonTree) adaptor.becomeRoot( | |
1420 | stream_ref.nextNode(), root_1); | |
866e5b51 | 1421 | |
63bfc685 MK |
1422 | // Grammar/CTFParser.g:266:46: ^( |
1423 | // UNARY_EXPRESSION_STRING IDENTIFIER ) | |
1424 | { | |
1425 | CommonTree root_2 = (CommonTree) adaptor.nil(); | |
1426 | root_2 = (CommonTree) adaptor.becomeRoot( | |
1427 | adaptor.create(UNARY_EXPRESSION_STRING, | |
1428 | "UNARY_EXPRESSION_STRING"), | |
1429 | root_2); | |
866e5b51 | 1430 | |
63bfc685 MK |
1431 | adaptor.addChild(root_2, |
1432 | stream_IDENTIFIER.nextNode()); | |
866e5b51 | 1433 | |
63bfc685 MK |
1434 | adaptor.addChild(root_1, root_2); |
1435 | } | |
866e5b51 | 1436 | |
63bfc685 MK |
1437 | adaptor.addChild(root_0, root_1); |
1438 | } | |
866e5b51 | 1439 | |
63bfc685 | 1440 | } |
866e5b51 | 1441 | |
63bfc685 | 1442 | retval.tree = root_0; |
866e5b51 | 1443 | } |
866e5b51 FC |
1444 | } |
1445 | ||
1446 | retval.stop = input.LT(-1); | |
1447 | ||
63bfc685 | 1448 | if (state.backtracking == 0) { |
866e5b51 | 1449 | |
63bfc685 MK |
1450 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
1451 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
1452 | retval.stop); | |
866e5b51 | 1453 | } |
63bfc685 | 1454 | if (state.backtracking == 0) { |
866e5b51 | 1455 | |
63bfc685 | 1456 | debug_print(input.toString(retval.start, input.LT(-1))); |
866e5b51 FC |
1457 | exit("reference"); |
1458 | ||
1459 | } | |
1460 | } | |
1461 | ||
63bfc685 MK |
1462 | catch (RecognitionException e) { |
1463 | throw e; | |
866e5b51 FC |
1464 | } |
1465 | return retval; | |
1466 | } | |
63bfc685 | 1467 | |
866e5b51 FC |
1468 | // $ANTLR end "reference" |
1469 | ||
63bfc685 MK |
1470 | public static class postfixExpressionSuffix_return extends |
1471 | ParserRuleReturnScope { | |
866e5b51 | 1472 | CommonTree tree; |
63bfc685 | 1473 | |
866e5b51 | 1474 | @Override |
63bfc685 MK |
1475 | public Object getTree() { |
1476 | return tree; | |
1477 | } | |
1478 | } | |
866e5b51 FC |
1479 | |
1480 | // $ANTLR start "postfixExpressionSuffix" | |
63bfc685 MK |
1481 | // Grammar/CTFParser.g:269:1: postfixExpressionSuffix : ( ( OPENBRAC |
1482 | // unaryExpression CLOSEBRAC ) | reference ); | |
1483 | public final CTFParser.postfixExpressionSuffix_return postfixExpressionSuffix() | |
1484 | throws RecognitionException { | |
866e5b51 FC |
1485 | CTFParser.postfixExpressionSuffix_return retval = new CTFParser.postfixExpressionSuffix_return(); |
1486 | retval.start = input.LT(1); | |
1487 | ||
1488 | CommonTree root_0 = null; | |
1489 | ||
63bfc685 MK |
1490 | Token OPENBRAC15 = null; |
1491 | Token CLOSEBRAC17 = null; | |
866e5b51 FC |
1492 | CTFParser.unaryExpression_return unaryExpression16 = null; |
1493 | ||
1494 | CTFParser.reference_return reference18 = null; | |
1495 | ||
63bfc685 MK |
1496 | CommonTree OPENBRAC15_tree = null; |
1497 | CommonTree CLOSEBRAC17_tree = null; | |
866e5b51 | 1498 | |
63bfc685 | 1499 | enter("postfixExpressionSuffix"); |
866e5b51 FC |
1500 | |
1501 | try { | |
63bfc685 MK |
1502 | // Grammar/CTFParser.g:276:1: ( ( OPENBRAC unaryExpression CLOSEBRAC |
1503 | // ) | reference ) | |
1504 | int alt7 = 2; | |
866e5b51 FC |
1505 | int LA7_0 = input.LA(1); |
1506 | ||
63bfc685 MK |
1507 | if ((LA7_0 == OPENBRAC)) { |
1508 | alt7 = 1; | |
1509 | } else if ((((LA7_0 >= ARROW) && (LA7_0 <= DOT)))) { | |
1510 | alt7 = 2; | |
1511 | } else { | |
1512 | if (state.backtracking > 0) { | |
1513 | state.failed = true; | |
1514 | return retval; | |
1515 | } | |
1516 | NoViableAltException nvae = new NoViableAltException("", 7, 0, | |
1517 | input); | |
866e5b51 FC |
1518 | |
1519 | throw nvae; | |
1520 | } | |
1521 | switch (alt7) { | |
63bfc685 MK |
1522 | case 1: |
1523 | // Grammar/CTFParser.g:277:5: ( OPENBRAC unaryExpression CLOSEBRAC ) | |
1524 | { | |
1525 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 1526 | |
63bfc685 MK |
1527 | // Grammar/CTFParser.g:277:5: ( OPENBRAC unaryExpression |
1528 | // CLOSEBRAC ) | |
1529 | // Grammar/CTFParser.g:277:6: OPENBRAC unaryExpression CLOSEBRAC | |
1530 | { | |
1531 | OPENBRAC15 = (Token) match(input, OPENBRAC, | |
1532 | FOLLOW_OPENBRAC_in_postfixExpressionSuffix612); | |
1533 | if (state.failed) { | |
1534 | return retval; | |
1535 | } | |
1536 | if (state.backtracking == 0) { | |
1537 | OPENBRAC15_tree = (CommonTree) adaptor | |
1538 | .create(OPENBRAC15); | |
1539 | adaptor.addChild(root_0, OPENBRAC15_tree); | |
866e5b51 FC |
1540 | } |
1541 | pushFollow(FOLLOW_unaryExpression_in_postfixExpressionSuffix614); | |
63bfc685 | 1542 | unaryExpression16 = unaryExpression(); |
866e5b51 FC |
1543 | |
1544 | state._fsp--; | |
63bfc685 MK |
1545 | if (state.failed) { |
1546 | return retval; | |
1547 | } | |
1548 | if (state.backtracking == 0) { | |
1549 | adaptor.addChild(root_0, unaryExpression16.getTree()); | |
1550 | } | |
1551 | // CLOSEBRAC17 = (Token) | |
1552 | match(input, CLOSEBRAC, | |
1553 | FOLLOW_CLOSEBRAC_in_postfixExpressionSuffix616); | |
1554 | if (state.failed) { | |
1555 | return retval; | |
866e5b51 FC |
1556 | } |
1557 | ||
63bfc685 | 1558 | } |
866e5b51 | 1559 | |
63bfc685 MK |
1560 | } |
1561 | break; | |
1562 | case 2: | |
1563 | // Grammar/CTFParser.g:278:5: reference | |
1564 | { | |
1565 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 1566 | |
63bfc685 MK |
1567 | pushFollow(FOLLOW_reference_in_postfixExpressionSuffix624); |
1568 | reference18 = reference(); | |
866e5b51 | 1569 | |
63bfc685 MK |
1570 | state._fsp--; |
1571 | if (state.failed) { | |
1572 | return retval; | |
1573 | } | |
1574 | if (state.backtracking == 0) { | |
1575 | adaptor.addChild(root_0, reference18.getTree()); | |
1576 | } | |
866e5b51 | 1577 | |
63bfc685 MK |
1578 | } |
1579 | break; | |
866e5b51 FC |
1580 | |
1581 | } | |
1582 | retval.stop = input.LT(-1); | |
1583 | ||
63bfc685 | 1584 | if (state.backtracking == 0) { |
866e5b51 | 1585 | |
63bfc685 MK |
1586 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
1587 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
1588 | retval.stop); | |
866e5b51 | 1589 | } |
63bfc685 | 1590 | if (state.backtracking == 0) { |
866e5b51 FC |
1591 | |
1592 | exit("postfixExpressionSuffix"); | |
1593 | ||
1594 | } | |
1595 | } | |
1596 | ||
63bfc685 MK |
1597 | catch (RecognitionException e) { |
1598 | throw e; | |
866e5b51 FC |
1599 | } |
1600 | return retval; | |
1601 | } | |
63bfc685 | 1602 | |
866e5b51 FC |
1603 | // $ANTLR end "postfixExpressionSuffix" |
1604 | ||
1605 | public static class postfixExpression_return extends ParserRuleReturnScope { | |
1606 | CommonTree tree; | |
63bfc685 | 1607 | |
866e5b51 | 1608 | @Override |
63bfc685 MK |
1609 | public Object getTree() { |
1610 | return tree; | |
1611 | } | |
1612 | } | |
866e5b51 FC |
1613 | |
1614 | // $ANTLR start "postfixExpression" | |
63bfc685 MK |
1615 | // Grammar/CTFParser.g:281:1: postfixExpression : ( ( primaryExpression ) ( |
1616 | // postfixExpressionSuffix )* | ( ( ctfSpecifierHead ) ( | |
1617 | // postfixExpressionSuffix )+ ) ); | |
1618 | public final CTFParser.postfixExpression_return postfixExpression() | |
1619 | throws RecognitionException { | |
866e5b51 FC |
1620 | CTFParser.postfixExpression_return retval = new CTFParser.postfixExpression_return(); |
1621 | retval.start = input.LT(1); | |
1622 | ||
1623 | CommonTree root_0 = null; | |
1624 | ||
1625 | CTFParser.primaryExpression_return primaryExpression19 = null; | |
1626 | ||
1627 | CTFParser.postfixExpressionSuffix_return postfixExpressionSuffix20 = null; | |
1628 | ||
1629 | CTFParser.ctfSpecifierHead_return ctfSpecifierHead21 = null; | |
1630 | ||
1631 | CTFParser.postfixExpressionSuffix_return postfixExpressionSuffix22 = null; | |
1632 | ||
63bfc685 | 1633 | enter("postfixExpression"); |
866e5b51 FC |
1634 | |
1635 | try { | |
63bfc685 MK |
1636 | // Grammar/CTFParser.g:288:1: ( ( primaryExpression ) ( |
1637 | // postfixExpressionSuffix )* | ( ( ctfSpecifierHead ) ( | |
1638 | // postfixExpressionSuffix )+ ) ) | |
1639 | int alt10 = 2; | |
866e5b51 FC |
1640 | alt10 = dfa10.predict(input); |
1641 | switch (alt10) { | |
63bfc685 MK |
1642 | case 1: |
1643 | // Grammar/CTFParser.g:289:3: ( primaryExpression ) ( | |
1644 | // postfixExpressionSuffix )* | |
1645 | { | |
1646 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 1647 | |
63bfc685 MK |
1648 | // Grammar/CTFParser.g:289:3: ( primaryExpression ) |
1649 | // Grammar/CTFParser.g:289:4: primaryExpression | |
1650 | { | |
866e5b51 | 1651 | pushFollow(FOLLOW_primaryExpression_in_postfixExpression648); |
63bfc685 | 1652 | primaryExpression19 = primaryExpression(); |
866e5b51 FC |
1653 | |
1654 | state._fsp--; | |
63bfc685 MK |
1655 | if (state.failed) { |
1656 | return retval; | |
1657 | } | |
1658 | if (state.backtracking == 0) { | |
1659 | adaptor.addChild(root_0, primaryExpression19.getTree()); | |
866e5b51 FC |
1660 | } |
1661 | ||
63bfc685 | 1662 | } |
866e5b51 | 1663 | |
63bfc685 MK |
1664 | // Grammar/CTFParser.g:289:23: ( postfixExpressionSuffix )* |
1665 | loop8: do { | |
1666 | int alt8 = 2; | |
1667 | int LA8_0 = input.LA(1); | |
866e5b51 | 1668 | |
63bfc685 MK |
1669 | if (((LA8_0 == OPENBRAC) || ((LA8_0 >= ARROW) && (LA8_0 <= DOT)))) { |
1670 | alt8 = 1; | |
1671 | } | |
866e5b51 | 1672 | |
63bfc685 MK |
1673 | switch (alt8) { |
1674 | case 1: | |
1675 | // Grammar/CTFParser.g:289:24: postfixExpressionSuffix | |
1676 | { | |
1677 | pushFollow(FOLLOW_postfixExpressionSuffix_in_postfixExpression652); | |
1678 | postfixExpressionSuffix20 = postfixExpressionSuffix(); | |
866e5b51 | 1679 | |
63bfc685 MK |
1680 | state._fsp--; |
1681 | if (state.failed) { | |
1682 | return retval; | |
1683 | } | |
1684 | if (state.backtracking == 0) { | |
1685 | adaptor.addChild(root_0, | |
1686 | postfixExpressionSuffix20.getTree()); | |
866e5b51 | 1687 | } |
866e5b51 | 1688 | |
63bfc685 MK |
1689 | } |
1690 | break; | |
866e5b51 | 1691 | |
63bfc685 MK |
1692 | default: |
1693 | break loop8; | |
866e5b51 | 1694 | } |
63bfc685 | 1695 | } while (true); |
866e5b51 | 1696 | |
63bfc685 MK |
1697 | } |
1698 | break; | |
1699 | case 2: | |
1700 | // Grammar/CTFParser.g:290:3: ( ( ctfSpecifierHead ) ( | |
1701 | // postfixExpressionSuffix )+ ) | |
1702 | { | |
1703 | root_0 = (CommonTree) adaptor.nil(); | |
1704 | ||
1705 | // Grammar/CTFParser.g:290:3: ( ( ctfSpecifierHead ) ( | |
1706 | // postfixExpressionSuffix )+ ) | |
1707 | // Grammar/CTFParser.g:290:4: ( ctfSpecifierHead ) ( | |
1708 | // postfixExpressionSuffix )+ | |
1709 | { | |
866e5b51 FC |
1710 | // Grammar/CTFParser.g:290:4: ( ctfSpecifierHead ) |
1711 | // Grammar/CTFParser.g:290:5: ctfSpecifierHead | |
1712 | { | |
63bfc685 MK |
1713 | pushFollow(FOLLOW_ctfSpecifierHead_in_postfixExpression661); |
1714 | ctfSpecifierHead21 = ctfSpecifierHead(); | |
866e5b51 | 1715 | |
63bfc685 MK |
1716 | state._fsp--; |
1717 | if (state.failed) { | |
1718 | return retval; | |
1719 | } | |
1720 | if (state.backtracking == 0) { | |
1721 | adaptor.addChild(root_0, | |
1722 | ctfSpecifierHead21.getTree()); | |
1723 | } | |
866e5b51 FC |
1724 | |
1725 | } | |
1726 | ||
1727 | // Grammar/CTFParser.g:290:24: ( postfixExpressionSuffix )+ | |
63bfc685 MK |
1728 | int cnt9 = 0; |
1729 | loop9: do { | |
1730 | int alt9 = 2; | |
866e5b51 FC |
1731 | int LA9_0 = input.LA(1); |
1732 | ||
63bfc685 MK |
1733 | if (((LA9_0 == OPENBRAC) || ((LA9_0 >= ARROW) && (LA9_0 <= DOT)))) { |
1734 | alt9 = 1; | |
866e5b51 FC |
1735 | } |
1736 | ||
866e5b51 | 1737 | switch (alt9) { |
63bfc685 MK |
1738 | case 1: |
1739 | // Grammar/CTFParser.g:290:25: postfixExpressionSuffix | |
1740 | { | |
1741 | pushFollow(FOLLOW_postfixExpressionSuffix_in_postfixExpression666); | |
1742 | postfixExpressionSuffix22 = postfixExpressionSuffix(); | |
1743 | ||
1744 | state._fsp--; | |
1745 | if (state.failed) { | |
1746 | return retval; | |
1747 | } | |
1748 | if (state.backtracking == 0) { | |
1749 | adaptor.addChild(root_0, | |
1750 | postfixExpressionSuffix22.getTree()); | |
1751 | } | |
1752 | ||
1753 | } | |
1754 | break; | |
1755 | ||
1756 | default: | |
1757 | if (cnt9 >= 1) { | |
1758 | break loop9; | |
1759 | } | |
1760 | if (state.backtracking > 0) { | |
1761 | state.failed = true; | |
1762 | return retval; | |
1763 | } | |
1764 | EarlyExitException eee = new EarlyExitException(9, | |
1765 | input); | |
1766 | throw eee; | |
866e5b51 FC |
1767 | } |
1768 | cnt9++; | |
1769 | } while (true); | |
1770 | ||
63bfc685 | 1771 | } |
866e5b51 | 1772 | |
63bfc685 MK |
1773 | } |
1774 | break; | |
866e5b51 FC |
1775 | |
1776 | } | |
1777 | retval.stop = input.LT(-1); | |
1778 | ||
63bfc685 | 1779 | if (state.backtracking == 0) { |
866e5b51 | 1780 | |
63bfc685 MK |
1781 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
1782 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
1783 | retval.stop); | |
866e5b51 | 1784 | } |
63bfc685 | 1785 | if (state.backtracking == 0) { |
866e5b51 FC |
1786 | |
1787 | exit("postfixExpression"); | |
1788 | ||
1789 | } | |
1790 | } | |
1791 | ||
63bfc685 MK |
1792 | catch (RecognitionException e) { |
1793 | throw e; | |
866e5b51 FC |
1794 | } |
1795 | return retval; | |
1796 | } | |
63bfc685 | 1797 | |
866e5b51 FC |
1798 | // $ANTLR end "postfixExpression" |
1799 | ||
1800 | public static class unaryExpression_return extends ParserRuleReturnScope { | |
1801 | CommonTree tree; | |
63bfc685 | 1802 | |
866e5b51 | 1803 | @Override |
63bfc685 MK |
1804 | public Object getTree() { |
1805 | return tree; | |
1806 | } | |
1807 | } | |
866e5b51 FC |
1808 | |
1809 | // $ANTLR start "unaryExpression" | |
1810 | // Grammar/CTFParser.g:293:1: unaryExpression : postfixExpression ; | |
63bfc685 MK |
1811 | public final CTFParser.unaryExpression_return unaryExpression() |
1812 | throws RecognitionException { | |
866e5b51 FC |
1813 | CTFParser.unaryExpression_return retval = new CTFParser.unaryExpression_return(); |
1814 | retval.start = input.LT(1); | |
1815 | ||
1816 | CommonTree root_0 = null; | |
1817 | ||
1818 | CTFParser.postfixExpression_return postfixExpression23 = null; | |
1819 | ||
63bfc685 | 1820 | enter("unaryExpression"); |
866e5b51 FC |
1821 | |
1822 | try { | |
1823 | // Grammar/CTFParser.g:300:1: ( postfixExpression ) | |
1824 | // Grammar/CTFParser.g:303:5: postfixExpression | |
1825 | { | |
63bfc685 | 1826 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 | 1827 | |
63bfc685 MK |
1828 | pushFollow(FOLLOW_postfixExpression_in_unaryExpression700); |
1829 | postfixExpression23 = postfixExpression(); | |
866e5b51 | 1830 | |
63bfc685 MK |
1831 | state._fsp--; |
1832 | if (state.failed) { | |
1833 | return retval; | |
1834 | } | |
1835 | if (state.backtracking == 0) { | |
1836 | adaptor.addChild(root_0, postfixExpression23.getTree()); | |
1837 | } | |
866e5b51 FC |
1838 | |
1839 | } | |
1840 | ||
1841 | retval.stop = input.LT(-1); | |
1842 | ||
63bfc685 | 1843 | if (state.backtracking == 0) { |
866e5b51 | 1844 | |
63bfc685 MK |
1845 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
1846 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
1847 | retval.stop); | |
866e5b51 | 1848 | } |
63bfc685 | 1849 | if (state.backtracking == 0) { |
866e5b51 FC |
1850 | |
1851 | exit("unaryExpression"); | |
1852 | ||
1853 | } | |
1854 | } | |
1855 | ||
63bfc685 MK |
1856 | catch (RecognitionException e) { |
1857 | throw e; | |
866e5b51 FC |
1858 | } |
1859 | return retval; | |
1860 | } | |
63bfc685 | 1861 | |
866e5b51 FC |
1862 | // $ANTLR end "unaryExpression" |
1863 | ||
1864 | public static class enumConstant_return extends ParserRuleReturnScope { | |
1865 | CommonTree tree; | |
63bfc685 | 1866 | |
866e5b51 | 1867 | @Override |
63bfc685 MK |
1868 | public Object getTree() { |
1869 | return tree; | |
1870 | } | |
1871 | } | |
866e5b51 FC |
1872 | |
1873 | // $ANTLR start "enumConstant" | |
63bfc685 MK |
1874 | // Grammar/CTFParser.g:306:1: enumConstant : ( STRING_LITERAL -> ^( |
1875 | // UNARY_EXPRESSION_STRING_QUOTES STRING_LITERAL ) | IDENTIFIER -> ^( | |
1876 | // UNARY_EXPRESSION_STRING IDENTIFIER ) | ctfKeyword -> ^( | |
1877 | // UNARY_EXPRESSION_STRING ctfKeyword ) ); | |
1878 | public final CTFParser.enumConstant_return enumConstant() | |
1879 | throws RecognitionException { | |
866e5b51 FC |
1880 | CTFParser.enumConstant_return retval = new CTFParser.enumConstant_return(); |
1881 | retval.start = input.LT(1); | |
1882 | ||
1883 | CommonTree root_0 = null; | |
1884 | ||
63bfc685 MK |
1885 | Token STRING_LITERAL24 = null; |
1886 | Token IDENTIFIER25 = null; | |
866e5b51 FC |
1887 | CTFParser.ctfKeyword_return ctfKeyword26 = null; |
1888 | ||
63bfc685 MK |
1889 | CommonTree STRING_LITERAL24_tree = null; |
1890 | CommonTree IDENTIFIER25_tree = null; | |
1891 | RewriteRuleTokenStream stream_STRING_LITERAL = new RewriteRuleTokenStream( | |
1892 | adaptor, "token STRING_LITERAL"); | |
1893 | RewriteRuleTokenStream stream_IDENTIFIER = new RewriteRuleTokenStream( | |
1894 | adaptor, "token IDENTIFIER"); | |
1895 | RewriteRuleSubtreeStream stream_ctfKeyword = new RewriteRuleSubtreeStream( | |
1896 | adaptor, "rule ctfKeyword"); | |
866e5b51 | 1897 | |
63bfc685 | 1898 | enter("enumConstant"); |
866e5b51 FC |
1899 | |
1900 | try { | |
63bfc685 MK |
1901 | // Grammar/CTFParser.g:314:1: ( STRING_LITERAL -> ^( |
1902 | // UNARY_EXPRESSION_STRING_QUOTES STRING_LITERAL ) | IDENTIFIER -> | |
1903 | // ^( UNARY_EXPRESSION_STRING IDENTIFIER ) | ctfKeyword -> ^( | |
1904 | // UNARY_EXPRESSION_STRING ctfKeyword ) ) | |
1905 | int alt11 = 3; | |
1906 | switch (input.LA(1)) { | |
1907 | case STRING_LITERAL: { | |
1908 | alt11 = 1; | |
1909 | } | |
866e5b51 | 1910 | break; |
63bfc685 MK |
1911 | case IDENTIFIER: { |
1912 | alt11 = 2; | |
1913 | } | |
866e5b51 FC |
1914 | break; |
1915 | case ALIGNTOK: | |
1916 | case EVENTTOK: | |
1917 | case SIGNEDTOK: | |
63bfc685 MK |
1918 | case STRINGTOK: { |
1919 | alt11 = 3; | |
1920 | } | |
866e5b51 FC |
1921 | break; |
1922 | default: | |
63bfc685 MK |
1923 | if (state.backtracking > 0) { |
1924 | state.failed = true; | |
1925 | return retval; | |
1926 | } | |
1927 | NoViableAltException nvae = new NoViableAltException("", 11, 0, | |
1928 | input); | |
866e5b51 FC |
1929 | |
1930 | throw nvae; | |
1931 | } | |
1932 | ||
1933 | switch (alt11) { | |
63bfc685 MK |
1934 | case 1: |
1935 | // Grammar/CTFParser.g:315:5: STRING_LITERAL | |
1936 | { | |
1937 | STRING_LITERAL24 = (Token) match(input, STRING_LITERAL, | |
1938 | FOLLOW_STRING_LITERAL_in_enumConstant725); | |
1939 | if (state.failed) { | |
1940 | return retval; | |
1941 | } | |
1942 | if (state.backtracking == 0) { | |
1943 | stream_STRING_LITERAL.add(STRING_LITERAL24); | |
1944 | } | |
1945 | ||
1946 | // AST REWRITE | |
1947 | // elements: STRING_LITERAL | |
1948 | // token labels: | |
1949 | // rule labels: retval | |
1950 | // token list labels: | |
1951 | // rule list labels: | |
1952 | // wildcard labels: | |
1953 | if (state.backtracking == 0) { | |
866e5b51 | 1954 | retval.tree = root_0; |
63bfc685 MK |
1955 | // RewriteRuleSubtreeStream stream_retval = |
1956 | new RewriteRuleSubtreeStream( | |
1957 | adaptor, "rule retval", | |
1958 | retval != null ? retval.tree : null); | |
866e5b51 | 1959 | |
63bfc685 MK |
1960 | root_0 = (CommonTree) adaptor.nil(); |
1961 | // 315:20: -> ^( UNARY_EXPRESSION_STRING_QUOTES | |
1962 | // STRING_LITERAL ) | |
866e5b51 | 1963 | { |
63bfc685 MK |
1964 | // Grammar/CTFParser.g:315:23: ^( |
1965 | // UNARY_EXPRESSION_STRING_QUOTES STRING_LITERAL ) | |
866e5b51 | 1966 | { |
63bfc685 MK |
1967 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
1968 | root_1 = (CommonTree) adaptor.becomeRoot(adaptor | |
1969 | .create(UNARY_EXPRESSION_STRING_QUOTES, | |
1970 | "UNARY_EXPRESSION_STRING_QUOTES"), | |
1971 | root_1); | |
866e5b51 | 1972 | |
63bfc685 MK |
1973 | adaptor.addChild(root_1, |
1974 | stream_STRING_LITERAL.nextNode()); | |
866e5b51 | 1975 | |
63bfc685 | 1976 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
1977 | } |
1978 | ||
1979 | } | |
1980 | ||
866e5b51 | 1981 | retval.tree = root_0; |
63bfc685 MK |
1982 | } |
1983 | } | |
1984 | break; | |
1985 | case 2: | |
1986 | // Grammar/CTFParser.g:316:7: IDENTIFIER | |
1987 | { | |
1988 | IDENTIFIER25 = (Token) match(input, IDENTIFIER, | |
1989 | FOLLOW_IDENTIFIER_in_enumConstant741); | |
1990 | if (state.failed) { | |
1991 | return retval; | |
1992 | } | |
1993 | if (state.backtracking == 0) { | |
1994 | stream_IDENTIFIER.add(IDENTIFIER25); | |
1995 | } | |
1996 | ||
1997 | // AST REWRITE | |
1998 | // elements: IDENTIFIER | |
1999 | // token labels: | |
2000 | // rule labels: retval | |
2001 | // token list labels: | |
2002 | // rule list labels: | |
2003 | // wildcard labels: | |
2004 | if (state.backtracking == 0) { | |
2005 | retval.tree = root_0; | |
2006 | // RewriteRuleSubtreeStream stream_retval = | |
2007 | new RewriteRuleSubtreeStream( | |
2008 | adaptor, "rule retval", | |
2009 | retval != null ? retval.tree : null); | |
866e5b51 | 2010 | |
63bfc685 | 2011 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 FC |
2012 | // 316:18: -> ^( UNARY_EXPRESSION_STRING IDENTIFIER ) |
2013 | { | |
63bfc685 MK |
2014 | // Grammar/CTFParser.g:316:21: ^( |
2015 | // UNARY_EXPRESSION_STRING IDENTIFIER ) | |
866e5b51 | 2016 | { |
63bfc685 MK |
2017 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
2018 | root_1 = (CommonTree) adaptor.becomeRoot(adaptor | |
2019 | .create(UNARY_EXPRESSION_STRING, | |
2020 | "UNARY_EXPRESSION_STRING"), root_1); | |
866e5b51 | 2021 | |
63bfc685 MK |
2022 | adaptor.addChild(root_1, |
2023 | stream_IDENTIFIER.nextNode()); | |
866e5b51 | 2024 | |
63bfc685 | 2025 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
2026 | } |
2027 | ||
2028 | } | |
2029 | ||
63bfc685 MK |
2030 | retval.tree = root_0; |
2031 | } | |
2032 | } | |
2033 | break; | |
2034 | case 3: | |
2035 | // Grammar/CTFParser.g:317:7: ctfKeyword | |
2036 | { | |
2037 | pushFollow(FOLLOW_ctfKeyword_in_enumConstant757); | |
2038 | ctfKeyword26 = ctfKeyword(); | |
866e5b51 | 2039 | |
63bfc685 MK |
2040 | state._fsp--; |
2041 | if (state.failed) { | |
2042 | return retval; | |
2043 | } | |
2044 | if (state.backtracking == 0) { | |
2045 | stream_ctfKeyword.add(ctfKeyword26.getTree()); | |
2046 | } | |
866e5b51 | 2047 | |
63bfc685 MK |
2048 | // AST REWRITE |
2049 | // elements: ctfKeyword | |
2050 | // token labels: | |
2051 | // rule labels: retval | |
2052 | // token list labels: | |
2053 | // rule list labels: | |
2054 | // wildcard labels: | |
2055 | if (state.backtracking == 0) { | |
866e5b51 | 2056 | retval.tree = root_0; |
63bfc685 MK |
2057 | // RewriteRuleSubtreeStream stream_retval = |
2058 | new RewriteRuleSubtreeStream( | |
2059 | adaptor, "rule retval", | |
2060 | retval != null ? retval.tree : null); | |
866e5b51 | 2061 | |
63bfc685 | 2062 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 FC |
2063 | // 317:18: -> ^( UNARY_EXPRESSION_STRING ctfKeyword ) |
2064 | { | |
63bfc685 MK |
2065 | // Grammar/CTFParser.g:317:21: ^( |
2066 | // UNARY_EXPRESSION_STRING ctfKeyword ) | |
866e5b51 | 2067 | { |
63bfc685 MK |
2068 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
2069 | root_1 = (CommonTree) adaptor.becomeRoot(adaptor | |
2070 | .create(UNARY_EXPRESSION_STRING, | |
2071 | "UNARY_EXPRESSION_STRING"), root_1); | |
866e5b51 | 2072 | |
63bfc685 MK |
2073 | adaptor.addChild(root_1, |
2074 | stream_ctfKeyword.nextTree()); | |
866e5b51 | 2075 | |
63bfc685 | 2076 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
2077 | } |
2078 | ||
2079 | } | |
2080 | ||
63bfc685 MK |
2081 | retval.tree = root_0; |
2082 | } | |
2083 | } | |
2084 | break; | |
866e5b51 FC |
2085 | |
2086 | } | |
2087 | retval.stop = input.LT(-1); | |
2088 | ||
63bfc685 | 2089 | if (state.backtracking == 0) { |
866e5b51 | 2090 | |
63bfc685 MK |
2091 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
2092 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
2093 | retval.stop); | |
866e5b51 | 2094 | } |
63bfc685 | 2095 | if (state.backtracking == 0) { |
866e5b51 | 2096 | |
63bfc685 | 2097 | debug_print(input.toString(retval.start, input.LT(-1))); |
866e5b51 FC |
2098 | exit("enumConstant"); |
2099 | ||
2100 | } | |
2101 | } | |
2102 | ||
63bfc685 MK |
2103 | catch (RecognitionException e) { |
2104 | throw e; | |
866e5b51 FC |
2105 | } |
2106 | return retval; | |
2107 | } | |
63bfc685 | 2108 | |
866e5b51 FC |
2109 | // $ANTLR end "enumConstant" |
2110 | ||
2111 | public static class declaration_return extends ParserRuleReturnScope { | |
2112 | CommonTree tree; | |
866e5b51 | 2113 | |
63bfc685 MK |
2114 | @Override |
2115 | public Object getTree() { | |
2116 | return tree; | |
2117 | } | |
2118 | } | |
2119 | ||
2120 | // $ANTLR start "declaration" | |
2121 | // Grammar/CTFParser.g:321:1: declaration : ( ( declarationSpecifiers ( | |
2122 | // declaratorList )? TERM ) -> {inTypedef()}? ^( DECLARATION ^( TYPEDEF | |
2123 | // declaratorList declarationSpecifiers ) ) -> ^( DECLARATION | |
2124 | // declarationSpecifiers ( declaratorList )? ) | ( ctfSpecifier TERM ) ); | |
2125 | public final CTFParser.declaration_return declaration() | |
2126 | throws RecognitionException { | |
866e5b51 FC |
2127 | CTFParser.declaration_return retval = new CTFParser.declaration_return(); |
2128 | retval.start = input.LT(1); | |
2129 | ||
2130 | CommonTree root_0 = null; | |
2131 | ||
63bfc685 MK |
2132 | Token TERM29 = null; |
2133 | Token TERM31 = null; | |
866e5b51 FC |
2134 | CTFParser.declarationSpecifiers_return declarationSpecifiers27 = null; |
2135 | ||
2136 | CTFParser.declaratorList_return declaratorList28 = null; | |
2137 | ||
2138 | CTFParser.ctfSpecifier_return ctfSpecifier30 = null; | |
2139 | ||
63bfc685 MK |
2140 | CommonTree TERM29_tree = null; |
2141 | CommonTree TERM31_tree = null; | |
2142 | RewriteRuleTokenStream stream_TERM = new RewriteRuleTokenStream( | |
2143 | adaptor, "token TERM"); | |
2144 | RewriteRuleSubtreeStream stream_declaratorList = new RewriteRuleSubtreeStream( | |
2145 | adaptor, "rule declaratorList"); | |
2146 | RewriteRuleSubtreeStream stream_declarationSpecifiers = new RewriteRuleSubtreeStream( | |
2147 | adaptor, "rule declarationSpecifiers"); | |
866e5b51 | 2148 | |
63bfc685 | 2149 | enter("declaration"); |
866e5b51 FC |
2150 | |
2151 | try { | |
63bfc685 MK |
2152 | // Grammar/CTFParser.g:330:1: ( ( declarationSpecifiers ( |
2153 | // declaratorList )? TERM ) -> {inTypedef()}? ^( DECLARATION ^( | |
2154 | // TYPEDEF declaratorList declarationSpecifiers ) ) -> ^( | |
2155 | // DECLARATION declarationSpecifiers ( declaratorList )? ) | ( | |
2156 | // ctfSpecifier TERM ) ) | |
2157 | int alt13 = 2; | |
866e5b51 FC |
2158 | int LA13_0 = input.LA(1); |
2159 | ||
63bfc685 MK |
2160 | if ((((LA13_0 >= CONSTTOK) && (LA13_0 <= ENUMTOK)) |
2161 | || ((LA13_0 >= FLOATINGPOINTTOK) && (LA13_0 <= SIGNEDTOK)) | |
2162 | || ((LA13_0 >= STRINGTOK) && (LA13_0 <= STRUCTTOK)) || ((LA13_0 >= TYPEDEFTOK) && (LA13_0 <= IMAGINARYTOK)))) { | |
2163 | alt13 = 1; | |
2164 | } else if ((LA13_0 == IDENTIFIER) | |
2165 | && ((inTypealiasAlias() || isTypeName(input.LT(1).getText())))) { | |
2166 | alt13 = 1; | |
2167 | } else if (((LA13_0 == EVENTTOK) || (LA13_0 == STREAMTOK) | |
2168 | || ((LA13_0 >= TRACETOK) && (LA13_0 <= TYPEALIASTOK)) || ((LA13_0 >= ENVTOK) && (LA13_0 <= CLOCKTOK)))) { | |
2169 | alt13 = 2; | |
2170 | } else { | |
2171 | if (state.backtracking > 0) { | |
2172 | state.failed = true; | |
2173 | return retval; | |
2174 | } | |
2175 | NoViableAltException nvae = new NoViableAltException("", 13, 0, | |
2176 | input); | |
866e5b51 FC |
2177 | |
2178 | throw nvae; | |
2179 | } | |
2180 | switch (alt13) { | |
63bfc685 MK |
2181 | case 1: |
2182 | // Grammar/CTFParser.g:331:3: ( declarationSpecifiers ( | |
2183 | // declaratorList )? TERM ) | |
2184 | { | |
2185 | // Grammar/CTFParser.g:331:3: ( declarationSpecifiers ( | |
2186 | // declaratorList )? TERM ) | |
2187 | // Grammar/CTFParser.g:331:4: declarationSpecifiers ( | |
2188 | // declaratorList )? TERM | |
2189 | { | |
866e5b51 | 2190 | pushFollow(FOLLOW_declarationSpecifiers_in_declaration790); |
63bfc685 | 2191 | declarationSpecifiers27 = declarationSpecifiers(); |
866e5b51 FC |
2192 | |
2193 | state._fsp--; | |
63bfc685 MK |
2194 | if (state.failed) { |
2195 | return retval; | |
2196 | } | |
2197 | if (state.backtracking == 0) { | |
2198 | stream_declarationSpecifiers | |
2199 | .add(declarationSpecifiers27.getTree()); | |
2200 | } | |
866e5b51 | 2201 | // Grammar/CTFParser.g:331:26: ( declaratorList )? |
63bfc685 | 2202 | int alt12 = 2; |
866e5b51 FC |
2203 | int LA12_0 = input.LA(1); |
2204 | ||
63bfc685 MK |
2205 | if (((LA12_0 == POINTER) || (LA12_0 == IDENTIFIER))) { |
2206 | alt12 = 1; | |
866e5b51 FC |
2207 | } |
2208 | switch (alt12) { | |
63bfc685 MK |
2209 | case 1: |
2210 | // Grammar/CTFParser.g:331:26: declaratorList | |
2211 | { | |
2212 | pushFollow(FOLLOW_declaratorList_in_declaration792); | |
2213 | declaratorList28 = declaratorList(); | |
866e5b51 | 2214 | |
63bfc685 MK |
2215 | state._fsp--; |
2216 | if (state.failed) { | |
2217 | return retval; | |
2218 | } | |
2219 | if (state.backtracking == 0) { | |
2220 | stream_declaratorList.add(declaratorList28 | |
2221 | .getTree()); | |
2222 | } | |
866e5b51 FC |
2223 | |
2224 | } | |
63bfc685 | 2225 | break; |
866e5b51 FC |
2226 | |
2227 | } | |
2228 | ||
63bfc685 MK |
2229 | TERM29 = (Token) match(input, TERM, |
2230 | FOLLOW_TERM_in_declaration795); | |
2231 | if (state.failed) { | |
2232 | return retval; | |
2233 | } | |
2234 | if (state.backtracking == 0) { | |
2235 | stream_TERM.add(TERM29); | |
2236 | } | |
866e5b51 | 2237 | |
63bfc685 | 2238 | } |
866e5b51 | 2239 | |
63bfc685 MK |
2240 | // AST REWRITE |
2241 | // elements: declaratorList, declaratorList, | |
2242 | // declarationSpecifiers, declarationSpecifiers | |
2243 | // token labels: | |
2244 | // rule labels: retval | |
2245 | // token list labels: | |
2246 | // rule list labels: | |
2247 | // wildcard labels: | |
2248 | if (state.backtracking == 0) { | |
866e5b51 | 2249 | retval.tree = root_0; |
63bfc685 MK |
2250 | // RewriteRuleSubtreeStream stream_retval = |
2251 | new RewriteRuleSubtreeStream( | |
2252 | adaptor, "rule retval", | |
2253 | retval != null ? retval.tree : null); | |
2254 | ||
2255 | root_0 = (CommonTree) adaptor.nil(); | |
2256 | // 334:3: -> {inTypedef()}? ^( DECLARATION ^( TYPEDEF | |
2257 | // declaratorList declarationSpecifiers ) ) | |
866e5b51 | 2258 | if (inTypedef()) { |
63bfc685 MK |
2259 | // Grammar/CTFParser.g:334:21: ^( DECLARATION ^( TYPEDEF |
2260 | // declaratorList declarationSpecifiers ) ) | |
866e5b51 | 2261 | { |
63bfc685 MK |
2262 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
2263 | root_1 = (CommonTree) adaptor.becomeRoot( | |
2264 | adaptor.create(DECLARATION, "DECLARATION"), | |
2265 | root_1); | |
866e5b51 | 2266 | |
63bfc685 MK |
2267 | // Grammar/CTFParser.g:334:35: ^( TYPEDEF |
2268 | // declaratorList declarationSpecifiers ) | |
2269 | { | |
2270 | CommonTree root_2 = (CommonTree) adaptor.nil(); | |
2271 | root_2 = (CommonTree) adaptor.becomeRoot( | |
2272 | adaptor.create(TYPEDEF, "TYPEDEF"), | |
2273 | root_2); | |
866e5b51 | 2274 | |
63bfc685 MK |
2275 | adaptor.addChild(root_2, |
2276 | stream_declaratorList.nextTree()); | |
2277 | adaptor.addChild(root_2, | |
2278 | stream_declarationSpecifiers.nextTree()); | |
866e5b51 | 2279 | |
63bfc685 MK |
2280 | adaptor.addChild(root_1, root_2); |
2281 | } | |
866e5b51 | 2282 | |
63bfc685 | 2283 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
2284 | } |
2285 | ||
63bfc685 MK |
2286 | } else // 335:3: -> ^( DECLARATION declarationSpecifiers ( |
2287 | // declaratorList )? ) | |
866e5b51 | 2288 | { |
63bfc685 MK |
2289 | // Grammar/CTFParser.g:335:6: ^( DECLARATION |
2290 | // declarationSpecifiers ( declaratorList )? ) | |
866e5b51 | 2291 | { |
63bfc685 MK |
2292 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
2293 | root_1 = (CommonTree) adaptor.becomeRoot( | |
2294 | adaptor.create(DECLARATION, "DECLARATION"), | |
2295 | root_1); | |
2296 | ||
2297 | adaptor.addChild(root_1, | |
2298 | stream_declarationSpecifiers.nextTree()); | |
2299 | // Grammar/CTFParser.g:335:42: ( declaratorList )? | |
2300 | if (stream_declaratorList.hasNext()) { | |
2301 | adaptor.addChild(root_1, | |
2302 | stream_declaratorList.nextTree()); | |
866e5b51 | 2303 | |
63bfc685 MK |
2304 | } |
2305 | stream_declaratorList.reset(); | |
866e5b51 | 2306 | |
63bfc685 | 2307 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
2308 | } |
2309 | ||
2310 | } | |
2311 | ||
63bfc685 MK |
2312 | retval.tree = root_0; |
2313 | } | |
2314 | } | |
2315 | break; | |
2316 | case 2: | |
2317 | // Grammar/CTFParser.g:337:5: ( ctfSpecifier TERM ) | |
2318 | { | |
2319 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 2320 | |
63bfc685 MK |
2321 | // Grammar/CTFParser.g:337:5: ( ctfSpecifier TERM ) |
2322 | // Grammar/CTFParser.g:337:6: ctfSpecifier TERM | |
2323 | { | |
866e5b51 | 2324 | pushFollow(FOLLOW_ctfSpecifier_in_declaration844); |
63bfc685 | 2325 | ctfSpecifier30 = ctfSpecifier(); |
866e5b51 FC |
2326 | |
2327 | state._fsp--; | |
63bfc685 MK |
2328 | if (state.failed) { |
2329 | return retval; | |
2330 | } | |
2331 | if (state.backtracking == 0) { | |
2332 | adaptor.addChild(root_0, ctfSpecifier30.getTree()); | |
2333 | } | |
2334 | // TERM31 = (Token) | |
2335 | match(input, TERM, | |
2336 | FOLLOW_TERM_in_declaration846); | |
2337 | if (state.failed) { | |
2338 | return retval; | |
866e5b51 FC |
2339 | } |
2340 | ||
63bfc685 | 2341 | } |
866e5b51 | 2342 | |
63bfc685 MK |
2343 | } |
2344 | break; | |
866e5b51 FC |
2345 | |
2346 | } | |
2347 | retval.stop = input.LT(-1); | |
2348 | ||
63bfc685 | 2349 | if (state.backtracking == 0) { |
866e5b51 | 2350 | |
63bfc685 MK |
2351 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
2352 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
2353 | retval.stop); | |
866e5b51 | 2354 | } |
63bfc685 | 2355 | if (state.backtracking == 0) { |
866e5b51 FC |
2356 | |
2357 | exit("declaration"); | |
63bfc685 MK |
2358 | if (inTypedef()) { |
2359 | typedefOff(); | |
2360 | } | |
866e5b51 FC |
2361 | |
2362 | } | |
2363 | } | |
2364 | ||
63bfc685 MK |
2365 | catch (RecognitionException e) { |
2366 | throw e; | |
866e5b51 FC |
2367 | } |
2368 | return retval; | |
2369 | } | |
63bfc685 | 2370 | |
866e5b51 FC |
2371 | // $ANTLR end "declaration" |
2372 | ||
63bfc685 MK |
2373 | public static class declarationSpecifiers_return extends |
2374 | ParserRuleReturnScope { | |
866e5b51 | 2375 | CommonTree tree; |
63bfc685 | 2376 | |
866e5b51 | 2377 | @Override |
63bfc685 MK |
2378 | public Object getTree() { |
2379 | return tree; | |
2380 | } | |
2381 | } | |
866e5b51 FC |
2382 | |
2383 | // $ANTLR start "declarationSpecifiers" | |
63bfc685 MK |
2384 | // Grammar/CTFParser.g:340:1: declarationSpecifiers : ( |
2385 | // storageClassSpecifier | typeQualifier | typeSpecifier )+ -> ^( | |
2386 | // TYPE_SPECIFIER_LIST ( typeQualifier )* ( typeSpecifier )* ) ; | |
2387 | public final CTFParser.declarationSpecifiers_return declarationSpecifiers() | |
2388 | throws RecognitionException { | |
866e5b51 FC |
2389 | CTFParser.declarationSpecifiers_return retval = new CTFParser.declarationSpecifiers_return(); |
2390 | retval.start = input.LT(1); | |
2391 | ||
2392 | CommonTree root_0 = null; | |
2393 | ||
2394 | CTFParser.storageClassSpecifier_return storageClassSpecifier32 = null; | |
2395 | ||
2396 | CTFParser.typeQualifier_return typeQualifier33 = null; | |
2397 | ||
2398 | CTFParser.typeSpecifier_return typeSpecifier34 = null; | |
2399 | ||
63bfc685 MK |
2400 | RewriteRuleSubtreeStream stream_typeSpecifier = new RewriteRuleSubtreeStream( |
2401 | adaptor, "rule typeSpecifier"); | |
2402 | RewriteRuleSubtreeStream stream_typeQualifier = new RewriteRuleSubtreeStream( | |
2403 | adaptor, "rule typeQualifier"); | |
2404 | RewriteRuleSubtreeStream stream_storageClassSpecifier = new RewriteRuleSubtreeStream( | |
2405 | adaptor, "rule storageClassSpecifier"); | |
866e5b51 | 2406 | |
63bfc685 | 2407 | enter("declarationSpecifiers"); |
866e5b51 FC |
2408 | |
2409 | try { | |
63bfc685 MK |
2410 | // Grammar/CTFParser.g:348:1: ( ( storageClassSpecifier | |
2411 | // typeQualifier | typeSpecifier )+ -> ^( TYPE_SPECIFIER_LIST ( | |
2412 | // typeQualifier )* ( typeSpecifier )* ) ) | |
2413 | // Grammar/CTFParser.g:349:3: ( storageClassSpecifier | | |
2414 | // typeQualifier | typeSpecifier )+ | |
866e5b51 | 2415 | { |
63bfc685 MK |
2416 | // Grammar/CTFParser.g:349:3: ( storageClassSpecifier | |
2417 | // typeQualifier | typeSpecifier )+ | |
2418 | int cnt14 = 0; | |
2419 | loop14: do { | |
2420 | int alt14 = 4; | |
2421 | switch (input.LA(1)) { | |
2422 | case IDENTIFIER: { | |
2423 | int LA14_2 = input.LA(2); | |
2424 | ||
2425 | if (((inTypealiasAlias() || isTypeName(input.LT(1) | |
2426 | .getText())))) { | |
2427 | alt14 = 3; | |
2428 | } | |
866e5b51 | 2429 | |
866e5b51 | 2430 | } |
63bfc685 MK |
2431 | break; |
2432 | case TYPEDEFTOK: { | |
2433 | alt14 = 1; | |
2434 | } | |
2435 | break; | |
2436 | case CONSTTOK: { | |
2437 | alt14 = 2; | |
2438 | } | |
2439 | break; | |
2440 | case CHARTOK: | |
2441 | case DOUBLETOK: | |
2442 | case ENUMTOK: | |
2443 | case FLOATINGPOINTTOK: | |
2444 | case FLOATTOK: | |
2445 | case INTEGERTOK: | |
2446 | case INTTOK: | |
2447 | case LONGTOK: | |
2448 | case SHORTTOK: | |
2449 | case SIGNEDTOK: | |
2450 | case STRINGTOK: | |
2451 | case STRUCTTOK: | |
2452 | case UNSIGNEDTOK: | |
2453 | case VARIANTTOK: | |
2454 | case VOIDTOK: | |
2455 | case BOOLTOK: | |
2456 | case COMPLEXTOK: | |
2457 | case IMAGINARYTOK: { | |
2458 | alt14 = 3; | |
2459 | } | |
2460 | break; | |
866e5b51 FC |
2461 | |
2462 | } | |
63bfc685 MK |
2463 | |
2464 | switch (alt14) { | |
2465 | case 1: | |
2466 | // Grammar/CTFParser.g:352:6: storageClassSpecifier | |
866e5b51 | 2467 | { |
63bfc685 MK |
2468 | pushFollow(FOLLOW_storageClassSpecifier_in_declarationSpecifiers891); |
2469 | storageClassSpecifier32 = storageClassSpecifier(); | |
2470 | ||
2471 | state._fsp--; | |
2472 | if (state.failed) { | |
2473 | return retval; | |
2474 | } | |
2475 | if (state.backtracking == 0) { | |
2476 | stream_storageClassSpecifier | |
2477 | .add(storageClassSpecifier32.getTree()); | |
2478 | } | |
2479 | ||
866e5b51 | 2480 | } |
63bfc685 MK |
2481 | break; |
2482 | case 2: | |
2483 | // Grammar/CTFParser.g:353:6: typeQualifier | |
866e5b51 | 2484 | { |
63bfc685 MK |
2485 | pushFollow(FOLLOW_typeQualifier_in_declarationSpecifiers898); |
2486 | typeQualifier33 = typeQualifier(); | |
2487 | ||
2488 | state._fsp--; | |
2489 | if (state.failed) { | |
2490 | return retval; | |
2491 | } | |
2492 | if (state.backtracking == 0) { | |
2493 | stream_typeQualifier.add(typeQualifier33.getTree()); | |
2494 | } | |
2495 | ||
866e5b51 | 2496 | } |
63bfc685 MK |
2497 | break; |
2498 | case 3: | |
2499 | // Grammar/CTFParser.g:354:6: typeSpecifier | |
866e5b51 | 2500 | { |
63bfc685 MK |
2501 | pushFollow(FOLLOW_typeSpecifier_in_declarationSpecifiers905); |
2502 | typeSpecifier34 = typeSpecifier(); | |
866e5b51 | 2503 | |
63bfc685 MK |
2504 | state._fsp--; |
2505 | if (state.failed) { | |
2506 | return retval; | |
2507 | } | |
2508 | if (state.backtracking == 0) { | |
2509 | stream_typeSpecifier.add(typeSpecifier34.getTree()); | |
2510 | } | |
866e5b51 | 2511 | |
63bfc685 MK |
2512 | } |
2513 | break; | |
866e5b51 | 2514 | |
63bfc685 MK |
2515 | default: |
2516 | if (cnt14 >= 1) { | |
2517 | break loop14; | |
2518 | } | |
2519 | if (state.backtracking > 0) { | |
2520 | state.failed = true; | |
2521 | return retval; | |
2522 | } | |
2523 | EarlyExitException eee = new EarlyExitException(14, | |
2524 | input); | |
2525 | throw eee; | |
2526 | } | |
2527 | cnt14++; | |
2528 | } while (true); | |
2529 | ||
2530 | // AST REWRITE | |
2531 | // elements: typeQualifier, typeSpecifier | |
2532 | // token labels: | |
2533 | // rule labels: retval | |
2534 | // token list labels: | |
2535 | // rule list labels: | |
2536 | // wildcard labels: | |
2537 | if (state.backtracking == 0) { | |
2538 | retval.tree = root_0; | |
2539 | // RewriteRuleSubtreeStream stream_retval = | |
2540 | new RewriteRuleSubtreeStream( | |
2541 | adaptor, "rule retval", | |
2542 | retval != null ? retval.tree : null); | |
866e5b51 | 2543 | |
63bfc685 MK |
2544 | root_0 = (CommonTree) adaptor.nil(); |
2545 | // 355:6: -> ^( TYPE_SPECIFIER_LIST ( typeQualifier )* ( | |
2546 | // typeSpecifier )* ) | |
2547 | { | |
2548 | // Grammar/CTFParser.g:355:9: ^( TYPE_SPECIFIER_LIST ( | |
2549 | // typeQualifier )* ( typeSpecifier )* ) | |
2550 | { | |
2551 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
2552 | root_1 = (CommonTree) adaptor.becomeRoot(adaptor | |
2553 | .create(TYPE_SPECIFIER_LIST, | |
2554 | "TYPE_SPECIFIER_LIST"), root_1); | |
866e5b51 | 2555 | |
63bfc685 MK |
2556 | // Grammar/CTFParser.g:355:31: ( typeQualifier )* |
2557 | while (stream_typeQualifier.hasNext()) { | |
2558 | adaptor.addChild(root_1, | |
2559 | stream_typeQualifier.nextTree()); | |
866e5b51 | 2560 | |
63bfc685 MK |
2561 | } |
2562 | stream_typeQualifier.reset(); | |
2563 | // Grammar/CTFParser.g:355:46: ( typeSpecifier )* | |
2564 | while (stream_typeSpecifier.hasNext()) { | |
2565 | adaptor.addChild(root_1, | |
2566 | stream_typeSpecifier.nextTree()); | |
866e5b51 | 2567 | |
63bfc685 MK |
2568 | } |
2569 | stream_typeSpecifier.reset(); | |
866e5b51 | 2570 | |
63bfc685 MK |
2571 | adaptor.addChild(root_0, root_1); |
2572 | } | |
866e5b51 | 2573 | |
63bfc685 | 2574 | } |
866e5b51 | 2575 | |
63bfc685 | 2576 | retval.tree = root_0; |
866e5b51 | 2577 | } |
866e5b51 FC |
2578 | } |
2579 | ||
2580 | retval.stop = input.LT(-1); | |
2581 | ||
63bfc685 | 2582 | if (state.backtracking == 0) { |
866e5b51 | 2583 | |
63bfc685 MK |
2584 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
2585 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
2586 | retval.stop); | |
866e5b51 | 2587 | } |
63bfc685 | 2588 | if (state.backtracking == 0) { |
866e5b51 | 2589 | |
63bfc685 | 2590 | debug_print(input.toString(retval.start, input.LT(-1))); |
866e5b51 FC |
2591 | exit("declarationSpecifiers"); |
2592 | ||
2593 | } | |
2594 | } | |
2595 | ||
63bfc685 MK |
2596 | catch (RecognitionException e) { |
2597 | throw e; | |
2598 | ||
866e5b51 FC |
2599 | } |
2600 | return retval; | |
2601 | } | |
63bfc685 | 2602 | |
866e5b51 FC |
2603 | // $ANTLR end "declarationSpecifiers" |
2604 | ||
2605 | public static class declaratorList_return extends ParserRuleReturnScope { | |
2606 | CommonTree tree; | |
63bfc685 | 2607 | |
866e5b51 | 2608 | @Override |
63bfc685 MK |
2609 | public Object getTree() { |
2610 | return tree; | |
2611 | } | |
2612 | } | |
866e5b51 FC |
2613 | |
2614 | // $ANTLR start "declaratorList" | |
63bfc685 MK |
2615 | // Grammar/CTFParser.g:358:1: declaratorList : declarator ( SEPARATOR |
2616 | // declarator )* -> ^( TYPE_DECLARATOR_LIST ( declarator )+ ) ; | |
2617 | public final CTFParser.declaratorList_return declaratorList() | |
2618 | throws RecognitionException { | |
866e5b51 FC |
2619 | CTFParser.declaratorList_return retval = new CTFParser.declaratorList_return(); |
2620 | retval.start = input.LT(1); | |
2621 | ||
2622 | CommonTree root_0 = null; | |
2623 | ||
63bfc685 | 2624 | Token SEPARATOR36 = null; |
866e5b51 FC |
2625 | CTFParser.declarator_return declarator35 = null; |
2626 | ||
2627 | CTFParser.declarator_return declarator37 = null; | |
2628 | ||
63bfc685 MK |
2629 | CommonTree SEPARATOR36_tree = null; |
2630 | RewriteRuleTokenStream stream_SEPARATOR = new RewriteRuleTokenStream( | |
2631 | adaptor, "token SEPARATOR"); | |
2632 | RewriteRuleSubtreeStream stream_declarator = new RewriteRuleSubtreeStream( | |
2633 | adaptor, "rule declarator"); | |
866e5b51 | 2634 | |
63bfc685 | 2635 | enter("declaratorList"); |
866e5b51 FC |
2636 | |
2637 | try { | |
63bfc685 MK |
2638 | // Grammar/CTFParser.g:365:1: ( declarator ( SEPARATOR declarator )* |
2639 | // -> ^( TYPE_DECLARATOR_LIST ( declarator )+ ) ) | |
866e5b51 FC |
2640 | // Grammar/CTFParser.g:366:3: declarator ( SEPARATOR declarator )* |
2641 | { | |
63bfc685 MK |
2642 | pushFollow(FOLLOW_declarator_in_declaratorList946); |
2643 | declarator35 = declarator(); | |
866e5b51 | 2644 | |
63bfc685 MK |
2645 | state._fsp--; |
2646 | if (state.failed) { | |
2647 | return retval; | |
866e5b51 | 2648 | } |
63bfc685 MK |
2649 | if (state.backtracking == 0) { |
2650 | stream_declarator.add(declarator35.getTree()); | |
2651 | } | |
2652 | // Grammar/CTFParser.g:366:14: ( SEPARATOR declarator )* | |
2653 | loop15: do { | |
2654 | int alt15 = 2; | |
2655 | int LA15_0 = input.LA(1); | |
866e5b51 | 2656 | |
63bfc685 MK |
2657 | if ((LA15_0 == SEPARATOR)) { |
2658 | alt15 = 1; | |
2659 | } | |
866e5b51 | 2660 | |
63bfc685 MK |
2661 | switch (alt15) { |
2662 | case 1: | |
2663 | // Grammar/CTFParser.g:366:15: SEPARATOR declarator | |
2664 | { | |
2665 | SEPARATOR36 = (Token) match(input, SEPARATOR, | |
2666 | FOLLOW_SEPARATOR_in_declaratorList949); | |
2667 | if (state.failed) { | |
2668 | return retval; | |
2669 | } | |
2670 | if (state.backtracking == 0) { | |
2671 | stream_SEPARATOR.add(SEPARATOR36); | |
2672 | } | |
866e5b51 | 2673 | |
63bfc685 MK |
2674 | pushFollow(FOLLOW_declarator_in_declaratorList951); |
2675 | declarator37 = declarator(); | |
866e5b51 | 2676 | |
63bfc685 MK |
2677 | state._fsp--; |
2678 | if (state.failed) { | |
2679 | return retval; | |
2680 | } | |
2681 | if (state.backtracking == 0) { | |
2682 | stream_declarator.add(declarator37.getTree()); | |
2683 | } | |
866e5b51 | 2684 | |
63bfc685 MK |
2685 | } |
2686 | break; | |
866e5b51 | 2687 | |
63bfc685 MK |
2688 | default: |
2689 | break loop15; | |
2690 | } | |
2691 | } while (true); | |
2692 | ||
2693 | // AST REWRITE | |
2694 | // elements: declarator | |
2695 | // token labels: | |
2696 | // rule labels: retval | |
2697 | // token list labels: | |
2698 | // rule list labels: | |
2699 | // wildcard labels: | |
2700 | if (state.backtracking == 0) { | |
2701 | retval.tree = root_0; | |
2702 | // RewriteRuleSubtreeStream stream_retval = | |
2703 | new RewriteRuleSubtreeStream( | |
2704 | adaptor, "rule retval", | |
2705 | retval != null ? retval.tree : null); | |
866e5b51 | 2706 | |
63bfc685 MK |
2707 | root_0 = (CommonTree) adaptor.nil(); |
2708 | // 366:38: -> ^( TYPE_DECLARATOR_LIST ( declarator )+ ) | |
2709 | { | |
2710 | // Grammar/CTFParser.g:366:41: ^( TYPE_DECLARATOR_LIST ( | |
2711 | // declarator )+ ) | |
2712 | { | |
2713 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
2714 | root_1 = (CommonTree) adaptor.becomeRoot(adaptor | |
2715 | .create(TYPE_DECLARATOR_LIST, | |
2716 | "TYPE_DECLARATOR_LIST"), root_1); | |
866e5b51 | 2717 | |
63bfc685 MK |
2718 | if (!(stream_declarator.hasNext())) { |
2719 | throw new RewriteEarlyExitException(); | |
2720 | } | |
2721 | while (stream_declarator.hasNext()) { | |
2722 | adaptor.addChild(root_1, | |
2723 | stream_declarator.nextTree()); | |
866e5b51 | 2724 | |
63bfc685 MK |
2725 | } |
2726 | stream_declarator.reset(); | |
866e5b51 | 2727 | |
63bfc685 MK |
2728 | adaptor.addChild(root_0, root_1); |
2729 | } | |
866e5b51 | 2730 | |
63bfc685 | 2731 | } |
866e5b51 | 2732 | |
63bfc685 | 2733 | retval.tree = root_0; |
866e5b51 | 2734 | } |
866e5b51 FC |
2735 | } |
2736 | ||
2737 | retval.stop = input.LT(-1); | |
2738 | ||
63bfc685 | 2739 | if (state.backtracking == 0) { |
866e5b51 | 2740 | |
63bfc685 MK |
2741 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
2742 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
2743 | retval.stop); | |
866e5b51 | 2744 | } |
63bfc685 | 2745 | if (state.backtracking == 0) { |
866e5b51 FC |
2746 | |
2747 | exit("declaratorList"); | |
2748 | ||
2749 | } | |
2750 | } | |
2751 | ||
63bfc685 MK |
2752 | catch (RecognitionException e) { |
2753 | throw e; | |
2754 | ||
866e5b51 FC |
2755 | } |
2756 | return retval; | |
2757 | } | |
63bfc685 | 2758 | |
866e5b51 FC |
2759 | // $ANTLR end "declaratorList" |
2760 | ||
63bfc685 MK |
2761 | public static class abstractDeclaratorList_return extends |
2762 | ParserRuleReturnScope { | |
866e5b51 | 2763 | CommonTree tree; |
63bfc685 | 2764 | |
866e5b51 | 2765 | @Override |
63bfc685 MK |
2766 | public Object getTree() { |
2767 | return tree; | |
2768 | } | |
2769 | } | |
866e5b51 FC |
2770 | |
2771 | // $ANTLR start "abstractDeclaratorList" | |
63bfc685 MK |
2772 | // Grammar/CTFParser.g:369:1: abstractDeclaratorList : abstractDeclarator ( |
2773 | // SEPARATOR abstractDeclarator )* -> ^( TYPE_DECLARATOR_LIST ( | |
2774 | // abstractDeclarator )+ ) ; | |
2775 | public final CTFParser.abstractDeclaratorList_return abstractDeclaratorList() | |
2776 | throws RecognitionException { | |
866e5b51 FC |
2777 | CTFParser.abstractDeclaratorList_return retval = new CTFParser.abstractDeclaratorList_return(); |
2778 | retval.start = input.LT(1); | |
2779 | ||
2780 | CommonTree root_0 = null; | |
2781 | ||
63bfc685 | 2782 | Token SEPARATOR39 = null; |
866e5b51 FC |
2783 | CTFParser.abstractDeclarator_return abstractDeclarator38 = null; |
2784 | ||
2785 | CTFParser.abstractDeclarator_return abstractDeclarator40 = null; | |
2786 | ||
63bfc685 MK |
2787 | CommonTree SEPARATOR39_tree = null; |
2788 | RewriteRuleTokenStream stream_SEPARATOR = new RewriteRuleTokenStream( | |
2789 | adaptor, "token SEPARATOR"); | |
2790 | RewriteRuleSubtreeStream stream_abstractDeclarator = new RewriteRuleSubtreeStream( | |
2791 | adaptor, "rule abstractDeclarator"); | |
866e5b51 | 2792 | |
63bfc685 | 2793 | enter("abstractDeclaratorList"); |
866e5b51 FC |
2794 | |
2795 | try { | |
63bfc685 MK |
2796 | // Grammar/CTFParser.g:376:1: ( abstractDeclarator ( SEPARATOR |
2797 | // abstractDeclarator )* -> ^( TYPE_DECLARATOR_LIST ( | |
2798 | // abstractDeclarator )+ ) ) | |
2799 | // Grammar/CTFParser.g:377:3: abstractDeclarator ( SEPARATOR | |
2800 | // abstractDeclarator )* | |
866e5b51 | 2801 | { |
63bfc685 MK |
2802 | pushFollow(FOLLOW_abstractDeclarator_in_abstractDeclaratorList985); |
2803 | abstractDeclarator38 = abstractDeclarator(); | |
866e5b51 | 2804 | |
63bfc685 MK |
2805 | state._fsp--; |
2806 | if (state.failed) { | |
2807 | return retval; | |
866e5b51 | 2808 | } |
63bfc685 MK |
2809 | if (state.backtracking == 0) { |
2810 | stream_abstractDeclarator.add(abstractDeclarator38 | |
2811 | .getTree()); | |
2812 | } | |
2813 | // Grammar/CTFParser.g:377:22: ( SEPARATOR abstractDeclarator )* | |
2814 | loop16: do { | |
2815 | int alt16 = 2; | |
2816 | int LA16_0 = input.LA(1); | |
866e5b51 | 2817 | |
63bfc685 MK |
2818 | if ((LA16_0 == SEPARATOR)) { |
2819 | alt16 = 1; | |
2820 | } | |
866e5b51 | 2821 | |
63bfc685 MK |
2822 | switch (alt16) { |
2823 | case 1: | |
2824 | // Grammar/CTFParser.g:377:23: SEPARATOR abstractDeclarator | |
2825 | { | |
2826 | SEPARATOR39 = (Token) match(input, SEPARATOR, | |
2827 | FOLLOW_SEPARATOR_in_abstractDeclaratorList988); | |
2828 | if (state.failed) { | |
2829 | return retval; | |
2830 | } | |
2831 | if (state.backtracking == 0) { | |
2832 | stream_SEPARATOR.add(SEPARATOR39); | |
2833 | } | |
866e5b51 | 2834 | |
63bfc685 MK |
2835 | pushFollow(FOLLOW_abstractDeclarator_in_abstractDeclaratorList990); |
2836 | abstractDeclarator40 = abstractDeclarator(); | |
866e5b51 | 2837 | |
63bfc685 MK |
2838 | state._fsp--; |
2839 | if (state.failed) { | |
2840 | return retval; | |
2841 | } | |
2842 | if (state.backtracking == 0) { | |
2843 | stream_abstractDeclarator.add(abstractDeclarator40 | |
2844 | .getTree()); | |
2845 | } | |
866e5b51 | 2846 | |
63bfc685 MK |
2847 | } |
2848 | break; | |
866e5b51 | 2849 | |
63bfc685 MK |
2850 | default: |
2851 | break loop16; | |
2852 | } | |
2853 | } while (true); | |
2854 | ||
2855 | // AST REWRITE | |
2856 | // elements: abstractDeclarator | |
2857 | // token labels: | |
2858 | // rule labels: retval | |
2859 | // token list labels: | |
2860 | // rule list labels: | |
2861 | // wildcard labels: | |
2862 | if (state.backtracking == 0) { | |
2863 | retval.tree = root_0; | |
2864 | // RewriteRuleSubtreeStream stream_retval = | |
2865 | new RewriteRuleSubtreeStream( | |
2866 | adaptor, "rule retval", | |
2867 | retval != null ? retval.tree : null); | |
866e5b51 | 2868 | |
63bfc685 MK |
2869 | root_0 = (CommonTree) adaptor.nil(); |
2870 | // 377:54: -> ^( TYPE_DECLARATOR_LIST ( abstractDeclarator | |
2871 | // )+ ) | |
2872 | { | |
2873 | // Grammar/CTFParser.g:377:57: ^( TYPE_DECLARATOR_LIST ( | |
2874 | // abstractDeclarator )+ ) | |
2875 | { | |
2876 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
2877 | root_1 = (CommonTree) adaptor.becomeRoot(adaptor | |
2878 | .create(TYPE_DECLARATOR_LIST, | |
2879 | "TYPE_DECLARATOR_LIST"), root_1); | |
866e5b51 | 2880 | |
63bfc685 MK |
2881 | if (!(stream_abstractDeclarator.hasNext())) { |
2882 | throw new RewriteEarlyExitException(); | |
2883 | } | |
2884 | while (stream_abstractDeclarator.hasNext()) { | |
2885 | adaptor.addChild(root_1, | |
2886 | stream_abstractDeclarator.nextTree()); | |
866e5b51 | 2887 | |
63bfc685 MK |
2888 | } |
2889 | stream_abstractDeclarator.reset(); | |
866e5b51 | 2890 | |
63bfc685 MK |
2891 | adaptor.addChild(root_0, root_1); |
2892 | } | |
866e5b51 | 2893 | |
63bfc685 | 2894 | } |
866e5b51 | 2895 | |
63bfc685 | 2896 | retval.tree = root_0; |
866e5b51 | 2897 | } |
866e5b51 FC |
2898 | } |
2899 | ||
2900 | retval.stop = input.LT(-1); | |
2901 | ||
63bfc685 | 2902 | if (state.backtracking == 0) { |
866e5b51 | 2903 | |
63bfc685 MK |
2904 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
2905 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
2906 | retval.stop); | |
866e5b51 | 2907 | } |
63bfc685 | 2908 | if (state.backtracking == 0) { |
866e5b51 FC |
2909 | |
2910 | exit("abstractDeclaratorList"); | |
2911 | ||
2912 | } | |
2913 | } | |
2914 | ||
63bfc685 MK |
2915 | catch (RecognitionException e) { |
2916 | throw e; | |
866e5b51 FC |
2917 | } |
2918 | return retval; | |
2919 | } | |
63bfc685 | 2920 | |
866e5b51 FC |
2921 | // $ANTLR end "abstractDeclaratorList" |
2922 | ||
63bfc685 MK |
2923 | public static class storageClassSpecifier_return extends |
2924 | ParserRuleReturnScope { | |
866e5b51 | 2925 | CommonTree tree; |
63bfc685 | 2926 | |
866e5b51 | 2927 | @Override |
63bfc685 MK |
2928 | public Object getTree() { |
2929 | return tree; | |
2930 | } | |
2931 | } | |
866e5b51 FC |
2932 | |
2933 | // $ANTLR start "storageClassSpecifier" | |
2934 | // Grammar/CTFParser.g:380:1: storageClassSpecifier : TYPEDEFTOK ; | |
63bfc685 MK |
2935 | public final CTFParser.storageClassSpecifier_return storageClassSpecifier() |
2936 | throws RecognitionException { | |
866e5b51 FC |
2937 | CTFParser.storageClassSpecifier_return retval = new CTFParser.storageClassSpecifier_return(); |
2938 | retval.start = input.LT(1); | |
2939 | ||
2940 | CommonTree root_0 = null; | |
2941 | ||
63bfc685 | 2942 | Token TYPEDEFTOK41 = null; |
866e5b51 | 2943 | |
63bfc685 | 2944 | CommonTree TYPEDEFTOK41_tree = null; |
866e5b51 FC |
2945 | |
2946 | try { | |
2947 | // Grammar/CTFParser.g:380:23: ( TYPEDEFTOK ) | |
2948 | // Grammar/CTFParser.g:381:3: TYPEDEFTOK | |
2949 | { | |
63bfc685 | 2950 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 | 2951 | |
63bfc685 MK |
2952 | TYPEDEFTOK41 = (Token) match(input, TYPEDEFTOK, |
2953 | FOLLOW_TYPEDEFTOK_in_storageClassSpecifier1014); | |
2954 | if (state.failed) { | |
2955 | return retval; | |
2956 | } | |
2957 | if (state.backtracking == 0) { | |
2958 | TYPEDEFTOK41_tree = (CommonTree) adaptor | |
2959 | .create(TYPEDEFTOK41); | |
2960 | adaptor.addChild(root_0, TYPEDEFTOK41_tree); | |
2961 | } | |
2962 | if (state.backtracking == 0) { | |
2963 | typedefOn(); | |
2964 | } | |
866e5b51 FC |
2965 | |
2966 | } | |
2967 | ||
2968 | retval.stop = input.LT(-1); | |
2969 | ||
63bfc685 | 2970 | if (state.backtracking == 0) { |
866e5b51 | 2971 | |
63bfc685 MK |
2972 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
2973 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
2974 | retval.stop); | |
866e5b51 FC |
2975 | } |
2976 | } | |
2977 | ||
63bfc685 MK |
2978 | catch (RecognitionException e) { |
2979 | throw e; | |
2980 | ||
866e5b51 FC |
2981 | } |
2982 | return retval; | |
2983 | } | |
63bfc685 | 2984 | |
866e5b51 FC |
2985 | // $ANTLR end "storageClassSpecifier" |
2986 | ||
2987 | public static class typeSpecifier_return extends ParserRuleReturnScope { | |
2988 | CommonTree tree; | |
63bfc685 | 2989 | |
866e5b51 | 2990 | @Override |
63bfc685 MK |
2991 | public Object getTree() { |
2992 | return tree; | |
2993 | } | |
2994 | } | |
866e5b51 FC |
2995 | |
2996 | // $ANTLR start "typeSpecifier" | |
63bfc685 MK |
2997 | // Grammar/CTFParser.g:384:1: typeSpecifier : ( FLOATTOK | INTTOK | LONGTOK |
2998 | // | SHORTTOK | SIGNEDTOK | UNSIGNEDTOK | CHARTOK | DOUBLETOK | VOIDTOK | | |
2999 | // BOOLTOK | COMPLEXTOK | IMAGINARYTOK | structSpecifier | variantSpecifier | |
3000 | // | enumSpecifier | ctfTypeSpecifier | {...}? => typedefName ); | |
3001 | public final CTFParser.typeSpecifier_return typeSpecifier() | |
3002 | throws RecognitionException { | |
866e5b51 FC |
3003 | CTFParser.typeSpecifier_return retval = new CTFParser.typeSpecifier_return(); |
3004 | retval.start = input.LT(1); | |
3005 | ||
3006 | CommonTree root_0 = null; | |
3007 | ||
63bfc685 MK |
3008 | Token FLOATTOK42 = null; |
3009 | Token INTTOK43 = null; | |
3010 | Token LONGTOK44 = null; | |
3011 | Token SHORTTOK45 = null; | |
3012 | Token SIGNEDTOK46 = null; | |
3013 | Token UNSIGNEDTOK47 = null; | |
3014 | Token CHARTOK48 = null; | |
3015 | Token DOUBLETOK49 = null; | |
3016 | Token VOIDTOK50 = null; | |
3017 | Token BOOLTOK51 = null; | |
3018 | Token COMPLEXTOK52 = null; | |
3019 | Token IMAGINARYTOK53 = null; | |
866e5b51 FC |
3020 | CTFParser.structSpecifier_return structSpecifier54 = null; |
3021 | ||
3022 | CTFParser.variantSpecifier_return variantSpecifier55 = null; | |
3023 | ||
3024 | CTFParser.enumSpecifier_return enumSpecifier56 = null; | |
3025 | ||
3026 | CTFParser.ctfTypeSpecifier_return ctfTypeSpecifier57 = null; | |
3027 | ||
3028 | CTFParser.typedefName_return typedefName58 = null; | |
3029 | ||
63bfc685 MK |
3030 | CommonTree FLOATTOK42_tree = null; |
3031 | CommonTree INTTOK43_tree = null; | |
3032 | CommonTree LONGTOK44_tree = null; | |
3033 | CommonTree SHORTTOK45_tree = null; | |
3034 | CommonTree SIGNEDTOK46_tree = null; | |
3035 | CommonTree UNSIGNEDTOK47_tree = null; | |
3036 | CommonTree CHARTOK48_tree = null; | |
3037 | CommonTree DOUBLETOK49_tree = null; | |
3038 | CommonTree VOIDTOK50_tree = null; | |
3039 | CommonTree BOOLTOK51_tree = null; | |
3040 | CommonTree COMPLEXTOK52_tree = null; | |
3041 | CommonTree IMAGINARYTOK53_tree = null; | |
3042 | ||
3043 | enter("typeSpecifier"); | |
866e5b51 FC |
3044 | |
3045 | try { | |
63bfc685 MK |
3046 | // Grammar/CTFParser.g:392:1: ( FLOATTOK | INTTOK | LONGTOK | |
3047 | // SHORTTOK | SIGNEDTOK | UNSIGNEDTOK | CHARTOK | DOUBLETOK | | |
3048 | // VOIDTOK | BOOLTOK | COMPLEXTOK | IMAGINARYTOK | structSpecifier | | |
3049 | // variantSpecifier | enumSpecifier | ctfTypeSpecifier | {...}? => | |
3050 | // typedefName ) | |
3051 | int alt17 = 17; | |
866e5b51 FC |
3052 | alt17 = dfa17.predict(input); |
3053 | switch (alt17) { | |
63bfc685 MK |
3054 | case 1: |
3055 | // Grammar/CTFParser.g:393:3: FLOATTOK | |
3056 | { | |
3057 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3058 | |
63bfc685 MK |
3059 | FLOATTOK42 = (Token) match(input, FLOATTOK, |
3060 | FOLLOW_FLOATTOK_in_typeSpecifier1040); | |
3061 | if (state.failed) { | |
3062 | return retval; | |
3063 | } | |
3064 | if (state.backtracking == 0) { | |
3065 | FLOATTOK42_tree = (CommonTree) adaptor.create(FLOATTOK42); | |
866e5b51 | 3066 | adaptor.addChild(root_0, FLOATTOK42_tree); |
63bfc685 | 3067 | } |
866e5b51 | 3068 | |
63bfc685 MK |
3069 | } |
3070 | break; | |
3071 | case 2: | |
3072 | // Grammar/CTFParser.g:394:5: INTTOK | |
3073 | { | |
3074 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3075 | |
63bfc685 MK |
3076 | INTTOK43 = (Token) match(input, INTTOK, |
3077 | FOLLOW_INTTOK_in_typeSpecifier1046); | |
3078 | if (state.failed) { | |
3079 | return retval; | |
3080 | } | |
3081 | if (state.backtracking == 0) { | |
3082 | INTTOK43_tree = (CommonTree) adaptor.create(INTTOK43); | |
866e5b51 | 3083 | adaptor.addChild(root_0, INTTOK43_tree); |
63bfc685 | 3084 | } |
866e5b51 | 3085 | |
63bfc685 MK |
3086 | } |
3087 | break; | |
3088 | case 3: | |
3089 | // Grammar/CTFParser.g:395:5: LONGTOK | |
3090 | { | |
3091 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3092 | |
63bfc685 MK |
3093 | LONGTOK44 = (Token) match(input, LONGTOK, |
3094 | FOLLOW_LONGTOK_in_typeSpecifier1052); | |
3095 | if (state.failed) { | |
3096 | return retval; | |
3097 | } | |
3098 | if (state.backtracking == 0) { | |
3099 | LONGTOK44_tree = (CommonTree) adaptor.create(LONGTOK44); | |
866e5b51 | 3100 | adaptor.addChild(root_0, LONGTOK44_tree); |
63bfc685 | 3101 | } |
866e5b51 | 3102 | |
63bfc685 MK |
3103 | } |
3104 | break; | |
3105 | case 4: | |
3106 | // Grammar/CTFParser.g:396:5: SHORTTOK | |
3107 | { | |
3108 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3109 | |
63bfc685 MK |
3110 | SHORTTOK45 = (Token) match(input, SHORTTOK, |
3111 | FOLLOW_SHORTTOK_in_typeSpecifier1058); | |
3112 | if (state.failed) { | |
3113 | return retval; | |
3114 | } | |
3115 | if (state.backtracking == 0) { | |
3116 | SHORTTOK45_tree = (CommonTree) adaptor.create(SHORTTOK45); | |
866e5b51 | 3117 | adaptor.addChild(root_0, SHORTTOK45_tree); |
63bfc685 | 3118 | } |
866e5b51 | 3119 | |
63bfc685 MK |
3120 | } |
3121 | break; | |
3122 | case 5: | |
3123 | // Grammar/CTFParser.g:397:5: SIGNEDTOK | |
3124 | { | |
3125 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3126 | |
63bfc685 MK |
3127 | SIGNEDTOK46 = (Token) match(input, SIGNEDTOK, |
3128 | FOLLOW_SIGNEDTOK_in_typeSpecifier1064); | |
3129 | if (state.failed) { | |
3130 | return retval; | |
3131 | } | |
3132 | if (state.backtracking == 0) { | |
3133 | SIGNEDTOK46_tree = (CommonTree) adaptor.create(SIGNEDTOK46); | |
866e5b51 | 3134 | adaptor.addChild(root_0, SIGNEDTOK46_tree); |
63bfc685 | 3135 | } |
866e5b51 | 3136 | |
63bfc685 MK |
3137 | } |
3138 | break; | |
3139 | case 6: | |
3140 | // Grammar/CTFParser.g:398:5: UNSIGNEDTOK | |
3141 | { | |
3142 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3143 | |
63bfc685 MK |
3144 | UNSIGNEDTOK47 = (Token) match(input, UNSIGNEDTOK, |
3145 | FOLLOW_UNSIGNEDTOK_in_typeSpecifier1070); | |
3146 | if (state.failed) { | |
3147 | return retval; | |
3148 | } | |
3149 | if (state.backtracking == 0) { | |
3150 | UNSIGNEDTOK47_tree = (CommonTree) adaptor | |
3151 | .create(UNSIGNEDTOK47); | |
866e5b51 | 3152 | adaptor.addChild(root_0, UNSIGNEDTOK47_tree); |
63bfc685 | 3153 | } |
866e5b51 | 3154 | |
63bfc685 MK |
3155 | } |
3156 | break; | |
3157 | case 7: | |
3158 | // Grammar/CTFParser.g:399:5: CHARTOK | |
3159 | { | |
3160 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3161 | |
63bfc685 MK |
3162 | CHARTOK48 = (Token) match(input, CHARTOK, |
3163 | FOLLOW_CHARTOK_in_typeSpecifier1076); | |
3164 | if (state.failed) { | |
3165 | return retval; | |
3166 | } | |
3167 | if (state.backtracking == 0) { | |
3168 | CHARTOK48_tree = (CommonTree) adaptor.create(CHARTOK48); | |
866e5b51 | 3169 | adaptor.addChild(root_0, CHARTOK48_tree); |
63bfc685 | 3170 | } |
866e5b51 | 3171 | |
63bfc685 MK |
3172 | } |
3173 | break; | |
3174 | case 8: | |
3175 | // Grammar/CTFParser.g:400:5: DOUBLETOK | |
3176 | { | |
3177 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3178 | |
63bfc685 MK |
3179 | DOUBLETOK49 = (Token) match(input, DOUBLETOK, |
3180 | FOLLOW_DOUBLETOK_in_typeSpecifier1082); | |
3181 | if (state.failed) { | |
3182 | return retval; | |
3183 | } | |
3184 | if (state.backtracking == 0) { | |
3185 | DOUBLETOK49_tree = (CommonTree) adaptor.create(DOUBLETOK49); | |
866e5b51 | 3186 | adaptor.addChild(root_0, DOUBLETOK49_tree); |
63bfc685 | 3187 | } |
866e5b51 | 3188 | |
63bfc685 MK |
3189 | } |
3190 | break; | |
3191 | case 9: | |
3192 | // Grammar/CTFParser.g:401:5: VOIDTOK | |
3193 | { | |
3194 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3195 | |
63bfc685 MK |
3196 | VOIDTOK50 = (Token) match(input, VOIDTOK, |
3197 | FOLLOW_VOIDTOK_in_typeSpecifier1088); | |
3198 | if (state.failed) { | |
3199 | return retval; | |
3200 | } | |
3201 | if (state.backtracking == 0) { | |
3202 | VOIDTOK50_tree = (CommonTree) adaptor.create(VOIDTOK50); | |
866e5b51 | 3203 | adaptor.addChild(root_0, VOIDTOK50_tree); |
63bfc685 | 3204 | } |
866e5b51 | 3205 | |
63bfc685 MK |
3206 | } |
3207 | break; | |
3208 | case 10: | |
3209 | // Grammar/CTFParser.g:402:5: BOOLTOK | |
3210 | { | |
3211 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3212 | |
63bfc685 MK |
3213 | BOOLTOK51 = (Token) match(input, BOOLTOK, |
3214 | FOLLOW_BOOLTOK_in_typeSpecifier1094); | |
3215 | if (state.failed) { | |
3216 | return retval; | |
3217 | } | |
3218 | if (state.backtracking == 0) { | |
3219 | BOOLTOK51_tree = (CommonTree) adaptor.create(BOOLTOK51); | |
866e5b51 | 3220 | adaptor.addChild(root_0, BOOLTOK51_tree); |
63bfc685 | 3221 | } |
866e5b51 | 3222 | |
63bfc685 MK |
3223 | } |
3224 | break; | |
3225 | case 11: | |
3226 | // Grammar/CTFParser.g:403:5: COMPLEXTOK | |
3227 | { | |
3228 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3229 | |
63bfc685 MK |
3230 | COMPLEXTOK52 = (Token) match(input, COMPLEXTOK, |
3231 | FOLLOW_COMPLEXTOK_in_typeSpecifier1100); | |
3232 | if (state.failed) { | |
3233 | return retval; | |
3234 | } | |
3235 | if (state.backtracking == 0) { | |
3236 | COMPLEXTOK52_tree = (CommonTree) adaptor | |
3237 | .create(COMPLEXTOK52); | |
866e5b51 | 3238 | adaptor.addChild(root_0, COMPLEXTOK52_tree); |
63bfc685 | 3239 | } |
866e5b51 | 3240 | |
63bfc685 MK |
3241 | } |
3242 | break; | |
3243 | case 12: | |
3244 | // Grammar/CTFParser.g:404:5: IMAGINARYTOK | |
3245 | { | |
3246 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3247 | |
63bfc685 MK |
3248 | IMAGINARYTOK53 = (Token) match(input, IMAGINARYTOK, |
3249 | FOLLOW_IMAGINARYTOK_in_typeSpecifier1106); | |
3250 | if (state.failed) { | |
3251 | return retval; | |
3252 | } | |
3253 | if (state.backtracking == 0) { | |
3254 | IMAGINARYTOK53_tree = (CommonTree) adaptor | |
3255 | .create(IMAGINARYTOK53); | |
866e5b51 | 3256 | adaptor.addChild(root_0, IMAGINARYTOK53_tree); |
63bfc685 | 3257 | } |
866e5b51 | 3258 | |
63bfc685 MK |
3259 | } |
3260 | break; | |
3261 | case 13: | |
3262 | // Grammar/CTFParser.g:405:5: structSpecifier | |
3263 | { | |
3264 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3265 | |
63bfc685 MK |
3266 | pushFollow(FOLLOW_structSpecifier_in_typeSpecifier1112); |
3267 | structSpecifier54 = structSpecifier(); | |
866e5b51 | 3268 | |
63bfc685 MK |
3269 | state._fsp--; |
3270 | if (state.failed) { | |
3271 | return retval; | |
3272 | } | |
3273 | if (state.backtracking == 0) { | |
3274 | adaptor.addChild(root_0, structSpecifier54.getTree()); | |
3275 | } | |
866e5b51 | 3276 | |
63bfc685 MK |
3277 | } |
3278 | break; | |
3279 | case 14: | |
3280 | // Grammar/CTFParser.g:406:5: variantSpecifier | |
3281 | { | |
3282 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3283 | |
63bfc685 MK |
3284 | pushFollow(FOLLOW_variantSpecifier_in_typeSpecifier1118); |
3285 | variantSpecifier55 = variantSpecifier(); | |
866e5b51 | 3286 | |
63bfc685 MK |
3287 | state._fsp--; |
3288 | if (state.failed) { | |
3289 | return retval; | |
3290 | } | |
3291 | if (state.backtracking == 0) { | |
3292 | adaptor.addChild(root_0, variantSpecifier55.getTree()); | |
3293 | } | |
866e5b51 | 3294 | |
63bfc685 MK |
3295 | } |
3296 | break; | |
3297 | case 15: | |
3298 | // Grammar/CTFParser.g:407:5: enumSpecifier | |
3299 | { | |
3300 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3301 | |
63bfc685 MK |
3302 | pushFollow(FOLLOW_enumSpecifier_in_typeSpecifier1124); |
3303 | enumSpecifier56 = enumSpecifier(); | |
866e5b51 | 3304 | |
63bfc685 MK |
3305 | state._fsp--; |
3306 | if (state.failed) { | |
3307 | return retval; | |
3308 | } | |
3309 | if (state.backtracking == 0) { | |
3310 | adaptor.addChild(root_0, enumSpecifier56.getTree()); | |
3311 | } | |
866e5b51 | 3312 | |
63bfc685 MK |
3313 | } |
3314 | break; | |
3315 | case 16: | |
3316 | // Grammar/CTFParser.g:408:5: ctfTypeSpecifier | |
3317 | { | |
3318 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3319 | |
63bfc685 MK |
3320 | pushFollow(FOLLOW_ctfTypeSpecifier_in_typeSpecifier1130); |
3321 | ctfTypeSpecifier57 = ctfTypeSpecifier(); | |
866e5b51 | 3322 | |
63bfc685 MK |
3323 | state._fsp--; |
3324 | if (state.failed) { | |
3325 | return retval; | |
3326 | } | |
3327 | if (state.backtracking == 0) { | |
3328 | adaptor.addChild(root_0, ctfTypeSpecifier57.getTree()); | |
3329 | } | |
866e5b51 | 3330 | |
63bfc685 MK |
3331 | } |
3332 | break; | |
3333 | case 17: | |
3334 | // Grammar/CTFParser.g:409:5: {...}? => typedefName | |
3335 | { | |
3336 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 3337 | |
63bfc685 MK |
3338 | if (!((inTypealiasAlias() || isTypeName(input.LT(1).getText())))) { |
3339 | if (state.backtracking > 0) { | |
3340 | state.failed = true; | |
3341 | return retval; | |
866e5b51 | 3342 | } |
63bfc685 MK |
3343 | throw new FailedPredicateException(input, "typeSpecifier", |
3344 | "inTypealiasAlias() || isTypeName(input.LT(1).getText())"); | |
3345 | } | |
3346 | pushFollow(FOLLOW_typedefName_in_typeSpecifier1140); | |
3347 | typedefName58 = typedefName(); | |
866e5b51 | 3348 | |
63bfc685 MK |
3349 | state._fsp--; |
3350 | if (state.failed) { | |
3351 | return retval; | |
3352 | } | |
3353 | if (state.backtracking == 0) { | |
3354 | adaptor.addChild(root_0, typedefName58.getTree()); | |
3355 | } | |
866e5b51 | 3356 | |
63bfc685 MK |
3357 | } |
3358 | break; | |
866e5b51 FC |
3359 | |
3360 | } | |
3361 | retval.stop = input.LT(-1); | |
3362 | ||
63bfc685 | 3363 | if (state.backtracking == 0) { |
866e5b51 | 3364 | |
63bfc685 MK |
3365 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
3366 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
3367 | retval.stop); | |
866e5b51 | 3368 | } |
63bfc685 | 3369 | if (state.backtracking == 0) { |
866e5b51 | 3370 | |
63bfc685 | 3371 | debug_print(input.toString(retval.start, input.LT(-1))); |
866e5b51 FC |
3372 | exit("typeSpecifier"); |
3373 | ||
3374 | } | |
3375 | } | |
3376 | ||
63bfc685 MK |
3377 | catch (RecognitionException e) { |
3378 | throw e; | |
3379 | ||
866e5b51 FC |
3380 | } |
3381 | return retval; | |
3382 | } | |
63bfc685 | 3383 | |
866e5b51 FC |
3384 | // $ANTLR end "typeSpecifier" |
3385 | ||
3386 | public static class typeQualifier_return extends ParserRuleReturnScope { | |
3387 | CommonTree tree; | |
63bfc685 | 3388 | |
866e5b51 | 3389 | @Override |
63bfc685 MK |
3390 | public Object getTree() { |
3391 | return tree; | |
3392 | } | |
3393 | } | |
866e5b51 FC |
3394 | |
3395 | // $ANTLR start "typeQualifier" | |
3396 | // Grammar/CTFParser.g:412:1: typeQualifier : CONSTTOK ; | |
63bfc685 MK |
3397 | public final CTFParser.typeQualifier_return typeQualifier() |
3398 | throws RecognitionException { | |
866e5b51 FC |
3399 | CTFParser.typeQualifier_return retval = new CTFParser.typeQualifier_return(); |
3400 | retval.start = input.LT(1); | |
3401 | ||
3402 | CommonTree root_0 = null; | |
3403 | ||
63bfc685 | 3404 | Token CONSTTOK59 = null; |
866e5b51 | 3405 | |
63bfc685 | 3406 | CommonTree CONSTTOK59_tree = null; |
866e5b51 | 3407 | |
63bfc685 | 3408 | enter("typeQualifier"); |
866e5b51 FC |
3409 | |
3410 | try { | |
3411 | // Grammar/CTFParser.g:420:1: ( CONSTTOK ) | |
3412 | // Grammar/CTFParser.g:421:3: CONSTTOK | |
3413 | { | |
63bfc685 | 3414 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 | 3415 | |
63bfc685 MK |
3416 | CONSTTOK59 = (Token) match(input, CONSTTOK, |
3417 | FOLLOW_CONSTTOK_in_typeQualifier1163); | |
3418 | if (state.failed) { | |
3419 | return retval; | |
3420 | } | |
3421 | if (state.backtracking == 0) { | |
3422 | CONSTTOK59_tree = (CommonTree) adaptor.create(CONSTTOK59); | |
3423 | adaptor.addChild(root_0, CONSTTOK59_tree); | |
3424 | } | |
866e5b51 FC |
3425 | |
3426 | } | |
3427 | ||
3428 | retval.stop = input.LT(-1); | |
3429 | ||
63bfc685 | 3430 | if (state.backtracking == 0) { |
866e5b51 | 3431 | |
63bfc685 MK |
3432 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
3433 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
3434 | retval.stop); | |
866e5b51 | 3435 | } |
63bfc685 | 3436 | if (state.backtracking == 0) { |
866e5b51 | 3437 | |
63bfc685 | 3438 | debug_print(input.toString(retval.start, input.LT(-1))); |
866e5b51 FC |
3439 | exit("typeQualifier"); |
3440 | ||
3441 | } | |
3442 | } | |
3443 | ||
63bfc685 MK |
3444 | catch (RecognitionException e) { |
3445 | throw e; | |
866e5b51 | 3446 | } |
63bfc685 | 3447 | |
866e5b51 FC |
3448 | return retval; |
3449 | } | |
63bfc685 | 3450 | |
866e5b51 FC |
3451 | // $ANTLR end "typeQualifier" |
3452 | ||
3453 | public static class alignAttribute_return extends ParserRuleReturnScope { | |
3454 | CommonTree tree; | |
63bfc685 | 3455 | |
866e5b51 | 3456 | @Override |
63bfc685 MK |
3457 | public Object getTree() { |
3458 | return tree; | |
3459 | } | |
3460 | } | |
866e5b51 FC |
3461 | |
3462 | // $ANTLR start "alignAttribute" | |
63bfc685 MK |
3463 | // Grammar/CTFParser.g:424:1: alignAttribute : ALIGNTOK LPAREN |
3464 | // unaryExpression RPAREN -> ^( ALIGN unaryExpression ) ; | |
3465 | public final CTFParser.alignAttribute_return alignAttribute() | |
3466 | throws RecognitionException { | |
866e5b51 FC |
3467 | CTFParser.alignAttribute_return retval = new CTFParser.alignAttribute_return(); |
3468 | retval.start = input.LT(1); | |
3469 | ||
3470 | CommonTree root_0 = null; | |
3471 | ||
63bfc685 MK |
3472 | Token ALIGNTOK60 = null; |
3473 | Token LPAREN61 = null; | |
3474 | Token RPAREN63 = null; | |
866e5b51 FC |
3475 | CTFParser.unaryExpression_return unaryExpression62 = null; |
3476 | ||
63bfc685 MK |
3477 | CommonTree ALIGNTOK60_tree = null; |
3478 | CommonTree LPAREN61_tree = null; | |
3479 | CommonTree RPAREN63_tree = null; | |
3480 | RewriteRuleTokenStream stream_RPAREN = new RewriteRuleTokenStream( | |
3481 | adaptor, "token RPAREN"); | |
3482 | RewriteRuleTokenStream stream_ALIGNTOK = new RewriteRuleTokenStream( | |
3483 | adaptor, "token ALIGNTOK"); | |
3484 | RewriteRuleTokenStream stream_LPAREN = new RewriteRuleTokenStream( | |
3485 | adaptor, "token LPAREN"); | |
3486 | RewriteRuleSubtreeStream stream_unaryExpression = new RewriteRuleSubtreeStream( | |
3487 | adaptor, "rule unaryExpression"); | |
866e5b51 | 3488 | try { |
63bfc685 MK |
3489 | // Grammar/CTFParser.g:424:16: ( ALIGNTOK LPAREN unaryExpression |
3490 | // RPAREN -> ^( ALIGN unaryExpression ) ) | |
866e5b51 FC |
3491 | // Grammar/CTFParser.g:425:3: ALIGNTOK LPAREN unaryExpression RPAREN |
3492 | { | |
63bfc685 MK |
3493 | ALIGNTOK60 = (Token) match(input, ALIGNTOK, |
3494 | FOLLOW_ALIGNTOK_in_alignAttribute1176); | |
3495 | if (state.failed) { | |
3496 | return retval; | |
3497 | } | |
3498 | if (state.backtracking == 0) { | |
3499 | stream_ALIGNTOK.add(ALIGNTOK60); | |
3500 | } | |
866e5b51 | 3501 | |
63bfc685 MK |
3502 | LPAREN61 = (Token) match(input, LPAREN, |
3503 | FOLLOW_LPAREN_in_alignAttribute1178); | |
3504 | if (state.failed) { | |
3505 | return retval; | |
3506 | } | |
3507 | if (state.backtracking == 0) { | |
3508 | stream_LPAREN.add(LPAREN61); | |
3509 | } | |
866e5b51 | 3510 | |
63bfc685 MK |
3511 | pushFollow(FOLLOW_unaryExpression_in_alignAttribute1180); |
3512 | unaryExpression62 = unaryExpression(); | |
866e5b51 | 3513 | |
63bfc685 MK |
3514 | state._fsp--; |
3515 | if (state.failed) { | |
3516 | return retval; | |
3517 | } | |
3518 | if (state.backtracking == 0) { | |
3519 | stream_unaryExpression.add(unaryExpression62.getTree()); | |
3520 | } | |
3521 | RPAREN63 = (Token) match(input, RPAREN, | |
3522 | FOLLOW_RPAREN_in_alignAttribute1182); | |
3523 | if (state.failed) { | |
3524 | return retval; | |
3525 | } | |
3526 | if (state.backtracking == 0) { | |
3527 | stream_RPAREN.add(RPAREN63); | |
3528 | } | |
866e5b51 | 3529 | |
63bfc685 MK |
3530 | // AST REWRITE |
3531 | // elements: unaryExpression | |
3532 | // token labels: | |
3533 | // rule labels: retval | |
3534 | // token list labels: | |
3535 | // rule list labels: | |
3536 | // wildcard labels: | |
3537 | if (state.backtracking == 0) { | |
3538 | retval.tree = root_0; | |
3539 | // RewriteRuleSubtreeStream stream_retval = | |
3540 | new RewriteRuleSubtreeStream( | |
3541 | adaptor, "rule retval", | |
3542 | retval != null ? retval.tree : null); | |
866e5b51 | 3543 | |
63bfc685 MK |
3544 | root_0 = (CommonTree) adaptor.nil(); |
3545 | // 425:42: -> ^( ALIGN unaryExpression ) | |
3546 | { | |
3547 | // Grammar/CTFParser.g:425:45: ^( ALIGN unaryExpression | |
3548 | // ) | |
3549 | { | |
3550 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
3551 | root_1 = (CommonTree) adaptor.becomeRoot( | |
3552 | adaptor.create(ALIGN, "ALIGN"), root_1); | |
866e5b51 | 3553 | |
63bfc685 MK |
3554 | adaptor.addChild(root_1, |
3555 | stream_unaryExpression.nextTree()); | |
3556 | ||
3557 | adaptor.addChild(root_0, root_1); | |
3558 | } | |
3559 | ||
3560 | } | |
866e5b51 | 3561 | |
63bfc685 MK |
3562 | retval.tree = root_0; |
3563 | } | |
866e5b51 FC |
3564 | } |
3565 | ||
3566 | retval.stop = input.LT(-1); | |
3567 | ||
63bfc685 | 3568 | if (state.backtracking == 0) { |
866e5b51 | 3569 | |
63bfc685 MK |
3570 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
3571 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
3572 | retval.stop); | |
866e5b51 FC |
3573 | } |
3574 | } | |
3575 | ||
63bfc685 MK |
3576 | catch (RecognitionException e) { |
3577 | throw e; | |
866e5b51 | 3578 | } |
63bfc685 | 3579 | |
866e5b51 FC |
3580 | return retval; |
3581 | } | |
63bfc685 | 3582 | |
866e5b51 FC |
3583 | // $ANTLR end "alignAttribute" |
3584 | ||
3585 | public static class structBody_return extends ParserRuleReturnScope { | |
3586 | CommonTree tree; | |
63bfc685 | 3587 | |
866e5b51 | 3588 | @Override |
63bfc685 MK |
3589 | public Object getTree() { |
3590 | return tree; | |
3591 | } | |
3592 | } | |
866e5b51 FC |
3593 | |
3594 | // $ANTLR start "structBody" | |
63bfc685 MK |
3595 | // Grammar/CTFParser.g:429:1: structBody : LCURL ( |
3596 | // structOrVariantDeclarationList )? RCURL -> ^( STRUCT_BODY ( | |
3597 | // structOrVariantDeclarationList )? ) ; | |
3598 | public final CTFParser.structBody_return structBody() | |
3599 | throws RecognitionException { | |
866e5b51 FC |
3600 | Symbols_stack.push(new Symbols_scope()); |
3601 | ||
3602 | CTFParser.structBody_return retval = new CTFParser.structBody_return(); | |
3603 | retval.start = input.LT(1); | |
3604 | ||
3605 | CommonTree root_0 = null; | |
3606 | ||
63bfc685 MK |
3607 | Token LCURL64 = null; |
3608 | Token RCURL66 = null; | |
866e5b51 FC |
3609 | CTFParser.structOrVariantDeclarationList_return structOrVariantDeclarationList65 = null; |
3610 | ||
63bfc685 MK |
3611 | CommonTree LCURL64_tree = null; |
3612 | CommonTree RCURL66_tree = null; | |
3613 | RewriteRuleTokenStream stream_LCURL = new RewriteRuleTokenStream( | |
3614 | adaptor, "token LCURL"); | |
3615 | RewriteRuleTokenStream stream_RCURL = new RewriteRuleTokenStream( | |
3616 | adaptor, "token RCURL"); | |
3617 | RewriteRuleSubtreeStream stream_structOrVariantDeclarationList = new RewriteRuleSubtreeStream( | |
3618 | adaptor, "rule structOrVariantDeclarationList"); | |
866e5b51 | 3619 | |
63bfc685 MK |
3620 | enter("structBody"); |
3621 | debug_print("Scope push " + Symbols_stack.size()); | |
3622 | ((Symbols_scope) Symbols_stack.peek()).types = new HashSet<String>(); | |
866e5b51 FC |
3623 | |
3624 | try { | |
63bfc685 MK |
3625 | // Grammar/CTFParser.g:440:1: ( LCURL ( |
3626 | // structOrVariantDeclarationList )? RCURL -> ^( STRUCT_BODY ( | |
3627 | // structOrVariantDeclarationList )? ) ) | |
3628 | // Grammar/CTFParser.g:441:3: LCURL ( structOrVariantDeclarationList | |
3629 | // )? RCURL | |
866e5b51 | 3630 | { |
63bfc685 MK |
3631 | LCURL64 = (Token) match(input, LCURL, |
3632 | FOLLOW_LCURL_in_structBody1223); | |
3633 | if (state.failed) { | |
3634 | return retval; | |
3635 | } | |
3636 | if (state.backtracking == 0) { | |
3637 | stream_LCURL.add(LCURL64); | |
3638 | } | |
3639 | ||
3640 | // Grammar/CTFParser.g:441:9: ( structOrVariantDeclarationList | |
3641 | // )? | |
3642 | int alt18 = 2; | |
3643 | int LA18_0 = input.LA(1); | |
3644 | ||
3645 | if ((((LA18_0 >= CONSTTOK) && (LA18_0 <= ENUMTOK)) | |
3646 | || ((LA18_0 >= FLOATINGPOINTTOK) && (LA18_0 <= SIGNEDTOK)) | |
3647 | || ((LA18_0 >= STRINGTOK) && (LA18_0 <= STRUCTTOK)) || ((LA18_0 >= TYPEDEFTOK) && (LA18_0 <= IMAGINARYTOK)))) { | |
3648 | alt18 = 1; | |
3649 | } else if ((LA18_0 == IDENTIFIER) | |
3650 | && ((inTypealiasAlias() || isTypeName(input.LT(1) | |
3651 | .getText())))) { | |
3652 | alt18 = 1; | |
3653 | } else if ((LA18_0 == TYPEALIASTOK)) { | |
3654 | alt18 = 1; | |
3655 | } | |
3656 | switch (alt18) { | |
3657 | case 1: | |
3658 | // Grammar/CTFParser.g:441:9: structOrVariantDeclarationList | |
3659 | { | |
866e5b51 | 3660 | pushFollow(FOLLOW_structOrVariantDeclarationList_in_structBody1225); |
63bfc685 | 3661 | structOrVariantDeclarationList65 = structOrVariantDeclarationList(); |
866e5b51 FC |
3662 | |
3663 | state._fsp--; | |
63bfc685 MK |
3664 | if (state.failed) { |
3665 | return retval; | |
3666 | } | |
3667 | if (state.backtracking == 0) { | |
3668 | stream_structOrVariantDeclarationList | |
3669 | .add(structOrVariantDeclarationList65.getTree()); | |
866e5b51 | 3670 | } |
866e5b51 | 3671 | |
63bfc685 MK |
3672 | } |
3673 | break; | |
866e5b51 | 3674 | |
63bfc685 | 3675 | } |
866e5b51 | 3676 | |
63bfc685 MK |
3677 | RCURL66 = (Token) match(input, RCURL, |
3678 | FOLLOW_RCURL_in_structBody1228); | |
3679 | if (state.failed) { | |
3680 | return retval; | |
3681 | } | |
3682 | if (state.backtracking == 0) { | |
3683 | stream_RCURL.add(RCURL66); | |
3684 | } | |
866e5b51 | 3685 | |
63bfc685 MK |
3686 | // AST REWRITE |
3687 | // elements: structOrVariantDeclarationList | |
3688 | // token labels: | |
3689 | // rule labels: retval | |
3690 | // token list labels: | |
3691 | // rule list labels: | |
3692 | // wildcard labels: | |
3693 | if (state.backtracking == 0) { | |
3694 | retval.tree = root_0; | |
3695 | // RewriteRuleSubtreeStream stream_retval = | |
3696 | new RewriteRuleSubtreeStream( | |
3697 | adaptor, "rule retval", | |
3698 | retval != null ? retval.tree : null); | |
866e5b51 | 3699 | |
63bfc685 MK |
3700 | root_0 = (CommonTree) adaptor.nil(); |
3701 | // 441:47: -> ^( STRUCT_BODY ( | |
3702 | // structOrVariantDeclarationList )? ) | |
3703 | { | |
3704 | // Grammar/CTFParser.g:441:50: ^( STRUCT_BODY ( | |
3705 | // structOrVariantDeclarationList )? ) | |
3706 | { | |
3707 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
3708 | root_1 = (CommonTree) adaptor.becomeRoot( | |
3709 | adaptor.create(STRUCT_BODY, "STRUCT_BODY"), | |
3710 | root_1); | |
3711 | ||
3712 | // Grammar/CTFParser.g:441:64: ( | |
3713 | // structOrVariantDeclarationList )? | |
3714 | if (stream_structOrVariantDeclarationList.hasNext()) { | |
3715 | adaptor.addChild(root_1, | |
3716 | stream_structOrVariantDeclarationList | |
3717 | .nextTree()); | |
866e5b51 | 3718 | |
63bfc685 MK |
3719 | } |
3720 | stream_structOrVariantDeclarationList.reset(); | |
866e5b51 | 3721 | |
63bfc685 MK |
3722 | adaptor.addChild(root_0, root_1); |
3723 | } | |
866e5b51 | 3724 | |
63bfc685 | 3725 | } |
866e5b51 | 3726 | |
63bfc685 | 3727 | retval.tree = root_0; |
866e5b51 | 3728 | } |
866e5b51 FC |
3729 | } |
3730 | ||
3731 | retval.stop = input.LT(-1); | |
3732 | ||
63bfc685 | 3733 | if (state.backtracking == 0) { |
866e5b51 | 3734 | |
63bfc685 MK |
3735 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
3736 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
3737 | retval.stop); | |
866e5b51 | 3738 | } |
63bfc685 | 3739 | if (state.backtracking == 0) { |
866e5b51 FC |
3740 | |
3741 | debug_print("Scope pop " + Symbols_stack.size()); | |
3742 | exit("structBody"); | |
3743 | ||
3744 | } | |
3745 | } | |
3746 | ||
63bfc685 MK |
3747 | catch (RecognitionException e) { |
3748 | throw e; | |
3749 | } finally { | |
866e5b51 FC |
3750 | Symbols_stack.pop(); |
3751 | ||
3752 | } | |
3753 | return retval; | |
3754 | } | |
63bfc685 | 3755 | |
866e5b51 FC |
3756 | // $ANTLR end "structBody" |
3757 | ||
3758 | public static class structSpecifier_return extends ParserRuleReturnScope { | |
3759 | CommonTree tree; | |
63bfc685 | 3760 | |
866e5b51 | 3761 | @Override |
63bfc685 MK |
3762 | public Object getTree() { |
3763 | return tree; | |
3764 | } | |
3765 | } | |
866e5b51 FC |
3766 | |
3767 | // $ANTLR start "structSpecifier" | |
63bfc685 MK |
3768 | // Grammar/CTFParser.g:446:1: structSpecifier : STRUCTTOK ( ( structName ( |
3769 | // alignAttribute | ( structBody ( alignAttribute | ) ) | ) ) | ( structBody | |
3770 | // ( alignAttribute | ) ) ) -> ^( STRUCT ( structName )? ( structBody )? ( | |
3771 | // alignAttribute )? ) ; | |
3772 | public final CTFParser.structSpecifier_return structSpecifier() | |
3773 | throws RecognitionException { | |
866e5b51 FC |
3774 | CTFParser.structSpecifier_return retval = new CTFParser.structSpecifier_return(); |
3775 | retval.start = input.LT(1); | |
3776 | ||
3777 | CommonTree root_0 = null; | |
3778 | ||
63bfc685 | 3779 | Token STRUCTTOK67 = null; |
866e5b51 FC |
3780 | CTFParser.structName_return structName68 = null; |
3781 | ||
3782 | CTFParser.alignAttribute_return alignAttribute69 = null; | |
3783 | ||
3784 | CTFParser.structBody_return structBody70 = null; | |
3785 | ||
3786 | CTFParser.alignAttribute_return alignAttribute71 = null; | |
3787 | ||
3788 | CTFParser.structBody_return structBody72 = null; | |
3789 | ||
3790 | CTFParser.alignAttribute_return alignAttribute73 = null; | |
3791 | ||
63bfc685 MK |
3792 | CommonTree STRUCTTOK67_tree = null; |
3793 | RewriteRuleTokenStream stream_STRUCTTOK = new RewriteRuleTokenStream( | |
3794 | adaptor, "token STRUCTTOK"); | |
3795 | RewriteRuleSubtreeStream stream_structName = new RewriteRuleSubtreeStream( | |
3796 | adaptor, "rule structName"); | |
3797 | RewriteRuleSubtreeStream stream_structBody = new RewriteRuleSubtreeStream( | |
3798 | adaptor, "rule structBody"); | |
3799 | RewriteRuleSubtreeStream stream_alignAttribute = new RewriteRuleSubtreeStream( | |
3800 | adaptor, "rule alignAttribute"); | |
866e5b51 | 3801 | |
63bfc685 | 3802 | enter("structSpecifier"); |
866e5b51 FC |
3803 | |
3804 | try { | |
63bfc685 MK |
3805 | // Grammar/CTFParser.g:453:1: ( STRUCTTOK ( ( structName ( |
3806 | // alignAttribute | ( structBody ( alignAttribute | ) ) | ) ) | ( | |
3807 | // structBody ( alignAttribute | ) ) ) -> ^( STRUCT ( structName )? | |
3808 | // ( structBody )? ( alignAttribute )? ) ) | |
3809 | // Grammar/CTFParser.g:454:3: STRUCTTOK ( ( structName ( | |
3810 | // alignAttribute | ( structBody ( alignAttribute | ) ) | ) ) | ( | |
3811 | // structBody ( alignAttribute | ) ) ) | |
866e5b51 | 3812 | { |
63bfc685 MK |
3813 | STRUCTTOK67 = (Token) match(input, STRUCTTOK, |
3814 | FOLLOW_STRUCTTOK_in_structSpecifier1266); | |
3815 | if (state.failed) { | |
3816 | return retval; | |
3817 | } | |
3818 | if (state.backtracking == 0) { | |
3819 | stream_STRUCTTOK.add(STRUCTTOK67); | |
3820 | } | |
866e5b51 | 3821 | |
63bfc685 MK |
3822 | // Grammar/CTFParser.g:455:3: ( ( structName ( alignAttribute | |
3823 | // ( structBody ( alignAttribute | ) ) | ) ) | ( structBody ( | |
3824 | // alignAttribute | ) ) ) | |
3825 | int alt22 = 2; | |
3826 | int LA22_0 = input.LA(1); | |
866e5b51 | 3827 | |
63bfc685 MK |
3828 | if ((LA22_0 == IDENTIFIER)) { |
3829 | alt22 = 1; | |
3830 | } else if ((LA22_0 == LCURL)) { | |
3831 | alt22 = 2; | |
3832 | } else { | |
3833 | if (state.backtracking > 0) { | |
3834 | state.failed = true; | |
3835 | return retval; | |
3836 | } | |
3837 | NoViableAltException nvae = new NoViableAltException("", | |
3838 | 22, 0, input); | |
866e5b51 | 3839 | |
63bfc685 MK |
3840 | throw nvae; |
3841 | } | |
3842 | switch (alt22) { | |
3843 | case 1: | |
3844 | // Grammar/CTFParser.g:457:5: ( structName ( alignAttribute | ( | |
3845 | // structBody ( alignAttribute | ) ) | ) ) | |
3846 | { | |
3847 | // Grammar/CTFParser.g:457:5: ( structName ( alignAttribute | |
3848 | // | ( structBody ( alignAttribute | ) ) | ) ) | |
3849 | // Grammar/CTFParser.g:458:6: structName ( alignAttribute | | |
3850 | // ( structBody ( alignAttribute | ) ) | ) | |
866e5b51 | 3851 | { |
63bfc685 MK |
3852 | pushFollow(FOLLOW_structName_in_structSpecifier1288); |
3853 | structName68 = structName(); | |
866e5b51 | 3854 | |
63bfc685 MK |
3855 | state._fsp--; |
3856 | if (state.failed) { | |
3857 | return retval; | |
3858 | } | |
3859 | if (state.backtracking == 0) { | |
3860 | stream_structName.add(structName68.getTree()); | |
3861 | } | |
3862 | // Grammar/CTFParser.g:459:6: ( alignAttribute | ( | |
3863 | // structBody ( alignAttribute | ) ) | ) | |
3864 | int alt20 = 3; | |
3865 | switch (input.LA(1)) { | |
3866 | case ALIGNTOK: { | |
3867 | alt20 = 1; | |
866e5b51 | 3868 | } |
866e5b51 | 3869 | break; |
63bfc685 MK |
3870 | case LCURL: { |
3871 | switch (input.LA(2)) { | |
3872 | case CONSTTOK: | |
3873 | case CHARTOK: | |
3874 | case DOUBLETOK: | |
3875 | case ENUMTOK: | |
3876 | case FLOATINGPOINTTOK: | |
3877 | case FLOATTOK: | |
3878 | case INTEGERTOK: | |
3879 | case INTTOK: | |
3880 | case LONGTOK: | |
3881 | case SHORTTOK: | |
3882 | case STRUCTTOK: | |
3883 | case TYPEALIASTOK: | |
3884 | case TYPEDEFTOK: | |
3885 | case UNSIGNEDTOK: | |
3886 | case VARIANTTOK: | |
3887 | case VOIDTOK: | |
3888 | case BOOLTOK: | |
3889 | case COMPLEXTOK: | |
3890 | case IMAGINARYTOK: | |
3891 | case RCURL: { | |
3892 | alt20 = 2; | |
866e5b51 | 3893 | } |
63bfc685 MK |
3894 | break; |
3895 | case SIGNEDTOK: { | |
3896 | int LA20_5 = input.LA(3); | |
3897 | ||
3898 | if ((((LA20_5 >= CONSTTOK) && (LA20_5 <= ENUMTOK)) | |
3899 | || ((LA20_5 >= FLOATINGPOINTTOK) && (LA20_5 <= SIGNEDTOK)) | |
3900 | || ((LA20_5 >= STRINGTOK) && (LA20_5 <= STRUCTTOK)) | |
3901 | || ((LA20_5 >= TYPEDEFTOK) && (LA20_5 <= IMAGINARYTOK)) | |
3902 | || (LA20_5 == POINTER) || (LA20_5 == IDENTIFIER))) { | |
3903 | alt20 = 2; | |
3904 | } else if (((LA20_5 == SEPARATOR) | |
3905 | || (LA20_5 == ASSIGNMENT) || (LA20_5 == RCURL))) { | |
3906 | alt20 = 3; | |
3907 | } else { | |
3908 | if (state.backtracking > 0) { | |
3909 | state.failed = true; | |
3910 | return retval; | |
3911 | } | |
3912 | NoViableAltException nvae = new NoViableAltException( | |
3913 | "", 20, 5, input); | |
866e5b51 | 3914 | |
63bfc685 MK |
3915 | throw nvae; |
3916 | } | |
866e5b51 | 3917 | } |
63bfc685 MK |
3918 | break; |
3919 | case STRINGTOK: { | |
3920 | int LA20_6 = input.LA(3); | |
3921 | ||
3922 | if ((((LA20_6 >= CONSTTOK) && (LA20_6 <= ENUMTOK)) | |
3923 | || ((LA20_6 >= FLOATINGPOINTTOK) && (LA20_6 <= SIGNEDTOK)) | |
3924 | || ((LA20_6 >= STRINGTOK) && (LA20_6 <= STRUCTTOK)) | |
3925 | || ((LA20_6 >= TYPEDEFTOK) && (LA20_6 <= IMAGINARYTOK)) | |
3926 | || (LA20_6 == LCURL) | |
3927 | || (LA20_6 == POINTER) || (LA20_6 == IDENTIFIER))) { | |
3928 | alt20 = 2; | |
3929 | } else if (((LA20_6 == SEPARATOR) | |
3930 | || (LA20_6 == ASSIGNMENT) || (LA20_6 == RCURL))) { | |
3931 | alt20 = 3; | |
3932 | } else { | |
3933 | if (state.backtracking > 0) { | |
3934 | state.failed = true; | |
3935 | return retval; | |
3936 | } | |
3937 | NoViableAltException nvae = new NoViableAltException( | |
3938 | "", 20, 6, input); | |
866e5b51 | 3939 | |
63bfc685 MK |
3940 | throw nvae; |
3941 | } | |
866e5b51 | 3942 | } |
63bfc685 MK |
3943 | break; |
3944 | case IDENTIFIER: { | |
3945 | int LA20_7 = input.LA(3); | |
3946 | ||
3947 | if (((LA20_7 == SEPARATOR) | |
3948 | || (LA20_7 == ASSIGNMENT) || (LA20_7 == RCURL))) { | |
3949 | alt20 = 3; | |
3950 | } else if ((((LA20_7 >= CONSTTOK) && (LA20_7 <= ENUMTOK)) | |
3951 | || ((LA20_7 >= FLOATINGPOINTTOK) && (LA20_7 <= SIGNEDTOK)) | |
3952 | || ((LA20_7 >= STRINGTOK) && (LA20_7 <= STRUCTTOK)) | |
3953 | || ((LA20_7 >= TYPEDEFTOK) && (LA20_7 <= IMAGINARYTOK)) | |
3954 | || (LA20_7 == POINTER) || (LA20_7 == IDENTIFIER))) { | |
3955 | alt20 = 2; | |
3956 | } else { | |
3957 | if (state.backtracking > 0) { | |
3958 | state.failed = true; | |
3959 | return retval; | |
3960 | } | |
3961 | NoViableAltException nvae = new NoViableAltException( | |
3962 | "", 20, 7, input); | |
866e5b51 | 3963 | |
63bfc685 MK |
3964 | throw nvae; |
3965 | } | |
866e5b51 | 3966 | } |
63bfc685 MK |
3967 | break; |
3968 | case ALIGNTOK: | |
3969 | case EVENTTOK: | |
3970 | case STRING_LITERAL: { | |
3971 | alt20 = 3; | |
866e5b51 | 3972 | } |
63bfc685 MK |
3973 | break; |
3974 | default: | |
3975 | if (state.backtracking > 0) { | |
3976 | state.failed = true; | |
3977 | return retval; | |
3978 | } | |
3979 | NoViableAltException nvae = new NoViableAltException( | |
3980 | "", 20, 2, input); | |
866e5b51 FC |
3981 | |
3982 | throw nvae; | |
3983 | } | |
63bfc685 MK |
3984 | |
3985 | } | |
866e5b51 | 3986 | break; |
63bfc685 MK |
3987 | case EOF: |
3988 | case CONSTTOK: | |
3989 | case CHARTOK: | |
3990 | case DOUBLETOK: | |
3991 | case ENUMTOK: | |
3992 | case FLOATINGPOINTTOK: | |
3993 | case FLOATTOK: | |
3994 | case INTEGERTOK: | |
3995 | case INTTOK: | |
3996 | case LONGTOK: | |
3997 | case SHORTTOK: | |
3998 | case SIGNEDTOK: | |
3999 | case STRINGTOK: | |
4000 | case STRUCTTOK: | |
4001 | case TYPEDEFTOK: | |
4002 | case UNSIGNEDTOK: | |
4003 | case VARIANTTOK: | |
4004 | case VOIDTOK: | |
4005 | case BOOLTOK: | |
4006 | case COMPLEXTOK: | |
4007 | case IMAGINARYTOK: | |
4008 | case TYPE_ASSIGNMENT: | |
4009 | case LPAREN: | |
4010 | case TERM: | |
4011 | case POINTER: | |
4012 | case IDENTIFIER: { | |
4013 | alt20 = 3; | |
4014 | } | |
866e5b51 FC |
4015 | break; |
4016 | default: | |
63bfc685 MK |
4017 | if (state.backtracking > 0) { |
4018 | state.failed = true; | |
4019 | return retval; | |
4020 | } | |
4021 | NoViableAltException nvae = new NoViableAltException( | |
4022 | "", 20, 0, input); | |
866e5b51 FC |
4023 | |
4024 | throw nvae; | |
4025 | } | |
4026 | ||
63bfc685 MK |
4027 | switch (alt20) { |
4028 | case 1: | |
4029 | // Grammar/CTFParser.g:460:8: alignAttribute | |
866e5b51 | 4030 | { |
866e5b51 | 4031 | pushFollow(FOLLOW_alignAttribute_in_structSpecifier1304); |
63bfc685 | 4032 | alignAttribute69 = alignAttribute(); |
866e5b51 FC |
4033 | |
4034 | state._fsp--; | |
63bfc685 MK |
4035 | if (state.failed) { |
4036 | return retval; | |
4037 | } | |
4038 | if (state.backtracking == 0) { | |
4039 | stream_alignAttribute.add(alignAttribute69 | |
4040 | .getTree()); | |
866e5b51 | 4041 | } |
63bfc685 MK |
4042 | |
4043 | } | |
866e5b51 | 4044 | break; |
63bfc685 MK |
4045 | case 2: |
4046 | // Grammar/CTFParser.g:462:8: ( structBody ( | |
4047 | // alignAttribute | ) ) | |
4048 | { | |
4049 | // Grammar/CTFParser.g:462:8: ( structBody ( | |
4050 | // alignAttribute | ) ) | |
4051 | // Grammar/CTFParser.g:463:10: structBody ( | |
4052 | // alignAttribute | ) | |
866e5b51 | 4053 | { |
63bfc685 MK |
4054 | pushFollow(FOLLOW_structBody_in_structSpecifier1333); |
4055 | structBody70 = structBody(); | |
866e5b51 | 4056 | |
63bfc685 MK |
4057 | state._fsp--; |
4058 | if (state.failed) { | |
4059 | return retval; | |
4060 | } | |
4061 | if (state.backtracking == 0) { | |
4062 | stream_structBody.add(structBody70 | |
4063 | .getTree()); | |
4064 | } | |
4065 | // Grammar/CTFParser.g:464:10: ( alignAttribute | |
4066 | // | ) | |
4067 | int alt19 = 2; | |
4068 | int LA19_0 = input.LA(1); | |
4069 | ||
4070 | if ((LA19_0 == ALIGNTOK)) { | |
4071 | alt19 = 1; | |
4072 | } else if (((LA19_0 == EOF) | |
4073 | || ((LA19_0 >= CONSTTOK) && (LA19_0 <= ENUMTOK)) | |
4074 | || ((LA19_0 >= FLOATINGPOINTTOK) && (LA19_0 <= SIGNEDTOK)) | |
4075 | || ((LA19_0 >= STRINGTOK) && (LA19_0 <= STRUCTTOK)) | |
4076 | || ((LA19_0 >= TYPEDEFTOK) && (LA19_0 <= IMAGINARYTOK)) | |
4077 | || (LA19_0 == TYPE_ASSIGNMENT) | |
4078 | || (LA19_0 == LPAREN) | |
4079 | || (LA19_0 == LCURL) | |
4080 | || ((LA19_0 >= TERM) && (LA19_0 <= POINTER)) || (LA19_0 == IDENTIFIER))) { | |
4081 | alt19 = 2; | |
4082 | } else { | |
4083 | if (state.backtracking > 0) { | |
4084 | state.failed = true; | |
4085 | return retval; | |
4086 | } | |
4087 | NoViableAltException nvae = new NoViableAltException( | |
4088 | "", 19, 0, input); | |
866e5b51 | 4089 | |
63bfc685 MK |
4090 | throw nvae; |
4091 | } | |
4092 | switch (alt19) { | |
4093 | case 1: | |
4094 | // Grammar/CTFParser.g:465:11: alignAttribute | |
4095 | { | |
866e5b51 | 4096 | pushFollow(FOLLOW_alignAttribute_in_structSpecifier1358); |
63bfc685 | 4097 | alignAttribute71 = alignAttribute(); |
866e5b51 FC |
4098 | |
4099 | state._fsp--; | |
63bfc685 MK |
4100 | if (state.failed) { |
4101 | return retval; | |
866e5b51 | 4102 | } |
63bfc685 MK |
4103 | if (state.backtracking == 0) { |
4104 | stream_alignAttribute | |
4105 | .add(alignAttribute71.getTree()); | |
866e5b51 | 4106 | } |
866e5b51 | 4107 | |
63bfc685 MK |
4108 | } |
4109 | break; | |
4110 | case 2: | |
4111 | // Grammar/CTFParser.g:468:10: | |
4112 | { | |
4113 | } | |
4114 | break; | |
866e5b51 | 4115 | |
63bfc685 | 4116 | } |
866e5b51 FC |
4117 | |
4118 | } | |
4119 | ||
63bfc685 | 4120 | } |
866e5b51 | 4121 | break; |
63bfc685 MK |
4122 | case 3: |
4123 | // Grammar/CTFParser.g:472:6: | |
4124 | { | |
4125 | } | |
866e5b51 FC |
4126 | break; |
4127 | ||
63bfc685 | 4128 | } |
866e5b51 FC |
4129 | |
4130 | } | |
4131 | ||
63bfc685 | 4132 | } |
866e5b51 | 4133 | break; |
63bfc685 MK |
4134 | case 2: |
4135 | // Grammar/CTFParser.g:476:5: ( structBody ( alignAttribute | ) | |
4136 | // ) | |
4137 | { | |
4138 | // Grammar/CTFParser.g:476:5: ( structBody ( alignAttribute | |
4139 | // | ) ) | |
4140 | // Grammar/CTFParser.g:477:7: structBody ( alignAttribute | | |
4141 | // ) | |
866e5b51 | 4142 | { |
63bfc685 MK |
4143 | pushFollow(FOLLOW_structBody_in_structSpecifier1456); |
4144 | structBody72 = structBody(); | |
866e5b51 | 4145 | |
63bfc685 MK |
4146 | state._fsp--; |
4147 | if (state.failed) { | |
4148 | return retval; | |
4149 | } | |
4150 | if (state.backtracking == 0) { | |
4151 | stream_structBody.add(structBody72.getTree()); | |
4152 | } | |
4153 | // Grammar/CTFParser.g:478:7: ( alignAttribute | ) | |
4154 | int alt21 = 2; | |
4155 | int LA21_0 = input.LA(1); | |
4156 | ||
4157 | if ((LA21_0 == ALIGNTOK)) { | |
4158 | alt21 = 1; | |
4159 | } else if (((LA21_0 == EOF) | |
4160 | || ((LA21_0 >= CONSTTOK) && (LA21_0 <= ENUMTOK)) | |
4161 | || ((LA21_0 >= FLOATINGPOINTTOK) && (LA21_0 <= SIGNEDTOK)) | |
4162 | || ((LA21_0 >= STRINGTOK) && (LA21_0 <= STRUCTTOK)) | |
4163 | || ((LA21_0 >= TYPEDEFTOK) && (LA21_0 <= IMAGINARYTOK)) | |
4164 | || (LA21_0 == TYPE_ASSIGNMENT) | |
4165 | || (LA21_0 == LPAREN) || (LA21_0 == LCURL) | |
4166 | || ((LA21_0 >= TERM) && (LA21_0 <= POINTER)) || (LA21_0 == IDENTIFIER))) { | |
4167 | alt21 = 2; | |
4168 | } else { | |
4169 | if (state.backtracking > 0) { | |
4170 | state.failed = true; | |
4171 | return retval; | |
4172 | } | |
4173 | NoViableAltException nvae = new NoViableAltException( | |
4174 | "", 21, 0, input); | |
866e5b51 | 4175 | |
63bfc685 MK |
4176 | throw nvae; |
4177 | } | |
4178 | switch (alt21) { | |
4179 | case 1: | |
4180 | // Grammar/CTFParser.g:479:9: alignAttribute | |
4181 | { | |
866e5b51 | 4182 | pushFollow(FOLLOW_alignAttribute_in_structSpecifier1474); |
63bfc685 | 4183 | alignAttribute73 = alignAttribute(); |
866e5b51 FC |
4184 | |
4185 | state._fsp--; | |
63bfc685 MK |
4186 | if (state.failed) { |
4187 | return retval; | |
866e5b51 | 4188 | } |
63bfc685 MK |
4189 | if (state.backtracking == 0) { |
4190 | stream_alignAttribute.add(alignAttribute73 | |
4191 | .getTree()); | |
866e5b51 | 4192 | } |
866e5b51 | 4193 | |
63bfc685 MK |
4194 | } |
4195 | break; | |
4196 | case 2: | |
4197 | break; | |
866e5b51 | 4198 | |
63bfc685 | 4199 | } |
866e5b51 FC |
4200 | |
4201 | } | |
4202 | ||
63bfc685 | 4203 | } |
866e5b51 FC |
4204 | break; |
4205 | ||
63bfc685 | 4206 | } |
866e5b51 | 4207 | |
63bfc685 MK |
4208 | // AST REWRITE |
4209 | // elements: alignAttribute, structName, structBody | |
4210 | // token labels: | |
4211 | // rule labels: retval | |
4212 | // token list labels: | |
4213 | // rule list labels: | |
4214 | // wildcard labels: | |
4215 | if (state.backtracking == 0) { | |
4216 | retval.tree = root_0; | |
4217 | RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream( | |
4218 | adaptor, "rule retval", | |
4219 | retval != null ? retval.tree : null); | |
866e5b51 | 4220 | |
63bfc685 MK |
4221 | root_0 = (CommonTree) adaptor.nil(); |
4222 | // 484:5: -> ^( STRUCT ( structName )? ( structBody )? ( | |
4223 | // alignAttribute )? ) | |
4224 | { | |
4225 | // Grammar/CTFParser.g:484:8: ^( STRUCT ( structName )? | |
4226 | // ( structBody )? ( alignAttribute )? ) | |
4227 | { | |
4228 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
4229 | root_1 = (CommonTree) adaptor.becomeRoot( | |
4230 | adaptor.create(STRUCT, "STRUCT"), root_1); | |
866e5b51 | 4231 | |
63bfc685 MK |
4232 | // Grammar/CTFParser.g:484:17: ( structName )? |
4233 | if (stream_structName.hasNext()) { | |
4234 | adaptor.addChild(root_1, | |
4235 | stream_structName.nextTree()); | |
866e5b51 | 4236 | |
63bfc685 MK |
4237 | } |
4238 | stream_structName.reset(); | |
4239 | // Grammar/CTFParser.g:484:29: ( structBody )? | |
4240 | if (stream_structBody.hasNext()) { | |
4241 | adaptor.addChild(root_1, | |
4242 | stream_structBody.nextTree()); | |
866e5b51 | 4243 | |
63bfc685 MK |
4244 | } |
4245 | stream_structBody.reset(); | |
4246 | // Grammar/CTFParser.g:484:41: ( alignAttribute )? | |
4247 | if (stream_alignAttribute.hasNext()) { | |
4248 | adaptor.addChild(root_1, | |
4249 | stream_alignAttribute.nextTree()); | |
866e5b51 | 4250 | |
63bfc685 MK |
4251 | } |
4252 | stream_alignAttribute.reset(); | |
866e5b51 | 4253 | |
63bfc685 MK |
4254 | adaptor.addChild(root_0, root_1); |
4255 | } | |
866e5b51 | 4256 | |
63bfc685 | 4257 | } |
866e5b51 | 4258 | |
63bfc685 | 4259 | retval.tree = root_0; |
866e5b51 | 4260 | } |
866e5b51 FC |
4261 | } |
4262 | ||
4263 | retval.stop = input.LT(-1); | |
4264 | ||
63bfc685 | 4265 | if (state.backtracking == 0) { |
866e5b51 | 4266 | |
63bfc685 MK |
4267 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
4268 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
4269 | retval.stop); | |
866e5b51 | 4270 | } |
63bfc685 | 4271 | if (state.backtracking == 0) { |
866e5b51 FC |
4272 | |
4273 | exit("structSpecifier"); | |
4274 | ||
4275 | } | |
4276 | } | |
4277 | ||
63bfc685 MK |
4278 | catch (RecognitionException e) { |
4279 | throw e; | |
866e5b51 FC |
4280 | } |
4281 | return retval; | |
4282 | } | |
63bfc685 | 4283 | |
866e5b51 FC |
4284 | // $ANTLR end "structSpecifier" |
4285 | ||
4286 | public static class structName_return extends ParserRuleReturnScope { | |
4287 | CommonTree tree; | |
63bfc685 | 4288 | |
866e5b51 | 4289 | @Override |
63bfc685 MK |
4290 | public Object getTree() { |
4291 | return tree; | |
4292 | } | |
4293 | } | |
866e5b51 FC |
4294 | |
4295 | // $ANTLR start "structName" | |
63bfc685 MK |
4296 | // Grammar/CTFParser.g:487:1: structName : IDENTIFIER -> ^( STRUCT_NAME |
4297 | // IDENTIFIER ) ; | |
4298 | public final CTFParser.structName_return structName() | |
4299 | throws RecognitionException { | |
866e5b51 FC |
4300 | CTFParser.structName_return retval = new CTFParser.structName_return(); |
4301 | retval.start = input.LT(1); | |
4302 | ||
4303 | CommonTree root_0 = null; | |
4304 | ||
63bfc685 | 4305 | Token IDENTIFIER74 = null; |
866e5b51 | 4306 | |
63bfc685 MK |
4307 | CommonTree IDENTIFIER74_tree = null; |
4308 | RewriteRuleTokenStream stream_IDENTIFIER = new RewriteRuleTokenStream( | |
4309 | adaptor, "token IDENTIFIER"); | |
866e5b51 | 4310 | |
63bfc685 | 4311 | enter("structName"); |
866e5b51 FC |
4312 | |
4313 | try { | |
63bfc685 MK |
4314 | // Grammar/CTFParser.g:495:1: ( IDENTIFIER -> ^( STRUCT_NAME |
4315 | // IDENTIFIER ) ) | |
866e5b51 FC |
4316 | // Grammar/CTFParser.g:496:3: IDENTIFIER |
4317 | { | |
63bfc685 MK |
4318 | IDENTIFIER74 = (Token) match(input, IDENTIFIER, |
4319 | FOLLOW_IDENTIFIER_in_structName1550); | |
4320 | if (state.failed) { | |
4321 | return retval; | |
4322 | } | |
4323 | if (state.backtracking == 0) { | |
4324 | stream_IDENTIFIER.add(IDENTIFIER74); | |
4325 | } | |
4326 | ||
4327 | // AST REWRITE | |
4328 | // elements: IDENTIFIER | |
4329 | // token labels: | |
4330 | // rule labels: retval | |
4331 | // token list labels: | |
4332 | // rule list labels: | |
4333 | // wildcard labels: | |
4334 | if (state.backtracking == 0) { | |
4335 | retval.tree = root_0; | |
4336 | // RewriteRuleSubtreeStream stream_retval = | |
4337 | new RewriteRuleSubtreeStream( | |
4338 | adaptor, "rule retval", | |
4339 | retval != null ? retval.tree : null); | |
866e5b51 | 4340 | |
63bfc685 MK |
4341 | root_0 = (CommonTree) adaptor.nil(); |
4342 | // 496:14: -> ^( STRUCT_NAME IDENTIFIER ) | |
4343 | { | |
4344 | // Grammar/CTFParser.g:496:17: ^( STRUCT_NAME IDENTIFIER | |
4345 | // ) | |
4346 | { | |
4347 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
4348 | root_1 = (CommonTree) adaptor.becomeRoot( | |
4349 | adaptor.create(STRUCT_NAME, "STRUCT_NAME"), | |
4350 | root_1); | |
866e5b51 | 4351 | |
63bfc685 MK |
4352 | adaptor.addChild(root_1, |
4353 | stream_IDENTIFIER.nextNode()); | |
866e5b51 | 4354 | |
63bfc685 MK |
4355 | adaptor.addChild(root_0, root_1); |
4356 | } | |
866e5b51 | 4357 | |
63bfc685 | 4358 | } |
866e5b51 | 4359 | |
63bfc685 | 4360 | retval.tree = root_0; |
866e5b51 | 4361 | } |
866e5b51 FC |
4362 | } |
4363 | ||
4364 | retval.stop = input.LT(-1); | |
4365 | ||
63bfc685 | 4366 | if (state.backtracking == 0) { |
866e5b51 | 4367 | |
63bfc685 MK |
4368 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
4369 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
4370 | retval.stop); | |
866e5b51 | 4371 | } |
63bfc685 | 4372 | if (state.backtracking == 0) { |
866e5b51 | 4373 | |
63bfc685 | 4374 | debug_print(input.toString(retval.start, input.LT(-1))); |
866e5b51 FC |
4375 | exit("structName"); |
4376 | ||
4377 | } | |
4378 | } | |
4379 | ||
63bfc685 MK |
4380 | catch (RecognitionException e) { |
4381 | throw e; | |
866e5b51 FC |
4382 | } |
4383 | return retval; | |
4384 | } | |
63bfc685 | 4385 | |
866e5b51 FC |
4386 | // $ANTLR end "structName" |
4387 | ||
63bfc685 MK |
4388 | public static class structOrVariantDeclarationList_return extends |
4389 | ParserRuleReturnScope { | |
866e5b51 | 4390 | CommonTree tree; |
63bfc685 | 4391 | |
866e5b51 | 4392 | @Override |
63bfc685 MK |
4393 | public Object getTree() { |
4394 | return tree; | |
4395 | } | |
4396 | } | |
866e5b51 FC |
4397 | |
4398 | // $ANTLR start "structOrVariantDeclarationList" | |
63bfc685 MK |
4399 | // Grammar/CTFParser.g:499:1: structOrVariantDeclarationList : ( |
4400 | // structOrVariantDeclaration )+ ; | |
4401 | public final CTFParser.structOrVariantDeclarationList_return structOrVariantDeclarationList() | |
4402 | throws RecognitionException { | |
866e5b51 FC |
4403 | CTFParser.structOrVariantDeclarationList_return retval = new CTFParser.structOrVariantDeclarationList_return(); |
4404 | retval.start = input.LT(1); | |
4405 | ||
4406 | CommonTree root_0 = null; | |
4407 | ||
4408 | CTFParser.structOrVariantDeclaration_return structOrVariantDeclaration75 = null; | |
4409 | ||
63bfc685 | 4410 | enter("structOrVariantDeclarationList"); |
866e5b51 FC |
4411 | |
4412 | try { | |
4413 | // Grammar/CTFParser.g:506:1: ( ( structOrVariantDeclaration )+ ) | |
4414 | // Grammar/CTFParser.g:507:3: ( structOrVariantDeclaration )+ | |
4415 | { | |
63bfc685 MK |
4416 | root_0 = (CommonTree) adaptor.nil(); |
4417 | ||
4418 | // Grammar/CTFParser.g:507:3: ( structOrVariantDeclaration )+ | |
4419 | int cnt23 = 0; | |
4420 | loop23: do { | |
4421 | int alt23 = 2; | |
4422 | int LA23_0 = input.LA(1); | |
4423 | ||
4424 | if ((((LA23_0 >= CONSTTOK) && (LA23_0 <= ENUMTOK)) | |
4425 | || ((LA23_0 >= FLOATINGPOINTTOK) && (LA23_0 <= SIGNEDTOK)) | |
4426 | || ((LA23_0 >= STRINGTOK) && (LA23_0 <= STRUCTTOK)) || ((LA23_0 >= TYPEDEFTOK) && (LA23_0 <= IMAGINARYTOK)))) { | |
4427 | alt23 = 1; | |
4428 | } else if ((LA23_0 == IDENTIFIER) | |
4429 | && ((inTypealiasAlias() || isTypeName(input.LT(1) | |
4430 | .getText())))) { | |
4431 | alt23 = 1; | |
4432 | } else if ((LA23_0 == TYPEALIASTOK)) { | |
4433 | alt23 = 1; | |
4434 | } | |
4435 | ||
4436 | switch (alt23) { | |
4437 | case 1: | |
4438 | // Grammar/CTFParser.g:507:3: structOrVariantDeclaration | |
4439 | { | |
4440 | pushFollow(FOLLOW_structOrVariantDeclaration_in_structOrVariantDeclarationList1581); | |
4441 | structOrVariantDeclaration75 = structOrVariantDeclaration(); | |
4442 | ||
4443 | state._fsp--; | |
4444 | if (state.failed) { | |
4445 | return retval; | |
4446 | } | |
4447 | if (state.backtracking == 0) { | |
4448 | adaptor.addChild(root_0, | |
4449 | structOrVariantDeclaration75.getTree()); | |
4450 | } | |
866e5b51 | 4451 | |
63bfc685 MK |
4452 | } |
4453 | break; | |
866e5b51 | 4454 | |
63bfc685 MK |
4455 | default: |
4456 | if (cnt23 >= 1) { | |
4457 | break loop23; | |
4458 | } | |
4459 | if (state.backtracking > 0) { | |
4460 | state.failed = true; | |
4461 | return retval; | |
4462 | } | |
4463 | EarlyExitException eee = new EarlyExitException(23, | |
4464 | input); | |
866e5b51 | 4465 | throw eee; |
63bfc685 MK |
4466 | } |
4467 | cnt23++; | |
4468 | } while (true); | |
866e5b51 FC |
4469 | |
4470 | } | |
4471 | ||
4472 | retval.stop = input.LT(-1); | |
4473 | ||
63bfc685 | 4474 | if (state.backtracking == 0) { |
866e5b51 | 4475 | |
63bfc685 MK |
4476 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
4477 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
4478 | retval.stop); | |
866e5b51 | 4479 | } |
63bfc685 | 4480 | if (state.backtracking == 0) { |
866e5b51 FC |
4481 | |
4482 | exit("structOrVariantDeclarationList"); | |
4483 | ||
4484 | } | |
4485 | } | |
4486 | ||
63bfc685 MK |
4487 | catch (RecognitionException e) { |
4488 | throw e; | |
4489 | ||
866e5b51 FC |
4490 | } |
4491 | return retval; | |
4492 | } | |
63bfc685 | 4493 | |
866e5b51 FC |
4494 | // $ANTLR end "structOrVariantDeclarationList" |
4495 | ||
63bfc685 MK |
4496 | public static class structOrVariantDeclaration_return extends |
4497 | ParserRuleReturnScope { | |
866e5b51 | 4498 | CommonTree tree; |
63bfc685 | 4499 | |
866e5b51 | 4500 | @Override |
63bfc685 MK |
4501 | public Object getTree() { |
4502 | return tree; | |
4503 | } | |
4504 | } | |
866e5b51 FC |
4505 | |
4506 | // $ANTLR start "structOrVariantDeclaration" | |
63bfc685 MK |
4507 | // Grammar/CTFParser.g:510:1: structOrVariantDeclaration : ( ( |
4508 | // declarationSpecifiers ({...}? => declaratorList -> ^( TYPEDEF | |
4509 | // declaratorList declarationSpecifiers ) | structOrVariantDeclaratorList -> | |
4510 | // ^( SV_DECLARATION declarationSpecifiers structOrVariantDeclaratorList ) ) | |
4511 | // ) | typealiasDecl -> typealiasDecl ) TERM ; | |
4512 | public final CTFParser.structOrVariantDeclaration_return structOrVariantDeclaration() | |
4513 | throws RecognitionException { | |
866e5b51 FC |
4514 | CTFParser.structOrVariantDeclaration_return retval = new CTFParser.structOrVariantDeclaration_return(); |
4515 | retval.start = input.LT(1); | |
4516 | ||
4517 | CommonTree root_0 = null; | |
4518 | ||
63bfc685 | 4519 | Token TERM80 = null; |
866e5b51 FC |
4520 | CTFParser.declarationSpecifiers_return declarationSpecifiers76 = null; |
4521 | ||
4522 | CTFParser.declaratorList_return declaratorList77 = null; | |
4523 | ||
4524 | CTFParser.structOrVariantDeclaratorList_return structOrVariantDeclaratorList78 = null; | |
4525 | ||
4526 | CTFParser.typealiasDecl_return typealiasDecl79 = null; | |
4527 | ||
63bfc685 MK |
4528 | CommonTree TERM80_tree = null; |
4529 | RewriteRuleTokenStream stream_TERM = new RewriteRuleTokenStream( | |
4530 | adaptor, "token TERM"); | |
4531 | RewriteRuleSubtreeStream stream_declaratorList = new RewriteRuleSubtreeStream( | |
4532 | adaptor, "rule declaratorList"); | |
4533 | RewriteRuleSubtreeStream stream_typealiasDecl = new RewriteRuleSubtreeStream( | |
4534 | adaptor, "rule typealiasDecl"); | |
4535 | RewriteRuleSubtreeStream stream_declarationSpecifiers = new RewriteRuleSubtreeStream( | |
4536 | adaptor, "rule declarationSpecifiers"); | |
4537 | RewriteRuleSubtreeStream stream_structOrVariantDeclaratorList = new RewriteRuleSubtreeStream( | |
4538 | adaptor, "rule structOrVariantDeclaratorList"); | |
866e5b51 | 4539 | |
63bfc685 | 4540 | enter("structOrVariantDeclaration"); |
866e5b51 FC |
4541 | |
4542 | try { | |
63bfc685 MK |
4543 | // Grammar/CTFParser.g:517:1: ( ( ( declarationSpecifiers ({...}? => |
4544 | // declaratorList -> ^( TYPEDEF declaratorList declarationSpecifiers | |
4545 | // ) | structOrVariantDeclaratorList -> ^( SV_DECLARATION | |
4546 | // declarationSpecifiers structOrVariantDeclaratorList ) ) ) | | |
4547 | // typealiasDecl -> typealiasDecl ) TERM ) | |
4548 | // Grammar/CTFParser.g:518:3: ( ( declarationSpecifiers ({...}? => | |
4549 | // declaratorList -> ^( TYPEDEF declaratorList declarationSpecifiers | |
4550 | // ) | structOrVariantDeclaratorList -> ^( SV_DECLARATION | |
4551 | // declarationSpecifiers structOrVariantDeclaratorList ) ) ) | | |
4552 | // typealiasDecl -> typealiasDecl ) TERM | |
866e5b51 | 4553 | { |
63bfc685 MK |
4554 | // Grammar/CTFParser.g:518:3: ( ( declarationSpecifiers ({...}? |
4555 | // => declaratorList -> ^( TYPEDEF declaratorList | |
4556 | // declarationSpecifiers ) | structOrVariantDeclaratorList -> ^( | |
4557 | // SV_DECLARATION declarationSpecifiers | |
4558 | // structOrVariantDeclaratorList ) ) ) | typealiasDecl -> | |
4559 | // typealiasDecl ) | |
4560 | int alt25 = 2; | |
4561 | int LA25_0 = input.LA(1); | |
4562 | ||
4563 | if ((((LA25_0 >= CONSTTOK) && (LA25_0 <= ENUMTOK)) | |
4564 | || ((LA25_0 >= FLOATINGPOINTTOK) && (LA25_0 <= SIGNEDTOK)) | |
4565 | || ((LA25_0 >= STRINGTOK) && (LA25_0 <= STRUCTTOK)) || ((LA25_0 >= TYPEDEFTOK) && (LA25_0 <= IMAGINARYTOK)))) { | |
4566 | alt25 = 1; | |
4567 | } else if ((LA25_0 == IDENTIFIER) | |
4568 | && ((inTypealiasAlias() || isTypeName(input.LT(1) | |
4569 | .getText())))) { | |
4570 | alt25 = 1; | |
4571 | } else if ((LA25_0 == TYPEALIASTOK)) { | |
4572 | alt25 = 2; | |
4573 | } else { | |
4574 | if (state.backtracking > 0) { | |
4575 | state.failed = true; | |
4576 | return retval; | |
4577 | } | |
4578 | NoViableAltException nvae = new NoViableAltException("", | |
4579 | 25, 0, input); | |
866e5b51 | 4580 | |
63bfc685 MK |
4581 | throw nvae; |
4582 | } | |
4583 | switch (alt25) { | |
4584 | case 1: | |
4585 | // Grammar/CTFParser.g:519:4: ( declarationSpecifiers ({...}? => | |
4586 | // declaratorList -> ^( TYPEDEF declaratorList | |
4587 | // declarationSpecifiers ) | structOrVariantDeclaratorList -> ^( | |
4588 | // SV_DECLARATION declarationSpecifiers | |
4589 | // structOrVariantDeclaratorList ) ) ) | |
4590 | { | |
4591 | // Grammar/CTFParser.g:519:4: ( declarationSpecifiers | |
4592 | // ({...}? => declaratorList -> ^( TYPEDEF declaratorList | |
4593 | // declarationSpecifiers ) | structOrVariantDeclaratorList | |
4594 | // -> ^( SV_DECLARATION declarationSpecifiers | |
4595 | // structOrVariantDeclaratorList ) ) ) | |
4596 | // Grammar/CTFParser.g:520:5: declarationSpecifiers ({...}? | |
4597 | // => declaratorList -> ^( TYPEDEF declaratorList | |
4598 | // declarationSpecifiers ) | structOrVariantDeclaratorList | |
4599 | // -> ^( SV_DECLARATION declarationSpecifiers | |
4600 | // structOrVariantDeclaratorList ) ) | |
4601 | { | |
4602 | pushFollow(FOLLOW_declarationSpecifiers_in_structOrVariantDeclaration1619); | |
4603 | declarationSpecifiers76 = declarationSpecifiers(); | |
4604 | ||
4605 | state._fsp--; | |
4606 | if (state.failed) { | |
4607 | return retval; | |
4608 | } | |
4609 | if (state.backtracking == 0) { | |
4610 | stream_declarationSpecifiers | |
4611 | .add(declarationSpecifiers76.getTree()); | |
4612 | } | |
4613 | // Grammar/CTFParser.g:521:7: ({...}? => declaratorList | |
4614 | // -> ^( TYPEDEF declaratorList declarationSpecifiers ) | |
4615 | // | structOrVariantDeclaratorList -> ^( SV_DECLARATION | |
4616 | // declarationSpecifiers structOrVariantDeclaratorList ) | |
4617 | // ) | |
4618 | int alt24 = 2; | |
4619 | alt24 = dfa24.predict(input); | |
4620 | switch (alt24) { | |
4621 | case 1: | |
4622 | // Grammar/CTFParser.g:523:9: {...}? => declaratorList | |
4623 | { | |
4624 | if (!((inTypedef()))) { | |
4625 | if (state.backtracking > 0) { | |
4626 | state.failed = true; | |
4627 | return retval; | |
4628 | } | |
4629 | throw new FailedPredicateException(input, | |
4630 | "structOrVariantDeclaration", | |
4631 | "inTypedef()"); | |
866e5b51 FC |
4632 | } |
4633 | pushFollow(FOLLOW_declaratorList_in_structOrVariantDeclaration1651); | |
63bfc685 | 4634 | declaratorList77 = declaratorList(); |
866e5b51 FC |
4635 | |
4636 | state._fsp--; | |
63bfc685 MK |
4637 | if (state.failed) { |
4638 | return retval; | |
4639 | } | |
4640 | if (state.backtracking == 0) { | |
4641 | stream_declaratorList.add(declaratorList77 | |
4642 | .getTree()); | |
4643 | } | |
4644 | if (state.backtracking == 0) { | |
4645 | typedefOff(); | |
866e5b51 | 4646 | } |
866e5b51 FC |
4647 | |
4648 | // AST REWRITE | |
4649 | // elements: declarationSpecifiers, declaratorList | |
63bfc685 | 4650 | // token labels: |
866e5b51 | 4651 | // rule labels: retval |
63bfc685 MK |
4652 | // token list labels: |
4653 | // rule list labels: | |
4654 | // wildcard labels: | |
4655 | if (state.backtracking == 0) { | |
4656 | retval.tree = root_0; | |
4657 | // RewriteRuleSubtreeStream stream_retval = | |
4658 | new RewriteRuleSubtreeStream( | |
4659 | adaptor, "rule retval", | |
4660 | retval != null ? retval.tree : null); | |
4661 | ||
4662 | root_0 = (CommonTree) adaptor.nil(); | |
4663 | // 524:11: -> ^( TYPEDEF declaratorList | |
4664 | // declarationSpecifiers ) | |
866e5b51 | 4665 | { |
63bfc685 MK |
4666 | // Grammar/CTFParser.g:524:14: ^( TYPEDEF |
4667 | // declaratorList declarationSpecifiers ) | |
4668 | { | |
4669 | CommonTree root_1 = (CommonTree) adaptor | |
4670 | .nil(); | |
4671 | root_1 = (CommonTree) adaptor | |
4672 | .becomeRoot(adaptor.create( | |
4673 | TYPEDEF, "TYPEDEF"), | |
4674 | root_1); | |
4675 | ||
4676 | adaptor.addChild(root_1, | |
4677 | stream_declaratorList | |
4678 | .nextTree()); | |
4679 | adaptor.addChild(root_1, | |
4680 | stream_declarationSpecifiers | |
4681 | .nextTree()); | |
4682 | ||
4683 | adaptor.addChild(root_0, root_1); | |
4684 | } | |
866e5b51 | 4685 | |
866e5b51 FC |
4686 | } |
4687 | ||
63bfc685 | 4688 | retval.tree = root_0; |
866e5b51 | 4689 | } |
63bfc685 | 4690 | } |
866e5b51 | 4691 | break; |
63bfc685 MK |
4692 | case 2: |
4693 | // Grammar/CTFParser.g:525:11: | |
4694 | // structOrVariantDeclaratorList | |
4695 | { | |
866e5b51 | 4696 | pushFollow(FOLLOW_structOrVariantDeclaratorList_in_structOrVariantDeclaration1685); |
63bfc685 | 4697 | structOrVariantDeclaratorList78 = structOrVariantDeclaratorList(); |
866e5b51 FC |
4698 | |
4699 | state._fsp--; | |
63bfc685 MK |
4700 | if (state.failed) { |
4701 | return retval; | |
4702 | } | |
4703 | if (state.backtracking == 0) { | |
4704 | stream_structOrVariantDeclaratorList | |
4705 | .add(structOrVariantDeclaratorList78 | |
4706 | .getTree()); | |
4707 | } | |
866e5b51 FC |
4708 | |
4709 | // AST REWRITE | |
63bfc685 MK |
4710 | // elements: structOrVariantDeclaratorList, |
4711 | // declarationSpecifiers | |
4712 | // token labels: | |
866e5b51 | 4713 | // rule labels: retval |
63bfc685 MK |
4714 | // token list labels: |
4715 | // rule list labels: | |
4716 | // wildcard labels: | |
4717 | if (state.backtracking == 0) { | |
4718 | retval.tree = root_0; | |
4719 | // RewriteRuleSubtreeStream stream_retval = | |
4720 | new RewriteRuleSubtreeStream( | |
4721 | adaptor, "rule retval", | |
4722 | retval != null ? retval.tree : null); | |
4723 | ||
4724 | root_0 = (CommonTree) adaptor.nil(); | |
4725 | // 526:11: -> ^( SV_DECLARATION | |
4726 | // declarationSpecifiers | |
4727 | // structOrVariantDeclaratorList ) | |
866e5b51 | 4728 | { |
63bfc685 MK |
4729 | // Grammar/CTFParser.g:526:14: ^( |
4730 | // SV_DECLARATION declarationSpecifiers | |
4731 | // structOrVariantDeclaratorList ) | |
4732 | { | |
4733 | CommonTree root_1 = (CommonTree) adaptor | |
4734 | .nil(); | |
4735 | root_1 = (CommonTree) adaptor | |
4736 | .becomeRoot(adaptor.create( | |
4737 | SV_DECLARATION, | |
4738 | "SV_DECLARATION"), | |
4739 | root_1); | |
4740 | ||
4741 | adaptor.addChild(root_1, | |
4742 | stream_declarationSpecifiers | |
4743 | .nextTree()); | |
4744 | adaptor.addChild(root_1, | |
4745 | stream_structOrVariantDeclaratorList | |
4746 | .nextTree()); | |
4747 | ||
4748 | adaptor.addChild(root_0, root_1); | |
4749 | } | |
866e5b51 | 4750 | |
866e5b51 FC |
4751 | } |
4752 | ||
63bfc685 | 4753 | retval.tree = root_0; |
866e5b51 | 4754 | } |
63bfc685 | 4755 | } |
866e5b51 FC |
4756 | break; |
4757 | ||
63bfc685 | 4758 | } |
866e5b51 FC |
4759 | |
4760 | } | |
4761 | ||
63bfc685 | 4762 | } |
866e5b51 | 4763 | break; |
63bfc685 MK |
4764 | case 2: |
4765 | // Grammar/CTFParser.g:531:5: typealiasDecl | |
4766 | { | |
866e5b51 | 4767 | pushFollow(FOLLOW_typealiasDecl_in_structOrVariantDeclaration1735); |
63bfc685 | 4768 | typealiasDecl79 = typealiasDecl(); |
866e5b51 FC |
4769 | |
4770 | state._fsp--; | |
63bfc685 MK |
4771 | if (state.failed) { |
4772 | return retval; | |
4773 | } | |
4774 | if (state.backtracking == 0) { | |
4775 | stream_typealiasDecl.add(typealiasDecl79.getTree()); | |
4776 | } | |
866e5b51 FC |
4777 | |
4778 | // AST REWRITE | |
4779 | // elements: typealiasDecl | |
63bfc685 | 4780 | // token labels: |
866e5b51 | 4781 | // rule labels: retval |
63bfc685 MK |
4782 | // token list labels: |
4783 | // rule list labels: | |
4784 | // wildcard labels: | |
4785 | if (state.backtracking == 0) { | |
4786 | retval.tree = root_0; | |
4787 | // RewriteRuleSubtreeStream stream_retval = | |
4788 | new RewriteRuleSubtreeStream( | |
4789 | adaptor, "rule retval", | |
4790 | retval != null ? retval.tree : null); | |
4791 | ||
4792 | root_0 = (CommonTree) adaptor.nil(); | |
4793 | // 531:19: -> typealiasDecl | |
4794 | { | |
4795 | adaptor.addChild(root_0, | |
4796 | stream_typealiasDecl.nextTree()); | |
866e5b51 | 4797 | |
63bfc685 | 4798 | } |
866e5b51 | 4799 | |
63bfc685 | 4800 | retval.tree = root_0; |
866e5b51 | 4801 | } |
63bfc685 | 4802 | } |
866e5b51 FC |
4803 | break; |
4804 | ||
63bfc685 | 4805 | } |
866e5b51 | 4806 | |
63bfc685 MK |
4807 | TERM80 = (Token) match(input, TERM, |
4808 | FOLLOW_TERM_in_structOrVariantDeclaration1747); | |
4809 | if (state.failed) { | |
4810 | return retval; | |
4811 | } | |
4812 | if (state.backtracking == 0) { | |
4813 | stream_TERM.add(TERM80); | |
4814 | } | |
866e5b51 FC |
4815 | |
4816 | } | |
4817 | ||
4818 | retval.stop = input.LT(-1); | |
4819 | ||
63bfc685 | 4820 | if (state.backtracking == 0) { |
866e5b51 | 4821 | |
63bfc685 MK |
4822 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
4823 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
4824 | retval.stop); | |
866e5b51 | 4825 | } |
63bfc685 | 4826 | if (state.backtracking == 0) { |
866e5b51 FC |
4827 | |
4828 | exit("structOrVariantDeclaration"); | |
4829 | ||
4830 | } | |
4831 | } | |
4832 | ||
63bfc685 MK |
4833 | catch (RecognitionException e) { |
4834 | throw e; | |
4835 | ||
866e5b51 FC |
4836 | } |
4837 | return retval; | |
4838 | } | |
63bfc685 | 4839 | |
866e5b51 FC |
4840 | // $ANTLR end "structOrVariantDeclaration" |
4841 | ||
63bfc685 MK |
4842 | public static class specifierQualifierList_return extends |
4843 | ParserRuleReturnScope { | |
866e5b51 | 4844 | CommonTree tree; |
63bfc685 | 4845 | |
866e5b51 | 4846 | @Override |
63bfc685 MK |
4847 | public Object getTree() { |
4848 | return tree; | |
4849 | } | |
4850 | } | |
866e5b51 FC |
4851 | |
4852 | // $ANTLR start "specifierQualifierList" | |
63bfc685 MK |
4853 | // Grammar/CTFParser.g:536:1: specifierQualifierList : ( typeQualifier | |
4854 | // typeSpecifier )+ -> ^( TYPE_SPECIFIER_LIST ( typeQualifier )* ( | |
4855 | // typeSpecifier )* ) ; | |
4856 | public final CTFParser.specifierQualifierList_return specifierQualifierList() | |
4857 | throws RecognitionException { | |
866e5b51 FC |
4858 | CTFParser.specifierQualifierList_return retval = new CTFParser.specifierQualifierList_return(); |
4859 | retval.start = input.LT(1); | |
4860 | ||
4861 | CommonTree root_0 = null; | |
4862 | ||
4863 | CTFParser.typeQualifier_return typeQualifier81 = null; | |
4864 | ||
4865 | CTFParser.typeSpecifier_return typeSpecifier82 = null; | |
4866 | ||
63bfc685 MK |
4867 | RewriteRuleSubtreeStream stream_typeSpecifier = new RewriteRuleSubtreeStream( |
4868 | adaptor, "rule typeSpecifier"); | |
4869 | RewriteRuleSubtreeStream stream_typeQualifier = new RewriteRuleSubtreeStream( | |
4870 | adaptor, "rule typeQualifier"); | |
866e5b51 | 4871 | |
63bfc685 | 4872 | enter("specifierQualifierList"); |
866e5b51 FC |
4873 | |
4874 | try { | |
63bfc685 MK |
4875 | // Grammar/CTFParser.g:543:1: ( ( typeQualifier | typeSpecifier )+ |
4876 | // -> ^( TYPE_SPECIFIER_LIST ( typeQualifier )* ( typeSpecifier )* ) | |
4877 | // ) | |
866e5b51 FC |
4878 | // Grammar/CTFParser.g:544:3: ( typeQualifier | typeSpecifier )+ |
4879 | { | |
63bfc685 MK |
4880 | // Grammar/CTFParser.g:544:3: ( typeQualifier | typeSpecifier )+ |
4881 | int cnt26 = 0; | |
4882 | loop26: do { | |
4883 | int alt26 = 3; | |
4884 | int LA26_0 = input.LA(1); | |
4885 | ||
4886 | if ((LA26_0 == CONSTTOK)) { | |
4887 | alt26 = 1; | |
4888 | } else if ((((LA26_0 >= CHARTOK) && (LA26_0 <= ENUMTOK)) | |
4889 | || ((LA26_0 >= FLOATINGPOINTTOK) && (LA26_0 <= SIGNEDTOK)) | |
4890 | || ((LA26_0 >= STRINGTOK) && (LA26_0 <= STRUCTTOK)) || ((LA26_0 >= UNSIGNEDTOK) && (LA26_0 <= IMAGINARYTOK)))) { | |
4891 | alt26 = 2; | |
4892 | } else if ((LA26_0 == IDENTIFIER) | |
4893 | && ((inTypealiasAlias() || isTypeName(input.LT(1) | |
4894 | .getText())))) { | |
4895 | alt26 = 2; | |
4896 | } | |
4897 | ||
4898 | switch (alt26) { | |
4899 | case 1: | |
4900 | // Grammar/CTFParser.g:544:4: typeQualifier | |
4901 | { | |
4902 | pushFollow(FOLLOW_typeQualifier_in_specifierQualifierList1771); | |
4903 | typeQualifier81 = typeQualifier(); | |
4904 | ||
4905 | state._fsp--; | |
4906 | if (state.failed) { | |
4907 | return retval; | |
4908 | } | |
4909 | if (state.backtracking == 0) { | |
4910 | stream_typeQualifier.add(typeQualifier81.getTree()); | |
4911 | } | |
866e5b51 | 4912 | |
63bfc685 MK |
4913 | } |
4914 | break; | |
4915 | case 2: | |
4916 | // Grammar/CTFParser.g:544:20: typeSpecifier | |
4917 | { | |
4918 | pushFollow(FOLLOW_typeSpecifier_in_specifierQualifierList1775); | |
4919 | typeSpecifier82 = typeSpecifier(); | |
866e5b51 | 4920 | |
63bfc685 MK |
4921 | state._fsp--; |
4922 | if (state.failed) { | |
4923 | return retval; | |
4924 | } | |
4925 | if (state.backtracking == 0) { | |
4926 | stream_typeSpecifier.add(typeSpecifier82.getTree()); | |
4927 | } | |
866e5b51 | 4928 | |
63bfc685 MK |
4929 | } |
4930 | break; | |
866e5b51 | 4931 | |
63bfc685 MK |
4932 | default: |
4933 | if (cnt26 >= 1) { | |
4934 | break loop26; | |
4935 | } | |
4936 | if (state.backtracking > 0) { | |
4937 | state.failed = true; | |
4938 | return retval; | |
4939 | } | |
4940 | EarlyExitException eee = new EarlyExitException(26, | |
4941 | input); | |
4942 | throw eee; | |
4943 | } | |
4944 | cnt26++; | |
4945 | } while (true); | |
4946 | ||
4947 | // AST REWRITE | |
4948 | // elements: typeSpecifier, typeQualifier | |
4949 | // token labels: | |
4950 | // rule labels: retval | |
4951 | // token list labels: | |
4952 | // rule list labels: | |
4953 | // wildcard labels: | |
4954 | if (state.backtracking == 0) { | |
4955 | retval.tree = root_0; | |
4956 | // RewriteRuleSubtreeStream stream_retval = | |
4957 | new RewriteRuleSubtreeStream( | |
4958 | adaptor, "rule retval", | |
4959 | retval != null ? retval.tree : null); | |
866e5b51 | 4960 | |
63bfc685 MK |
4961 | root_0 = (CommonTree) adaptor.nil(); |
4962 | // 544:36: -> ^( TYPE_SPECIFIER_LIST ( typeQualifier )* ( | |
4963 | // typeSpecifier )* ) | |
4964 | { | |
4965 | // Grammar/CTFParser.g:544:39: ^( TYPE_SPECIFIER_LIST ( | |
4966 | // typeQualifier )* ( typeSpecifier )* ) | |
4967 | { | |
4968 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
4969 | root_1 = (CommonTree) adaptor.becomeRoot(adaptor | |
4970 | .create(TYPE_SPECIFIER_LIST, | |
4971 | "TYPE_SPECIFIER_LIST"), root_1); | |
866e5b51 | 4972 | |
63bfc685 MK |
4973 | // Grammar/CTFParser.g:544:61: ( typeQualifier )* |
4974 | while (stream_typeQualifier.hasNext()) { | |
4975 | adaptor.addChild(root_1, | |
4976 | stream_typeQualifier.nextTree()); | |
866e5b51 | 4977 | |
63bfc685 MK |
4978 | } |
4979 | stream_typeQualifier.reset(); | |
4980 | // Grammar/CTFParser.g:544:76: ( typeSpecifier )* | |
4981 | while (stream_typeSpecifier.hasNext()) { | |
4982 | adaptor.addChild(root_1, | |
4983 | stream_typeSpecifier.nextTree()); | |
866e5b51 | 4984 | |
63bfc685 MK |
4985 | } |
4986 | stream_typeSpecifier.reset(); | |
866e5b51 | 4987 | |
63bfc685 MK |
4988 | adaptor.addChild(root_0, root_1); |
4989 | } | |
4990 | ||
4991 | } | |
866e5b51 | 4992 | |
63bfc685 MK |
4993 | retval.tree = root_0; |
4994 | } | |
866e5b51 FC |
4995 | } |
4996 | ||
4997 | retval.stop = input.LT(-1); | |
4998 | ||
63bfc685 | 4999 | if (state.backtracking == 0) { |
866e5b51 | 5000 | |
63bfc685 MK |
5001 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
5002 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
5003 | retval.stop); | |
866e5b51 | 5004 | } |
63bfc685 | 5005 | if (state.backtracking == 0) { |
866e5b51 FC |
5006 | |
5007 | exit("specifierQualifierList"); | |
5008 | ||
5009 | } | |
5010 | } | |
5011 | ||
63bfc685 MK |
5012 | catch (RecognitionException e) { |
5013 | throw e; | |
5014 | ||
866e5b51 FC |
5015 | } |
5016 | return retval; | |
5017 | } | |
63bfc685 | 5018 | |
866e5b51 FC |
5019 | // $ANTLR end "specifierQualifierList" |
5020 | ||
63bfc685 MK |
5021 | public static class structOrVariantDeclaratorList_return extends |
5022 | ParserRuleReturnScope { | |
866e5b51 | 5023 | CommonTree tree; |
63bfc685 | 5024 | |
866e5b51 | 5025 | @Override |
63bfc685 MK |
5026 | public Object getTree() { |
5027 | return tree; | |
5028 | } | |
5029 | } | |
866e5b51 FC |
5030 | |
5031 | // $ANTLR start "structOrVariantDeclaratorList" | |
63bfc685 MK |
5032 | // Grammar/CTFParser.g:547:1: structOrVariantDeclaratorList : |
5033 | // structOrVariantDeclarator ( SEPARATOR structOrVariantDeclarator )* -> ^( | |
5034 | // TYPE_DECLARATOR_LIST ( structOrVariantDeclarator )+ ) ; | |
5035 | public final CTFParser.structOrVariantDeclaratorList_return structOrVariantDeclaratorList() | |
5036 | throws RecognitionException { | |
866e5b51 FC |
5037 | CTFParser.structOrVariantDeclaratorList_return retval = new CTFParser.structOrVariantDeclaratorList_return(); |
5038 | retval.start = input.LT(1); | |
5039 | ||
5040 | CommonTree root_0 = null; | |
5041 | ||
63bfc685 | 5042 | Token SEPARATOR84 = null; |
866e5b51 FC |
5043 | CTFParser.structOrVariantDeclarator_return structOrVariantDeclarator83 = null; |
5044 | ||
5045 | CTFParser.structOrVariantDeclarator_return structOrVariantDeclarator85 = null; | |
5046 | ||
63bfc685 MK |
5047 | CommonTree SEPARATOR84_tree = null; |
5048 | RewriteRuleTokenStream stream_SEPARATOR = new RewriteRuleTokenStream( | |
5049 | adaptor, "token SEPARATOR"); | |
5050 | RewriteRuleSubtreeStream stream_structOrVariantDeclarator = new RewriteRuleSubtreeStream( | |
5051 | adaptor, "rule structOrVariantDeclarator"); | |
866e5b51 | 5052 | |
63bfc685 | 5053 | enter("structOrVariantDeclaratorList"); |
866e5b51 FC |
5054 | |
5055 | try { | |
63bfc685 MK |
5056 | // Grammar/CTFParser.g:554:1: ( structOrVariantDeclarator ( |
5057 | // SEPARATOR structOrVariantDeclarator )* -> ^( TYPE_DECLARATOR_LIST | |
5058 | // ( structOrVariantDeclarator )+ ) ) | |
5059 | // Grammar/CTFParser.g:555:3: structOrVariantDeclarator ( SEPARATOR | |
5060 | // structOrVariantDeclarator )* | |
866e5b51 | 5061 | { |
63bfc685 MK |
5062 | pushFollow(FOLLOW_structOrVariantDeclarator_in_structOrVariantDeclaratorList1812); |
5063 | structOrVariantDeclarator83 = structOrVariantDeclarator(); | |
866e5b51 | 5064 | |
63bfc685 MK |
5065 | state._fsp--; |
5066 | if (state.failed) { | |
5067 | return retval; | |
866e5b51 | 5068 | } |
63bfc685 MK |
5069 | if (state.backtracking == 0) { |
5070 | stream_structOrVariantDeclarator | |
5071 | .add(structOrVariantDeclarator83.getTree()); | |
5072 | } | |
5073 | // Grammar/CTFParser.g:555:29: ( SEPARATOR | |
5074 | // structOrVariantDeclarator )* | |
5075 | loop27: do { | |
5076 | int alt27 = 2; | |
5077 | int LA27_0 = input.LA(1); | |
866e5b51 | 5078 | |
63bfc685 MK |
5079 | if ((LA27_0 == SEPARATOR)) { |
5080 | alt27 = 1; | |
5081 | } | |
866e5b51 | 5082 | |
63bfc685 MK |
5083 | switch (alt27) { |
5084 | case 1: | |
5085 | // Grammar/CTFParser.g:555:30: SEPARATOR | |
5086 | // structOrVariantDeclarator | |
5087 | { | |
5088 | SEPARATOR84 = (Token) match(input, SEPARATOR, | |
5089 | FOLLOW_SEPARATOR_in_structOrVariantDeclaratorList1815); | |
5090 | if (state.failed) { | |
5091 | return retval; | |
5092 | } | |
5093 | if (state.backtracking == 0) { | |
5094 | stream_SEPARATOR.add(SEPARATOR84); | |
5095 | } | |
866e5b51 | 5096 | |
63bfc685 MK |
5097 | pushFollow(FOLLOW_structOrVariantDeclarator_in_structOrVariantDeclaratorList1817); |
5098 | structOrVariantDeclarator85 = structOrVariantDeclarator(); | |
866e5b51 | 5099 | |
63bfc685 MK |
5100 | state._fsp--; |
5101 | if (state.failed) { | |
5102 | return retval; | |
5103 | } | |
5104 | if (state.backtracking == 0) { | |
5105 | stream_structOrVariantDeclarator | |
5106 | .add(structOrVariantDeclarator85.getTree()); | |
5107 | } | |
866e5b51 | 5108 | |
63bfc685 MK |
5109 | } |
5110 | break; | |
866e5b51 | 5111 | |
63bfc685 MK |
5112 | default: |
5113 | break loop27; | |
5114 | } | |
5115 | } while (true); | |
5116 | ||
5117 | // AST REWRITE | |
5118 | // elements: structOrVariantDeclarator | |
5119 | // token labels: | |
5120 | // rule labels: retval | |
5121 | // token list labels: | |
5122 | // rule list labels: | |
5123 | // wildcard labels: | |
5124 | if (state.backtracking == 0) { | |
5125 | retval.tree = root_0; | |
5126 | // RewriteRuleSubtreeStream stream_retval = | |
5127 | new RewriteRuleSubtreeStream( | |
5128 | adaptor, "rule retval", | |
5129 | retval != null ? retval.tree : null); | |
866e5b51 | 5130 | |
63bfc685 MK |
5131 | root_0 = (CommonTree) adaptor.nil(); |
5132 | // 555:68: -> ^( TYPE_DECLARATOR_LIST ( | |
5133 | // structOrVariantDeclarator )+ ) | |
5134 | { | |
5135 | // Grammar/CTFParser.g:555:71: ^( TYPE_DECLARATOR_LIST ( | |
5136 | // structOrVariantDeclarator )+ ) | |
5137 | { | |
5138 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
5139 | root_1 = (CommonTree) adaptor.becomeRoot(adaptor | |
5140 | .create(TYPE_DECLARATOR_LIST, | |
5141 | "TYPE_DECLARATOR_LIST"), root_1); | |
866e5b51 | 5142 | |
63bfc685 MK |
5143 | if (!(stream_structOrVariantDeclarator.hasNext())) { |
5144 | throw new RewriteEarlyExitException(); | |
5145 | } | |
5146 | while (stream_structOrVariantDeclarator.hasNext()) { | |
5147 | adaptor.addChild(root_1, | |
5148 | stream_structOrVariantDeclarator | |
5149 | .nextTree()); | |
866e5b51 | 5150 | |
63bfc685 MK |
5151 | } |
5152 | stream_structOrVariantDeclarator.reset(); | |
866e5b51 | 5153 | |
63bfc685 MK |
5154 | adaptor.addChild(root_0, root_1); |
5155 | } | |
866e5b51 | 5156 | |
63bfc685 | 5157 | } |
866e5b51 | 5158 | |
63bfc685 | 5159 | retval.tree = root_0; |
866e5b51 | 5160 | } |
866e5b51 FC |
5161 | } |
5162 | ||
5163 | retval.stop = input.LT(-1); | |
5164 | ||
63bfc685 | 5165 | if (state.backtracking == 0) { |
866e5b51 | 5166 | |
63bfc685 MK |
5167 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
5168 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
5169 | retval.stop); | |
866e5b51 | 5170 | } |
63bfc685 | 5171 | if (state.backtracking == 0) { |
866e5b51 FC |
5172 | |
5173 | exit("structOrVariantDeclaratorList"); | |
5174 | ||
5175 | } | |
5176 | } | |
5177 | ||
63bfc685 MK |
5178 | catch (RecognitionException e) { |
5179 | throw e; | |
866e5b51 FC |
5180 | } |
5181 | return retval; | |
5182 | } | |
63bfc685 | 5183 | |
866e5b51 FC |
5184 | // $ANTLR end "structOrVariantDeclaratorList" |
5185 | ||
63bfc685 MK |
5186 | public static class structOrVariantDeclarator_return extends |
5187 | ParserRuleReturnScope { | |
866e5b51 | 5188 | CommonTree tree; |
63bfc685 | 5189 | |
866e5b51 | 5190 | @Override |
63bfc685 MK |
5191 | public Object getTree() { |
5192 | return tree; | |
5193 | } | |
5194 | } | |
866e5b51 FC |
5195 | |
5196 | // $ANTLR start "structOrVariantDeclarator" | |
63bfc685 MK |
5197 | // Grammar/CTFParser.g:558:1: structOrVariantDeclarator : ( declarator ( |
5198 | // COLON numberLiteral )? ) -> declarator ; | |
5199 | public final CTFParser.structOrVariantDeclarator_return structOrVariantDeclarator() | |
5200 | throws RecognitionException { | |
866e5b51 FC |
5201 | CTFParser.structOrVariantDeclarator_return retval = new CTFParser.structOrVariantDeclarator_return(); |
5202 | retval.start = input.LT(1); | |
5203 | ||
5204 | CommonTree root_0 = null; | |
5205 | ||
63bfc685 | 5206 | Token COLON87 = null; |
866e5b51 FC |
5207 | CTFParser.declarator_return declarator86 = null; |
5208 | ||
5209 | CTFParser.numberLiteral_return numberLiteral88 = null; | |
5210 | ||
63bfc685 MK |
5211 | CommonTree COLON87_tree = null; |
5212 | RewriteRuleTokenStream stream_COLON = new RewriteRuleTokenStream( | |
5213 | adaptor, "token COLON"); | |
5214 | RewriteRuleSubtreeStream stream_declarator = new RewriteRuleSubtreeStream( | |
5215 | adaptor, "rule declarator"); | |
5216 | RewriteRuleSubtreeStream stream_numberLiteral = new RewriteRuleSubtreeStream( | |
5217 | adaptor, "rule numberLiteral"); | |
866e5b51 | 5218 | |
63bfc685 | 5219 | enter("structOrVariantDeclarator"); |
866e5b51 FC |
5220 | |
5221 | try { | |
63bfc685 MK |
5222 | // Grammar/CTFParser.g:565:1: ( ( declarator ( COLON numberLiteral |
5223 | // )? ) -> declarator ) | |
5224 | // Grammar/CTFParser.g:567:5: ( declarator ( COLON numberLiteral )? | |
5225 | // ) | |
866e5b51 | 5226 | { |
63bfc685 MK |
5227 | // Grammar/CTFParser.g:567:5: ( declarator ( COLON numberLiteral |
5228 | // )? ) | |
5229 | // Grammar/CTFParser.g:567:6: declarator ( COLON numberLiteral | |
5230 | // )? | |
5231 | { | |
5232 | pushFollow(FOLLOW_declarator_in_structOrVariantDeclarator1858); | |
5233 | declarator86 = declarator(); | |
866e5b51 | 5234 | |
63bfc685 MK |
5235 | state._fsp--; |
5236 | if (state.failed) { | |
5237 | return retval; | |
5238 | } | |
5239 | if (state.backtracking == 0) { | |
5240 | stream_declarator.add(declarator86.getTree()); | |
5241 | } | |
5242 | // Grammar/CTFParser.g:567:17: ( COLON numberLiteral )? | |
5243 | int alt28 = 2; | |
5244 | int LA28_0 = input.LA(1); | |
866e5b51 | 5245 | |
63bfc685 MK |
5246 | if ((LA28_0 == COLON)) { |
5247 | alt28 = 1; | |
5248 | } | |
5249 | switch (alt28) { | |
5250 | case 1: | |
866e5b51 FC |
5251 | // Grammar/CTFParser.g:567:18: COLON numberLiteral |
5252 | { | |
63bfc685 MK |
5253 | COLON87 = (Token) match(input, COLON, |
5254 | FOLLOW_COLON_in_structOrVariantDeclarator1861); | |
5255 | if (state.failed) { | |
5256 | return retval; | |
5257 | } | |
5258 | if (state.backtracking == 0) { | |
5259 | stream_COLON.add(COLON87); | |
5260 | } | |
866e5b51 | 5261 | |
63bfc685 MK |
5262 | pushFollow(FOLLOW_numberLiteral_in_structOrVariantDeclarator1863); |
5263 | numberLiteral88 = numberLiteral(); | |
866e5b51 | 5264 | |
63bfc685 MK |
5265 | state._fsp--; |
5266 | if (state.failed) { | |
5267 | return retval; | |
5268 | } | |
5269 | if (state.backtracking == 0) { | |
5270 | stream_numberLiteral.add(numberLiteral88.getTree()); | |
5271 | } | |
866e5b51 FC |
5272 | |
5273 | } | |
63bfc685 | 5274 | break; |
866e5b51 | 5275 | |
63bfc685 | 5276 | } |
866e5b51 | 5277 | |
63bfc685 | 5278 | } |
866e5b51 | 5279 | |
63bfc685 MK |
5280 | // AST REWRITE |
5281 | // elements: declarator | |
5282 | // token labels: | |
5283 | // rule labels: retval | |
5284 | // token list labels: | |
5285 | // rule list labels: | |
5286 | // wildcard labels: | |
5287 | if (state.backtracking == 0) { | |
5288 | retval.tree = root_0; | |
5289 | // RewriteRuleSubtreeStream stream_retval = | |
5290 | new RewriteRuleSubtreeStream( | |
5291 | adaptor, "rule retval", | |
5292 | retval != null ? retval.tree : null); | |
866e5b51 | 5293 | |
63bfc685 MK |
5294 | root_0 = (CommonTree) adaptor.nil(); |
5295 | // 567:41: -> declarator | |
5296 | { | |
5297 | adaptor.addChild(root_0, stream_declarator.nextTree()); | |
866e5b51 | 5298 | |
63bfc685 | 5299 | } |
866e5b51 | 5300 | |
63bfc685 MK |
5301 | retval.tree = root_0; |
5302 | } | |
866e5b51 FC |
5303 | } |
5304 | ||
5305 | retval.stop = input.LT(-1); | |
5306 | ||
63bfc685 | 5307 | if (state.backtracking == 0) { |
866e5b51 | 5308 | |
63bfc685 MK |
5309 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
5310 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
5311 | retval.stop); | |
866e5b51 | 5312 | } |
63bfc685 | 5313 | if (state.backtracking == 0) { |
866e5b51 FC |
5314 | |
5315 | exit("structOrVariantDeclarator"); | |
5316 | ||
5317 | } | |
5318 | } | |
5319 | ||
63bfc685 MK |
5320 | catch (RecognitionException e) { |
5321 | throw e; | |
866e5b51 FC |
5322 | } |
5323 | return retval; | |
5324 | } | |
63bfc685 | 5325 | |
866e5b51 FC |
5326 | // $ANTLR end "structOrVariantDeclarator" |
5327 | ||
5328 | public static class variantSpecifier_return extends ParserRuleReturnScope { | |
5329 | CommonTree tree; | |
63bfc685 | 5330 | |
866e5b51 | 5331 | @Override |
63bfc685 MK |
5332 | public Object getTree() { |
5333 | return tree; | |
5334 | } | |
5335 | } | |
866e5b51 FC |
5336 | |
5337 | // $ANTLR start "variantSpecifier" | |
63bfc685 MK |
5338 | // Grammar/CTFParser.g:571:1: variantSpecifier : VARIANTTOK ( ( variantName |
5339 | // ( ( variantTag ( variantBody | ) ) | variantBody ) ) | ( variantTag | |
5340 | // variantBody ) | variantBody ) -> ^( VARIANT ( variantName )? ( variantTag | |
5341 | // )? ( variantBody )? ) ; | |
5342 | public final CTFParser.variantSpecifier_return variantSpecifier() | |
5343 | throws RecognitionException { | |
866e5b51 FC |
5344 | CTFParser.variantSpecifier_return retval = new CTFParser.variantSpecifier_return(); |
5345 | retval.start = input.LT(1); | |
5346 | ||
5347 | CommonTree root_0 = null; | |
5348 | ||
63bfc685 | 5349 | Token VARIANTTOK89 = null; |
866e5b51 FC |
5350 | CTFParser.variantName_return variantName90 = null; |
5351 | ||
5352 | CTFParser.variantTag_return variantTag91 = null; | |
5353 | ||
5354 | CTFParser.variantBody_return variantBody92 = null; | |
5355 | ||
5356 | CTFParser.variantBody_return variantBody93 = null; | |
5357 | ||
5358 | CTFParser.variantTag_return variantTag94 = null; | |
5359 | ||
5360 | CTFParser.variantBody_return variantBody95 = null; | |
5361 | ||
5362 | CTFParser.variantBody_return variantBody96 = null; | |
5363 | ||
63bfc685 MK |
5364 | CommonTree VARIANTTOK89_tree = null; |
5365 | RewriteRuleTokenStream stream_VARIANTTOK = new RewriteRuleTokenStream( | |
5366 | adaptor, "token VARIANTTOK"); | |
5367 | RewriteRuleSubtreeStream stream_variantName = new RewriteRuleSubtreeStream( | |
5368 | adaptor, "rule variantName"); | |
5369 | RewriteRuleSubtreeStream stream_variantTag = new RewriteRuleSubtreeStream( | |
5370 | adaptor, "rule variantTag"); | |
5371 | RewriteRuleSubtreeStream stream_variantBody = new RewriteRuleSubtreeStream( | |
5372 | adaptor, "rule variantBody"); | |
866e5b51 | 5373 | |
63bfc685 | 5374 | enter("variantSpecifier"); |
866e5b51 FC |
5375 | |
5376 | try { | |
63bfc685 MK |
5377 | // Grammar/CTFParser.g:578:1: ( VARIANTTOK ( ( variantName ( ( |
5378 | // variantTag ( variantBody | ) ) | variantBody ) ) | ( variantTag | |
5379 | // variantBody ) | variantBody ) -> ^( VARIANT ( variantName )? ( | |
5380 | // variantTag )? ( variantBody )? ) ) | |
5381 | // Grammar/CTFParser.g:579:3: VARIANTTOK ( ( variantName ( ( | |
5382 | // variantTag ( variantBody | ) ) | variantBody ) ) | ( variantTag | |
5383 | // variantBody ) | variantBody ) | |
866e5b51 | 5384 | { |
63bfc685 MK |
5385 | VARIANTTOK89 = (Token) match(input, VARIANTTOK, |
5386 | FOLLOW_VARIANTTOK_in_variantSpecifier1897); | |
5387 | if (state.failed) { | |
5388 | return retval; | |
5389 | } | |
5390 | if (state.backtracking == 0) { | |
5391 | stream_VARIANTTOK.add(VARIANTTOK89); | |
5392 | } | |
866e5b51 | 5393 | |
63bfc685 MK |
5394 | // Grammar/CTFParser.g:580:3: ( ( variantName ( ( variantTag ( |
5395 | // variantBody | ) ) | variantBody ) ) | ( variantTag | |
5396 | // variantBody ) | variantBody ) | |
5397 | int alt31 = 3; | |
5398 | switch (input.LA(1)) { | |
5399 | case IDENTIFIER: { | |
5400 | alt31 = 1; | |
866e5b51 | 5401 | } |
63bfc685 MK |
5402 | break; |
5403 | case LT: { | |
5404 | alt31 = 2; | |
866e5b51 | 5405 | } |
63bfc685 MK |
5406 | break; |
5407 | case LCURL: { | |
5408 | alt31 = 3; | |
866e5b51 | 5409 | } |
63bfc685 MK |
5410 | break; |
5411 | default: | |
5412 | if (state.backtracking > 0) { | |
5413 | state.failed = true; | |
5414 | return retval; | |
5415 | } | |
5416 | NoViableAltException nvae = new NoViableAltException("", | |
5417 | 31, 0, input); | |
866e5b51 | 5418 | |
63bfc685 MK |
5419 | throw nvae; |
5420 | } | |
866e5b51 | 5421 | |
63bfc685 MK |
5422 | switch (alt31) { |
5423 | case 1: | |
5424 | // Grammar/CTFParser.g:581:5: ( variantName ( ( variantTag ( | |
5425 | // variantBody | ) ) | variantBody ) ) | |
5426 | { | |
5427 | // Grammar/CTFParser.g:581:5: ( variantName ( ( variantTag ( | |
5428 | // variantBody | ) ) | variantBody ) ) | |
5429 | // Grammar/CTFParser.g:582:7: variantName ( ( variantTag ( | |
5430 | // variantBody | ) ) | variantBody ) | |
866e5b51 | 5431 | { |
63bfc685 MK |
5432 | pushFollow(FOLLOW_variantName_in_variantSpecifier1915); |
5433 | variantName90 = variantName(); | |
866e5b51 | 5434 | |
63bfc685 MK |
5435 | state._fsp--; |
5436 | if (state.failed) { | |
5437 | return retval; | |
5438 | } | |
5439 | if (state.backtracking == 0) { | |
5440 | stream_variantName.add(variantName90.getTree()); | |
5441 | } | |
5442 | // Grammar/CTFParser.g:583:7: ( ( variantTag ( | |
5443 | // variantBody | ) ) | variantBody ) | |
5444 | int alt30 = 2; | |
5445 | int LA30_0 = input.LA(1); | |
5446 | ||
5447 | if ((LA30_0 == LT)) { | |
5448 | alt30 = 1; | |
5449 | } else if ((LA30_0 == LCURL)) { | |
5450 | alt30 = 2; | |
5451 | } else { | |
5452 | if (state.backtracking > 0) { | |
5453 | state.failed = true; | |
5454 | return retval; | |
5455 | } | |
5456 | NoViableAltException nvae = new NoViableAltException( | |
5457 | "", 30, 0, input); | |
866e5b51 | 5458 | |
63bfc685 MK |
5459 | throw nvae; |
5460 | } | |
5461 | switch (alt30) { | |
5462 | case 1: | |
5463 | // Grammar/CTFParser.g:584:9: ( variantTag ( variantBody | |
5464 | // | ) ) | |
5465 | { | |
5466 | // Grammar/CTFParser.g:584:9: ( variantTag ( | |
5467 | // variantBody | ) ) | |
5468 | // Grammar/CTFParser.g:585:11: variantTag ( | |
5469 | // variantBody | ) | |
866e5b51 | 5470 | { |
63bfc685 MK |
5471 | pushFollow(FOLLOW_variantTag_in_variantSpecifier1946); |
5472 | variantTag91 = variantTag(); | |
866e5b51 | 5473 | |
63bfc685 MK |
5474 | state._fsp--; |
5475 | if (state.failed) { | |
5476 | return retval; | |
5477 | } | |
5478 | if (state.backtracking == 0) { | |
5479 | stream_variantTag.add(variantTag91 | |
5480 | .getTree()); | |
5481 | } | |
5482 | // Grammar/CTFParser.g:586:11: ( variantBody | ) | |
5483 | int alt29 = 2; | |
5484 | int LA29_0 = input.LA(1); | |
5485 | ||
5486 | if ((LA29_0 == LCURL)) { | |
5487 | switch (input.LA(2)) { | |
5488 | case CONSTTOK: | |
5489 | case CHARTOK: | |
5490 | case DOUBLETOK: | |
5491 | case ENUMTOK: | |
5492 | case FLOATINGPOINTTOK: | |
5493 | case FLOATTOK: | |
5494 | case INTEGERTOK: | |
5495 | case INTTOK: | |
5496 | case LONGTOK: | |
5497 | case SHORTTOK: | |
5498 | case STRUCTTOK: | |
5499 | case TYPEALIASTOK: | |
5500 | case TYPEDEFTOK: | |
5501 | case UNSIGNEDTOK: | |
5502 | case VARIANTTOK: | |
5503 | case VOIDTOK: | |
5504 | case BOOLTOK: | |
5505 | case COMPLEXTOK: | |
5506 | case IMAGINARYTOK: { | |
5507 | alt29 = 1; | |
866e5b51 | 5508 | } |
63bfc685 MK |
5509 | break; |
5510 | case SIGNEDTOK: { | |
5511 | int LA29_4 = input.LA(3); | |
5512 | ||
5513 | if ((((LA29_4 >= CONSTTOK) && (LA29_4 <= ENUMTOK)) | |
5514 | || ((LA29_4 >= FLOATINGPOINTTOK) && (LA29_4 <= SIGNEDTOK)) | |
5515 | || ((LA29_4 >= STRINGTOK) && (LA29_4 <= STRUCTTOK)) | |
5516 | || ((LA29_4 >= TYPEDEFTOK) && (LA29_4 <= IMAGINARYTOK)) | |
5517 | || (LA29_4 == POINTER) || (LA29_4 == IDENTIFIER))) { | |
5518 | alt29 = 1; | |
5519 | } else if (((LA29_4 == SEPARATOR) | |
5520 | || (LA29_4 == ASSIGNMENT) || (LA29_4 == RCURL))) { | |
5521 | alt29 = 2; | |
5522 | } else { | |
5523 | if (state.backtracking > 0) { | |
5524 | state.failed = true; | |
5525 | return retval; | |
5526 | } | |
5527 | NoViableAltException nvae = new NoViableAltException( | |
5528 | "", 29, 4, input); | |
5529 | ||
5530 | throw nvae; | |
5531 | } | |
866e5b51 | 5532 | } |
63bfc685 MK |
5533 | break; |
5534 | case STRINGTOK: { | |
5535 | int LA29_5 = input.LA(3); | |
5536 | ||
5537 | if (((LA29_5 == SEPARATOR) | |
5538 | || (LA29_5 == ASSIGNMENT) || (LA29_5 == RCURL))) { | |
5539 | alt29 = 2; | |
5540 | } else if ((((LA29_5 >= CONSTTOK) && (LA29_5 <= ENUMTOK)) | |
5541 | || ((LA29_5 >= FLOATINGPOINTTOK) && (LA29_5 <= SIGNEDTOK)) | |
5542 | || ((LA29_5 >= STRINGTOK) && (LA29_5 <= STRUCTTOK)) | |
5543 | || ((LA29_5 >= TYPEDEFTOK) && (LA29_5 <= IMAGINARYTOK)) | |
5544 | || (LA29_5 == LCURL) | |
5545 | || (LA29_5 == POINTER) || (LA29_5 == IDENTIFIER))) { | |
5546 | alt29 = 1; | |
5547 | } else { | |
5548 | if (state.backtracking > 0) { | |
5549 | state.failed = true; | |
5550 | return retval; | |
5551 | } | |
5552 | NoViableAltException nvae = new NoViableAltException( | |
5553 | "", 29, 5, input); | |
5554 | ||
5555 | throw nvae; | |
5556 | } | |
866e5b51 | 5557 | } |
63bfc685 MK |
5558 | break; |
5559 | case IDENTIFIER: { | |
5560 | int LA29_6 = input.LA(3); | |
5561 | ||
5562 | if (((LA29_6 == SEPARATOR) | |
5563 | || (LA29_6 == ASSIGNMENT) || (LA29_6 == RCURL))) { | |
5564 | alt29 = 2; | |
5565 | } else if ((((LA29_6 >= CONSTTOK) && (LA29_6 <= ENUMTOK)) | |
5566 | || ((LA29_6 >= FLOATINGPOINTTOK) && (LA29_6 <= SIGNEDTOK)) | |
5567 | || ((LA29_6 >= STRINGTOK) && (LA29_6 <= STRUCTTOK)) | |
5568 | || ((LA29_6 >= TYPEDEFTOK) && (LA29_6 <= IMAGINARYTOK)) | |
5569 | || (LA29_6 == POINTER) || (LA29_6 == IDENTIFIER))) { | |
5570 | alt29 = 1; | |
5571 | } else { | |
5572 | if (state.backtracking > 0) { | |
5573 | state.failed = true; | |
5574 | return retval; | |
5575 | } | |
5576 | NoViableAltException nvae = new NoViableAltException( | |
5577 | "", 29, 6, input); | |
5578 | ||
5579 | throw nvae; | |
5580 | } | |
866e5b51 | 5581 | } |
63bfc685 MK |
5582 | break; |
5583 | case ALIGNTOK: | |
5584 | case EVENTTOK: | |
5585 | case STRING_LITERAL: { | |
5586 | alt29 = 2; | |
866e5b51 | 5587 | } |
63bfc685 MK |
5588 | break; |
5589 | default: | |
5590 | if (state.backtracking > 0) { | |
5591 | state.failed = true; | |
5592 | return retval; | |
5593 | } | |
5594 | NoViableAltException nvae = new NoViableAltException( | |
5595 | "", 29, 1, input); | |
866e5b51 FC |
5596 | |
5597 | throw nvae; | |
5598 | } | |
866e5b51 | 5599 | |
63bfc685 MK |
5600 | } else if (((LA29_0 == EOF) |
5601 | || ((LA29_0 >= CONSTTOK) && (LA29_0 <= ENUMTOK)) | |
5602 | || ((LA29_0 >= FLOATINGPOINTTOK) && (LA29_0 <= SIGNEDTOK)) | |
5603 | || ((LA29_0 >= STRINGTOK) && (LA29_0 <= STRUCTTOK)) | |
5604 | || ((LA29_0 >= TYPEDEFTOK) && (LA29_0 <= IMAGINARYTOK)) | |
5605 | || (LA29_0 == TYPE_ASSIGNMENT) | |
5606 | || (LA29_0 == LPAREN) | |
5607 | || ((LA29_0 >= TERM) && (LA29_0 <= POINTER)) || (LA29_0 == IDENTIFIER))) { | |
5608 | alt29 = 2; | |
5609 | } else { | |
5610 | if (state.backtracking > 0) { | |
5611 | state.failed = true; | |
5612 | return retval; | |
866e5b51 | 5613 | } |
63bfc685 MK |
5614 | NoViableAltException nvae = new NoViableAltException( |
5615 | "", 29, 0, input); | |
866e5b51 FC |
5616 | |
5617 | throw nvae; | |
5618 | } | |
63bfc685 MK |
5619 | switch (alt29) { |
5620 | case 1: | |
5621 | // Grammar/CTFParser.g:587:13: variantBody | |
5622 | { | |
866e5b51 | 5623 | pushFollow(FOLLOW_variantBody_in_variantSpecifier1972); |
63bfc685 | 5624 | variantBody92 = variantBody(); |
866e5b51 FC |
5625 | |
5626 | state._fsp--; | |
63bfc685 MK |
5627 | if (state.failed) { |
5628 | return retval; | |
866e5b51 | 5629 | } |
63bfc685 MK |
5630 | if (state.backtracking == 0) { |
5631 | stream_variantBody.add(variantBody92 | |
5632 | .getTree()); | |
866e5b51 | 5633 | } |
866e5b51 | 5634 | |
63bfc685 MK |
5635 | } |
5636 | break; | |
5637 | case 2: | |
5638 | break; | |
866e5b51 | 5639 | |
63bfc685 | 5640 | } |
866e5b51 FC |
5641 | |
5642 | } | |
5643 | ||
63bfc685 | 5644 | } |
866e5b51 | 5645 | break; |
63bfc685 MK |
5646 | case 2: |
5647 | // Grammar/CTFParser.g:593:9: variantBody | |
5648 | { | |
866e5b51 | 5649 | pushFollow(FOLLOW_variantBody_in_variantSpecifier2040); |
63bfc685 | 5650 | variantBody93 = variantBody(); |
866e5b51 FC |
5651 | |
5652 | state._fsp--; | |
63bfc685 MK |
5653 | if (state.failed) { |
5654 | return retval; | |
5655 | } | |
5656 | if (state.backtracking == 0) { | |
5657 | stream_variantBody.add(variantBody93.getTree()); | |
866e5b51 | 5658 | } |
866e5b51 | 5659 | |
63bfc685 MK |
5660 | } |
5661 | break; | |
866e5b51 | 5662 | |
63bfc685 | 5663 | } |
866e5b51 FC |
5664 | |
5665 | } | |
5666 | ||
63bfc685 | 5667 | } |
866e5b51 | 5668 | break; |
63bfc685 MK |
5669 | case 2: |
5670 | // Grammar/CTFParser.g:597:5: ( variantTag variantBody ) | |
5671 | { | |
866e5b51 FC |
5672 | // Grammar/CTFParser.g:597:5: ( variantTag variantBody ) |
5673 | // Grammar/CTFParser.g:597:6: variantTag variantBody | |
5674 | { | |
63bfc685 MK |
5675 | pushFollow(FOLLOW_variantTag_in_variantSpecifier2065); |
5676 | variantTag94 = variantTag(); | |
866e5b51 | 5677 | |
63bfc685 MK |
5678 | state._fsp--; |
5679 | if (state.failed) { | |
5680 | return retval; | |
5681 | } | |
5682 | if (state.backtracking == 0) { | |
5683 | stream_variantTag.add(variantTag94.getTree()); | |
5684 | } | |
5685 | pushFollow(FOLLOW_variantBody_in_variantSpecifier2067); | |
5686 | variantBody95 = variantBody(); | |
866e5b51 | 5687 | |
63bfc685 MK |
5688 | state._fsp--; |
5689 | if (state.failed) { | |
5690 | return retval; | |
5691 | } | |
5692 | if (state.backtracking == 0) { | |
5693 | stream_variantBody.add(variantBody95.getTree()); | |
5694 | } | |
866e5b51 FC |
5695 | |
5696 | } | |
5697 | ||
63bfc685 | 5698 | } |
866e5b51 | 5699 | break; |
63bfc685 MK |
5700 | case 3: |
5701 | // Grammar/CTFParser.g:599:5: variantBody | |
5702 | { | |
866e5b51 | 5703 | pushFollow(FOLLOW_variantBody_in_variantSpecifier2078); |
63bfc685 | 5704 | variantBody96 = variantBody(); |
866e5b51 FC |
5705 | |
5706 | state._fsp--; | |
63bfc685 MK |
5707 | if (state.failed) { |
5708 | return retval; | |
5709 | } | |
5710 | if (state.backtracking == 0) { | |
5711 | stream_variantBody.add(variantBody96.getTree()); | |
866e5b51 | 5712 | } |
63bfc685 MK |
5713 | |
5714 | } | |
866e5b51 FC |
5715 | break; |
5716 | ||
63bfc685 | 5717 | } |
866e5b51 | 5718 | |
63bfc685 MK |
5719 | // AST REWRITE |
5720 | // elements: variantBody, variantTag, variantName | |
5721 | // token labels: | |
5722 | // rule labels: retval | |
5723 | // token list labels: | |
5724 | // rule list labels: | |
5725 | // wildcard labels: | |
5726 | if (state.backtracking == 0) { | |
5727 | retval.tree = root_0; | |
5728 | RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream( | |
5729 | adaptor, "rule retval", | |
5730 | retval != null ? retval.tree : null); | |
866e5b51 | 5731 | |
63bfc685 MK |
5732 | root_0 = (CommonTree) adaptor.nil(); |
5733 | // 600:5: -> ^( VARIANT ( variantName )? ( variantTag )? ( | |
5734 | // variantBody )? ) | |
5735 | { | |
5736 | // Grammar/CTFParser.g:600:8: ^( VARIANT ( variantName | |
5737 | // )? ( variantTag )? ( variantBody )? ) | |
5738 | { | |
5739 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
5740 | root_1 = (CommonTree) adaptor.becomeRoot( | |
5741 | adaptor.create(VARIANT, "VARIANT"), root_1); | |
866e5b51 | 5742 | |
63bfc685 MK |
5743 | // Grammar/CTFParser.g:600:18: ( variantName )? |
5744 | if (stream_variantName.hasNext()) { | |
5745 | adaptor.addChild(root_1, | |
5746 | stream_variantName.nextTree()); | |
866e5b51 | 5747 | |
63bfc685 MK |
5748 | } |
5749 | stream_variantName.reset(); | |
5750 | // Grammar/CTFParser.g:600:31: ( variantTag )? | |
5751 | if (stream_variantTag.hasNext()) { | |
5752 | adaptor.addChild(root_1, | |
5753 | stream_variantTag.nextTree()); | |
866e5b51 | 5754 | |
63bfc685 MK |
5755 | } |
5756 | stream_variantTag.reset(); | |
5757 | // Grammar/CTFParser.g:600:43: ( variantBody )? | |
5758 | if (stream_variantBody.hasNext()) { | |
5759 | adaptor.addChild(root_1, | |
5760 | stream_variantBody.nextTree()); | |
866e5b51 | 5761 | |
63bfc685 MK |
5762 | } |
5763 | stream_variantBody.reset(); | |
866e5b51 | 5764 | |
63bfc685 MK |
5765 | adaptor.addChild(root_0, root_1); |
5766 | } | |
866e5b51 | 5767 | |
63bfc685 | 5768 | } |
866e5b51 | 5769 | |
63bfc685 | 5770 | retval.tree = root_0; |
866e5b51 | 5771 | } |
866e5b51 FC |
5772 | } |
5773 | ||
5774 | retval.stop = input.LT(-1); | |
5775 | ||
63bfc685 | 5776 | if (state.backtracking == 0) { |
866e5b51 | 5777 | |
63bfc685 MK |
5778 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
5779 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
5780 | retval.stop); | |
866e5b51 | 5781 | } |
63bfc685 | 5782 | if (state.backtracking == 0) { |
866e5b51 FC |
5783 | |
5784 | exit("variantSpecifier"); | |
5785 | ||
5786 | } | |
5787 | } | |
5788 | ||
63bfc685 MK |
5789 | catch (RecognitionException e) { |
5790 | throw e; | |
866e5b51 FC |
5791 | } |
5792 | return retval; | |
5793 | } | |
63bfc685 | 5794 | |
866e5b51 FC |
5795 | // $ANTLR end "variantSpecifier" |
5796 | ||
5797 | public static class variantName_return extends ParserRuleReturnScope { | |
5798 | CommonTree tree; | |
63bfc685 | 5799 | |
866e5b51 | 5800 | @Override |
63bfc685 MK |
5801 | public Object getTree() { |
5802 | return tree; | |
5803 | } | |
5804 | } | |
866e5b51 FC |
5805 | |
5806 | // $ANTLR start "variantName" | |
63bfc685 MK |
5807 | // Grammar/CTFParser.g:603:1: variantName : IDENTIFIER -> ^( VARIANT_NAME |
5808 | // IDENTIFIER ) ; | |
5809 | public final CTFParser.variantName_return variantName() | |
5810 | throws RecognitionException { | |
866e5b51 FC |
5811 | CTFParser.variantName_return retval = new CTFParser.variantName_return(); |
5812 | retval.start = input.LT(1); | |
5813 | ||
5814 | CommonTree root_0 = null; | |
5815 | ||
63bfc685 | 5816 | Token IDENTIFIER97 = null; |
866e5b51 | 5817 | |
63bfc685 MK |
5818 | CommonTree IDENTIFIER97_tree = null; |
5819 | RewriteRuleTokenStream stream_IDENTIFIER = new RewriteRuleTokenStream( | |
5820 | adaptor, "token IDENTIFIER"); | |
866e5b51 | 5821 | |
63bfc685 | 5822 | enter("variantName"); |
866e5b51 FC |
5823 | |
5824 | try { | |
63bfc685 MK |
5825 | // Grammar/CTFParser.g:611:1: ( IDENTIFIER -> ^( VARIANT_NAME |
5826 | // IDENTIFIER ) ) | |
866e5b51 FC |
5827 | // Grammar/CTFParser.g:612:3: IDENTIFIER |
5828 | { | |
63bfc685 MK |
5829 | IDENTIFIER97 = (Token) match(input, IDENTIFIER, |
5830 | FOLLOW_IDENTIFIER_in_variantName2120); | |
5831 | if (state.failed) { | |
5832 | return retval; | |
5833 | } | |
5834 | if (state.backtracking == 0) { | |
5835 | stream_IDENTIFIER.add(IDENTIFIER97); | |
5836 | } | |
5837 | ||
5838 | // AST REWRITE | |
5839 | // elements: IDENTIFIER | |
5840 | // token labels: | |
5841 | // rule labels: retval | |
5842 | // token list labels: | |
5843 | // rule list labels: | |
5844 | // wildcard labels: | |
5845 | if (state.backtracking == 0) { | |
5846 | retval.tree = root_0; | |
5847 | // RewriteRuleSubtreeStream stream_retval = | |
5848 | new RewriteRuleSubtreeStream( | |
5849 | adaptor, "rule retval", | |
5850 | retval != null ? retval.tree : null); | |
866e5b51 | 5851 | |
63bfc685 MK |
5852 | root_0 = (CommonTree) adaptor.nil(); |
5853 | // 612:14: -> ^( VARIANT_NAME IDENTIFIER ) | |
5854 | { | |
5855 | // Grammar/CTFParser.g:612:17: ^( VARIANT_NAME | |
5856 | // IDENTIFIER ) | |
5857 | { | |
5858 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
5859 | root_1 = (CommonTree) adaptor.becomeRoot(adaptor | |
5860 | .create(VARIANT_NAME, "VARIANT_NAME"), | |
5861 | root_1); | |
866e5b51 | 5862 | |
63bfc685 MK |
5863 | adaptor.addChild(root_1, |
5864 | stream_IDENTIFIER.nextNode()); | |
866e5b51 | 5865 | |
63bfc685 MK |
5866 | adaptor.addChild(root_0, root_1); |
5867 | } | |
866e5b51 | 5868 | |
63bfc685 | 5869 | } |
866e5b51 | 5870 | |
63bfc685 | 5871 | retval.tree = root_0; |
866e5b51 | 5872 | } |
866e5b51 FC |
5873 | } |
5874 | ||
5875 | retval.stop = input.LT(-1); | |
5876 | ||
63bfc685 | 5877 | if (state.backtracking == 0) { |
866e5b51 | 5878 | |
63bfc685 MK |
5879 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
5880 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
5881 | retval.stop); | |
866e5b51 | 5882 | } |
63bfc685 | 5883 | if (state.backtracking == 0) { |
866e5b51 | 5884 | |
63bfc685 | 5885 | debug_print(input.toString(retval.start, input.LT(-1))); |
866e5b51 FC |
5886 | exit("variantName"); |
5887 | ||
5888 | } | |
5889 | } | |
5890 | ||
63bfc685 MK |
5891 | catch (RecognitionException e) { |
5892 | throw e; | |
866e5b51 FC |
5893 | } |
5894 | return retval; | |
5895 | } | |
63bfc685 | 5896 | |
866e5b51 FC |
5897 | // $ANTLR end "variantName" |
5898 | ||
5899 | public static class variantBody_return extends ParserRuleReturnScope { | |
5900 | CommonTree tree; | |
63bfc685 | 5901 | |
866e5b51 | 5902 | @Override |
63bfc685 MK |
5903 | public Object getTree() { |
5904 | return tree; | |
5905 | } | |
5906 | } | |
866e5b51 FC |
5907 | |
5908 | // $ANTLR start "variantBody" | |
63bfc685 MK |
5909 | // Grammar/CTFParser.g:615:1: variantBody : LCURL |
5910 | // structOrVariantDeclarationList RCURL -> ^( VARIANT_BODY | |
5911 | // structOrVariantDeclarationList ) ; | |
5912 | public final CTFParser.variantBody_return variantBody() | |
5913 | throws RecognitionException { | |
866e5b51 FC |
5914 | Symbols_stack.push(new Symbols_scope()); |
5915 | ||
5916 | CTFParser.variantBody_return retval = new CTFParser.variantBody_return(); | |
5917 | retval.start = input.LT(1); | |
5918 | ||
5919 | CommonTree root_0 = null; | |
5920 | ||
63bfc685 MK |
5921 | Token LCURL98 = null; |
5922 | Token RCURL100 = null; | |
866e5b51 FC |
5923 | CTFParser.structOrVariantDeclarationList_return structOrVariantDeclarationList99 = null; |
5924 | ||
63bfc685 MK |
5925 | CommonTree LCURL98_tree = null; |
5926 | CommonTree RCURL100_tree = null; | |
5927 | RewriteRuleTokenStream stream_LCURL = new RewriteRuleTokenStream( | |
5928 | adaptor, "token LCURL"); | |
5929 | RewriteRuleTokenStream stream_RCURL = new RewriteRuleTokenStream( | |
5930 | adaptor, "token RCURL"); | |
5931 | RewriteRuleSubtreeStream stream_structOrVariantDeclarationList = new RewriteRuleSubtreeStream( | |
5932 | adaptor, "rule structOrVariantDeclarationList"); | |
866e5b51 | 5933 | |
63bfc685 MK |
5934 | enter("variantBody"); |
5935 | debug_print("Scope push " + Symbols_stack.size()); | |
5936 | ((Symbols_scope) Symbols_stack.peek()).types = new HashSet<String>(); | |
866e5b51 FC |
5937 | |
5938 | try { | |
63bfc685 MK |
5939 | // Grammar/CTFParser.g:626:1: ( LCURL structOrVariantDeclarationList |
5940 | // RCURL -> ^( VARIANT_BODY structOrVariantDeclarationList ) ) | |
5941 | // Grammar/CTFParser.g:627:3: LCURL structOrVariantDeclarationList | |
5942 | // RCURL | |
866e5b51 | 5943 | { |
63bfc685 MK |
5944 | LCURL98 = (Token) match(input, LCURL, |
5945 | FOLLOW_LCURL_in_variantBody2156); | |
5946 | if (state.failed) { | |
5947 | return retval; | |
5948 | } | |
5949 | if (state.backtracking == 0) { | |
5950 | stream_LCURL.add(LCURL98); | |
5951 | } | |
866e5b51 | 5952 | |
63bfc685 MK |
5953 | pushFollow(FOLLOW_structOrVariantDeclarationList_in_variantBody2158); |
5954 | structOrVariantDeclarationList99 = structOrVariantDeclarationList(); | |
866e5b51 | 5955 | |
63bfc685 MK |
5956 | state._fsp--; |
5957 | if (state.failed) { | |
5958 | return retval; | |
5959 | } | |
5960 | if (state.backtracking == 0) { | |
5961 | stream_structOrVariantDeclarationList | |
5962 | .add(structOrVariantDeclarationList99.getTree()); | |
5963 | } | |
5964 | RCURL100 = (Token) match(input, RCURL, | |
5965 | FOLLOW_RCURL_in_variantBody2160); | |
5966 | if (state.failed) { | |
5967 | return retval; | |
5968 | } | |
5969 | if (state.backtracking == 0) { | |
5970 | stream_RCURL.add(RCURL100); | |
5971 | } | |
866e5b51 | 5972 | |
63bfc685 MK |
5973 | // AST REWRITE |
5974 | // elements: structOrVariantDeclarationList | |
5975 | // token labels: | |
5976 | // rule labels: retval | |
5977 | // token list labels: | |
5978 | // rule list labels: | |
5979 | // wildcard labels: | |
5980 | if (state.backtracking == 0) { | |
5981 | retval.tree = root_0; | |
5982 | // RewriteRuleSubtreeStream stream_retval = | |
5983 | new RewriteRuleSubtreeStream( | |
5984 | adaptor, "rule retval", | |
5985 | retval != null ? retval.tree : null); | |
866e5b51 | 5986 | |
63bfc685 MK |
5987 | root_0 = (CommonTree) adaptor.nil(); |
5988 | // 627:46: -> ^( VARIANT_BODY structOrVariantDeclarationList | |
5989 | // ) | |
5990 | { | |
5991 | // Grammar/CTFParser.g:627:49: ^( VARIANT_BODY | |
5992 | // structOrVariantDeclarationList ) | |
5993 | { | |
5994 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
5995 | root_1 = (CommonTree) adaptor.becomeRoot(adaptor | |
5996 | .create(VARIANT_BODY, "VARIANT_BODY"), | |
5997 | root_1); | |
866e5b51 | 5998 | |
63bfc685 MK |
5999 | adaptor.addChild(root_1, |
6000 | stream_structOrVariantDeclarationList | |
6001 | .nextTree()); | |
6002 | ||
6003 | adaptor.addChild(root_0, root_1); | |
6004 | } | |
6005 | ||
6006 | } | |
866e5b51 | 6007 | |
63bfc685 MK |
6008 | retval.tree = root_0; |
6009 | } | |
866e5b51 FC |
6010 | } |
6011 | ||
6012 | retval.stop = input.LT(-1); | |
6013 | ||
63bfc685 | 6014 | if (state.backtracking == 0) { |
866e5b51 | 6015 | |
63bfc685 MK |
6016 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
6017 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
6018 | retval.stop); | |
866e5b51 | 6019 | } |
63bfc685 | 6020 | if (state.backtracking == 0) { |
866e5b51 FC |
6021 | |
6022 | debug_print("Scope pop " + Symbols_stack.size()); | |
6023 | exit("variantBody"); | |
6024 | ||
6025 | } | |
6026 | } | |
6027 | ||
63bfc685 MK |
6028 | catch (RecognitionException e) { |
6029 | throw e; | |
6030 | } finally { | |
866e5b51 FC |
6031 | Symbols_stack.pop(); |
6032 | ||
6033 | } | |
6034 | return retval; | |
6035 | } | |
63bfc685 | 6036 | |
866e5b51 FC |
6037 | // $ANTLR end "variantBody" |
6038 | ||
6039 | public static class variantTag_return extends ParserRuleReturnScope { | |
6040 | CommonTree tree; | |
63bfc685 | 6041 | |
866e5b51 | 6042 | @Override |
63bfc685 MK |
6043 | public Object getTree() { |
6044 | return tree; | |
6045 | } | |
6046 | } | |
866e5b51 FC |
6047 | |
6048 | // $ANTLR start "variantTag" | |
63bfc685 MK |
6049 | // Grammar/CTFParser.g:630:1: variantTag : LT IDENTIFIER GT -> ^( |
6050 | // VARIANT_TAG IDENTIFIER ) ; | |
6051 | public final CTFParser.variantTag_return variantTag() | |
6052 | throws RecognitionException { | |
866e5b51 FC |
6053 | CTFParser.variantTag_return retval = new CTFParser.variantTag_return(); |
6054 | retval.start = input.LT(1); | |
6055 | ||
6056 | CommonTree root_0 = null; | |
6057 | ||
63bfc685 MK |
6058 | Token LT101 = null; |
6059 | Token IDENTIFIER102 = null; | |
6060 | Token GT103 = null; | |
866e5b51 | 6061 | |
63bfc685 MK |
6062 | CommonTree LT101_tree = null; |
6063 | CommonTree IDENTIFIER102_tree = null; | |
6064 | CommonTree GT103_tree = null; | |
6065 | RewriteRuleTokenStream stream_GT = new RewriteRuleTokenStream(adaptor, | |
6066 | "token GT"); | |
6067 | RewriteRuleTokenStream stream_LT = new RewriteRuleTokenStream(adaptor, | |
6068 | "token LT"); | |
6069 | RewriteRuleTokenStream stream_IDENTIFIER = new RewriteRuleTokenStream( | |
6070 | adaptor, "token IDENTIFIER"); | |
866e5b51 | 6071 | |
63bfc685 | 6072 | enter("variantTag"); |
866e5b51 FC |
6073 | |
6074 | try { | |
63bfc685 MK |
6075 | // Grammar/CTFParser.g:638:1: ( LT IDENTIFIER GT -> ^( VARIANT_TAG |
6076 | // IDENTIFIER ) ) | |
866e5b51 FC |
6077 | // Grammar/CTFParser.g:639:3: LT IDENTIFIER GT |
6078 | { | |
63bfc685 MK |
6079 | LT101 = (Token) match(input, LT, FOLLOW_LT_in_variantTag2191); |
6080 | if (state.failed) { | |
6081 | return retval; | |
6082 | } | |
6083 | if (state.backtracking == 0) { | |
6084 | stream_LT.add(LT101); | |
6085 | } | |
866e5b51 | 6086 | |
63bfc685 MK |
6087 | IDENTIFIER102 = (Token) match(input, IDENTIFIER, |
6088 | FOLLOW_IDENTIFIER_in_variantTag2193); | |
6089 | if (state.failed) { | |
6090 | return retval; | |
6091 | } | |
6092 | if (state.backtracking == 0) { | |
6093 | stream_IDENTIFIER.add(IDENTIFIER102); | |
6094 | } | |
866e5b51 | 6095 | |
63bfc685 MK |
6096 | GT103 = (Token) match(input, GT, FOLLOW_GT_in_variantTag2195); |
6097 | if (state.failed) { | |
6098 | return retval; | |
6099 | } | |
6100 | if (state.backtracking == 0) { | |
6101 | stream_GT.add(GT103); | |
6102 | } | |
866e5b51 | 6103 | |
63bfc685 MK |
6104 | // AST REWRITE |
6105 | // elements: IDENTIFIER | |
6106 | // token labels: | |
6107 | // rule labels: retval | |
6108 | // token list labels: | |
6109 | // rule list labels: | |
6110 | // wildcard labels: | |
6111 | if (state.backtracking == 0) { | |
6112 | retval.tree = root_0; | |
6113 | // RewriteRuleSubtreeStream stream_retval = | |
6114 | new RewriteRuleSubtreeStream( | |
6115 | adaptor, "rule retval", | |
6116 | retval != null ? retval.tree : null); | |
866e5b51 | 6117 | |
63bfc685 MK |
6118 | root_0 = (CommonTree) adaptor.nil(); |
6119 | // 639:20: -> ^( VARIANT_TAG IDENTIFIER ) | |
6120 | { | |
6121 | // Grammar/CTFParser.g:639:23: ^( VARIANT_TAG IDENTIFIER | |
6122 | // ) | |
6123 | { | |
6124 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
6125 | root_1 = (CommonTree) adaptor.becomeRoot( | |
6126 | adaptor.create(VARIANT_TAG, "VARIANT_TAG"), | |
6127 | root_1); | |
866e5b51 | 6128 | |
63bfc685 MK |
6129 | adaptor.addChild(root_1, |
6130 | stream_IDENTIFIER.nextNode()); | |
866e5b51 | 6131 | |
63bfc685 MK |
6132 | adaptor.addChild(root_0, root_1); |
6133 | } | |
866e5b51 | 6134 | |
63bfc685 | 6135 | } |
866e5b51 | 6136 | |
63bfc685 | 6137 | retval.tree = root_0; |
866e5b51 | 6138 | } |
866e5b51 FC |
6139 | } |
6140 | ||
6141 | retval.stop = input.LT(-1); | |
6142 | ||
63bfc685 | 6143 | if (state.backtracking == 0) { |
866e5b51 | 6144 | |
63bfc685 MK |
6145 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
6146 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
6147 | retval.stop); | |
866e5b51 | 6148 | } |
63bfc685 | 6149 | if (state.backtracking == 0) { |
866e5b51 | 6150 | |
63bfc685 | 6151 | debug_print(input.toString(retval.start, input.LT(-1))); |
866e5b51 FC |
6152 | exit("variantTag"); |
6153 | ||
6154 | } | |
6155 | } | |
6156 | ||
63bfc685 MK |
6157 | catch (RecognitionException e) { |
6158 | throw e; | |
6159 | ||
866e5b51 FC |
6160 | } |
6161 | return retval; | |
6162 | } | |
63bfc685 | 6163 | |
866e5b51 FC |
6164 | // $ANTLR end "variantTag" |
6165 | ||
6166 | public static class enumSpecifier_return extends ParserRuleReturnScope { | |
6167 | CommonTree tree; | |
63bfc685 | 6168 | |
866e5b51 | 6169 | @Override |
63bfc685 MK |
6170 | public Object getTree() { |
6171 | return tree; | |
6172 | } | |
6173 | } | |
866e5b51 FC |
6174 | |
6175 | // $ANTLR start "enumSpecifier" | |
63bfc685 MK |
6176 | // Grammar/CTFParser.g:642:1: enumSpecifier : ENUMTOK ( ( enumName ( |
6177 | // enumContainerType enumBody | enumBody | ) ) | ( enumContainerType | |
6178 | // enumBody | enumBody ) ) -> ^( ENUM ( enumName )? ( enumContainerType )? ( | |
6179 | // enumBody )? ) ; | |
6180 | public final CTFParser.enumSpecifier_return enumSpecifier() | |
6181 | throws RecognitionException { | |
866e5b51 FC |
6182 | CTFParser.enumSpecifier_return retval = new CTFParser.enumSpecifier_return(); |
6183 | retval.start = input.LT(1); | |
6184 | ||
6185 | CommonTree root_0 = null; | |
6186 | ||
63bfc685 | 6187 | Token ENUMTOK104 = null; |
866e5b51 FC |
6188 | CTFParser.enumName_return enumName105 = null; |
6189 | ||
6190 | CTFParser.enumContainerType_return enumContainerType106 = null; | |
6191 | ||
6192 | CTFParser.enumBody_return enumBody107 = null; | |
6193 | ||
6194 | CTFParser.enumBody_return enumBody108 = null; | |
6195 | ||
6196 | CTFParser.enumContainerType_return enumContainerType109 = null; | |
6197 | ||
6198 | CTFParser.enumBody_return enumBody110 = null; | |
6199 | ||
6200 | CTFParser.enumBody_return enumBody111 = null; | |
6201 | ||
63bfc685 MK |
6202 | CommonTree ENUMTOK104_tree = null; |
6203 | RewriteRuleTokenStream stream_ENUMTOK = new RewriteRuleTokenStream( | |
6204 | adaptor, "token ENUMTOK"); | |
6205 | RewriteRuleSubtreeStream stream_enumName = new RewriteRuleSubtreeStream( | |
6206 | adaptor, "rule enumName"); | |
6207 | RewriteRuleSubtreeStream stream_enumContainerType = new RewriteRuleSubtreeStream( | |
6208 | adaptor, "rule enumContainerType"); | |
6209 | RewriteRuleSubtreeStream stream_enumBody = new RewriteRuleSubtreeStream( | |
6210 | adaptor, "rule enumBody"); | |
866e5b51 | 6211 | |
63bfc685 | 6212 | enter("enumSpecifier"); |
866e5b51 FC |
6213 | |
6214 | try { | |
63bfc685 MK |
6215 | // Grammar/CTFParser.g:649:1: ( ENUMTOK ( ( enumName ( |
6216 | // enumContainerType enumBody | enumBody | ) ) | ( enumContainerType | |
6217 | // enumBody | enumBody ) ) -> ^( ENUM ( enumName )? ( | |
6218 | // enumContainerType )? ( enumBody )? ) ) | |
6219 | // Grammar/CTFParser.g:650:2: ENUMTOK ( ( enumName ( | |
6220 | // enumContainerType enumBody | enumBody | ) ) | ( enumContainerType | |
6221 | // enumBody | enumBody ) ) | |
866e5b51 | 6222 | { |
63bfc685 MK |
6223 | ENUMTOK104 = (Token) match(input, ENUMTOK, |
6224 | FOLLOW_ENUMTOK_in_enumSpecifier2225); | |
6225 | if (state.failed) { | |
6226 | return retval; | |
6227 | } | |
6228 | if (state.backtracking == 0) { | |
6229 | stream_ENUMTOK.add(ENUMTOK104); | |
6230 | } | |
866e5b51 | 6231 | |
63bfc685 MK |
6232 | // Grammar/CTFParser.g:651:2: ( ( enumName ( enumContainerType |
6233 | // enumBody | enumBody | ) ) | ( enumContainerType enumBody | | |
6234 | // enumBody ) ) | |
6235 | int alt34 = 2; | |
6236 | int LA34_0 = input.LA(1); | |
866e5b51 | 6237 | |
63bfc685 MK |
6238 | if ((LA34_0 == IDENTIFIER)) { |
6239 | alt34 = 1; | |
6240 | } else if (((LA34_0 == COLON) || (LA34_0 == LCURL))) { | |
6241 | alt34 = 2; | |
6242 | } else { | |
6243 | if (state.backtracking > 0) { | |
6244 | state.failed = true; | |
6245 | return retval; | |
6246 | } | |
6247 | NoViableAltException nvae = new NoViableAltException("", | |
6248 | 34, 0, input); | |
866e5b51 | 6249 | |
63bfc685 MK |
6250 | throw nvae; |
6251 | } | |
6252 | switch (alt34) { | |
6253 | case 1: | |
6254 | // Grammar/CTFParser.g:653:3: ( enumName ( enumContainerType | |
6255 | // enumBody | enumBody | ) ) | |
6256 | { | |
6257 | // Grammar/CTFParser.g:653:3: ( enumName ( enumContainerType | |
6258 | // enumBody | enumBody | ) ) | |
6259 | // Grammar/CTFParser.g:654:4: enumName ( enumContainerType | |
6260 | // enumBody | enumBody | ) | |
866e5b51 | 6261 | { |
63bfc685 MK |
6262 | pushFollow(FOLLOW_enumName_in_enumSpecifier2240); |
6263 | enumName105 = enumName(); | |
866e5b51 | 6264 | |
63bfc685 MK |
6265 | state._fsp--; |
6266 | if (state.failed) { | |
6267 | return retval; | |
6268 | } | |
6269 | if (state.backtracking == 0) { | |
6270 | stream_enumName.add(enumName105.getTree()); | |
6271 | } | |
6272 | // Grammar/CTFParser.g:655:4: ( enumContainerType | |
6273 | // enumBody | enumBody | ) | |
6274 | int alt32 = 3; | |
6275 | alt32 = dfa32.predict(input); | |
6276 | switch (alt32) { | |
6277 | case 1: | |
6278 | // Grammar/CTFParser.g:656:5: enumContainerType enumBody | |
6279 | { | |
866e5b51 | 6280 | pushFollow(FOLLOW_enumContainerType_in_enumSpecifier2251); |
63bfc685 | 6281 | enumContainerType106 = enumContainerType(); |
866e5b51 FC |
6282 | |
6283 | state._fsp--; | |
63bfc685 MK |
6284 | if (state.failed) { |
6285 | return retval; | |
6286 | } | |
6287 | if (state.backtracking == 0) { | |
6288 | stream_enumContainerType | |
6289 | .add(enumContainerType106.getTree()); | |
6290 | } | |
866e5b51 | 6291 | pushFollow(FOLLOW_enumBody_in_enumSpecifier2253); |
63bfc685 | 6292 | enumBody107 = enumBody(); |
866e5b51 FC |
6293 | |
6294 | state._fsp--; | |
63bfc685 MK |
6295 | if (state.failed) { |
6296 | return retval; | |
866e5b51 | 6297 | } |
63bfc685 MK |
6298 | if (state.backtracking == 0) { |
6299 | stream_enumBody.add(enumBody107.getTree()); | |
6300 | } | |
6301 | ||
6302 | } | |
866e5b51 | 6303 | break; |
63bfc685 MK |
6304 | case 2: |
6305 | // Grammar/CTFParser.g:658:5: enumBody | |
6306 | { | |
866e5b51 | 6307 | pushFollow(FOLLOW_enumBody_in_enumSpecifier2265); |
63bfc685 | 6308 | enumBody108 = enumBody(); |
866e5b51 FC |
6309 | |
6310 | state._fsp--; | |
63bfc685 MK |
6311 | if (state.failed) { |
6312 | return retval; | |
866e5b51 | 6313 | } |
63bfc685 MK |
6314 | if (state.backtracking == 0) { |
6315 | stream_enumBody.add(enumBody108.getTree()); | |
866e5b51 | 6316 | } |
866e5b51 | 6317 | |
63bfc685 MK |
6318 | } |
6319 | break; | |
6320 | case 3: | |
6321 | break; | |
6322 | } | |
866e5b51 | 6323 | } |
63bfc685 | 6324 | } |
866e5b51 | 6325 | break; |
63bfc685 MK |
6326 | case 2: |
6327 | // Grammar/CTFParser.g:665:3: ( enumContainerType enumBody | | |
6328 | // enumBody ) | |
6329 | { | |
6330 | // Grammar/CTFParser.g:665:3: ( enumContainerType enumBody | | |
6331 | // enumBody ) | |
6332 | int alt33 = 2; | |
866e5b51 FC |
6333 | int LA33_0 = input.LA(1); |
6334 | ||
63bfc685 MK |
6335 | if ((LA33_0 == COLON)) { |
6336 | alt33 = 1; | |
6337 | } else if ((LA33_0 == LCURL)) { | |
6338 | alt33 = 2; | |
6339 | } else { | |
6340 | if (state.backtracking > 0) { | |
6341 | state.failed = true; | |
6342 | return retval; | |
6343 | } | |
6344 | NoViableAltException nvae = new NoViableAltException( | |
6345 | "", 33, 0, input); | |
866e5b51 FC |
6346 | |
6347 | throw nvae; | |
6348 | } | |
6349 | switch (alt33) { | |
63bfc685 MK |
6350 | case 1: |
6351 | // Grammar/CTFParser.g:666:4: enumContainerType enumBody | |
6352 | { | |
6353 | pushFollow(FOLLOW_enumContainerType_in_enumSpecifier2300); | |
6354 | enumContainerType109 = enumContainerType(); | |
866e5b51 | 6355 | |
63bfc685 MK |
6356 | state._fsp--; |
6357 | if (state.failed) { | |
6358 | return retval; | |
6359 | } | |
6360 | if (state.backtracking == 0) { | |
6361 | stream_enumContainerType.add(enumContainerType109 | |
6362 | .getTree()); | |
6363 | } | |
6364 | pushFollow(FOLLOW_enumBody_in_enumSpecifier2302); | |
6365 | enumBody110 = enumBody(); | |
866e5b51 | 6366 | |
63bfc685 MK |
6367 | state._fsp--; |
6368 | if (state.failed) { | |
6369 | return retval; | |
6370 | } | |
6371 | if (state.backtracking == 0) { | |
6372 | stream_enumBody.add(enumBody110.getTree()); | |
6373 | } | |
866e5b51 | 6374 | |
63bfc685 MK |
6375 | } |
6376 | break; | |
6377 | case 2: | |
6378 | // Grammar/CTFParser.g:668:4: enumBody | |
6379 | { | |
6380 | pushFollow(FOLLOW_enumBody_in_enumSpecifier2311); | |
6381 | enumBody111 = enumBody(); | |
866e5b51 | 6382 | |
63bfc685 MK |
6383 | state._fsp--; |
6384 | if (state.failed) { | |
6385 | return retval; | |
6386 | } | |
6387 | if (state.backtracking == 0) { | |
6388 | stream_enumBody.add(enumBody111.getTree()); | |
6389 | } | |
866e5b51 FC |
6390 | |
6391 | } | |
63bfc685 | 6392 | break; |
866e5b51 FC |
6393 | |
6394 | } | |
63bfc685 MK |
6395 | |
6396 | } | |
866e5b51 FC |
6397 | break; |
6398 | ||
63bfc685 | 6399 | } |
866e5b51 | 6400 | |
63bfc685 MK |
6401 | // AST REWRITE |
6402 | // elements: enumContainerType, enumName, enumBody | |
6403 | // token labels: | |
6404 | // rule labels: retval | |
6405 | // token list labels: | |
6406 | // rule list labels: | |
6407 | // wildcard labels: | |
6408 | if (state.backtracking == 0) { | |
6409 | retval.tree = root_0; | |
6410 | // RewriteRuleSubtreeStream stream_retval = | |
6411 | new RewriteRuleSubtreeStream( | |
6412 | adaptor, "rule retval", | |
6413 | retval != null ? retval.tree : null); | |
866e5b51 | 6414 | |
63bfc685 MK |
6415 | root_0 = (CommonTree) adaptor.nil(); |
6416 | // 670:4: -> ^( ENUM ( enumName )? ( enumContainerType )? ( | |
6417 | // enumBody )? ) | |
6418 | { | |
6419 | // Grammar/CTFParser.g:670:7: ^( ENUM ( enumName )? ( | |
6420 | // enumContainerType )? ( enumBody )? ) | |
6421 | { | |
6422 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
6423 | root_1 = (CommonTree) adaptor.becomeRoot( | |
6424 | adaptor.create(ENUM, "ENUM"), root_1); | |
866e5b51 | 6425 | |
63bfc685 MK |
6426 | // Grammar/CTFParser.g:670:14: ( enumName )? |
6427 | if (stream_enumName.hasNext()) { | |
6428 | adaptor.addChild(root_1, | |
6429 | stream_enumName.nextTree()); | |
866e5b51 | 6430 | |
63bfc685 MK |
6431 | } |
6432 | stream_enumName.reset(); | |
6433 | // Grammar/CTFParser.g:670:24: ( enumContainerType | |
6434 | // )? | |
6435 | if (stream_enumContainerType.hasNext()) { | |
6436 | adaptor.addChild(root_1, | |
6437 | stream_enumContainerType.nextTree()); | |
866e5b51 | 6438 | |
63bfc685 MK |
6439 | } |
6440 | stream_enumContainerType.reset(); | |
6441 | // Grammar/CTFParser.g:670:43: ( enumBody )? | |
6442 | if (stream_enumBody.hasNext()) { | |
6443 | adaptor.addChild(root_1, | |
6444 | stream_enumBody.nextTree()); | |
866e5b51 | 6445 | |
63bfc685 MK |
6446 | } |
6447 | stream_enumBody.reset(); | |
866e5b51 | 6448 | |
63bfc685 MK |
6449 | adaptor.addChild(root_0, root_1); |
6450 | } | |
866e5b51 | 6451 | |
63bfc685 | 6452 | } |
866e5b51 | 6453 | |
63bfc685 | 6454 | retval.tree = root_0; |
866e5b51 | 6455 | } |
866e5b51 FC |
6456 | } |
6457 | ||
6458 | retval.stop = input.LT(-1); | |
6459 | ||
63bfc685 | 6460 | if (state.backtracking == 0) { |
866e5b51 | 6461 | |
63bfc685 MK |
6462 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
6463 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
6464 | retval.stop); | |
866e5b51 | 6465 | } |
63bfc685 | 6466 | if (state.backtracking == 0) { |
866e5b51 FC |
6467 | |
6468 | exit("enumSpecifier"); | |
6469 | ||
6470 | } | |
6471 | } | |
6472 | ||
63bfc685 MK |
6473 | catch (RecognitionException e) { |
6474 | throw e; | |
6475 | ||
866e5b51 FC |
6476 | } |
6477 | return retval; | |
6478 | } | |
63bfc685 | 6479 | |
866e5b51 FC |
6480 | // $ANTLR end "enumSpecifier" |
6481 | ||
6482 | public static class enumName_return extends ParserRuleReturnScope { | |
6483 | CommonTree tree; | |
63bfc685 | 6484 | |
866e5b51 | 6485 | @Override |
63bfc685 MK |
6486 | public Object getTree() { |
6487 | return tree; | |
6488 | } | |
6489 | } | |
866e5b51 FC |
6490 | |
6491 | // $ANTLR start "enumName" | |
63bfc685 MK |
6492 | // Grammar/CTFParser.g:673:1: enumName : IDENTIFIER -> ^( ENUM_NAME |
6493 | // IDENTIFIER ) ; | |
6494 | public final CTFParser.enumName_return enumName() | |
6495 | throws RecognitionException { | |
866e5b51 FC |
6496 | CTFParser.enumName_return retval = new CTFParser.enumName_return(); |
6497 | retval.start = input.LT(1); | |
6498 | ||
6499 | CommonTree root_0 = null; | |
6500 | ||
63bfc685 | 6501 | Token IDENTIFIER112 = null; |
866e5b51 | 6502 | |
63bfc685 MK |
6503 | CommonTree IDENTIFIER112_tree = null; |
6504 | RewriteRuleTokenStream stream_IDENTIFIER = new RewriteRuleTokenStream( | |
6505 | adaptor, "token IDENTIFIER"); | |
866e5b51 | 6506 | |
63bfc685 | 6507 | enter("enumName"); |
866e5b51 FC |
6508 | |
6509 | try { | |
63bfc685 MK |
6510 | // Grammar/CTFParser.g:681:1: ( IDENTIFIER -> ^( ENUM_NAME |
6511 | // IDENTIFIER ) ) | |
866e5b51 FC |
6512 | // Grammar/CTFParser.g:682:3: IDENTIFIER |
6513 | { | |
63bfc685 MK |
6514 | IDENTIFIER112 = (Token) match(input, IDENTIFIER, |
6515 | FOLLOW_IDENTIFIER_in_enumName2356); | |
6516 | if (state.failed) { | |
6517 | return retval; | |
6518 | } | |
6519 | if (state.backtracking == 0) { | |
6520 | stream_IDENTIFIER.add(IDENTIFIER112); | |
6521 | } | |
6522 | ||
6523 | // AST REWRITE | |
6524 | // elements: IDENTIFIER | |
6525 | // token labels: | |
6526 | // rule labels: retval | |
6527 | // token list labels: | |
6528 | // rule list labels: | |
6529 | // wildcard labels: | |
6530 | if (state.backtracking == 0) { | |
6531 | retval.tree = root_0; | |
6532 | // RewriteRuleSubtreeStream stream_retval = | |
6533 | new RewriteRuleSubtreeStream( | |
6534 | adaptor, "rule retval", | |
6535 | retval != null ? retval.tree : null); | |
866e5b51 | 6536 | |
63bfc685 MK |
6537 | root_0 = (CommonTree) adaptor.nil(); |
6538 | // 682:14: -> ^( ENUM_NAME IDENTIFIER ) | |
6539 | { | |
6540 | // Grammar/CTFParser.g:682:17: ^( ENUM_NAME IDENTIFIER ) | |
6541 | { | |
6542 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
6543 | root_1 = (CommonTree) adaptor.becomeRoot( | |
6544 | adaptor.create(ENUM_NAME, "ENUM_NAME"), | |
6545 | root_1); | |
866e5b51 | 6546 | |
63bfc685 MK |
6547 | adaptor.addChild(root_1, |
6548 | stream_IDENTIFIER.nextNode()); | |
866e5b51 | 6549 | |
63bfc685 MK |
6550 | adaptor.addChild(root_0, root_1); |
6551 | } | |
866e5b51 | 6552 | |
63bfc685 | 6553 | } |
866e5b51 | 6554 | |
63bfc685 | 6555 | retval.tree = root_0; |
866e5b51 | 6556 | } |
866e5b51 FC |
6557 | } |
6558 | ||
6559 | retval.stop = input.LT(-1); | |
6560 | ||
63bfc685 | 6561 | if (state.backtracking == 0) { |
866e5b51 | 6562 | |
63bfc685 MK |
6563 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
6564 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
6565 | retval.stop); | |
866e5b51 | 6566 | } |
63bfc685 | 6567 | if (state.backtracking == 0) { |
866e5b51 | 6568 | |
63bfc685 | 6569 | debug_print(input.toString(retval.start, input.LT(-1))); |
866e5b51 FC |
6570 | exit("enumName"); |
6571 | ||
6572 | } | |
6573 | } | |
6574 | ||
63bfc685 MK |
6575 | catch (RecognitionException e) { |
6576 | throw e; | |
6577 | ||
866e5b51 FC |
6578 | } |
6579 | return retval; | |
6580 | } | |
63bfc685 | 6581 | |
866e5b51 FC |
6582 | // $ANTLR end "enumName" |
6583 | ||
6584 | public static class enumBody_return extends ParserRuleReturnScope { | |
6585 | CommonTree tree; | |
63bfc685 | 6586 | |
866e5b51 | 6587 | @Override |
63bfc685 MK |
6588 | public Object getTree() { |
6589 | return tree; | |
6590 | } | |
6591 | } | |
866e5b51 FC |
6592 | |
6593 | // $ANTLR start "enumBody" | |
63bfc685 MK |
6594 | // Grammar/CTFParser.g:685:1: enumBody : LCURL enumeratorList ( SEPARATOR |
6595 | // RCURL | RCURL ) -> ^( ENUM_BODY enumeratorList ) ; | |
6596 | public final CTFParser.enumBody_return enumBody() | |
6597 | throws RecognitionException { | |
866e5b51 FC |
6598 | CTFParser.enumBody_return retval = new CTFParser.enumBody_return(); |
6599 | retval.start = input.LT(1); | |
6600 | ||
6601 | CommonTree root_0 = null; | |
6602 | ||
63bfc685 MK |
6603 | Token LCURL113 = null; |
6604 | Token SEPARATOR115 = null; | |
6605 | Token RCURL116 = null; | |
6606 | Token RCURL117 = null; | |
866e5b51 FC |
6607 | CTFParser.enumeratorList_return enumeratorList114 = null; |
6608 | ||
63bfc685 MK |
6609 | CommonTree LCURL113_tree = null; |
6610 | CommonTree SEPARATOR115_tree = null; | |
6611 | CommonTree RCURL116_tree = null; | |
6612 | CommonTree RCURL117_tree = null; | |
6613 | RewriteRuleTokenStream stream_LCURL = new RewriteRuleTokenStream( | |
6614 | adaptor, "token LCURL"); | |
6615 | RewriteRuleTokenStream stream_SEPARATOR = new RewriteRuleTokenStream( | |
6616 | adaptor, "token SEPARATOR"); | |
6617 | RewriteRuleTokenStream stream_RCURL = new RewriteRuleTokenStream( | |
6618 | adaptor, "token RCURL"); | |
6619 | RewriteRuleSubtreeStream stream_enumeratorList = new RewriteRuleSubtreeStream( | |
6620 | adaptor, "rule enumeratorList"); | |
6621 | ||
6622 | enter("enumBody"); | |
866e5b51 FC |
6623 | |
6624 | try { | |
63bfc685 MK |
6625 | // Grammar/CTFParser.g:692:1: ( LCURL enumeratorList ( SEPARATOR |
6626 | // RCURL | RCURL ) -> ^( ENUM_BODY enumeratorList ) ) | |
6627 | // Grammar/CTFParser.g:693:3: LCURL enumeratorList ( SEPARATOR RCURL | |
6628 | // | RCURL ) | |
866e5b51 | 6629 | { |
63bfc685 MK |
6630 | LCURL113 = (Token) match(input, LCURL, |
6631 | FOLLOW_LCURL_in_enumBody2389); | |
6632 | if (state.failed) { | |
6633 | return retval; | |
6634 | } | |
6635 | if (state.backtracking == 0) { | |
6636 | stream_LCURL.add(LCURL113); | |
6637 | } | |
866e5b51 | 6638 | |
63bfc685 MK |
6639 | pushFollow(FOLLOW_enumeratorList_in_enumBody2391); |
6640 | enumeratorList114 = enumeratorList(); | |
866e5b51 | 6641 | |
63bfc685 MK |
6642 | state._fsp--; |
6643 | if (state.failed) { | |
6644 | return retval; | |
6645 | } | |
6646 | if (state.backtracking == 0) { | |
6647 | stream_enumeratorList.add(enumeratorList114.getTree()); | |
6648 | } | |
6649 | // Grammar/CTFParser.g:693:24: ( SEPARATOR RCURL | RCURL ) | |
6650 | int alt35 = 2; | |
6651 | int LA35_0 = input.LA(1); | |
866e5b51 | 6652 | |
63bfc685 MK |
6653 | if ((LA35_0 == SEPARATOR)) { |
6654 | alt35 = 1; | |
6655 | } else if ((LA35_0 == RCURL)) { | |
6656 | alt35 = 2; | |
6657 | } else { | |
6658 | if (state.backtracking > 0) { | |
6659 | state.failed = true; | |
6660 | return retval; | |
6661 | } | |
6662 | NoViableAltException nvae = new NoViableAltException("", | |
6663 | 35, 0, input); | |
866e5b51 | 6664 | |
63bfc685 MK |
6665 | throw nvae; |
6666 | } | |
6667 | switch (alt35) { | |
6668 | case 1: | |
6669 | // Grammar/CTFParser.g:693:25: SEPARATOR RCURL | |
6670 | { | |
6671 | SEPARATOR115 = (Token) match(input, SEPARATOR, | |
6672 | FOLLOW_SEPARATOR_in_enumBody2394); | |
6673 | if (state.failed) { | |
6674 | return retval; | |
6675 | } | |
6676 | if (state.backtracking == 0) { | |
6677 | stream_SEPARATOR.add(SEPARATOR115); | |
866e5b51 | 6678 | } |
866e5b51 | 6679 | |
63bfc685 MK |
6680 | RCURL116 = (Token) match(input, RCURL, |
6681 | FOLLOW_RCURL_in_enumBody2396); | |
6682 | if (state.failed) { | |
6683 | return retval; | |
6684 | } | |
6685 | if (state.backtracking == 0) { | |
6686 | stream_RCURL.add(RCURL116); | |
6687 | } | |
866e5b51 | 6688 | |
63bfc685 MK |
6689 | } |
6690 | break; | |
6691 | case 2: | |
6692 | // Grammar/CTFParser.g:693:43: RCURL | |
6693 | { | |
6694 | RCURL117 = (Token) match(input, RCURL, | |
6695 | FOLLOW_RCURL_in_enumBody2400); | |
6696 | if (state.failed) { | |
6697 | return retval; | |
866e5b51 | 6698 | } |
63bfc685 MK |
6699 | if (state.backtracking == 0) { |
6700 | stream_RCURL.add(RCURL117); | |
6701 | } | |
6702 | ||
6703 | } | |
866e5b51 FC |
6704 | break; |
6705 | ||
63bfc685 | 6706 | } |
866e5b51 | 6707 | |
63bfc685 MK |
6708 | // AST REWRITE |
6709 | // elements: enumeratorList | |
6710 | // token labels: | |
6711 | // rule labels: retval | |
6712 | // token list labels: | |
6713 | // rule list labels: | |
6714 | // wildcard labels: | |
6715 | if (state.backtracking == 0) { | |
6716 | retval.tree = root_0; | |
6717 | // RewriteRuleSubtreeStream stream_retval = | |
6718 | new RewriteRuleSubtreeStream( | |
6719 | adaptor, "rule retval", | |
6720 | retval != null ? retval.tree : null); | |
866e5b51 | 6721 | |
63bfc685 MK |
6722 | root_0 = (CommonTree) adaptor.nil(); |
6723 | // 693:50: -> ^( ENUM_BODY enumeratorList ) | |
6724 | { | |
6725 | // Grammar/CTFParser.g:693:53: ^( ENUM_BODY | |
6726 | // enumeratorList ) | |
6727 | { | |
6728 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
6729 | root_1 = (CommonTree) adaptor.becomeRoot( | |
6730 | adaptor.create(ENUM_BODY, "ENUM_BODY"), | |
6731 | root_1); | |
866e5b51 | 6732 | |
63bfc685 MK |
6733 | adaptor.addChild(root_1, |
6734 | stream_enumeratorList.nextTree()); | |
866e5b51 | 6735 | |
63bfc685 MK |
6736 | adaptor.addChild(root_0, root_1); |
6737 | } | |
866e5b51 | 6738 | |
63bfc685 | 6739 | } |
866e5b51 | 6740 | |
63bfc685 | 6741 | retval.tree = root_0; |
866e5b51 | 6742 | } |
866e5b51 FC |
6743 | } |
6744 | ||
6745 | retval.stop = input.LT(-1); | |
6746 | ||
63bfc685 | 6747 | if (state.backtracking == 0) { |
866e5b51 | 6748 | |
63bfc685 MK |
6749 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
6750 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
6751 | retval.stop); | |
866e5b51 | 6752 | } |
63bfc685 | 6753 | if (state.backtracking == 0) { |
866e5b51 FC |
6754 | |
6755 | exit("enumBody"); | |
6756 | ||
6757 | } | |
6758 | } | |
6759 | ||
63bfc685 MK |
6760 | catch (RecognitionException e) { |
6761 | throw e; | |
6762 | ||
866e5b51 FC |
6763 | } |
6764 | return retval; | |
6765 | } | |
63bfc685 | 6766 | |
866e5b51 FC |
6767 | // $ANTLR end "enumBody" |
6768 | ||
6769 | public static class enumContainerType_return extends ParserRuleReturnScope { | |
6770 | CommonTree tree; | |
63bfc685 | 6771 | |
866e5b51 | 6772 | @Override |
63bfc685 MK |
6773 | public Object getTree() { |
6774 | return tree; | |
6775 | } | |
6776 | } | |
866e5b51 FC |
6777 | |
6778 | // $ANTLR start "enumContainerType" | |
63bfc685 MK |
6779 | // Grammar/CTFParser.g:696:1: enumContainerType : COLON |
6780 | // declarationSpecifiers -> ^( ENUM_CONTAINER_TYPE declarationSpecifiers ) ; | |
6781 | public final CTFParser.enumContainerType_return enumContainerType() | |
6782 | throws RecognitionException { | |
866e5b51 FC |
6783 | CTFParser.enumContainerType_return retval = new CTFParser.enumContainerType_return(); |
6784 | retval.start = input.LT(1); | |
6785 | ||
6786 | CommonTree root_0 = null; | |
6787 | ||
63bfc685 | 6788 | Token COLON118 = null; |
866e5b51 FC |
6789 | CTFParser.declarationSpecifiers_return declarationSpecifiers119 = null; |
6790 | ||
63bfc685 MK |
6791 | CommonTree COLON118_tree = null; |
6792 | RewriteRuleTokenStream stream_COLON = new RewriteRuleTokenStream( | |
6793 | adaptor, "token COLON"); | |
6794 | RewriteRuleSubtreeStream stream_declarationSpecifiers = new RewriteRuleSubtreeStream( | |
6795 | adaptor, "rule declarationSpecifiers"); | |
866e5b51 | 6796 | |
63bfc685 | 6797 | enter("enumContainerType"); |
866e5b51 FC |
6798 | |
6799 | try { | |
63bfc685 MK |
6800 | // Grammar/CTFParser.g:703:1: ( COLON declarationSpecifiers -> ^( |
6801 | // ENUM_CONTAINER_TYPE declarationSpecifiers ) ) | |
866e5b51 FC |
6802 | // Grammar/CTFParser.g:704:3: COLON declarationSpecifiers |
6803 | { | |
63bfc685 MK |
6804 | COLON118 = (Token) match(input, COLON, |
6805 | FOLLOW_COLON_in_enumContainerType2432); | |
6806 | if (state.failed) { | |
6807 | return retval; | |
6808 | } | |
6809 | if (state.backtracking == 0) { | |
6810 | stream_COLON.add(COLON118); | |
6811 | } | |
866e5b51 | 6812 | |
63bfc685 MK |
6813 | pushFollow(FOLLOW_declarationSpecifiers_in_enumContainerType2434); |
6814 | declarationSpecifiers119 = declarationSpecifiers(); | |
866e5b51 | 6815 | |
63bfc685 MK |
6816 | state._fsp--; |
6817 | if (state.failed) { | |
6818 | return retval; | |
6819 | } | |
6820 | if (state.backtracking == 0) { | |
6821 | stream_declarationSpecifiers.add(declarationSpecifiers119 | |
6822 | .getTree()); | |
6823 | } | |
866e5b51 | 6824 | |
63bfc685 MK |
6825 | // AST REWRITE |
6826 | // elements: declarationSpecifiers | |
6827 | // token labels: | |
6828 | // rule labels: retval | |
6829 | // token list labels: | |
6830 | // rule list labels: | |
6831 | // wildcard labels: | |
6832 | if (state.backtracking == 0) { | |
6833 | retval.tree = root_0; | |
6834 | // RewriteRuleSubtreeStream stream_retval = | |
6835 | new RewriteRuleSubtreeStream( | |
6836 | adaptor, "rule retval", | |
6837 | retval != null ? retval.tree : null); | |
866e5b51 | 6838 | |
63bfc685 MK |
6839 | root_0 = (CommonTree) adaptor.nil(); |
6840 | // 704:31: -> ^( ENUM_CONTAINER_TYPE declarationSpecifiers ) | |
6841 | { | |
6842 | // Grammar/CTFParser.g:704:34: ^( ENUM_CONTAINER_TYPE | |
6843 | // declarationSpecifiers ) | |
6844 | { | |
6845 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
6846 | root_1 = (CommonTree) adaptor.becomeRoot(adaptor | |
6847 | .create(ENUM_CONTAINER_TYPE, | |
6848 | "ENUM_CONTAINER_TYPE"), root_1); | |
866e5b51 | 6849 | |
63bfc685 MK |
6850 | adaptor.addChild(root_1, |
6851 | stream_declarationSpecifiers.nextTree()); | |
866e5b51 | 6852 | |
63bfc685 MK |
6853 | adaptor.addChild(root_0, root_1); |
6854 | } | |
6855 | ||
6856 | } | |
6857 | ||
6858 | retval.tree = root_0; | |
6859 | } | |
866e5b51 FC |
6860 | } |
6861 | ||
6862 | retval.stop = input.LT(-1); | |
6863 | ||
63bfc685 | 6864 | if (state.backtracking == 0) { |
866e5b51 | 6865 | |
63bfc685 MK |
6866 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
6867 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
6868 | retval.stop); | |
866e5b51 | 6869 | } |
63bfc685 | 6870 | if (state.backtracking == 0) { |
866e5b51 FC |
6871 | |
6872 | exit("enumContainerType"); | |
6873 | ||
6874 | } | |
6875 | } | |
6876 | ||
63bfc685 MK |
6877 | catch (RecognitionException e) { |
6878 | throw e; | |
866e5b51 FC |
6879 | } |
6880 | return retval; | |
6881 | } | |
63bfc685 | 6882 | |
866e5b51 FC |
6883 | // $ANTLR end "enumContainerType" |
6884 | ||
6885 | public static class enumeratorList_return extends ParserRuleReturnScope { | |
6886 | CommonTree tree; | |
63bfc685 | 6887 | |
866e5b51 | 6888 | @Override |
63bfc685 MK |
6889 | public Object getTree() { |
6890 | return tree; | |
6891 | } | |
6892 | } | |
866e5b51 FC |
6893 | |
6894 | // $ANTLR start "enumeratorList" | |
63bfc685 MK |
6895 | // Grammar/CTFParser.g:707:1: enumeratorList : enumerator ( SEPARATOR |
6896 | // enumerator )* -> ( ^( ENUM_ENUMERATOR enumerator ) )+ ; | |
6897 | public final CTFParser.enumeratorList_return enumeratorList() | |
6898 | throws RecognitionException { | |
866e5b51 FC |
6899 | CTFParser.enumeratorList_return retval = new CTFParser.enumeratorList_return(); |
6900 | retval.start = input.LT(1); | |
6901 | ||
6902 | CommonTree root_0 = null; | |
6903 | ||
63bfc685 | 6904 | Token SEPARATOR121 = null; |
866e5b51 FC |
6905 | CTFParser.enumerator_return enumerator120 = null; |
6906 | ||
6907 | CTFParser.enumerator_return enumerator122 = null; | |
6908 | ||
63bfc685 MK |
6909 | CommonTree SEPARATOR121_tree = null; |
6910 | RewriteRuleTokenStream stream_SEPARATOR = new RewriteRuleTokenStream( | |
6911 | adaptor, "token SEPARATOR"); | |
6912 | RewriteRuleSubtreeStream stream_enumerator = new RewriteRuleSubtreeStream( | |
6913 | adaptor, "rule enumerator"); | |
866e5b51 | 6914 | |
63bfc685 | 6915 | enter("enumeratorList"); |
866e5b51 FC |
6916 | |
6917 | try { | |
63bfc685 MK |
6918 | // Grammar/CTFParser.g:714:1: ( enumerator ( SEPARATOR enumerator )* |
6919 | // -> ( ^( ENUM_ENUMERATOR enumerator ) )+ ) | |
866e5b51 FC |
6920 | // Grammar/CTFParser.g:715:3: enumerator ( SEPARATOR enumerator )* |
6921 | { | |
63bfc685 MK |
6922 | pushFollow(FOLLOW_enumerator_in_enumeratorList2465); |
6923 | enumerator120 = enumerator(); | |
866e5b51 | 6924 | |
63bfc685 MK |
6925 | state._fsp--; |
6926 | if (state.failed) { | |
6927 | return retval; | |
6928 | } | |
6929 | if (state.backtracking == 0) { | |
6930 | stream_enumerator.add(enumerator120.getTree()); | |
866e5b51 | 6931 | } |
63bfc685 MK |
6932 | // Grammar/CTFParser.g:715:14: ( SEPARATOR enumerator )* |
6933 | loop36: do { | |
6934 | int alt36 = 2; | |
6935 | int LA36_0 = input.LA(1); | |
866e5b51 | 6936 | |
63bfc685 MK |
6937 | if ((LA36_0 == SEPARATOR)) { |
6938 | int LA36_1 = input.LA(2); | |
866e5b51 | 6939 | |
63bfc685 MK |
6940 | if (((LA36_1 == ALIGNTOK) || (LA36_1 == EVENTTOK) |
6941 | || (LA36_1 == SIGNEDTOK) | |
6942 | || (LA36_1 == STRINGTOK) | |
6943 | || (LA36_1 == STRING_LITERAL) || (LA36_1 == IDENTIFIER))) { | |
6944 | alt36 = 1; | |
6945 | } | |
866e5b51 | 6946 | |
63bfc685 | 6947 | } |
866e5b51 | 6948 | |
63bfc685 MK |
6949 | switch (alt36) { |
6950 | case 1: | |
6951 | // Grammar/CTFParser.g:715:15: SEPARATOR enumerator | |
6952 | { | |
6953 | SEPARATOR121 = (Token) match(input, SEPARATOR, | |
6954 | FOLLOW_SEPARATOR_in_enumeratorList2468); | |
6955 | if (state.failed) { | |
6956 | return retval; | |
6957 | } | |
6958 | if (state.backtracking == 0) { | |
6959 | stream_SEPARATOR.add(SEPARATOR121); | |
6960 | } | |
866e5b51 | 6961 | |
63bfc685 MK |
6962 | pushFollow(FOLLOW_enumerator_in_enumeratorList2470); |
6963 | enumerator122 = enumerator(); | |
866e5b51 | 6964 | |
63bfc685 MK |
6965 | state._fsp--; |
6966 | if (state.failed) { | |
6967 | return retval; | |
6968 | } | |
6969 | if (state.backtracking == 0) { | |
6970 | stream_enumerator.add(enumerator122.getTree()); | |
6971 | } | |
6972 | ||
6973 | } | |
6974 | break; | |
866e5b51 | 6975 | |
63bfc685 MK |
6976 | default: |
6977 | break loop36; | |
6978 | } | |
6979 | } while (true); | |
6980 | ||
6981 | // AST REWRITE | |
6982 | // elements: enumerator | |
6983 | // token labels: | |
6984 | // rule labels: retval | |
6985 | // token list labels: | |
6986 | // rule list labels: | |
6987 | // wildcard labels: | |
6988 | if (state.backtracking == 0) { | |
6989 | retval.tree = root_0; | |
6990 | // RewriteRuleSubtreeStream stream_retval = | |
6991 | new RewriteRuleSubtreeStream( | |
6992 | adaptor, "rule retval", | |
6993 | retval != null ? retval.tree : null); | |
866e5b51 | 6994 | |
63bfc685 MK |
6995 | root_0 = (CommonTree) adaptor.nil(); |
6996 | // 715:38: -> ( ^( ENUM_ENUMERATOR enumerator ) )+ | |
6997 | { | |
6998 | if (!(stream_enumerator.hasNext())) { | |
6999 | throw new RewriteEarlyExitException(); | |
7000 | } | |
7001 | while (stream_enumerator.hasNext()) { | |
7002 | // Grammar/CTFParser.g:715:42: ^( ENUM_ENUMERATOR | |
7003 | // enumerator ) | |
7004 | { | |
7005 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
7006 | root_1 = (CommonTree) adaptor.becomeRoot( | |
7007 | adaptor.create(ENUM_ENUMERATOR, | |
7008 | "ENUM_ENUMERATOR"), root_1); | |
866e5b51 | 7009 | |
63bfc685 MK |
7010 | adaptor.addChild(root_1, |
7011 | stream_enumerator.nextTree()); | |
866e5b51 | 7012 | |
63bfc685 MK |
7013 | adaptor.addChild(root_0, root_1); |
7014 | } | |
866e5b51 | 7015 | |
63bfc685 MK |
7016 | } |
7017 | stream_enumerator.reset(); | |
866e5b51 | 7018 | |
866e5b51 FC |
7019 | } |
7020 | ||
63bfc685 | 7021 | retval.tree = root_0; |
866e5b51 | 7022 | } |
866e5b51 FC |
7023 | } |
7024 | ||
7025 | retval.stop = input.LT(-1); | |
7026 | ||
63bfc685 | 7027 | if (state.backtracking == 0) { |
866e5b51 | 7028 | |
63bfc685 MK |
7029 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
7030 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
7031 | retval.stop); | |
866e5b51 | 7032 | } |
63bfc685 | 7033 | if (state.backtracking == 0) { |
866e5b51 FC |
7034 | |
7035 | exit("enumeratorList"); | |
7036 | ||
7037 | } | |
7038 | } | |
7039 | ||
63bfc685 MK |
7040 | catch (RecognitionException e) { |
7041 | throw e; | |
7042 | ||
866e5b51 FC |
7043 | } |
7044 | return retval; | |
7045 | } | |
63bfc685 | 7046 | |
866e5b51 FC |
7047 | // $ANTLR end "enumeratorList" |
7048 | ||
7049 | public static class enumerator_return extends ParserRuleReturnScope { | |
7050 | CommonTree tree; | |
63bfc685 | 7051 | |
866e5b51 | 7052 | @Override |
63bfc685 MK |
7053 | public Object getTree() { |
7054 | return tree; | |
7055 | } | |
7056 | } | |
866e5b51 FC |
7057 | |
7058 | // $ANTLR start "enumerator" | |
63bfc685 MK |
7059 | // Grammar/CTFParser.g:718:1: enumerator : enumConstant ( enumeratorValue )? |
7060 | // ; | |
7061 | public final CTFParser.enumerator_return enumerator() | |
7062 | throws RecognitionException { | |
866e5b51 FC |
7063 | CTFParser.enumerator_return retval = new CTFParser.enumerator_return(); |
7064 | retval.start = input.LT(1); | |
7065 | ||
7066 | CommonTree root_0 = null; | |
7067 | ||
7068 | CTFParser.enumConstant_return enumConstant123 = null; | |
7069 | ||
7070 | CTFParser.enumeratorValue_return enumeratorValue124 = null; | |
7071 | ||
63bfc685 | 7072 | enter("enumerator"); |
866e5b51 FC |
7073 | |
7074 | try { | |
7075 | // Grammar/CTFParser.g:725:1: ( enumConstant ( enumeratorValue )? ) | |
7076 | // Grammar/CTFParser.g:726:3: enumConstant ( enumeratorValue )? | |
7077 | { | |
63bfc685 | 7078 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 | 7079 | |
63bfc685 MK |
7080 | pushFollow(FOLLOW_enumConstant_in_enumerator2506); |
7081 | enumConstant123 = enumConstant(); | |
866e5b51 | 7082 | |
63bfc685 MK |
7083 | state._fsp--; |
7084 | if (state.failed) { | |
7085 | return retval; | |
7086 | } | |
7087 | if (state.backtracking == 0) { | |
7088 | adaptor.addChild(root_0, enumConstant123.getTree()); | |
7089 | } | |
7090 | // Grammar/CTFParser.g:726:16: ( enumeratorValue )? | |
7091 | int alt37 = 2; | |
7092 | int LA37_0 = input.LA(1); | |
7093 | ||
7094 | if ((LA37_0 == ASSIGNMENT)) { | |
7095 | alt37 = 1; | |
7096 | } | |
7097 | switch (alt37) { | |
7098 | case 1: | |
7099 | // Grammar/CTFParser.g:726:16: enumeratorValue | |
7100 | { | |
866e5b51 | 7101 | pushFollow(FOLLOW_enumeratorValue_in_enumerator2508); |
63bfc685 | 7102 | enumeratorValue124 = enumeratorValue(); |
866e5b51 FC |
7103 | |
7104 | state._fsp--; | |
63bfc685 MK |
7105 | if (state.failed) { |
7106 | return retval; | |
7107 | } | |
7108 | if (state.backtracking == 0) { | |
7109 | adaptor.addChild(root_0, enumeratorValue124.getTree()); | |
866e5b51 | 7110 | } |
866e5b51 | 7111 | |
63bfc685 MK |
7112 | } |
7113 | break; | |
866e5b51 | 7114 | |
63bfc685 | 7115 | } |
866e5b51 FC |
7116 | |
7117 | } | |
7118 | ||
7119 | retval.stop = input.LT(-1); | |
7120 | ||
63bfc685 | 7121 | if (state.backtracking == 0) { |
866e5b51 | 7122 | |
63bfc685 MK |
7123 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
7124 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
7125 | retval.stop); | |
866e5b51 | 7126 | } |
63bfc685 | 7127 | if (state.backtracking == 0) { |
866e5b51 FC |
7128 | |
7129 | exit("enumerator"); | |
7130 | ||
7131 | } | |
7132 | } | |
7133 | ||
63bfc685 MK |
7134 | catch (RecognitionException e) { |
7135 | throw e; | |
7136 | ||
866e5b51 FC |
7137 | } |
7138 | return retval; | |
7139 | } | |
63bfc685 | 7140 | |
866e5b51 FC |
7141 | // $ANTLR end "enumerator" |
7142 | ||
7143 | public static class enumeratorValue_return extends ParserRuleReturnScope { | |
7144 | CommonTree tree; | |
63bfc685 | 7145 | |
866e5b51 | 7146 | @Override |
63bfc685 MK |
7147 | public Object getTree() { |
7148 | return tree; | |
7149 | } | |
7150 | } | |
866e5b51 FC |
7151 | |
7152 | // $ANTLR start "enumeratorValue" | |
63bfc685 MK |
7153 | // Grammar/CTFParser.g:729:1: enumeratorValue : ASSIGNMENT e1= |
7154 | // unaryExpression ( -> ^( ENUM_VALUE $e1) | ELIPSES e2= unaryExpression -> | |
7155 | // ^( ENUM_VALUE_RANGE $e1 $e2) ) ; | |
7156 | public final CTFParser.enumeratorValue_return enumeratorValue() | |
7157 | throws RecognitionException { | |
866e5b51 FC |
7158 | CTFParser.enumeratorValue_return retval = new CTFParser.enumeratorValue_return(); |
7159 | retval.start = input.LT(1); | |
7160 | ||
7161 | CommonTree root_0 = null; | |
7162 | ||
63bfc685 MK |
7163 | Token ASSIGNMENT125 = null; |
7164 | Token ELIPSES126 = null; | |
866e5b51 FC |
7165 | CTFParser.unaryExpression_return e1 = null; |
7166 | ||
7167 | CTFParser.unaryExpression_return e2 = null; | |
7168 | ||
63bfc685 MK |
7169 | CommonTree ASSIGNMENT125_tree = null; |
7170 | CommonTree ELIPSES126_tree = null; | |
7171 | RewriteRuleTokenStream stream_ASSIGNMENT = new RewriteRuleTokenStream( | |
7172 | adaptor, "token ASSIGNMENT"); | |
7173 | RewriteRuleTokenStream stream_ELIPSES = new RewriteRuleTokenStream( | |
7174 | adaptor, "token ELIPSES"); | |
7175 | RewriteRuleSubtreeStream stream_unaryExpression = new RewriteRuleSubtreeStream( | |
7176 | adaptor, "rule unaryExpression"); | |
866e5b51 | 7177 | |
63bfc685 | 7178 | enter("enumeratorValue"); |
866e5b51 FC |
7179 | |
7180 | try { | |
63bfc685 MK |
7181 | // Grammar/CTFParser.g:736:1: ( ASSIGNMENT e1= unaryExpression ( -> |
7182 | // ^( ENUM_VALUE $e1) | ELIPSES e2= unaryExpression -> ^( | |
7183 | // ENUM_VALUE_RANGE $e1 $e2) ) ) | |
7184 | // Grammar/CTFParser.g:737:3: ASSIGNMENT e1= unaryExpression ( -> ^( | |
7185 | // ENUM_VALUE $e1) | ELIPSES e2= unaryExpression -> ^( | |
7186 | // ENUM_VALUE_RANGE $e1 $e2) ) | |
866e5b51 | 7187 | { |
63bfc685 MK |
7188 | ASSIGNMENT125 = (Token) match(input, ASSIGNMENT, |
7189 | FOLLOW_ASSIGNMENT_in_enumeratorValue2532); | |
7190 | if (state.failed) { | |
7191 | return retval; | |
7192 | } | |
7193 | if (state.backtracking == 0) { | |
7194 | stream_ASSIGNMENT.add(ASSIGNMENT125); | |
7195 | } | |
866e5b51 | 7196 | |
63bfc685 MK |
7197 | pushFollow(FOLLOW_unaryExpression_in_enumeratorValue2536); |
7198 | e1 = unaryExpression(); | |
866e5b51 | 7199 | |
63bfc685 MK |
7200 | state._fsp--; |
7201 | if (state.failed) { | |
7202 | return retval; | |
7203 | } | |
7204 | if (state.backtracking == 0) { | |
7205 | stream_unaryExpression.add(e1.getTree()); | |
7206 | } | |
7207 | // Grammar/CTFParser.g:738:3: ( -> ^( ENUM_VALUE $e1) | ELIPSES | |
7208 | // e2= unaryExpression -> ^( ENUM_VALUE_RANGE $e1 $e2) ) | |
7209 | int alt38 = 2; | |
7210 | int LA38_0 = input.LA(1); | |
866e5b51 | 7211 | |
63bfc685 MK |
7212 | if (((LA38_0 == SEPARATOR) || (LA38_0 == RCURL))) { |
7213 | alt38 = 1; | |
7214 | } else if ((LA38_0 == ELIPSES)) { | |
7215 | alt38 = 2; | |
7216 | } else { | |
7217 | if (state.backtracking > 0) { | |
7218 | state.failed = true; | |
7219 | return retval; | |
7220 | } | |
7221 | NoViableAltException nvae = new NoViableAltException("", | |
7222 | 38, 0, input); | |
866e5b51 | 7223 | |
63bfc685 MK |
7224 | throw nvae; |
7225 | } | |
7226 | switch (alt38) { | |
7227 | case 1: | |
7228 | // Grammar/CTFParser.g:739:5: | |
7229 | { | |
866e5b51 FC |
7230 | |
7231 | // AST REWRITE | |
7232 | // elements: e1 | |
63bfc685 | 7233 | // token labels: |
866e5b51 | 7234 | // rule labels: retval, e1 |
63bfc685 MK |
7235 | // token list labels: |
7236 | // rule list labels: | |
7237 | // wildcard labels: | |
7238 | if (state.backtracking == 0) { | |
7239 | retval.tree = root_0; | |
7240 | // RewriteRuleSubtreeStream stream_retval = | |
7241 | new RewriteRuleSubtreeStream( | |
7242 | adaptor, "rule retval", | |
7243 | retval != null ? retval.tree : null); | |
7244 | RewriteRuleSubtreeStream stream_e1 = new RewriteRuleSubtreeStream( | |
7245 | adaptor, "rule e1", e1 != null ? e1.tree : null); | |
7246 | ||
7247 | root_0 = (CommonTree) adaptor.nil(); | |
7248 | // 739:5: -> ^( ENUM_VALUE $e1) | |
866e5b51 | 7249 | { |
63bfc685 MK |
7250 | // Grammar/CTFParser.g:739:8: ^( ENUM_VALUE $e1) |
7251 | { | |
7252 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
7253 | root_1 = (CommonTree) adaptor | |
7254 | .becomeRoot(adaptor.create(ENUM_VALUE, | |
7255 | "ENUM_VALUE"), root_1); | |
866e5b51 | 7256 | |
63bfc685 | 7257 | adaptor.addChild(root_1, stream_e1.nextTree()); |
866e5b51 | 7258 | |
63bfc685 MK |
7259 | adaptor.addChild(root_0, root_1); |
7260 | } | |
866e5b51 | 7261 | |
63bfc685 | 7262 | } |
866e5b51 | 7263 | |
63bfc685 | 7264 | retval.tree = root_0; |
866e5b51 | 7265 | } |
63bfc685 | 7266 | } |
866e5b51 | 7267 | break; |
63bfc685 MK |
7268 | case 2: |
7269 | // Grammar/CTFParser.g:740:7: ELIPSES e2= unaryExpression | |
7270 | { | |
7271 | ELIPSES126 = (Token) match(input, ELIPSES, | |
7272 | FOLLOW_ELIPSES_in_enumeratorValue2562); | |
7273 | if (state.failed) { | |
7274 | return retval; | |
7275 | } | |
7276 | if (state.backtracking == 0) { | |
7277 | stream_ELIPSES.add(ELIPSES126); | |
7278 | } | |
866e5b51 FC |
7279 | |
7280 | pushFollow(FOLLOW_unaryExpression_in_enumeratorValue2566); | |
63bfc685 | 7281 | e2 = unaryExpression(); |
866e5b51 FC |
7282 | |
7283 | state._fsp--; | |
63bfc685 MK |
7284 | if (state.failed) { |
7285 | return retval; | |
7286 | } | |
7287 | if (state.backtracking == 0) { | |
7288 | stream_unaryExpression.add(e2.getTree()); | |
7289 | } | |
866e5b51 FC |
7290 | |
7291 | // AST REWRITE | |
7292 | // elements: e2, e1 | |
63bfc685 | 7293 | // token labels: |
866e5b51 | 7294 | // rule labels: retval, e1, e2 |
63bfc685 MK |
7295 | // token list labels: |
7296 | // rule list labels: | |
7297 | // wildcard labels: | |
7298 | if (state.backtracking == 0) { | |
7299 | retval.tree = root_0; | |
7300 | // RewriteRuleSubtreeStream stream_retval = | |
7301 | new RewriteRuleSubtreeStream( | |
7302 | adaptor, "rule retval", | |
7303 | retval != null ? retval.tree : null); | |
7304 | RewriteRuleSubtreeStream stream_e1 = new RewriteRuleSubtreeStream( | |
7305 | adaptor, "rule e1", e1 != null ? e1.tree : null); | |
7306 | RewriteRuleSubtreeStream stream_e2 = new RewriteRuleSubtreeStream( | |
7307 | adaptor, "rule e2", e2 != null ? e2.tree : null); | |
7308 | ||
7309 | root_0 = (CommonTree) adaptor.nil(); | |
7310 | // 740:34: -> ^( ENUM_VALUE_RANGE $e1 $e2) | |
866e5b51 | 7311 | { |
63bfc685 MK |
7312 | // Grammar/CTFParser.g:740:37: ^( ENUM_VALUE_RANGE |
7313 | // $e1 $e2) | |
7314 | { | |
7315 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
7316 | root_1 = (CommonTree) adaptor.becomeRoot( | |
7317 | adaptor.create(ENUM_VALUE_RANGE, | |
7318 | "ENUM_VALUE_RANGE"), root_1); | |
866e5b51 | 7319 | |
63bfc685 MK |
7320 | adaptor.addChild(root_1, stream_e1.nextTree()); |
7321 | adaptor.addChild(root_1, stream_e2.nextTree()); | |
866e5b51 | 7322 | |
63bfc685 MK |
7323 | adaptor.addChild(root_0, root_1); |
7324 | } | |
866e5b51 | 7325 | |
63bfc685 | 7326 | } |
866e5b51 | 7327 | |
63bfc685 | 7328 | retval.tree = root_0; |
866e5b51 | 7329 | } |
63bfc685 | 7330 | } |
866e5b51 FC |
7331 | break; |
7332 | ||
63bfc685 | 7333 | } |
866e5b51 FC |
7334 | |
7335 | } | |
7336 | ||
7337 | retval.stop = input.LT(-1); | |
7338 | ||
63bfc685 | 7339 | if (state.backtracking == 0) { |
866e5b51 | 7340 | |
63bfc685 MK |
7341 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
7342 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
7343 | retval.stop); | |
866e5b51 | 7344 | } |
63bfc685 | 7345 | if (state.backtracking == 0) { |
866e5b51 FC |
7346 | |
7347 | exit("enumeratorValue"); | |
7348 | ||
7349 | } | |
7350 | } | |
7351 | ||
63bfc685 MK |
7352 | catch (RecognitionException e) { |
7353 | throw e; | |
7354 | ||
866e5b51 FC |
7355 | } |
7356 | return retval; | |
7357 | } | |
63bfc685 | 7358 | |
866e5b51 FC |
7359 | // $ANTLR end "enumeratorValue" |
7360 | ||
7361 | public static class declarator_return extends ParserRuleReturnScope { | |
7362 | CommonTree tree; | |
63bfc685 | 7363 | |
866e5b51 | 7364 | @Override |
63bfc685 MK |
7365 | public Object getTree() { |
7366 | return tree; | |
7367 | } | |
7368 | } | |
866e5b51 FC |
7369 | |
7370 | // $ANTLR start "declarator" | |
63bfc685 MK |
7371 | // Grammar/CTFParser.g:745:1: declarator : ( pointer )* directDeclarator -> |
7372 | // ^( TYPE_DECLARATOR ( pointer )* directDeclarator ) ; | |
7373 | public final CTFParser.declarator_return declarator() | |
7374 | throws RecognitionException { | |
866e5b51 FC |
7375 | CTFParser.declarator_return retval = new CTFParser.declarator_return(); |
7376 | retval.start = input.LT(1); | |
7377 | ||
7378 | CommonTree root_0 = null; | |
7379 | ||
7380 | CTFParser.pointer_return pointer127 = null; | |
7381 | ||
7382 | CTFParser.directDeclarator_return directDeclarator128 = null; | |
7383 | ||
63bfc685 MK |
7384 | RewriteRuleSubtreeStream stream_directDeclarator = new RewriteRuleSubtreeStream( |
7385 | adaptor, "rule directDeclarator"); | |
7386 | RewriteRuleSubtreeStream stream_pointer = new RewriteRuleSubtreeStream( | |
7387 | adaptor, "rule pointer"); | |
866e5b51 | 7388 | |
63bfc685 | 7389 | enter("declarator"); |
866e5b51 FC |
7390 | |
7391 | try { | |
63bfc685 MK |
7392 | // Grammar/CTFParser.g:752:1: ( ( pointer )* directDeclarator -> ^( |
7393 | // TYPE_DECLARATOR ( pointer )* directDeclarator ) ) | |
866e5b51 FC |
7394 | // Grammar/CTFParser.g:753:3: ( pointer )* directDeclarator |
7395 | { | |
63bfc685 MK |
7396 | // Grammar/CTFParser.g:753:3: ( pointer )* |
7397 | loop39: do { | |
7398 | int alt39 = 2; | |
7399 | int LA39_0 = input.LA(1); | |
866e5b51 | 7400 | |
63bfc685 MK |
7401 | if ((LA39_0 == POINTER)) { |
7402 | alt39 = 1; | |
7403 | } | |
7404 | ||
7405 | switch (alt39) { | |
7406 | case 1: | |
7407 | // Grammar/CTFParser.g:753:3: pointer | |
7408 | { | |
7409 | pushFollow(FOLLOW_pointer_in_declarator2608); | |
7410 | pointer127 = pointer(); | |
866e5b51 | 7411 | |
63bfc685 MK |
7412 | state._fsp--; |
7413 | if (state.failed) { | |
7414 | return retval; | |
7415 | } | |
7416 | if (state.backtracking == 0) { | |
7417 | stream_pointer.add(pointer127.getTree()); | |
7418 | } | |
866e5b51 | 7419 | |
63bfc685 MK |
7420 | } |
7421 | break; | |
866e5b51 | 7422 | |
63bfc685 MK |
7423 | default: |
7424 | break loop39; | |
7425 | } | |
7426 | } while (true); | |
866e5b51 | 7427 | |
63bfc685 MK |
7428 | pushFollow(FOLLOW_directDeclarator_in_declarator2611); |
7429 | directDeclarator128 = directDeclarator(); | |
866e5b51 | 7430 | |
63bfc685 MK |
7431 | state._fsp--; |
7432 | if (state.failed) { | |
7433 | return retval; | |
7434 | } | |
7435 | if (state.backtracking == 0) { | |
7436 | stream_directDeclarator.add(directDeclarator128.getTree()); | |
866e5b51 | 7437 | } |
866e5b51 | 7438 | |
63bfc685 MK |
7439 | // AST REWRITE |
7440 | // elements: directDeclarator, pointer | |
7441 | // token labels: | |
7442 | // rule labels: retval | |
7443 | // token list labels: | |
7444 | // rule list labels: | |
7445 | // wildcard labels: | |
7446 | if (state.backtracking == 0) { | |
7447 | retval.tree = root_0; | |
7448 | // RewriteRuleSubtreeStream stream_retval = | |
7449 | new RewriteRuleSubtreeStream( | |
7450 | adaptor, "rule retval", | |
7451 | retval != null ? retval.tree : null); | |
866e5b51 | 7452 | |
63bfc685 MK |
7453 | root_0 = (CommonTree) adaptor.nil(); |
7454 | // 753:29: -> ^( TYPE_DECLARATOR ( pointer )* | |
7455 | // directDeclarator ) | |
7456 | { | |
7457 | // Grammar/CTFParser.g:753:32: ^( TYPE_DECLARATOR ( | |
7458 | // pointer )* directDeclarator ) | |
7459 | { | |
7460 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
7461 | root_1 = (CommonTree) adaptor.becomeRoot( | |
7462 | adaptor.create(TYPE_DECLARATOR, | |
7463 | "TYPE_DECLARATOR"), root_1); | |
866e5b51 | 7464 | |
63bfc685 MK |
7465 | // Grammar/CTFParser.g:753:50: ( pointer )* |
7466 | while (stream_pointer.hasNext()) { | |
7467 | adaptor.addChild(root_1, | |
7468 | stream_pointer.nextTree()); | |
866e5b51 | 7469 | |
63bfc685 MK |
7470 | } |
7471 | stream_pointer.reset(); | |
7472 | adaptor.addChild(root_1, | |
7473 | stream_directDeclarator.nextTree()); | |
866e5b51 | 7474 | |
63bfc685 MK |
7475 | adaptor.addChild(root_0, root_1); |
7476 | } | |
866e5b51 | 7477 | |
63bfc685 | 7478 | } |
866e5b51 | 7479 | |
63bfc685 MK |
7480 | retval.tree = root_0; |
7481 | } | |
866e5b51 FC |
7482 | } |
7483 | ||
7484 | retval.stop = input.LT(-1); | |
7485 | ||
63bfc685 | 7486 | if (state.backtracking == 0) { |
866e5b51 | 7487 | |
63bfc685 MK |
7488 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
7489 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
7490 | retval.stop); | |
866e5b51 | 7491 | } |
63bfc685 | 7492 | if (state.backtracking == 0) { |
866e5b51 FC |
7493 | |
7494 | exit("declarator"); | |
7495 | ||
7496 | } | |
7497 | } | |
7498 | ||
63bfc685 MK |
7499 | catch (RecognitionException e) { |
7500 | throw e; | |
7501 | ||
866e5b51 FC |
7502 | } |
7503 | return retval; | |
7504 | } | |
63bfc685 | 7505 | |
866e5b51 FC |
7506 | // $ANTLR end "declarator" |
7507 | ||
7508 | public static class directDeclarator_return extends ParserRuleReturnScope { | |
7509 | CommonTree tree; | |
63bfc685 | 7510 | |
866e5b51 | 7511 | @Override |
63bfc685 MK |
7512 | public Object getTree() { |
7513 | return tree; | |
7514 | } | |
7515 | } | |
866e5b51 FC |
7516 | |
7517 | // $ANTLR start "directDeclarator" | |
63bfc685 MK |
7518 | // Grammar/CTFParser.g:756:1: directDeclarator : ( IDENTIFIER ) ( |
7519 | // directDeclaratorSuffix )* ; | |
7520 | public final CTFParser.directDeclarator_return directDeclarator() | |
7521 | throws RecognitionException { | |
866e5b51 FC |
7522 | CTFParser.directDeclarator_return retval = new CTFParser.directDeclarator_return(); |
7523 | retval.start = input.LT(1); | |
7524 | ||
7525 | CommonTree root_0 = null; | |
7526 | ||
63bfc685 | 7527 | Token IDENTIFIER129 = null; |
866e5b51 FC |
7528 | CTFParser.directDeclaratorSuffix_return directDeclaratorSuffix130 = null; |
7529 | ||
63bfc685 | 7530 | CommonTree IDENTIFIER129_tree = null; |
866e5b51 | 7531 | |
63bfc685 | 7532 | enter("directDeclarator"); |
866e5b51 FC |
7533 | |
7534 | try { | |
63bfc685 MK |
7535 | // Grammar/CTFParser.g:763:1: ( ( IDENTIFIER ) ( |
7536 | // directDeclaratorSuffix )* ) | |
7537 | // Grammar/CTFParser.g:764:3: ( IDENTIFIER ) ( | |
7538 | // directDeclaratorSuffix )* | |
866e5b51 | 7539 | { |
63bfc685 | 7540 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 | 7541 | |
63bfc685 MK |
7542 | // Grammar/CTFParser.g:764:3: ( IDENTIFIER ) |
7543 | // Grammar/CTFParser.g:765:6: IDENTIFIER | |
7544 | { | |
7545 | IDENTIFIER129 = (Token) match(input, IDENTIFIER, | |
7546 | FOLLOW_IDENTIFIER_in_directDeclarator2655); | |
7547 | if (state.failed) { | |
7548 | return retval; | |
7549 | } | |
7550 | if (state.backtracking == 0) { | |
7551 | IDENTIFIER129_tree = (CommonTree) adaptor | |
7552 | .create(IDENTIFIER129); | |
7553 | adaptor.addChild(root_0, IDENTIFIER129_tree); | |
7554 | } | |
7555 | if (state.backtracking == 0) { | |
7556 | if (inTypedef()) { | |
7557 | addTypeName((IDENTIFIER129 != null ? IDENTIFIER129 | |
7558 | .getText() : null)); | |
7559 | } | |
7560 | } | |
7561 | if (state.backtracking == 0) { | |
7562 | debug_print((IDENTIFIER129 != null ? IDENTIFIER129 | |
7563 | .getText() : null)); | |
7564 | } | |
866e5b51 | 7565 | |
866e5b51 FC |
7566 | } |
7567 | ||
63bfc685 MK |
7568 | // Grammar/CTFParser.g:768:2: ( directDeclaratorSuffix )* |
7569 | loop40: do { | |
7570 | int alt40 = 2; | |
7571 | int LA40_0 = input.LA(1); | |
866e5b51 | 7572 | |
63bfc685 MK |
7573 | if ((LA40_0 == OPENBRAC)) { |
7574 | alt40 = 1; | |
7575 | } | |
866e5b51 | 7576 | |
63bfc685 MK |
7577 | switch (alt40) { |
7578 | case 1: | |
7579 | // Grammar/CTFParser.g:768:2: directDeclaratorSuffix | |
7580 | { | |
7581 | pushFollow(FOLLOW_directDeclaratorSuffix_in_directDeclarator2673); | |
7582 | directDeclaratorSuffix130 = directDeclaratorSuffix(); | |
866e5b51 | 7583 | |
63bfc685 MK |
7584 | state._fsp--; |
7585 | if (state.failed) { | |
7586 | return retval; | |
7587 | } | |
7588 | if (state.backtracking == 0) { | |
7589 | adaptor.addChild(root_0, | |
7590 | directDeclaratorSuffix130.getTree()); | |
7591 | } | |
866e5b51 | 7592 | |
63bfc685 MK |
7593 | } |
7594 | break; | |
866e5b51 | 7595 | |
63bfc685 MK |
7596 | default: |
7597 | break loop40; | |
7598 | } | |
7599 | } while (true); | |
866e5b51 FC |
7600 | |
7601 | } | |
7602 | ||
7603 | retval.stop = input.LT(-1); | |
7604 | ||
63bfc685 | 7605 | if (state.backtracking == 0) { |
866e5b51 | 7606 | |
63bfc685 MK |
7607 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
7608 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
7609 | retval.stop); | |
866e5b51 | 7610 | } |
63bfc685 | 7611 | if (state.backtracking == 0) { |
866e5b51 FC |
7612 | |
7613 | exit("directDeclarator"); | |
7614 | ||
7615 | } | |
7616 | } | |
7617 | ||
63bfc685 MK |
7618 | catch (RecognitionException e) { |
7619 | throw e; | |
7620 | ||
866e5b51 FC |
7621 | } |
7622 | return retval; | |
7623 | } | |
63bfc685 | 7624 | |
866e5b51 FC |
7625 | // $ANTLR end "directDeclarator" |
7626 | ||
63bfc685 MK |
7627 | public static class directDeclaratorSuffix_return extends |
7628 | ParserRuleReturnScope { | |
866e5b51 | 7629 | CommonTree tree; |
63bfc685 | 7630 | |
866e5b51 | 7631 | @Override |
63bfc685 MK |
7632 | public Object getTree() { |
7633 | return tree; | |
7634 | } | |
7635 | } | |
866e5b51 FC |
7636 | |
7637 | // $ANTLR start "directDeclaratorSuffix" | |
63bfc685 MK |
7638 | // Grammar/CTFParser.g:771:1: directDeclaratorSuffix : OPENBRAC |
7639 | // directDeclaratorLength CLOSEBRAC -> ^( LENGTH directDeclaratorLength ) ; | |
7640 | public final CTFParser.directDeclaratorSuffix_return directDeclaratorSuffix() | |
7641 | throws RecognitionException { | |
866e5b51 FC |
7642 | CTFParser.directDeclaratorSuffix_return retval = new CTFParser.directDeclaratorSuffix_return(); |
7643 | retval.start = input.LT(1); | |
7644 | ||
7645 | CommonTree root_0 = null; | |
7646 | ||
63bfc685 MK |
7647 | Token OPENBRAC131 = null; |
7648 | Token CLOSEBRAC133 = null; | |
866e5b51 FC |
7649 | CTFParser.directDeclaratorLength_return directDeclaratorLength132 = null; |
7650 | ||
63bfc685 MK |
7651 | CommonTree OPENBRAC131_tree = null; |
7652 | CommonTree CLOSEBRAC133_tree = null; | |
7653 | RewriteRuleTokenStream stream_OPENBRAC = new RewriteRuleTokenStream( | |
7654 | adaptor, "token OPENBRAC"); | |
7655 | RewriteRuleTokenStream stream_CLOSEBRAC = new RewriteRuleTokenStream( | |
7656 | adaptor, "token CLOSEBRAC"); | |
7657 | RewriteRuleSubtreeStream stream_directDeclaratorLength = new RewriteRuleSubtreeStream( | |
7658 | adaptor, "rule directDeclaratorLength"); | |
866e5b51 | 7659 | try { |
63bfc685 MK |
7660 | // Grammar/CTFParser.g:771:23: ( OPENBRAC directDeclaratorLength |
7661 | // CLOSEBRAC -> ^( LENGTH directDeclaratorLength ) ) | |
7662 | // Grammar/CTFParser.g:772:3: OPENBRAC directDeclaratorLength | |
7663 | // CLOSEBRAC | |
866e5b51 | 7664 | { |
63bfc685 MK |
7665 | OPENBRAC131 = (Token) match(input, OPENBRAC, |
7666 | FOLLOW_OPENBRAC_in_directDeclaratorSuffix2686); | |
7667 | if (state.failed) { | |
7668 | return retval; | |
7669 | } | |
7670 | if (state.backtracking == 0) { | |
7671 | stream_OPENBRAC.add(OPENBRAC131); | |
7672 | } | |
866e5b51 | 7673 | |
63bfc685 MK |
7674 | pushFollow(FOLLOW_directDeclaratorLength_in_directDeclaratorSuffix2688); |
7675 | directDeclaratorLength132 = directDeclaratorLength(); | |
866e5b51 | 7676 | |
63bfc685 MK |
7677 | state._fsp--; |
7678 | if (state.failed) { | |
7679 | return retval; | |
7680 | } | |
7681 | if (state.backtracking == 0) { | |
7682 | stream_directDeclaratorLength.add(directDeclaratorLength132 | |
7683 | .getTree()); | |
7684 | } | |
7685 | CLOSEBRAC133 = (Token) match(input, CLOSEBRAC, | |
7686 | FOLLOW_CLOSEBRAC_in_directDeclaratorSuffix2690); | |
7687 | if (state.failed) { | |
7688 | return retval; | |
7689 | } | |
7690 | if (state.backtracking == 0) { | |
7691 | stream_CLOSEBRAC.add(CLOSEBRAC133); | |
7692 | } | |
866e5b51 | 7693 | |
63bfc685 MK |
7694 | // AST REWRITE |
7695 | // elements: directDeclaratorLength | |
7696 | // token labels: | |
7697 | // rule labels: retval | |
7698 | // token list labels: | |
7699 | // rule list labels: | |
7700 | // wildcard labels: | |
7701 | if (state.backtracking == 0) { | |
7702 | retval.tree = root_0; | |
7703 | // RewriteRuleSubtreeStream stream_retval = | |
7704 | new RewriteRuleSubtreeStream( | |
7705 | adaptor, "rule retval", | |
7706 | retval != null ? retval.tree : null); | |
866e5b51 | 7707 | |
63bfc685 MK |
7708 | root_0 = (CommonTree) adaptor.nil(); |
7709 | // 772:45: -> ^( LENGTH directDeclaratorLength ) | |
7710 | { | |
7711 | // Grammar/CTFParser.g:772:48: ^( LENGTH | |
7712 | // directDeclaratorLength ) | |
7713 | { | |
7714 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
7715 | root_1 = (CommonTree) adaptor.becomeRoot( | |
7716 | adaptor.create(LENGTH, "LENGTH"), root_1); | |
866e5b51 | 7717 | |
63bfc685 MK |
7718 | adaptor.addChild(root_1, |
7719 | stream_directDeclaratorLength.nextTree()); | |
7720 | ||
7721 | adaptor.addChild(root_0, root_1); | |
7722 | } | |
7723 | ||
7724 | } | |
866e5b51 | 7725 | |
63bfc685 MK |
7726 | retval.tree = root_0; |
7727 | } | |
866e5b51 FC |
7728 | } |
7729 | ||
7730 | retval.stop = input.LT(-1); | |
7731 | ||
63bfc685 | 7732 | if (state.backtracking == 0) { |
866e5b51 | 7733 | |
63bfc685 MK |
7734 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
7735 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
7736 | retval.stop); | |
866e5b51 FC |
7737 | } |
7738 | } | |
7739 | ||
63bfc685 MK |
7740 | catch (RecognitionException e) { |
7741 | throw e; | |
7742 | ||
866e5b51 FC |
7743 | } |
7744 | return retval; | |
7745 | } | |
63bfc685 | 7746 | |
866e5b51 FC |
7747 | // $ANTLR end "directDeclaratorSuffix" |
7748 | ||
63bfc685 MK |
7749 | public static class directDeclaratorLength_return extends |
7750 | ParserRuleReturnScope { | |
866e5b51 | 7751 | CommonTree tree; |
63bfc685 | 7752 | |
866e5b51 | 7753 | @Override |
63bfc685 MK |
7754 | public Object getTree() { |
7755 | return tree; | |
7756 | } | |
7757 | } | |
866e5b51 FC |
7758 | |
7759 | // $ANTLR start "directDeclaratorLength" | |
7760 | // Grammar/CTFParser.g:775:1: directDeclaratorLength : unaryExpression ; | |
63bfc685 MK |
7761 | public final CTFParser.directDeclaratorLength_return directDeclaratorLength() |
7762 | throws RecognitionException { | |
866e5b51 FC |
7763 | CTFParser.directDeclaratorLength_return retval = new CTFParser.directDeclaratorLength_return(); |
7764 | retval.start = input.LT(1); | |
7765 | ||
7766 | CommonTree root_0 = null; | |
7767 | ||
7768 | CTFParser.unaryExpression_return unaryExpression134 = null; | |
7769 | ||
866e5b51 FC |
7770 | try { |
7771 | // Grammar/CTFParser.g:775:24: ( unaryExpression ) | |
7772 | // Grammar/CTFParser.g:776:3: unaryExpression | |
7773 | { | |
63bfc685 | 7774 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 | 7775 | |
63bfc685 MK |
7776 | pushFollow(FOLLOW_unaryExpression_in_directDeclaratorLength2711); |
7777 | unaryExpression134 = unaryExpression(); | |
866e5b51 | 7778 | |
63bfc685 MK |
7779 | state._fsp--; |
7780 | if (state.failed) { | |
7781 | return retval; | |
7782 | } | |
7783 | if (state.backtracking == 0) { | |
7784 | adaptor.addChild(root_0, unaryExpression134.getTree()); | |
7785 | } | |
866e5b51 FC |
7786 | |
7787 | } | |
7788 | ||
7789 | retval.stop = input.LT(-1); | |
7790 | ||
63bfc685 | 7791 | if (state.backtracking == 0) { |
866e5b51 | 7792 | |
63bfc685 MK |
7793 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
7794 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
7795 | retval.stop); | |
866e5b51 FC |
7796 | } |
7797 | } | |
7798 | ||
63bfc685 MK |
7799 | catch (RecognitionException e) { |
7800 | throw e; | |
7801 | ||
866e5b51 FC |
7802 | } |
7803 | return retval; | |
7804 | } | |
63bfc685 | 7805 | |
866e5b51 FC |
7806 | // $ANTLR end "directDeclaratorLength" |
7807 | ||
7808 | public static class abstractDeclarator_return extends ParserRuleReturnScope { | |
7809 | CommonTree tree; | |
63bfc685 | 7810 | |
866e5b51 | 7811 | @Override |
63bfc685 MK |
7812 | public Object getTree() { |
7813 | return tree; | |
7814 | } | |
7815 | } | |
866e5b51 FC |
7816 | |
7817 | // $ANTLR start "abstractDeclarator" | |
63bfc685 MK |
7818 | // Grammar/CTFParser.g:780:1: abstractDeclarator : ( ( ( pointer )+ ( |
7819 | // directAbstractDeclarator )? ) -> ^( TYPE_DECLARATOR ( pointer )+ ( | |
7820 | // directAbstractDeclarator )? ) | directAbstractDeclarator -> ^( | |
7821 | // TYPE_DECLARATOR directAbstractDeclarator ) ); | |
7822 | public final CTFParser.abstractDeclarator_return abstractDeclarator() | |
7823 | throws RecognitionException { | |
866e5b51 FC |
7824 | CTFParser.abstractDeclarator_return retval = new CTFParser.abstractDeclarator_return(); |
7825 | retval.start = input.LT(1); | |
7826 | ||
7827 | CommonTree root_0 = null; | |
7828 | ||
7829 | CTFParser.pointer_return pointer135 = null; | |
7830 | ||
7831 | CTFParser.directAbstractDeclarator_return directAbstractDeclarator136 = null; | |
7832 | ||
7833 | CTFParser.directAbstractDeclarator_return directAbstractDeclarator137 = null; | |
7834 | ||
63bfc685 MK |
7835 | RewriteRuleSubtreeStream stream_pointer = new RewriteRuleSubtreeStream( |
7836 | adaptor, "rule pointer"); | |
7837 | RewriteRuleSubtreeStream stream_directAbstractDeclarator = new RewriteRuleSubtreeStream( | |
7838 | adaptor, "rule directAbstractDeclarator"); | |
866e5b51 | 7839 | |
63bfc685 | 7840 | enter("abstractDeclarator"); |
866e5b51 FC |
7841 | |
7842 | try { | |
63bfc685 MK |
7843 | // Grammar/CTFParser.g:787:1: ( ( ( pointer )+ ( |
7844 | // directAbstractDeclarator )? ) -> ^( TYPE_DECLARATOR ( pointer )+ | |
7845 | // ( directAbstractDeclarator )? ) | directAbstractDeclarator -> ^( | |
7846 | // TYPE_DECLARATOR directAbstractDeclarator ) ) | |
7847 | int alt43 = 2; | |
866e5b51 FC |
7848 | int LA43_0 = input.LA(1); |
7849 | ||
63bfc685 MK |
7850 | if ((LA43_0 == POINTER)) { |
7851 | alt43 = 1; | |
7852 | } else if (((LA43_0 == LPAREN) || (LA43_0 == IDENTIFIER))) { | |
7853 | alt43 = 2; | |
7854 | } else { | |
7855 | if (state.backtracking > 0) { | |
7856 | state.failed = true; | |
7857 | return retval; | |
7858 | } | |
7859 | NoViableAltException nvae = new NoViableAltException("", 43, 0, | |
7860 | input); | |
866e5b51 FC |
7861 | |
7862 | throw nvae; | |
7863 | } | |
7864 | switch (alt43) { | |
63bfc685 MK |
7865 | case 1: |
7866 | // Grammar/CTFParser.g:788:5: ( ( pointer )+ ( | |
7867 | // directAbstractDeclarator )? ) | |
7868 | { | |
7869 | // Grammar/CTFParser.g:788:5: ( ( pointer )+ ( | |
7870 | // directAbstractDeclarator )? ) | |
7871 | // Grammar/CTFParser.g:788:6: ( pointer )+ ( | |
7872 | // directAbstractDeclarator )? | |
7873 | { | |
866e5b51 | 7874 | // Grammar/CTFParser.g:788:6: ( pointer )+ |
63bfc685 MK |
7875 | int cnt41 = 0; |
7876 | loop41: do { | |
7877 | int alt41 = 2; | |
866e5b51 FC |
7878 | int LA41_0 = input.LA(1); |
7879 | ||
63bfc685 MK |
7880 | if ((LA41_0 == POINTER)) { |
7881 | alt41 = 1; | |
866e5b51 FC |
7882 | } |
7883 | ||
866e5b51 | 7884 | switch (alt41) { |
63bfc685 MK |
7885 | case 1: |
7886 | // Grammar/CTFParser.g:788:6: pointer | |
7887 | { | |
7888 | pushFollow(FOLLOW_pointer_in_abstractDeclarator2742); | |
7889 | pointer135 = pointer(); | |
7890 | ||
7891 | state._fsp--; | |
7892 | if (state.failed) { | |
7893 | return retval; | |
7894 | } | |
7895 | if (state.backtracking == 0) { | |
7896 | stream_pointer.add(pointer135.getTree()); | |
7897 | } | |
7898 | ||
7899 | } | |
7900 | break; | |
7901 | ||
7902 | default: | |
7903 | if (cnt41 >= 1) { | |
7904 | break loop41; | |
7905 | } | |
7906 | if (state.backtracking > 0) { | |
7907 | state.failed = true; | |
7908 | return retval; | |
7909 | } | |
7910 | EarlyExitException eee = new EarlyExitException(41, | |
7911 | input); | |
7912 | throw eee; | |
866e5b51 FC |
7913 | } |
7914 | cnt41++; | |
7915 | } while (true); | |
7916 | ||
7917 | // Grammar/CTFParser.g:788:15: ( directAbstractDeclarator )? | |
63bfc685 | 7918 | int alt42 = 2; |
866e5b51 FC |
7919 | int LA42_0 = input.LA(1); |
7920 | ||
63bfc685 MK |
7921 | if (((LA42_0 == LPAREN) || (LA42_0 == IDENTIFIER))) { |
7922 | alt42 = 1; | |
866e5b51 FC |
7923 | } |
7924 | switch (alt42) { | |
63bfc685 MK |
7925 | case 1: |
7926 | // Grammar/CTFParser.g:788:15: directAbstractDeclarator | |
7927 | { | |
7928 | pushFollow(FOLLOW_directAbstractDeclarator_in_abstractDeclarator2745); | |
7929 | directAbstractDeclarator136 = directAbstractDeclarator(); | |
866e5b51 | 7930 | |
63bfc685 MK |
7931 | state._fsp--; |
7932 | if (state.failed) { | |
7933 | return retval; | |
7934 | } | |
7935 | if (state.backtracking == 0) { | |
7936 | stream_directAbstractDeclarator | |
7937 | .add(directAbstractDeclarator136.getTree()); | |
7938 | } | |
866e5b51 FC |
7939 | |
7940 | } | |
63bfc685 | 7941 | break; |
866e5b51 FC |
7942 | |
7943 | } | |
7944 | ||
63bfc685 | 7945 | } |
866e5b51 | 7946 | |
63bfc685 MK |
7947 | // AST REWRITE |
7948 | // elements: pointer, directAbstractDeclarator | |
7949 | // token labels: | |
7950 | // rule labels: retval | |
7951 | // token list labels: | |
7952 | // rule list labels: | |
7953 | // wildcard labels: | |
7954 | if (state.backtracking == 0) { | |
866e5b51 | 7955 | retval.tree = root_0; |
63bfc685 MK |
7956 | // RewriteRuleSubtreeStream stream_retval = |
7957 | new RewriteRuleSubtreeStream( | |
7958 | adaptor, "rule retval", | |
7959 | retval != null ? retval.tree : null); | |
866e5b51 | 7960 | |
63bfc685 MK |
7961 | root_0 = (CommonTree) adaptor.nil(); |
7962 | // 788:42: -> ^( TYPE_DECLARATOR ( pointer )+ ( | |
7963 | // directAbstractDeclarator )? ) | |
866e5b51 | 7964 | { |
63bfc685 MK |
7965 | // Grammar/CTFParser.g:788:45: ^( TYPE_DECLARATOR ( |
7966 | // pointer )+ ( directAbstractDeclarator )? ) | |
866e5b51 | 7967 | { |
63bfc685 MK |
7968 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
7969 | root_1 = (CommonTree) adaptor.becomeRoot( | |
7970 | adaptor.create(TYPE_DECLARATOR, | |
7971 | "TYPE_DECLARATOR"), root_1); | |
866e5b51 | 7972 | |
63bfc685 MK |
7973 | if (!(stream_pointer.hasNext())) { |
7974 | throw new RewriteEarlyExitException(); | |
7975 | } | |
7976 | while (stream_pointer.hasNext()) { | |
7977 | adaptor.addChild(root_1, | |
7978 | stream_pointer.nextTree()); | |
866e5b51 | 7979 | |
63bfc685 MK |
7980 | } |
7981 | stream_pointer.reset(); | |
7982 | // Grammar/CTFParser.g:788:72: ( | |
7983 | // directAbstractDeclarator )? | |
7984 | if (stream_directAbstractDeclarator.hasNext()) { | |
7985 | adaptor.addChild(root_1, | |
7986 | stream_directAbstractDeclarator | |
7987 | .nextTree()); | |
866e5b51 | 7988 | |
63bfc685 MK |
7989 | } |
7990 | stream_directAbstractDeclarator.reset(); | |
866e5b51 | 7991 | |
63bfc685 | 7992 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
7993 | } |
7994 | ||
7995 | } | |
7996 | ||
866e5b51 | 7997 | retval.tree = root_0; |
63bfc685 MK |
7998 | } |
7999 | } | |
8000 | break; | |
8001 | case 2: | |
8002 | // Grammar/CTFParser.g:789:5: directAbstractDeclarator | |
8003 | { | |
8004 | pushFollow(FOLLOW_directAbstractDeclarator_in_abstractDeclarator2765); | |
8005 | directAbstractDeclarator137 = directAbstractDeclarator(); | |
8006 | ||
8007 | state._fsp--; | |
8008 | if (state.failed) { | |
8009 | return retval; | |
8010 | } | |
8011 | if (state.backtracking == 0) { | |
8012 | stream_directAbstractDeclarator | |
8013 | .add(directAbstractDeclarator137.getTree()); | |
8014 | } | |
8015 | ||
8016 | // AST REWRITE | |
8017 | // elements: directAbstractDeclarator | |
8018 | // token labels: | |
8019 | // rule labels: retval | |
8020 | // token list labels: | |
8021 | // rule list labels: | |
8022 | // wildcard labels: | |
8023 | if (state.backtracking == 0) { | |
8024 | retval.tree = root_0; | |
8025 | // RewriteRuleSubtreeStream stream_retval = | |
8026 | new RewriteRuleSubtreeStream( | |
8027 | adaptor, "rule retval", | |
8028 | retval != null ? retval.tree : null); | |
866e5b51 | 8029 | |
63bfc685 | 8030 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 FC |
8031 | // 789:30: -> ^( TYPE_DECLARATOR directAbstractDeclarator ) |
8032 | { | |
63bfc685 MK |
8033 | // Grammar/CTFParser.g:789:33: ^( TYPE_DECLARATOR |
8034 | // directAbstractDeclarator ) | |
866e5b51 | 8035 | { |
63bfc685 MK |
8036 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
8037 | root_1 = (CommonTree) adaptor.becomeRoot( | |
8038 | adaptor.create(TYPE_DECLARATOR, | |
8039 | "TYPE_DECLARATOR"), root_1); | |
866e5b51 | 8040 | |
63bfc685 MK |
8041 | adaptor.addChild(root_1, |
8042 | stream_directAbstractDeclarator.nextTree()); | |
866e5b51 | 8043 | |
63bfc685 | 8044 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
8045 | } |
8046 | ||
8047 | } | |
8048 | ||
63bfc685 MK |
8049 | retval.tree = root_0; |
8050 | } | |
8051 | } | |
8052 | break; | |
866e5b51 FC |
8053 | |
8054 | } | |
8055 | retval.stop = input.LT(-1); | |
8056 | ||
63bfc685 | 8057 | if (state.backtracking == 0) { |
866e5b51 | 8058 | |
63bfc685 MK |
8059 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
8060 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
8061 | retval.stop); | |
866e5b51 | 8062 | } |
63bfc685 | 8063 | if (state.backtracking == 0) { |
866e5b51 FC |
8064 | |
8065 | exit("abstractDeclarator"); | |
8066 | ||
8067 | } | |
8068 | } | |
8069 | ||
63bfc685 MK |
8070 | catch (RecognitionException e) { |
8071 | throw e; | |
8072 | ||
866e5b51 FC |
8073 | } |
8074 | return retval; | |
8075 | } | |
63bfc685 | 8076 | |
866e5b51 FC |
8077 | // $ANTLR end "abstractDeclarator" |
8078 | ||
63bfc685 MK |
8079 | public static class directAbstractDeclarator_return extends |
8080 | ParserRuleReturnScope { | |
866e5b51 | 8081 | CommonTree tree; |
63bfc685 | 8082 | |
866e5b51 | 8083 | @Override |
63bfc685 MK |
8084 | public Object getTree() { |
8085 | return tree; | |
8086 | } | |
8087 | } | |
866e5b51 FC |
8088 | |
8089 | // $ANTLR start "directAbstractDeclarator" | |
63bfc685 MK |
8090 | // Grammar/CTFParser.g:796:1: directAbstractDeclarator : ( IDENTIFIER | ( |
8091 | // LPAREN abstractDeclarator RPAREN ) ) ( OPENBRAC ( unaryExpression )? | |
8092 | // CLOSEBRAC )? ; | |
8093 | public final CTFParser.directAbstractDeclarator_return directAbstractDeclarator() | |
8094 | throws RecognitionException { | |
866e5b51 FC |
8095 | CTFParser.directAbstractDeclarator_return retval = new CTFParser.directAbstractDeclarator_return(); |
8096 | retval.start = input.LT(1); | |
8097 | ||
8098 | CommonTree root_0 = null; | |
8099 | ||
63bfc685 MK |
8100 | Token IDENTIFIER138 = null; |
8101 | Token LPAREN139 = null; | |
8102 | Token RPAREN141 = null; | |
8103 | Token OPENBRAC142 = null; | |
8104 | Token CLOSEBRAC144 = null; | |
866e5b51 FC |
8105 | CTFParser.abstractDeclarator_return abstractDeclarator140 = null; |
8106 | ||
8107 | CTFParser.unaryExpression_return unaryExpression143 = null; | |
8108 | ||
63bfc685 MK |
8109 | CommonTree IDENTIFIER138_tree = null; |
8110 | CommonTree LPAREN139_tree = null; | |
8111 | CommonTree RPAREN141_tree = null; | |
8112 | CommonTree OPENBRAC142_tree = null; | |
8113 | CommonTree CLOSEBRAC144_tree = null; | |
866e5b51 | 8114 | |
63bfc685 | 8115 | enter("directAbstractDeclarator"); |
866e5b51 FC |
8116 | |
8117 | try { | |
63bfc685 MK |
8118 | // Grammar/CTFParser.g:804:1: ( ( IDENTIFIER | ( LPAREN |
8119 | // abstractDeclarator RPAREN ) ) ( OPENBRAC ( unaryExpression )? | |
8120 | // CLOSEBRAC )? ) | |
8121 | // Grammar/CTFParser.g:805:3: ( IDENTIFIER | ( LPAREN | |
8122 | // abstractDeclarator RPAREN ) ) ( OPENBRAC ( unaryExpression )? | |
8123 | // CLOSEBRAC )? | |
866e5b51 | 8124 | { |
63bfc685 | 8125 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 | 8126 | |
63bfc685 MK |
8127 | // Grammar/CTFParser.g:805:3: ( IDENTIFIER | ( LPAREN |
8128 | // abstractDeclarator RPAREN ) ) | |
8129 | int alt44 = 2; | |
8130 | int LA44_0 = input.LA(1); | |
866e5b51 | 8131 | |
63bfc685 MK |
8132 | if ((LA44_0 == IDENTIFIER)) { |
8133 | alt44 = 1; | |
8134 | } else if ((LA44_0 == LPAREN)) { | |
8135 | alt44 = 2; | |
8136 | } else { | |
8137 | if (state.backtracking > 0) { | |
8138 | state.failed = true; | |
8139 | return retval; | |
866e5b51 | 8140 | } |
63bfc685 MK |
8141 | NoViableAltException nvae = new NoViableAltException("", |
8142 | 44, 0, input); | |
866e5b51 | 8143 | |
63bfc685 MK |
8144 | throw nvae; |
8145 | } | |
8146 | switch (alt44) { | |
8147 | case 1: | |
8148 | // Grammar/CTFParser.g:806:6: IDENTIFIER | |
8149 | { | |
8150 | IDENTIFIER138 = (Token) match(input, IDENTIFIER, | |
8151 | FOLLOW_IDENTIFIER_in_directAbstractDeclarator2805); | |
8152 | if (state.failed) { | |
8153 | return retval; | |
866e5b51 | 8154 | } |
63bfc685 MK |
8155 | if (state.backtracking == 0) { |
8156 | IDENTIFIER138_tree = (CommonTree) adaptor | |
8157 | .create(IDENTIFIER138); | |
8158 | adaptor.addChild(root_0, IDENTIFIER138_tree); | |
866e5b51 FC |
8159 | } |
8160 | ||
63bfc685 MK |
8161 | } |
8162 | break; | |
8163 | case 2: | |
8164 | // Grammar/CTFParser.g:807:7: ( LPAREN abstractDeclarator RPAREN | |
8165 | // ) | |
8166 | { | |
8167 | // Grammar/CTFParser.g:807:7: ( LPAREN abstractDeclarator | |
8168 | // RPAREN ) | |
8169 | // Grammar/CTFParser.g:807:8: LPAREN abstractDeclarator | |
8170 | // RPAREN | |
8171 | { | |
8172 | LPAREN139 = (Token) match(input, LPAREN, | |
8173 | FOLLOW_LPAREN_in_directAbstractDeclarator2814); | |
8174 | if (state.failed) { | |
8175 | return retval; | |
8176 | } | |
8177 | if (state.backtracking == 0) { | |
8178 | LPAREN139_tree = (CommonTree) adaptor | |
8179 | .create(LPAREN139); | |
8180 | adaptor.addChild(root_0, LPAREN139_tree); | |
8181 | } | |
8182 | pushFollow(FOLLOW_abstractDeclarator_in_directAbstractDeclarator2816); | |
8183 | abstractDeclarator140 = abstractDeclarator(); | |
866e5b51 | 8184 | |
63bfc685 MK |
8185 | state._fsp--; |
8186 | if (state.failed) { | |
8187 | return retval; | |
8188 | } | |
8189 | if (state.backtracking == 0) { | |
8190 | adaptor.addChild(root_0, | |
8191 | abstractDeclarator140.getTree()); | |
8192 | } | |
8193 | RPAREN141 = (Token) match(input, RPAREN, | |
8194 | FOLLOW_RPAREN_in_directAbstractDeclarator2818); | |
8195 | if (state.failed) { | |
8196 | return retval; | |
8197 | } | |
8198 | if (state.backtracking == 0) { | |
8199 | RPAREN141_tree = (CommonTree) adaptor | |
8200 | .create(RPAREN141); | |
8201 | adaptor.addChild(root_0, RPAREN141_tree); | |
8202 | } | |
866e5b51 FC |
8203 | |
8204 | } | |
63bfc685 MK |
8205 | |
8206 | } | |
866e5b51 FC |
8207 | break; |
8208 | ||
63bfc685 | 8209 | } |
866e5b51 | 8210 | |
63bfc685 MK |
8211 | // Grammar/CTFParser.g:809:3: ( OPENBRAC ( unaryExpression )? |
8212 | // CLOSEBRAC )? | |
8213 | int alt46 = 2; | |
8214 | int LA46_0 = input.LA(1); | |
866e5b51 | 8215 | |
63bfc685 MK |
8216 | if ((LA46_0 == OPENBRAC)) { |
8217 | alt46 = 1; | |
8218 | } | |
8219 | switch (alt46) { | |
8220 | case 1: | |
8221 | // Grammar/CTFParser.g:810:5: OPENBRAC ( unaryExpression )? | |
8222 | // CLOSEBRAC | |
8223 | { | |
8224 | OPENBRAC142 = (Token) match(input, OPENBRAC, | |
8225 | FOLLOW_OPENBRAC_in_directAbstractDeclarator2833); | |
8226 | if (state.failed) { | |
8227 | return retval; | |
8228 | } | |
8229 | if (state.backtracking == 0) { | |
8230 | OPENBRAC142_tree = (CommonTree) adaptor | |
8231 | .create(OPENBRAC142); | |
8232 | adaptor.addChild(root_0, OPENBRAC142_tree); | |
866e5b51 FC |
8233 | } |
8234 | // Grammar/CTFParser.g:810:14: ( unaryExpression )? | |
63bfc685 | 8235 | int alt45 = 2; |
866e5b51 FC |
8236 | int LA45_0 = input.LA(1); |
8237 | ||
63bfc685 MK |
8238 | if (((LA45_0 == ALIGNTOK) || (LA45_0 == EVENTTOK) |
8239 | || ((LA45_0 >= SIGNEDTOK) && (LA45_0 <= STRINGTOK)) | |
8240 | || (LA45_0 == TRACETOK) | |
8241 | || ((LA45_0 >= ENVTOK) && (LA45_0 <= CLOCKTOK)) | |
8242 | || (LA45_0 == SIGN) || (LA45_0 == OCTAL_LITERAL) | |
8243 | || (LA45_0 == DECIMAL_LITERAL) | |
8244 | || (LA45_0 == HEX_LITERAL) | |
8245 | || (LA45_0 == CHARACTER_LITERAL) | |
8246 | || (LA45_0 == STRING_LITERAL) || (LA45_0 == IDENTIFIER))) { | |
8247 | alt45 = 1; | |
866e5b51 FC |
8248 | } |
8249 | switch (alt45) { | |
63bfc685 MK |
8250 | case 1: |
8251 | // Grammar/CTFParser.g:810:14: unaryExpression | |
8252 | { | |
8253 | pushFollow(FOLLOW_unaryExpression_in_directAbstractDeclarator2835); | |
8254 | unaryExpression143 = unaryExpression(); | |
866e5b51 | 8255 | |
63bfc685 MK |
8256 | state._fsp--; |
8257 | if (state.failed) { | |
8258 | return retval; | |
8259 | } | |
8260 | if (state.backtracking == 0) { | |
8261 | adaptor.addChild(root_0, | |
8262 | unaryExpression143.getTree()); | |
8263 | } | |
866e5b51 FC |
8264 | |
8265 | } | |
63bfc685 | 8266 | break; |
866e5b51 | 8267 | |
866e5b51 FC |
8268 | } |
8269 | ||
63bfc685 MK |
8270 | CLOSEBRAC144 = (Token) match(input, CLOSEBRAC, |
8271 | FOLLOW_CLOSEBRAC_in_directAbstractDeclarator2838); | |
8272 | if (state.failed) { | |
8273 | return retval; | |
8274 | } | |
8275 | if (state.backtracking == 0) { | |
8276 | CLOSEBRAC144_tree = (CommonTree) adaptor | |
8277 | .create(CLOSEBRAC144); | |
8278 | adaptor.addChild(root_0, CLOSEBRAC144_tree); | |
866e5b51 | 8279 | } |
866e5b51 | 8280 | |
63bfc685 MK |
8281 | } |
8282 | break; | |
866e5b51 | 8283 | |
63bfc685 | 8284 | } |
866e5b51 FC |
8285 | |
8286 | } | |
8287 | ||
8288 | retval.stop = input.LT(-1); | |
8289 | ||
63bfc685 | 8290 | if (state.backtracking == 0) { |
866e5b51 | 8291 | |
63bfc685 MK |
8292 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
8293 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
8294 | retval.stop); | |
866e5b51 | 8295 | } |
63bfc685 | 8296 | if (state.backtracking == 0) { |
866e5b51 | 8297 | |
63bfc685 | 8298 | debug_print(input.toString(retval.start, input.LT(-1))); |
866e5b51 FC |
8299 | exit("directAbstractDeclarator"); |
8300 | ||
8301 | } | |
8302 | } | |
8303 | ||
63bfc685 MK |
8304 | catch (RecognitionException e) { |
8305 | throw e; | |
8306 | ||
866e5b51 FC |
8307 | } |
8308 | return retval; | |
8309 | } | |
63bfc685 | 8310 | |
866e5b51 FC |
8311 | // $ANTLR end "directAbstractDeclarator" |
8312 | ||
8313 | public static class pointer_return extends ParserRuleReturnScope { | |
8314 | CommonTree tree; | |
63bfc685 | 8315 | |
866e5b51 | 8316 | @Override |
63bfc685 MK |
8317 | public Object getTree() { |
8318 | return tree; | |
8319 | } | |
8320 | } | |
866e5b51 FC |
8321 | |
8322 | // $ANTLR start "pointer" | |
63bfc685 MK |
8323 | // Grammar/CTFParser.g:814:1: pointer : POINTER ( typeQualifierList )? -> ^( |
8324 | // POINTER ( typeQualifierList )? ) ; | |
866e5b51 FC |
8325 | public final CTFParser.pointer_return pointer() throws RecognitionException { |
8326 | CTFParser.pointer_return retval = new CTFParser.pointer_return(); | |
8327 | retval.start = input.LT(1); | |
8328 | ||
8329 | CommonTree root_0 = null; | |
8330 | ||
63bfc685 | 8331 | Token POINTER145 = null; |
866e5b51 FC |
8332 | CTFParser.typeQualifierList_return typeQualifierList146 = null; |
8333 | ||
63bfc685 MK |
8334 | CommonTree POINTER145_tree = null; |
8335 | RewriteRuleTokenStream stream_POINTER = new RewriteRuleTokenStream( | |
8336 | adaptor, "token POINTER"); | |
8337 | RewriteRuleSubtreeStream stream_typeQualifierList = new RewriteRuleSubtreeStream( | |
8338 | adaptor, "rule typeQualifierList"); | |
866e5b51 | 8339 | |
63bfc685 | 8340 | enter("pointer"); |
866e5b51 FC |
8341 | |
8342 | try { | |
63bfc685 MK |
8343 | // Grammar/CTFParser.g:822:1: ( POINTER ( typeQualifierList )? -> ^( |
8344 | // POINTER ( typeQualifierList )? ) ) | |
866e5b51 FC |
8345 | // Grammar/CTFParser.g:823:3: POINTER ( typeQualifierList )? |
8346 | { | |
63bfc685 MK |
8347 | POINTER145 = (Token) match(input, POINTER, |
8348 | FOLLOW_POINTER_in_pointer2866); | |
8349 | if (state.failed) { | |
8350 | return retval; | |
8351 | } | |
8352 | if (state.backtracking == 0) { | |
8353 | stream_POINTER.add(POINTER145); | |
8354 | } | |
866e5b51 | 8355 | |
63bfc685 MK |
8356 | // Grammar/CTFParser.g:823:11: ( typeQualifierList )? |
8357 | int alt47 = 2; | |
8358 | int LA47_0 = input.LA(1); | |
866e5b51 | 8359 | |
63bfc685 MK |
8360 | if ((LA47_0 == CONSTTOK)) { |
8361 | alt47 = 1; | |
8362 | } | |
8363 | switch (alt47) { | |
8364 | case 1: | |
8365 | // Grammar/CTFParser.g:823:11: typeQualifierList | |
8366 | { | |
866e5b51 | 8367 | pushFollow(FOLLOW_typeQualifierList_in_pointer2868); |
63bfc685 | 8368 | typeQualifierList146 = typeQualifierList(); |
866e5b51 FC |
8369 | |
8370 | state._fsp--; | |
63bfc685 MK |
8371 | if (state.failed) { |
8372 | return retval; | |
8373 | } | |
8374 | if (state.backtracking == 0) { | |
8375 | stream_typeQualifierList.add(typeQualifierList146 | |
8376 | .getTree()); | |
866e5b51 | 8377 | } |
63bfc685 MK |
8378 | |
8379 | } | |
866e5b51 FC |
8380 | break; |
8381 | ||
63bfc685 | 8382 | } |
866e5b51 | 8383 | |
63bfc685 MK |
8384 | // AST REWRITE |
8385 | // elements: typeQualifierList, POINTER | |
8386 | // token labels: | |
8387 | // rule labels: retval | |
8388 | // token list labels: | |
8389 | // rule list labels: | |
8390 | // wildcard labels: | |
8391 | if (state.backtracking == 0) { | |
8392 | retval.tree = root_0; | |
8393 | // RewriteRuleSubtreeStream stream_retval = | |
8394 | new RewriteRuleSubtreeStream( | |
8395 | adaptor, "rule retval", | |
8396 | retval != null ? retval.tree : null); | |
866e5b51 | 8397 | |
63bfc685 MK |
8398 | root_0 = (CommonTree) adaptor.nil(); |
8399 | // 823:30: -> ^( POINTER ( typeQualifierList )? ) | |
8400 | { | |
8401 | // Grammar/CTFParser.g:823:33: ^( POINTER ( | |
8402 | // typeQualifierList )? ) | |
8403 | { | |
8404 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
8405 | root_1 = (CommonTree) adaptor.becomeRoot( | |
8406 | stream_POINTER.nextNode(), root_1); | |
866e5b51 | 8407 | |
63bfc685 MK |
8408 | // Grammar/CTFParser.g:823:43: ( typeQualifierList |
8409 | // )? | |
8410 | if (stream_typeQualifierList.hasNext()) { | |
8411 | adaptor.addChild(root_1, | |
8412 | stream_typeQualifierList.nextTree()); | |
866e5b51 | 8413 | |
63bfc685 MK |
8414 | } |
8415 | stream_typeQualifierList.reset(); | |
866e5b51 | 8416 | |
63bfc685 MK |
8417 | adaptor.addChild(root_0, root_1); |
8418 | } | |
866e5b51 | 8419 | |
63bfc685 | 8420 | } |
866e5b51 | 8421 | |
63bfc685 | 8422 | retval.tree = root_0; |
866e5b51 | 8423 | } |
866e5b51 FC |
8424 | } |
8425 | ||
8426 | retval.stop = input.LT(-1); | |
8427 | ||
63bfc685 | 8428 | if (state.backtracking == 0) { |
866e5b51 | 8429 | |
63bfc685 MK |
8430 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
8431 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
8432 | retval.stop); | |
866e5b51 | 8433 | } |
63bfc685 | 8434 | if (state.backtracking == 0) { |
866e5b51 | 8435 | |
63bfc685 | 8436 | debug_print(input.toString(retval.start, input.LT(-1))); |
866e5b51 FC |
8437 | exit("pointer"); |
8438 | ||
8439 | } | |
8440 | } | |
8441 | ||
63bfc685 MK |
8442 | catch (RecognitionException e) { |
8443 | throw e; | |
8444 | ||
866e5b51 FC |
8445 | } |
8446 | return retval; | |
8447 | } | |
63bfc685 | 8448 | |
866e5b51 FC |
8449 | // $ANTLR end "pointer" |
8450 | ||
8451 | public static class typeQualifierList_return extends ParserRuleReturnScope { | |
8452 | CommonTree tree; | |
63bfc685 | 8453 | |
866e5b51 | 8454 | @Override |
63bfc685 MK |
8455 | public Object getTree() { |
8456 | return tree; | |
8457 | } | |
8458 | } | |
866e5b51 FC |
8459 | |
8460 | // $ANTLR start "typeQualifierList" | |
8461 | // Grammar/CTFParser.g:826:1: typeQualifierList : ( typeQualifier )+ ; | |
63bfc685 MK |
8462 | public final CTFParser.typeQualifierList_return typeQualifierList() |
8463 | throws RecognitionException { | |
866e5b51 FC |
8464 | CTFParser.typeQualifierList_return retval = new CTFParser.typeQualifierList_return(); |
8465 | retval.start = input.LT(1); | |
8466 | ||
8467 | CommonTree root_0 = null; | |
8468 | ||
8469 | CTFParser.typeQualifier_return typeQualifier147 = null; | |
8470 | ||
866e5b51 FC |
8471 | try { |
8472 | // Grammar/CTFParser.g:826:19: ( ( typeQualifier )+ ) | |
8473 | // Grammar/CTFParser.g:827:3: ( typeQualifier )+ | |
8474 | { | |
63bfc685 | 8475 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 | 8476 | |
63bfc685 MK |
8477 | // Grammar/CTFParser.g:827:3: ( typeQualifier )+ |
8478 | int cnt48 = 0; | |
8479 | loop48: do { | |
8480 | int alt48 = 2; | |
8481 | int LA48_0 = input.LA(1); | |
866e5b51 | 8482 | |
63bfc685 MK |
8483 | if ((LA48_0 == CONSTTOK)) { |
8484 | alt48 = 1; | |
8485 | } | |
866e5b51 | 8486 | |
63bfc685 MK |
8487 | switch (alt48) { |
8488 | case 1: | |
8489 | // Grammar/CTFParser.g:827:3: typeQualifier | |
8490 | { | |
8491 | pushFollow(FOLLOW_typeQualifier_in_typeQualifierList2891); | |
8492 | typeQualifier147 = typeQualifier(); | |
866e5b51 | 8493 | |
63bfc685 MK |
8494 | state._fsp--; |
8495 | if (state.failed) { | |
8496 | return retval; | |
8497 | } | |
8498 | if (state.backtracking == 0) { | |
8499 | adaptor.addChild(root_0, typeQualifier147.getTree()); | |
8500 | } | |
866e5b51 | 8501 | |
63bfc685 MK |
8502 | } |
8503 | break; | |
866e5b51 | 8504 | |
63bfc685 MK |
8505 | default: |
8506 | if (cnt48 >= 1) { | |
8507 | break loop48; | |
8508 | } | |
8509 | if (state.backtracking > 0) { | |
8510 | state.failed = true; | |
8511 | return retval; | |
8512 | } | |
8513 | EarlyExitException eee = new EarlyExitException(48, | |
8514 | input); | |
866e5b51 | 8515 | throw eee; |
63bfc685 MK |
8516 | } |
8517 | cnt48++; | |
8518 | } while (true); | |
866e5b51 FC |
8519 | |
8520 | } | |
8521 | ||
8522 | retval.stop = input.LT(-1); | |
8523 | ||
63bfc685 | 8524 | if (state.backtracking == 0) { |
866e5b51 | 8525 | |
63bfc685 MK |
8526 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
8527 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
8528 | retval.stop); | |
866e5b51 FC |
8529 | } |
8530 | } | |
8531 | ||
63bfc685 MK |
8532 | catch (RecognitionException e) { |
8533 | throw e; | |
8534 | ||
866e5b51 FC |
8535 | } |
8536 | return retval; | |
8537 | } | |
63bfc685 | 8538 | |
866e5b51 FC |
8539 | // $ANTLR end "typeQualifierList" |
8540 | ||
8541 | public static class typedefName_return extends ParserRuleReturnScope { | |
8542 | CommonTree tree; | |
63bfc685 | 8543 | |
866e5b51 | 8544 | @Override |
63bfc685 MK |
8545 | public Object getTree() { |
8546 | return tree; | |
8547 | } | |
8548 | } | |
866e5b51 FC |
8549 | |
8550 | // $ANTLR start "typedefName" | |
8551 | // Grammar/CTFParser.g:830:1: typedefName : {...}? IDENTIFIER ; | |
63bfc685 MK |
8552 | public final CTFParser.typedefName_return typedefName() |
8553 | throws RecognitionException { | |
866e5b51 FC |
8554 | CTFParser.typedefName_return retval = new CTFParser.typedefName_return(); |
8555 | retval.start = input.LT(1); | |
8556 | ||
8557 | CommonTree root_0 = null; | |
8558 | ||
63bfc685 | 8559 | Token IDENTIFIER148 = null; |
866e5b51 | 8560 | |
63bfc685 | 8561 | CommonTree IDENTIFIER148_tree = null; |
866e5b51 | 8562 | |
63bfc685 | 8563 | enter("typedefName"); |
866e5b51 FC |
8564 | |
8565 | try { | |
8566 | // Grammar/CTFParser.g:838:1: ({...}? IDENTIFIER ) | |
8567 | // Grammar/CTFParser.g:839:3: {...}? IDENTIFIER | |
8568 | { | |
63bfc685 | 8569 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 | 8570 | |
63bfc685 MK |
8571 | if (!((inTypealiasAlias() || isTypeName(input.LT(1).getText())))) { |
8572 | if (state.backtracking > 0) { | |
8573 | state.failed = true; | |
8574 | return retval; | |
8575 | } | |
8576 | throw new FailedPredicateException(input, "typedefName", | |
8577 | "inTypealiasAlias() || isTypeName(input.LT(1).getText())"); | |
8578 | } | |
8579 | IDENTIFIER148 = (Token) match(input, IDENTIFIER, | |
8580 | FOLLOW_IDENTIFIER_in_typedefName2917); | |
8581 | if (state.failed) { | |
8582 | return retval; | |
8583 | } | |
8584 | if (state.backtracking == 0) { | |
8585 | IDENTIFIER148_tree = (CommonTree) adaptor | |
8586 | .create(IDENTIFIER148); | |
8587 | adaptor.addChild(root_0, IDENTIFIER148_tree); | |
8588 | } | |
8589 | if (state.backtracking == 0) { | |
8590 | if ((inTypedef() || inTypealiasAlias()) | |
8591 | && !isTypeName((IDENTIFIER148 != null ? IDENTIFIER148 | |
8592 | .getText() : null))) { | |
8593 | addTypeName((IDENTIFIER148 != null ? IDENTIFIER148 | |
8594 | .getText() : null)); | |
8595 | } | |
8596 | } | |
866e5b51 FC |
8597 | |
8598 | } | |
8599 | ||
8600 | retval.stop = input.LT(-1); | |
8601 | ||
63bfc685 | 8602 | if (state.backtracking == 0) { |
866e5b51 | 8603 | |
63bfc685 MK |
8604 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
8605 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
8606 | retval.stop); | |
866e5b51 | 8607 | } |
63bfc685 | 8608 | if (state.backtracking == 0) { |
866e5b51 | 8609 | |
63bfc685 MK |
8610 | debug_print("typedefName: " |
8611 | + input.toString(retval.start, input.LT(-1))); | |
8612 | exit("typedefName"); | |
866e5b51 FC |
8613 | |
8614 | } | |
8615 | } | |
8616 | ||
63bfc685 MK |
8617 | catch (RecognitionException e) { |
8618 | throw e; | |
8619 | ||
866e5b51 FC |
8620 | } |
8621 | return retval; | |
8622 | } | |
63bfc685 | 8623 | |
866e5b51 FC |
8624 | // $ANTLR end "typedefName" |
8625 | ||
8626 | public static class typealiasTarget_return extends ParserRuleReturnScope { | |
8627 | CommonTree tree; | |
63bfc685 | 8628 | |
866e5b51 | 8629 | @Override |
63bfc685 MK |
8630 | public Object getTree() { |
8631 | return tree; | |
8632 | } | |
8633 | } | |
866e5b51 FC |
8634 | |
8635 | // $ANTLR start "typealiasTarget" | |
63bfc685 MK |
8636 | // Grammar/CTFParser.g:842:1: typealiasTarget : declarationSpecifiers ( |
8637 | // abstractDeclaratorList )? ; | |
8638 | public final CTFParser.typealiasTarget_return typealiasTarget() | |
8639 | throws RecognitionException { | |
866e5b51 FC |
8640 | CTFParser.typealiasTarget_return retval = new CTFParser.typealiasTarget_return(); |
8641 | retval.start = input.LT(1); | |
8642 | ||
8643 | CommonTree root_0 = null; | |
8644 | ||
8645 | CTFParser.declarationSpecifiers_return declarationSpecifiers149 = null; | |
8646 | ||
8647 | CTFParser.abstractDeclaratorList_return abstractDeclaratorList150 = null; | |
8648 | ||
63bfc685 | 8649 | enter("typealiasTarget"); |
866e5b51 FC |
8650 | |
8651 | try { | |
63bfc685 MK |
8652 | // Grammar/CTFParser.g:855:1: ( declarationSpecifiers ( |
8653 | // abstractDeclaratorList )? ) | |
8654 | // Grammar/CTFParser.g:856:3: declarationSpecifiers ( | |
8655 | // abstractDeclaratorList )? | |
866e5b51 | 8656 | { |
63bfc685 | 8657 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 | 8658 | |
63bfc685 MK |
8659 | pushFollow(FOLLOW_declarationSpecifiers_in_typealiasTarget2945); |
8660 | declarationSpecifiers149 = declarationSpecifiers(); | |
866e5b51 | 8661 | |
63bfc685 MK |
8662 | state._fsp--; |
8663 | if (state.failed) { | |
8664 | return retval; | |
8665 | } | |
8666 | if (state.backtracking == 0) { | |
8667 | adaptor.addChild(root_0, declarationSpecifiers149.getTree()); | |
8668 | } | |
8669 | // Grammar/CTFParser.g:856:25: ( abstractDeclaratorList )? | |
8670 | int alt49 = 2; | |
8671 | int LA49_0 = input.LA(1); | |
8672 | ||
8673 | if (((LA49_0 == LPAREN) || (LA49_0 == POINTER) || (LA49_0 == IDENTIFIER))) { | |
8674 | alt49 = 1; | |
8675 | } | |
8676 | switch (alt49) { | |
8677 | case 1: | |
8678 | // Grammar/CTFParser.g:856:25: abstractDeclaratorList | |
8679 | { | |
866e5b51 | 8680 | pushFollow(FOLLOW_abstractDeclaratorList_in_typealiasTarget2947); |
63bfc685 | 8681 | abstractDeclaratorList150 = abstractDeclaratorList(); |
866e5b51 FC |
8682 | |
8683 | state._fsp--; | |
63bfc685 MK |
8684 | if (state.failed) { |
8685 | return retval; | |
8686 | } | |
8687 | if (state.backtracking == 0) { | |
8688 | adaptor.addChild(root_0, | |
8689 | abstractDeclaratorList150.getTree()); | |
866e5b51 | 8690 | } |
866e5b51 | 8691 | |
63bfc685 MK |
8692 | } |
8693 | break; | |
866e5b51 | 8694 | |
63bfc685 | 8695 | } |
866e5b51 FC |
8696 | |
8697 | } | |
8698 | ||
8699 | retval.stop = input.LT(-1); | |
8700 | ||
63bfc685 | 8701 | if (state.backtracking == 0) { |
866e5b51 | 8702 | |
63bfc685 MK |
8703 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
8704 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
8705 | retval.stop); | |
866e5b51 | 8706 | } |
63bfc685 | 8707 | if (state.backtracking == 0) { |
866e5b51 | 8708 | |
63bfc685 | 8709 | exit("typealiasTarget"); |
866e5b51 FC |
8710 | |
8711 | } | |
8712 | } | |
8713 | ||
63bfc685 MK |
8714 | catch (RecognitionException e) { |
8715 | throw e; | |
8716 | ||
866e5b51 FC |
8717 | } |
8718 | return retval; | |
8719 | } | |
63bfc685 | 8720 | |
866e5b51 FC |
8721 | // $ANTLR end "typealiasTarget" |
8722 | ||
8723 | public static class typealiasAlias_return extends ParserRuleReturnScope { | |
8724 | CommonTree tree; | |
63bfc685 | 8725 | |
866e5b51 | 8726 | @Override |
63bfc685 MK |
8727 | public Object getTree() { |
8728 | return tree; | |
8729 | } | |
8730 | } | |
866e5b51 FC |
8731 | |
8732 | // $ANTLR start "typealiasAlias" | |
63bfc685 MK |
8733 | // Grammar/CTFParser.g:859:1: typealiasAlias : ( abstractDeclaratorList | ( |
8734 | // declarationSpecifiers ( abstractDeclaratorList )? ) ) ; | |
8735 | public final CTFParser.typealiasAlias_return typealiasAlias() | |
8736 | throws RecognitionException { | |
866e5b51 FC |
8737 | CTFParser.typealiasAlias_return retval = new CTFParser.typealiasAlias_return(); |
8738 | retval.start = input.LT(1); | |
8739 | ||
8740 | CommonTree root_0 = null; | |
8741 | ||
8742 | CTFParser.abstractDeclaratorList_return abstractDeclaratorList151 = null; | |
8743 | ||
8744 | CTFParser.declarationSpecifiers_return declarationSpecifiers152 = null; | |
8745 | ||
8746 | CTFParser.abstractDeclaratorList_return abstractDeclaratorList153 = null; | |
8747 | ||
63bfc685 MK |
8748 | enter("typealiasAlias"); |
8749 | typealiasAliasOn(); | |
866e5b51 FC |
8750 | |
8751 | try { | |
63bfc685 MK |
8752 | // Grammar/CTFParser.g:874:1: ( ( abstractDeclaratorList | ( |
8753 | // declarationSpecifiers ( abstractDeclaratorList )? ) ) ) | |
8754 | // Grammar/CTFParser.g:875:3: ( abstractDeclaratorList | ( | |
8755 | // declarationSpecifiers ( abstractDeclaratorList )? ) ) | |
866e5b51 | 8756 | { |
63bfc685 | 8757 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 | 8758 | |
63bfc685 MK |
8759 | // Grammar/CTFParser.g:875:3: ( abstractDeclaratorList | ( |
8760 | // declarationSpecifiers ( abstractDeclaratorList )? ) ) | |
8761 | int alt51 = 2; | |
8762 | switch (input.LA(1)) { | |
8763 | case LPAREN: | |
8764 | case POINTER: { | |
8765 | alt51 = 1; | |
866e5b51 | 8766 | } |
63bfc685 MK |
8767 | break; |
8768 | case IDENTIFIER: { | |
8769 | int LA51_2 = input.LA(2); | |
8770 | ||
8771 | if ((!(((inTypealiasAlias() || isTypeName(input.LT(1) | |
8772 | .getText())))))) { | |
8773 | alt51 = 1; | |
8774 | } else if (((inTypealiasAlias() || isTypeName(input.LT(1) | |
8775 | .getText())))) { | |
8776 | alt51 = 2; | |
8777 | } else { | |
8778 | if (state.backtracking > 0) { | |
8779 | state.failed = true; | |
8780 | return retval; | |
8781 | } | |
8782 | NoViableAltException nvae = new NoViableAltException( | |
8783 | "", 51, 2, input); | |
866e5b51 | 8784 | |
63bfc685 MK |
8785 | throw nvae; |
8786 | } | |
866e5b51 | 8787 | } |
63bfc685 MK |
8788 | break; |
8789 | case CONSTTOK: | |
8790 | case CHARTOK: | |
8791 | case DOUBLETOK: | |
8792 | case ENUMTOK: | |
8793 | case FLOATINGPOINTTOK: | |
8794 | case FLOATTOK: | |
8795 | case INTEGERTOK: | |
8796 | case INTTOK: | |
8797 | case LONGTOK: | |
8798 | case SHORTTOK: | |
8799 | case SIGNEDTOK: | |
8800 | case STRINGTOK: | |
8801 | case STRUCTTOK: | |
8802 | case TYPEDEFTOK: | |
8803 | case UNSIGNEDTOK: | |
8804 | case VARIANTTOK: | |
8805 | case VOIDTOK: | |
8806 | case BOOLTOK: | |
8807 | case COMPLEXTOK: | |
8808 | case IMAGINARYTOK: { | |
8809 | alt51 = 2; | |
866e5b51 | 8810 | } |
63bfc685 MK |
8811 | break; |
8812 | default: | |
8813 | if (state.backtracking > 0) { | |
8814 | state.failed = true; | |
8815 | return retval; | |
8816 | } | |
8817 | NoViableAltException nvae = new NoViableAltException("", | |
8818 | 51, 0, input); | |
866e5b51 FC |
8819 | |
8820 | throw nvae; | |
8821 | } | |
866e5b51 | 8822 | |
63bfc685 MK |
8823 | switch (alt51) { |
8824 | case 1: | |
8825 | // Grammar/CTFParser.g:876:3: abstractDeclaratorList | |
8826 | { | |
866e5b51 | 8827 | pushFollow(FOLLOW_abstractDeclaratorList_in_typealiasAlias2980); |
63bfc685 | 8828 | abstractDeclaratorList151 = abstractDeclaratorList(); |
866e5b51 FC |
8829 | |
8830 | state._fsp--; | |
63bfc685 MK |
8831 | if (state.failed) { |
8832 | return retval; | |
8833 | } | |
8834 | if (state.backtracking == 0) { | |
8835 | adaptor.addChild(root_0, | |
8836 | abstractDeclaratorList151.getTree()); | |
866e5b51 | 8837 | } |
63bfc685 MK |
8838 | |
8839 | } | |
866e5b51 | 8840 | break; |
63bfc685 MK |
8841 | case 2: |
8842 | // Grammar/CTFParser.g:878:3: ( declarationSpecifiers ( | |
8843 | // abstractDeclaratorList )? ) | |
8844 | { | |
8845 | // Grammar/CTFParser.g:878:3: ( declarationSpecifiers ( | |
8846 | // abstractDeclaratorList )? ) | |
8847 | // Grammar/CTFParser.g:878:4: declarationSpecifiers ( | |
8848 | // abstractDeclaratorList )? | |
866e5b51 | 8849 | { |
63bfc685 MK |
8850 | pushFollow(FOLLOW_declarationSpecifiers_in_typealiasAlias2989); |
8851 | declarationSpecifiers152 = declarationSpecifiers(); | |
866e5b51 | 8852 | |
63bfc685 MK |
8853 | state._fsp--; |
8854 | if (state.failed) { | |
8855 | return retval; | |
8856 | } | |
8857 | if (state.backtracking == 0) { | |
8858 | adaptor.addChild(root_0, | |
8859 | declarationSpecifiers152.getTree()); | |
8860 | } | |
8861 | // Grammar/CTFParser.g:878:26: ( abstractDeclaratorList | |
8862 | // )? | |
8863 | int alt50 = 2; | |
8864 | int LA50_0 = input.LA(1); | |
8865 | ||
8866 | if (((LA50_0 == LPAREN) || (LA50_0 == POINTER) || (LA50_0 == IDENTIFIER))) { | |
8867 | alt50 = 1; | |
8868 | } | |
8869 | switch (alt50) { | |
8870 | case 1: | |
8871 | // Grammar/CTFParser.g:878:26: abstractDeclaratorList | |
8872 | { | |
866e5b51 | 8873 | pushFollow(FOLLOW_abstractDeclaratorList_in_typealiasAlias2991); |
63bfc685 | 8874 | abstractDeclaratorList153 = abstractDeclaratorList(); |
866e5b51 FC |
8875 | |
8876 | state._fsp--; | |
63bfc685 MK |
8877 | if (state.failed) { |
8878 | return retval; | |
8879 | } | |
8880 | if (state.backtracking == 0) { | |
8881 | adaptor.addChild(root_0, | |
8882 | abstractDeclaratorList153.getTree()); | |
866e5b51 | 8883 | } |
866e5b51 | 8884 | |
63bfc685 MK |
8885 | } |
8886 | break; | |
866e5b51 | 8887 | |
63bfc685 | 8888 | } |
866e5b51 FC |
8889 | |
8890 | } | |
8891 | ||
63bfc685 | 8892 | } |
866e5b51 FC |
8893 | break; |
8894 | ||
63bfc685 | 8895 | } |
866e5b51 FC |
8896 | |
8897 | } | |
8898 | ||
8899 | retval.stop = input.LT(-1); | |
8900 | ||
63bfc685 | 8901 | if (state.backtracking == 0) { |
866e5b51 | 8902 | |
63bfc685 MK |
8903 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
8904 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
8905 | retval.stop); | |
866e5b51 | 8906 | } |
63bfc685 | 8907 | if (state.backtracking == 0) { |
866e5b51 FC |
8908 | |
8909 | exit("typealiasAlias"); | |
8910 | typealiasAliasOff(); | |
8911 | ||
8912 | } | |
8913 | } | |
8914 | ||
63bfc685 MK |
8915 | catch (RecognitionException e) { |
8916 | throw e; | |
8917 | ||
866e5b51 FC |
8918 | } |
8919 | return retval; | |
8920 | } | |
63bfc685 | 8921 | |
866e5b51 FC |
8922 | // $ANTLR end "typealiasAlias" |
8923 | ||
8924 | public static class typealiasDecl_return extends ParserRuleReturnScope { | |
8925 | CommonTree tree; | |
63bfc685 | 8926 | |
866e5b51 | 8927 | @Override |
63bfc685 MK |
8928 | public Object getTree() { |
8929 | return tree; | |
8930 | } | |
8931 | } | |
866e5b51 FC |
8932 | |
8933 | // $ANTLR start "typealiasDecl" | |
63bfc685 MK |
8934 | // Grammar/CTFParser.g:882:1: typealiasDecl : TYPEALIASTOK typealiasTarget |
8935 | // TYPE_ASSIGNMENT typealiasAlias -> ^( TYPEALIAS ^( TYPEALIAS_TARGET | |
8936 | // typealiasTarget ) ^( TYPEALIAS_ALIAS typealiasAlias ) ) ; | |
8937 | public final CTFParser.typealiasDecl_return typealiasDecl() | |
8938 | throws RecognitionException { | |
866e5b51 FC |
8939 | CTFParser.typealiasDecl_return retval = new CTFParser.typealiasDecl_return(); |
8940 | retval.start = input.LT(1); | |
8941 | ||
8942 | CommonTree root_0 = null; | |
8943 | ||
63bfc685 MK |
8944 | Token TYPEALIASTOK154 = null; |
8945 | Token TYPE_ASSIGNMENT156 = null; | |
866e5b51 FC |
8946 | CTFParser.typealiasTarget_return typealiasTarget155 = null; |
8947 | ||
8948 | CTFParser.typealiasAlias_return typealiasAlias157 = null; | |
8949 | ||
63bfc685 MK |
8950 | CommonTree TYPEALIASTOK154_tree = null; |
8951 | CommonTree TYPE_ASSIGNMENT156_tree = null; | |
8952 | RewriteRuleTokenStream stream_TYPE_ASSIGNMENT = new RewriteRuleTokenStream( | |
8953 | adaptor, "token TYPE_ASSIGNMENT"); | |
8954 | RewriteRuleTokenStream stream_TYPEALIASTOK = new RewriteRuleTokenStream( | |
8955 | adaptor, "token TYPEALIASTOK"); | |
8956 | RewriteRuleSubtreeStream stream_typealiasAlias = new RewriteRuleSubtreeStream( | |
8957 | adaptor, "rule typealiasAlias"); | |
8958 | RewriteRuleSubtreeStream stream_typealiasTarget = new RewriteRuleSubtreeStream( | |
8959 | adaptor, "rule typealiasTarget"); | |
866e5b51 | 8960 | |
63bfc685 | 8961 | enter("typealiasDecl"); |
866e5b51 FC |
8962 | |
8963 | try { | |
63bfc685 MK |
8964 | // Grammar/CTFParser.g:889:1: ( TYPEALIASTOK typealiasTarget |
8965 | // TYPE_ASSIGNMENT typealiasAlias -> ^( TYPEALIAS ^( | |
8966 | // TYPEALIAS_TARGET typealiasTarget ) ^( TYPEALIAS_ALIAS | |
8967 | // typealiasAlias ) ) ) | |
8968 | // Grammar/CTFParser.g:890:3: TYPEALIASTOK typealiasTarget | |
8969 | // TYPE_ASSIGNMENT typealiasAlias | |
866e5b51 | 8970 | { |
63bfc685 MK |
8971 | TYPEALIASTOK154 = (Token) match(input, TYPEALIASTOK, |
8972 | FOLLOW_TYPEALIASTOK_in_typealiasDecl3023); | |
8973 | if (state.failed) { | |
8974 | return retval; | |
8975 | } | |
8976 | if (state.backtracking == 0) { | |
8977 | stream_TYPEALIASTOK.add(TYPEALIASTOK154); | |
8978 | } | |
866e5b51 | 8979 | |
63bfc685 MK |
8980 | pushFollow(FOLLOW_typealiasTarget_in_typealiasDecl3025); |
8981 | typealiasTarget155 = typealiasTarget(); | |
866e5b51 | 8982 | |
63bfc685 MK |
8983 | state._fsp--; |
8984 | if (state.failed) { | |
8985 | return retval; | |
8986 | } | |
8987 | if (state.backtracking == 0) { | |
8988 | stream_typealiasTarget.add(typealiasTarget155.getTree()); | |
8989 | } | |
8990 | TYPE_ASSIGNMENT156 = (Token) match(input, TYPE_ASSIGNMENT, | |
8991 | FOLLOW_TYPE_ASSIGNMENT_in_typealiasDecl3027); | |
8992 | if (state.failed) { | |
8993 | return retval; | |
8994 | } | |
8995 | if (state.backtracking == 0) { | |
8996 | stream_TYPE_ASSIGNMENT.add(TYPE_ASSIGNMENT156); | |
8997 | } | |
866e5b51 | 8998 | |
63bfc685 MK |
8999 | pushFollow(FOLLOW_typealiasAlias_in_typealiasDecl3029); |
9000 | typealiasAlias157 = typealiasAlias(); | |
866e5b51 | 9001 | |
63bfc685 MK |
9002 | state._fsp--; |
9003 | if (state.failed) { | |
9004 | return retval; | |
9005 | } | |
9006 | if (state.backtracking == 0) { | |
9007 | stream_typealiasAlias.add(typealiasAlias157.getTree()); | |
9008 | } | |
866e5b51 | 9009 | |
63bfc685 MK |
9010 | // AST REWRITE |
9011 | // elements: typealiasTarget, typealiasAlias | |
9012 | // token labels: | |
9013 | // rule labels: retval | |
9014 | // token list labels: | |
9015 | // rule list labels: | |
9016 | // wildcard labels: | |
9017 | if (state.backtracking == 0) { | |
9018 | retval.tree = root_0; | |
9019 | // RewriteRuleSubtreeStream stream_retval = | |
9020 | new RewriteRuleSubtreeStream( | |
9021 | adaptor, "rule retval", | |
9022 | retval != null ? retval.tree : null); | |
9023 | ||
9024 | root_0 = (CommonTree) adaptor.nil(); | |
9025 | // 891:3: -> ^( TYPEALIAS ^( TYPEALIAS_TARGET | |
9026 | // typealiasTarget ) ^( TYPEALIAS_ALIAS typealiasAlias ) ) | |
9027 | { | |
9028 | // Grammar/CTFParser.g:891:6: ^( TYPEALIAS ^( | |
9029 | // TYPEALIAS_TARGET typealiasTarget ) ^( TYPEALIAS_ALIAS | |
9030 | // typealiasAlias ) ) | |
9031 | { | |
9032 | CommonTree root_1 = (CommonTree) adaptor.nil(); | |
9033 | root_1 = (CommonTree) adaptor.becomeRoot( | |
9034 | adaptor.create(TYPEALIAS, "TYPEALIAS"), | |
9035 | root_1); | |
9036 | ||
9037 | // Grammar/CTFParser.g:891:18: ^( TYPEALIAS_TARGET | |
9038 | // typealiasTarget ) | |
9039 | { | |
9040 | CommonTree root_2 = (CommonTree) adaptor.nil(); | |
9041 | root_2 = (CommonTree) adaptor.becomeRoot( | |
9042 | adaptor.create(TYPEALIAS_TARGET, | |
9043 | "TYPEALIAS_TARGET"), root_2); | |
9044 | ||
9045 | adaptor.addChild(root_2, | |
9046 | stream_typealiasTarget.nextTree()); | |
9047 | ||
9048 | adaptor.addChild(root_1, root_2); | |
9049 | } | |
9050 | // Grammar/CTFParser.g:891:54: ^( TYPEALIAS_ALIAS | |
9051 | // typealiasAlias ) | |
9052 | { | |
9053 | CommonTree root_2 = (CommonTree) adaptor.nil(); | |
9054 | root_2 = (CommonTree) adaptor.becomeRoot( | |
9055 | adaptor.create(TYPEALIAS_ALIAS, | |
9056 | "TYPEALIAS_ALIAS"), root_2); | |
866e5b51 | 9057 | |
63bfc685 MK |
9058 | adaptor.addChild(root_2, |
9059 | stream_typealiasAlias.nextTree()); | |
866e5b51 | 9060 | |
63bfc685 MK |
9061 | adaptor.addChild(root_1, root_2); |
9062 | } | |
866e5b51 | 9063 | |
63bfc685 MK |
9064 | adaptor.addChild(root_0, root_1); |
9065 | } | |
866e5b51 | 9066 | |
63bfc685 | 9067 | } |
866e5b51 | 9068 | |
63bfc685 | 9069 | retval.tree = root_0; |
866e5b51 | 9070 | } |
866e5b51 FC |
9071 | } |
9072 | ||
9073 | retval.stop = input.LT(-1); | |
9074 | ||
63bfc685 | 9075 | if (state.backtracking == 0) { |
866e5b51 | 9076 | |
63bfc685 MK |
9077 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
9078 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
9079 | retval.stop); | |
866e5b51 | 9080 | } |
63bfc685 | 9081 | if (state.backtracking == 0) { |
866e5b51 FC |
9082 | |
9083 | exit("typealiasDecl"); | |
9084 | ||
9085 | } | |
9086 | } | |
9087 | ||
63bfc685 MK |
9088 | catch (RecognitionException e) { |
9089 | throw e; | |
9090 | ||
866e5b51 FC |
9091 | } |
9092 | return retval; | |
9093 | } | |
63bfc685 | 9094 | |
866e5b51 FC |
9095 | // $ANTLR end "typealiasDecl" |
9096 | ||
9097 | public static class ctfKeyword_return extends ParserRuleReturnScope { | |
9098 | CommonTree tree; | |
63bfc685 | 9099 | |
866e5b51 | 9100 | @Override |
63bfc685 MK |
9101 | public Object getTree() { |
9102 | return tree; | |
9103 | } | |
9104 | } | |
866e5b51 FC |
9105 | |
9106 | // $ANTLR start "ctfKeyword" | |
63bfc685 MK |
9107 | // Grammar/CTFParser.g:897:1: ctfKeyword : ( ALIGNTOK | EVENTTOK | SIGNEDTOK |
9108 | // | STRINGTOK ); | |
9109 | public final CTFParser.ctfKeyword_return ctfKeyword() | |
9110 | throws RecognitionException { | |
866e5b51 FC |
9111 | CTFParser.ctfKeyword_return retval = new CTFParser.ctfKeyword_return(); |
9112 | retval.start = input.LT(1); | |
9113 | ||
9114 | CommonTree root_0 = null; | |
9115 | ||
63bfc685 | 9116 | Token set158 = null; |
866e5b51 | 9117 | |
63bfc685 | 9118 | CommonTree set158_tree = null; |
866e5b51 | 9119 | |
63bfc685 | 9120 | enter("ctfKeyword"); |
866e5b51 FC |
9121 | |
9122 | try { | |
63bfc685 MK |
9123 | // Grammar/CTFParser.g:905:1: ( ALIGNTOK | EVENTTOK | SIGNEDTOK | |
9124 | // STRINGTOK ) | |
866e5b51 FC |
9125 | // Grammar/CTFParser.g: |
9126 | { | |
63bfc685 | 9127 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 | 9128 | |
63bfc685 MK |
9129 | set158 = input.LT(1); |
9130 | if ((input.LA(1) == ALIGNTOK) || (input.LA(1) == EVENTTOK) | |
9131 | || (input.LA(1) == SIGNEDTOK) | |
9132 | || (input.LA(1) == STRINGTOK)) { | |
9133 | input.consume(); | |
9134 | if (state.backtracking == 0) { | |
9135 | adaptor.addChild(root_0, adaptor.create(set158)); | |
9136 | } | |
9137 | state.errorRecovery = false; | |
9138 | state.failed = false; | |
9139 | } else { | |
9140 | if (state.backtracking > 0) { | |
9141 | state.failed = true; | |
9142 | return retval; | |
9143 | } | |
9144 | MismatchedSetException mse = new MismatchedSetException( | |
9145 | null, input); | |
9146 | throw mse; | |
9147 | } | |
866e5b51 FC |
9148 | |
9149 | } | |
9150 | ||
9151 | retval.stop = input.LT(-1); | |
9152 | ||
63bfc685 | 9153 | if (state.backtracking == 0) { |
866e5b51 | 9154 | |
63bfc685 MK |
9155 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
9156 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
9157 | retval.stop); | |
866e5b51 | 9158 | } |
63bfc685 | 9159 | if (state.backtracking == 0) { |
866e5b51 | 9160 | |
63bfc685 | 9161 | debug_print(input.toString(retval.start, input.LT(-1))); |
866e5b51 FC |
9162 | exit("ctfKeyword"); |
9163 | ||
9164 | } | |
9165 | } | |
9166 | ||
63bfc685 MK |
9167 | catch (RecognitionException e) { |
9168 | throw e; | |
9169 | ||
866e5b51 FC |
9170 | } |
9171 | return retval; | |
9172 | } | |
63bfc685 | 9173 | |
866e5b51 FC |
9174 | // $ANTLR end "ctfKeyword" |
9175 | ||
9176 | public static class ctfSpecifier_return extends ParserRuleReturnScope { | |
9177 | CommonTree tree; | |
63bfc685 | 9178 | |
866e5b51 | 9179 | @Override |
63bfc685 MK |
9180 | public Object getTree() { |
9181 | return tree; | |
9182 | } | |
9183 | } | |
866e5b51 FC |
9184 | |
9185 | // $ANTLR start "ctfSpecifier" | |
63bfc685 MK |
9186 | // Grammar/CTFParser.g:912:1: ctfSpecifier : ( ctfSpecifierHead ctfBody -> |
9187 | // ^( ctfSpecifierHead ctfBody ) | typealiasDecl -> ^( DECLARATION | |
9188 | // typealiasDecl ) ); | |
9189 | public final CTFParser.ctfSpecifier_return ctfSpecifier() | |
9190 | throws RecognitionException { | |
866e5b51 FC |
9191 | CTFParser.ctfSpecifier_return retval = new CTFParser.ctfSpecifier_return(); |
9192 | retval.start = input.LT(1); | |
9193 | ||
9194 | CommonTree root_0 = null; | |
9195 | ||
9196 | CTFParser.ctfSpecifierHead_return ctfSpecifierHead159 = null; | |
9197 | ||
9198 | CTFParser.ctfBody_return ctfBody160 = null; | |
9199 | ||
9200 | CTFParser.typealiasDecl_return typealiasDecl161 = null; | |
9201 | ||
63bfc685 MK |
9202 | RewriteRuleSubtreeStream stream_ctfSpecifierHead = new RewriteRuleSubtreeStream( |
9203 | adaptor, "rule ctfSpecifierHead"); | |
9204 | RewriteRuleSubtreeStream stream_typealiasDecl = new RewriteRuleSubtreeStream( | |
9205 | adaptor, "rule typealiasDecl"); | |
9206 | RewriteRuleSubtreeStream stream_ctfBody = new RewriteRuleSubtreeStream( | |
9207 | adaptor, "rule ctfBody"); | |
866e5b51 | 9208 | |
63bfc685 | 9209 | enter("ctfSpecifier"); |
866e5b51 FC |
9210 | |
9211 | try { | |
63bfc685 MK |
9212 | // Grammar/CTFParser.g:919:3: ( ctfSpecifierHead ctfBody -> ^( |
9213 | // ctfSpecifierHead ctfBody ) | typealiasDecl -> ^( DECLARATION | |
9214 | // typealiasDecl ) ) | |
9215 | int alt52 = 2; | |
866e5b51 FC |
9216 | int LA52_0 = input.LA(1); |
9217 | ||
63bfc685 MK |
9218 | if (((LA52_0 == EVENTTOK) || (LA52_0 == STREAMTOK) |
9219 | || (LA52_0 == TRACETOK) || ((LA52_0 >= ENVTOK) && (LA52_0 <= CLOCKTOK)))) { | |
9220 | alt52 = 1; | |
9221 | } else if ((LA52_0 == TYPEALIASTOK)) { | |
9222 | alt52 = 2; | |
9223 | } else { | |
9224 | if (state.backtracking > 0) { | |
9225 | state.failed = true; | |
9226 | return retval; | |
9227 | } | |
9228 | NoViableAltException nvae = new NoViableAltException("", 52, 0, | |
9229 | input); | |
866e5b51 FC |
9230 | |
9231 | throw nvae; | |
9232 | } | |
9233 | switch (alt52) { | |
63bfc685 MK |
9234 | case 1: |
9235 | // Grammar/CTFParser.g:921:3: ctfSpecifierHead ctfBody | |
9236 | { | |
9237 | pushFollow(FOLLOW_ctfSpecifierHead_in_ctfSpecifier3123); | |
9238 | ctfSpecifierHead159 = ctfSpecifierHead(); | |
866e5b51 | 9239 | |
63bfc685 MK |
9240 | state._fsp--; |
9241 | if (state.failed) { | |
9242 | return retval; | |
9243 | } | |
9244 | if (state.backtracking == 0) { | |
9245 | stream_ctfSpecifierHead.add(ctfSpecifierHead159.getTree()); | |
9246 | } | |
9247 | pushFollow(FOLLOW_ctfBody_in_ctfSpecifier3125); | |
9248 | ctfBody160 = ctfBody(); | |
866e5b51 | 9249 | |
63bfc685 MK |
9250 | state._fsp--; |
9251 | if (state.failed) { | |
9252 | return retval; | |
9253 | } | |
9254 | if (state.backtracking == 0) { | |
9255 | stream_ctfBody.add(ctfBody160.getTree()); | |
9256 | } | |
866e5b51 | 9257 | |
63bfc685 MK |
9258 | // AST REWRITE |
9259 | // elements: ctfBody, ctfSpecifierHead | |
9260 | // token labels: | |
9261 | // rule labels: retval | |
9262 | // token list labels: | |
9263 | // rule list labels: | |
9264 | // wildcard labels: | |
9265 | if (state.backtracking == 0) { | |
866e5b51 | 9266 | retval.tree = root_0; |
63bfc685 MK |
9267 | // RewriteRuleSubtreeStream stream_retval = |
9268 | new RewriteRuleSubtreeStream( | |
9269 | adaptor, "rule retval", | |
9270 | retval != null ? retval.tree : null); | |
866e5b51 | 9271 | |
63bfc685 | 9272 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 FC |
9273 | // 921:28: -> ^( ctfSpecifierHead ctfBody ) |
9274 | { | |
63bfc685 MK |
9275 | // Grammar/CTFParser.g:921:31: ^( ctfSpecifierHead |
9276 | // ctfBody ) | |
866e5b51 | 9277 | { |
63bfc685 MK |
9278 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
9279 | root_1 = (CommonTree) adaptor.becomeRoot( | |
9280 | stream_ctfSpecifierHead.nextNode(), root_1); | |
866e5b51 | 9281 | |
63bfc685 | 9282 | adaptor.addChild(root_1, stream_ctfBody.nextTree()); |
866e5b51 | 9283 | |
63bfc685 | 9284 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
9285 | } |
9286 | ||
9287 | } | |
9288 | ||
63bfc685 MK |
9289 | retval.tree = root_0; |
9290 | } | |
9291 | } | |
9292 | break; | |
9293 | case 2: | |
9294 | // Grammar/CTFParser.g:924:3: typealiasDecl | |
9295 | { | |
9296 | pushFollow(FOLLOW_typealiasDecl_in_ctfSpecifier3144); | |
9297 | typealiasDecl161 = typealiasDecl(); | |
866e5b51 | 9298 | |
63bfc685 MK |
9299 | state._fsp--; |
9300 | if (state.failed) { | |
9301 | return retval; | |
9302 | } | |
9303 | if (state.backtracking == 0) { | |
9304 | stream_typealiasDecl.add(typealiasDecl161.getTree()); | |
9305 | } | |
866e5b51 | 9306 | |
63bfc685 MK |
9307 | // AST REWRITE |
9308 | // elements: typealiasDecl | |
9309 | // token labels: | |
9310 | // rule labels: retval | |
9311 | // token list labels: | |
9312 | // rule list labels: | |
9313 | // wildcard labels: | |
9314 | if (state.backtracking == 0) { | |
866e5b51 | 9315 | retval.tree = root_0; |
63bfc685 MK |
9316 | // RewriteRuleSubtreeStream stream_retval = |
9317 | new RewriteRuleSubtreeStream( | |
9318 | adaptor, "rule retval", | |
9319 | retval != null ? retval.tree : null); | |
866e5b51 | 9320 | |
63bfc685 | 9321 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 FC |
9322 | // 924:17: -> ^( DECLARATION typealiasDecl ) |
9323 | { | |
63bfc685 MK |
9324 | // Grammar/CTFParser.g:924:20: ^( DECLARATION |
9325 | // typealiasDecl ) | |
866e5b51 | 9326 | { |
63bfc685 MK |
9327 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
9328 | root_1 = (CommonTree) adaptor.becomeRoot( | |
9329 | adaptor.create(DECLARATION, "DECLARATION"), | |
9330 | root_1); | |
866e5b51 | 9331 | |
63bfc685 MK |
9332 | adaptor.addChild(root_1, |
9333 | stream_typealiasDecl.nextTree()); | |
866e5b51 | 9334 | |
63bfc685 | 9335 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
9336 | } |
9337 | ||
9338 | } | |
9339 | ||
63bfc685 MK |
9340 | retval.tree = root_0; |
9341 | } | |
9342 | } | |
9343 | break; | |
866e5b51 FC |
9344 | |
9345 | } | |
9346 | retval.stop = input.LT(-1); | |
9347 | ||
63bfc685 | 9348 | if (state.backtracking == 0) { |
866e5b51 | 9349 | |
63bfc685 MK |
9350 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
9351 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
9352 | retval.stop); | |
866e5b51 | 9353 | } |
63bfc685 | 9354 | if (state.backtracking == 0) { |
866e5b51 FC |
9355 | |
9356 | exit("ctfSpecifier"); | |
9357 | ||
9358 | } | |
9359 | } | |
9360 | ||
63bfc685 MK |
9361 | catch (RecognitionException e) { |
9362 | throw e; | |
9363 | ||
866e5b51 FC |
9364 | } |
9365 | return retval; | |
9366 | } | |
63bfc685 | 9367 | |
866e5b51 FC |
9368 | // $ANTLR end "ctfSpecifier" |
9369 | ||
9370 | public static class ctfSpecifierHead_return extends ParserRuleReturnScope { | |
9371 | CommonTree tree; | |
63bfc685 | 9372 | |
866e5b51 | 9373 | @Override |
63bfc685 MK |
9374 | public Object getTree() { |
9375 | return tree; | |
9376 | } | |
9377 | } | |
866e5b51 FC |
9378 | |
9379 | // $ANTLR start "ctfSpecifierHead" | |
63bfc685 MK |
9380 | // Grammar/CTFParser.g:927:1: ctfSpecifierHead : ( EVENTTOK -> EVENT | |
9381 | // STREAMTOK -> STREAM | TRACETOK -> TRACE | ENVTOK -> ENV | CLOCKTOK -> | |
9382 | // CLOCK ); | |
9383 | public final CTFParser.ctfSpecifierHead_return ctfSpecifierHead() | |
9384 | throws RecognitionException { | |
866e5b51 FC |
9385 | CTFParser.ctfSpecifierHead_return retval = new CTFParser.ctfSpecifierHead_return(); |
9386 | retval.start = input.LT(1); | |
9387 | ||
9388 | CommonTree root_0 = null; | |
9389 | ||
63bfc685 MK |
9390 | Token EVENTTOK162 = null; |
9391 | Token STREAMTOK163 = null; | |
9392 | Token TRACETOK164 = null; | |
9393 | Token ENVTOK165 = null; | |
9394 | Token CLOCKTOK166 = null; | |
9395 | ||
9396 | CommonTree EVENTTOK162_tree = null; | |
9397 | CommonTree STREAMTOK163_tree = null; | |
9398 | CommonTree TRACETOK164_tree = null; | |
9399 | CommonTree ENVTOK165_tree = null; | |
9400 | CommonTree CLOCKTOK166_tree = null; | |
9401 | RewriteRuleTokenStream stream_EVENTTOK = new RewriteRuleTokenStream( | |
9402 | adaptor, "token EVENTTOK"); | |
9403 | RewriteRuleTokenStream stream_STREAMTOK = new RewriteRuleTokenStream( | |
9404 | adaptor, "token STREAMTOK"); | |
9405 | RewriteRuleTokenStream stream_ENVTOK = new RewriteRuleTokenStream( | |
9406 | adaptor, "token ENVTOK"); | |
9407 | RewriteRuleTokenStream stream_CLOCKTOK = new RewriteRuleTokenStream( | |
9408 | adaptor, "token CLOCKTOK"); | |
9409 | RewriteRuleTokenStream stream_TRACETOK = new RewriteRuleTokenStream( | |
9410 | adaptor, "token TRACETOK"); | |
9411 | ||
9412 | enter("ctfSpecifierHead"); | |
866e5b51 FC |
9413 | |
9414 | try { | |
63bfc685 MK |
9415 | // Grammar/CTFParser.g:935:1: ( EVENTTOK -> EVENT | STREAMTOK -> |
9416 | // STREAM | TRACETOK -> TRACE | ENVTOK -> ENV | CLOCKTOK -> CLOCK ) | |
9417 | int alt53 = 5; | |
9418 | switch (input.LA(1)) { | |
9419 | case EVENTTOK: { | |
9420 | alt53 = 1; | |
9421 | } | |
866e5b51 | 9422 | break; |
63bfc685 MK |
9423 | case STREAMTOK: { |
9424 | alt53 = 2; | |
9425 | } | |
866e5b51 | 9426 | break; |
63bfc685 MK |
9427 | case TRACETOK: { |
9428 | alt53 = 3; | |
9429 | } | |
866e5b51 | 9430 | break; |
63bfc685 MK |
9431 | case ENVTOK: { |
9432 | alt53 = 4; | |
9433 | } | |
866e5b51 | 9434 | break; |
63bfc685 MK |
9435 | case CLOCKTOK: { |
9436 | alt53 = 5; | |
9437 | } | |
866e5b51 FC |
9438 | break; |
9439 | default: | |
63bfc685 MK |
9440 | if (state.backtracking > 0) { |
9441 | state.failed = true; | |
9442 | return retval; | |
9443 | } | |
9444 | NoViableAltException nvae = new NoViableAltException("", 53, 0, | |
9445 | input); | |
866e5b51 FC |
9446 | |
9447 | throw nvae; | |
9448 | } | |
9449 | ||
9450 | switch (alt53) { | |
63bfc685 MK |
9451 | case 1: |
9452 | // Grammar/CTFParser.g:936:4: EVENTTOK | |
9453 | { | |
9454 | EVENTTOK162 = (Token) match(input, EVENTTOK, | |
9455 | FOLLOW_EVENTTOK_in_ctfSpecifierHead3176); | |
9456 | if (state.failed) { | |
9457 | return retval; | |
9458 | } | |
9459 | if (state.backtracking == 0) { | |
9460 | stream_EVENTTOK.add(EVENTTOK162); | |
9461 | } | |
9462 | ||
9463 | // AST REWRITE | |
9464 | // elements: | |
9465 | // token labels: | |
9466 | // rule labels: retval | |
9467 | // token list labels: | |
9468 | // rule list labels: | |
9469 | // wildcard labels: | |
9470 | if (state.backtracking == 0) { | |
866e5b51 | 9471 | retval.tree = root_0; |
63bfc685 MK |
9472 | RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream( |
9473 | adaptor, "rule retval", | |
9474 | retval != null ? retval.tree : null); | |
866e5b51 | 9475 | |
63bfc685 | 9476 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 FC |
9477 | // 936:13: -> EVENT |
9478 | { | |
63bfc685 | 9479 | adaptor.addChild(root_0, adaptor.create(EVENT, "EVENT")); |
866e5b51 | 9480 | |
866e5b51 | 9481 | } |
866e5b51 | 9482 | |
866e5b51 | 9483 | retval.tree = root_0; |
63bfc685 MK |
9484 | } |
9485 | } | |
9486 | break; | |
9487 | case 2: | |
9488 | // Grammar/CTFParser.g:937:4: STREAMTOK | |
9489 | { | |
9490 | STREAMTOK163 = (Token) match(input, STREAMTOK, | |
9491 | FOLLOW_STREAMTOK_in_ctfSpecifierHead3185); | |
9492 | if (state.failed) { | |
9493 | return retval; | |
9494 | } | |
9495 | if (state.backtracking == 0) { | |
9496 | stream_STREAMTOK.add(STREAMTOK163); | |
9497 | } | |
9498 | ||
9499 | // AST REWRITE | |
9500 | // elements: | |
9501 | // token labels: | |
9502 | // rule labels: retval | |
9503 | // token list labels: | |
9504 | // rule list labels: | |
9505 | // wildcard labels: | |
9506 | if (state.backtracking == 0) { | |
9507 | retval.tree = root_0; | |
9508 | RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream( | |
9509 | adaptor, "rule retval", | |
9510 | retval != null ? retval.tree : null); | |
866e5b51 | 9511 | |
63bfc685 | 9512 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 FC |
9513 | // 937:14: -> STREAM |
9514 | { | |
63bfc685 MK |
9515 | adaptor.addChild(root_0, |
9516 | adaptor.create(STREAM, "STREAM")); | |
866e5b51 FC |
9517 | |
9518 | } | |
9519 | ||
866e5b51 | 9520 | retval.tree = root_0; |
63bfc685 MK |
9521 | } |
9522 | } | |
9523 | break; | |
9524 | case 3: | |
9525 | // Grammar/CTFParser.g:938:4: TRACETOK | |
9526 | { | |
9527 | TRACETOK164 = (Token) match(input, TRACETOK, | |
9528 | FOLLOW_TRACETOK_in_ctfSpecifierHead3194); | |
9529 | if (state.failed) { | |
9530 | return retval; | |
9531 | } | |
9532 | if (state.backtracking == 0) { | |
9533 | stream_TRACETOK.add(TRACETOK164); | |
9534 | } | |
9535 | ||
9536 | // AST REWRITE | |
9537 | // elements: | |
9538 | // token labels: | |
9539 | // rule labels: retval | |
9540 | // token list labels: | |
9541 | // rule list labels: | |
9542 | // wildcard labels: | |
9543 | if (state.backtracking == 0) { | |
9544 | retval.tree = root_0; | |
9545 | // RewriteRuleSubtreeStream stream_retval = | |
9546 | new RewriteRuleSubtreeStream( | |
9547 | adaptor, "rule retval", | |
9548 | retval != null ? retval.tree : null); | |
866e5b51 | 9549 | |
63bfc685 | 9550 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 FC |
9551 | // 938:13: -> TRACE |
9552 | { | |
63bfc685 | 9553 | adaptor.addChild(root_0, adaptor.create(TRACE, "TRACE")); |
866e5b51 | 9554 | |
866e5b51 | 9555 | } |
866e5b51 | 9556 | |
866e5b51 | 9557 | retval.tree = root_0; |
63bfc685 MK |
9558 | } |
9559 | } | |
9560 | break; | |
9561 | case 4: | |
9562 | // Grammar/CTFParser.g:939:4: ENVTOK | |
9563 | { | |
9564 | ENVTOK165 = (Token) match(input, ENVTOK, | |
9565 | FOLLOW_ENVTOK_in_ctfSpecifierHead3203); | |
9566 | if (state.failed) { | |
9567 | return retval; | |
9568 | } | |
9569 | if (state.backtracking == 0) { | |
9570 | stream_ENVTOK.add(ENVTOK165); | |
9571 | } | |
9572 | ||
9573 | // AST REWRITE | |
9574 | // elements: | |
9575 | // token labels: | |
9576 | // rule labels: retval | |
9577 | // token list labels: | |
9578 | // rule list labels: | |
9579 | // wildcard labels: | |
9580 | if (state.backtracking == 0) { | |
9581 | retval.tree = root_0; | |
9582 | // RewriteRuleSubtreeStream stream_retval = | |
9583 | new RewriteRuleSubtreeStream( | |
9584 | adaptor, "rule retval", | |
9585 | retval != null ? retval.tree : null); | |
866e5b51 | 9586 | |
63bfc685 | 9587 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 FC |
9588 | // 939:11: -> ENV |
9589 | { | |
63bfc685 | 9590 | adaptor.addChild(root_0, adaptor.create(ENV, "ENV")); |
866e5b51 | 9591 | |
866e5b51 | 9592 | } |
866e5b51 | 9593 | |
866e5b51 | 9594 | retval.tree = root_0; |
63bfc685 MK |
9595 | } |
9596 | } | |
9597 | break; | |
9598 | case 5: | |
9599 | // Grammar/CTFParser.g:940:4: CLOCKTOK | |
9600 | { | |
9601 | CLOCKTOK166 = (Token) match(input, CLOCKTOK, | |
9602 | FOLLOW_CLOCKTOK_in_ctfSpecifierHead3212); | |
9603 | if (state.failed) { | |
9604 | return retval; | |
9605 | } | |
9606 | if (state.backtracking == 0) { | |
9607 | stream_CLOCKTOK.add(CLOCKTOK166); | |
9608 | } | |
9609 | ||
9610 | // AST REWRITE | |
9611 | // elements: | |
9612 | // token labels: | |
9613 | // rule labels: retval | |
9614 | // token list labels: | |
9615 | // rule list labels: | |
9616 | // wildcard labels: | |
9617 | if (state.backtracking == 0) { | |
9618 | retval.tree = root_0; | |
9619 | // RewriteRuleSubtreeStream stream_retval = | |
9620 | new RewriteRuleSubtreeStream( | |
9621 | adaptor, "rule retval", | |
9622 | retval != null ? retval.tree : null); | |
866e5b51 | 9623 | |
63bfc685 | 9624 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 FC |
9625 | // 940:13: -> CLOCK |
9626 | { | |
63bfc685 | 9627 | adaptor.addChild(root_0, adaptor.create(CLOCK, "CLOCK")); |
866e5b51 FC |
9628 | |
9629 | } | |
9630 | ||
63bfc685 MK |
9631 | retval.tree = root_0; |
9632 | } | |
9633 | } | |
9634 | break; | |
866e5b51 FC |
9635 | |
9636 | } | |
9637 | retval.stop = input.LT(-1); | |
9638 | ||
63bfc685 | 9639 | if (state.backtracking == 0) { |
866e5b51 | 9640 | |
63bfc685 MK |
9641 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
9642 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
9643 | retval.stop); | |
866e5b51 | 9644 | } |
63bfc685 | 9645 | if (state.backtracking == 0) { |
866e5b51 | 9646 | |
63bfc685 | 9647 | debug_print(input.toString(retval.start, input.LT(-1))); |
866e5b51 FC |
9648 | exit("ctfSpecifierHead"); |
9649 | ||
9650 | } | |
9651 | } | |
9652 | ||
63bfc685 MK |
9653 | catch (RecognitionException e) { |
9654 | throw e; | |
9655 | ||
866e5b51 FC |
9656 | } |
9657 | return retval; | |
9658 | } | |
63bfc685 | 9659 | |
866e5b51 FC |
9660 | // $ANTLR end "ctfSpecifierHead" |
9661 | ||
9662 | public static class ctfTypeSpecifier_return extends ParserRuleReturnScope { | |
9663 | CommonTree tree; | |
63bfc685 | 9664 | |
866e5b51 | 9665 | @Override |
63bfc685 MK |
9666 | public Object getTree() { |
9667 | return tree; | |
9668 | } | |
9669 | } | |
866e5b51 FC |
9670 | |
9671 | // $ANTLR start "ctfTypeSpecifier" | |
63bfc685 MK |
9672 | // Grammar/CTFParser.g:943:1: ctfTypeSpecifier : ( FLOATINGPOINTTOK ctfBody |
9673 | // -> ^( FLOATING_POINT ( ctfBody )? ) | INTEGERTOK ctfBody -> ^( INTEGER ( | |
9674 | // ctfBody )? ) | STRINGTOK ( ctfBody )? -> ^( STRING ( ctfBody )? ) ); | |
9675 | public final CTFParser.ctfTypeSpecifier_return ctfTypeSpecifier() | |
9676 | throws RecognitionException { | |
866e5b51 FC |
9677 | CTFParser.ctfTypeSpecifier_return retval = new CTFParser.ctfTypeSpecifier_return(); |
9678 | retval.start = input.LT(1); | |
9679 | ||
9680 | CommonTree root_0 = null; | |
9681 | ||
63bfc685 MK |
9682 | Token FLOATINGPOINTTOK167 = null; |
9683 | Token INTEGERTOK169 = null; | |
9684 | Token STRINGTOK171 = null; | |
866e5b51 FC |
9685 | CTFParser.ctfBody_return ctfBody168 = null; |
9686 | ||
9687 | CTFParser.ctfBody_return ctfBody170 = null; | |
9688 | ||
9689 | CTFParser.ctfBody_return ctfBody172 = null; | |
9690 | ||
63bfc685 MK |
9691 | CommonTree FLOATINGPOINTTOK167_tree = null; |
9692 | CommonTree INTEGERTOK169_tree = null; | |
9693 | CommonTree STRINGTOK171_tree = null; | |
9694 | RewriteRuleTokenStream stream_FLOATINGPOINTTOK = new RewriteRuleTokenStream( | |
9695 | adaptor, "token FLOATINGPOINTTOK"); | |
9696 | RewriteRuleTokenStream stream_STRINGTOK = new RewriteRuleTokenStream( | |
9697 | adaptor, "token STRINGTOK"); | |
9698 | RewriteRuleTokenStream stream_INTEGERTOK = new RewriteRuleTokenStream( | |
9699 | adaptor, "token INTEGERTOK"); | |
9700 | RewriteRuleSubtreeStream stream_ctfBody = new RewriteRuleSubtreeStream( | |
9701 | adaptor, "rule ctfBody"); | |
866e5b51 | 9702 | |
63bfc685 | 9703 | enter("ctfTypeSpecifier"); |
866e5b51 FC |
9704 | |
9705 | try { | |
63bfc685 MK |
9706 | // Grammar/CTFParser.g:950:1: ( FLOATINGPOINTTOK ctfBody -> ^( |
9707 | // FLOATING_POINT ( ctfBody )? ) | INTEGERTOK ctfBody -> ^( INTEGER | |
9708 | // ( ctfBody )? ) | STRINGTOK ( ctfBody )? -> ^( STRING ( ctfBody )? | |
9709 | // ) ) | |
9710 | int alt55 = 3; | |
9711 | switch (input.LA(1)) { | |
9712 | case FLOATINGPOINTTOK: { | |
9713 | alt55 = 1; | |
9714 | } | |
866e5b51 | 9715 | break; |
63bfc685 MK |
9716 | case INTEGERTOK: { |
9717 | alt55 = 2; | |
9718 | } | |
866e5b51 | 9719 | break; |
63bfc685 MK |
9720 | case STRINGTOK: { |
9721 | alt55 = 3; | |
9722 | } | |
866e5b51 FC |
9723 | break; |
9724 | default: | |
63bfc685 MK |
9725 | if (state.backtracking > 0) { |
9726 | state.failed = true; | |
9727 | return retval; | |
9728 | } | |
9729 | NoViableAltException nvae = new NoViableAltException("", 55, 0, | |
9730 | input); | |
866e5b51 FC |
9731 | |
9732 | throw nvae; | |
9733 | } | |
9734 | ||
9735 | switch (alt55) { | |
63bfc685 MK |
9736 | case 1: |
9737 | // Grammar/CTFParser.g:952:5: FLOATINGPOINTTOK ctfBody | |
9738 | { | |
9739 | FLOATINGPOINTTOK167 = (Token) match(input, FLOATINGPOINTTOK, | |
9740 | FOLLOW_FLOATINGPOINTTOK_in_ctfTypeSpecifier3246); | |
9741 | if (state.failed) { | |
9742 | return retval; | |
9743 | } | |
9744 | if (state.backtracking == 0) { | |
9745 | stream_FLOATINGPOINTTOK.add(FLOATINGPOINTTOK167); | |
9746 | } | |
866e5b51 | 9747 | |
63bfc685 MK |
9748 | pushFollow(FOLLOW_ctfBody_in_ctfTypeSpecifier3248); |
9749 | ctfBody168 = ctfBody(); | |
866e5b51 | 9750 | |
63bfc685 MK |
9751 | state._fsp--; |
9752 | if (state.failed) { | |
9753 | return retval; | |
9754 | } | |
9755 | if (state.backtracking == 0) { | |
9756 | stream_ctfBody.add(ctfBody168.getTree()); | |
9757 | } | |
866e5b51 | 9758 | |
63bfc685 MK |
9759 | // AST REWRITE |
9760 | // elements: ctfBody | |
9761 | // token labels: | |
9762 | // rule labels: retval | |
9763 | // token list labels: | |
9764 | // rule list labels: | |
9765 | // wildcard labels: | |
9766 | if (state.backtracking == 0) { | |
866e5b51 | 9767 | retval.tree = root_0; |
63bfc685 MK |
9768 | // RewriteRuleSubtreeStream stream_retval = |
9769 | new RewriteRuleSubtreeStream( | |
9770 | adaptor, "rule retval", | |
9771 | retval != null ? retval.tree : null); | |
866e5b51 | 9772 | |
63bfc685 | 9773 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 FC |
9774 | // 952:30: -> ^( FLOATING_POINT ( ctfBody )? ) |
9775 | { | |
63bfc685 MK |
9776 | // Grammar/CTFParser.g:952:33: ^( FLOATING_POINT ( |
9777 | // ctfBody )? ) | |
866e5b51 | 9778 | { |
63bfc685 MK |
9779 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
9780 | root_1 = (CommonTree) adaptor.becomeRoot(adaptor | |
9781 | .create(FLOATING_POINT, "FLOATING_POINT"), | |
9782 | root_1); | |
866e5b51 | 9783 | |
63bfc685 MK |
9784 | // Grammar/CTFParser.g:952:50: ( ctfBody )? |
9785 | if (stream_ctfBody.hasNext()) { | |
9786 | adaptor.addChild(root_1, | |
9787 | stream_ctfBody.nextTree()); | |
866e5b51 | 9788 | |
63bfc685 MK |
9789 | } |
9790 | stream_ctfBody.reset(); | |
866e5b51 | 9791 | |
63bfc685 | 9792 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
9793 | } |
9794 | ||
9795 | } | |
9796 | ||
63bfc685 MK |
9797 | retval.tree = root_0; |
9798 | } | |
9799 | } | |
9800 | break; | |
9801 | case 2: | |
9802 | // Grammar/CTFParser.g:953:5: INTEGERTOK ctfBody | |
9803 | { | |
9804 | INTEGERTOK169 = (Token) match(input, INTEGERTOK, | |
9805 | FOLLOW_INTEGERTOK_in_ctfTypeSpecifier3263); | |
9806 | if (state.failed) { | |
9807 | return retval; | |
9808 | } | |
9809 | if (state.backtracking == 0) { | |
9810 | stream_INTEGERTOK.add(INTEGERTOK169); | |
9811 | } | |
866e5b51 | 9812 | |
63bfc685 MK |
9813 | pushFollow(FOLLOW_ctfBody_in_ctfTypeSpecifier3265); |
9814 | ctfBody170 = ctfBody(); | |
866e5b51 | 9815 | |
63bfc685 MK |
9816 | state._fsp--; |
9817 | if (state.failed) { | |
9818 | return retval; | |
9819 | } | |
9820 | if (state.backtracking == 0) { | |
9821 | stream_ctfBody.add(ctfBody170.getTree()); | |
9822 | } | |
866e5b51 | 9823 | |
63bfc685 MK |
9824 | // AST REWRITE |
9825 | // elements: ctfBody | |
9826 | // token labels: | |
9827 | // rule labels: retval | |
9828 | // token list labels: | |
9829 | // rule list labels: | |
9830 | // wildcard labels: | |
9831 | if (state.backtracking == 0) { | |
866e5b51 | 9832 | retval.tree = root_0; |
63bfc685 MK |
9833 | // RewriteRuleSubtreeStream stream_retval = |
9834 | new RewriteRuleSubtreeStream( | |
9835 | adaptor, "rule retval", | |
9836 | retval != null ? retval.tree : null); | |
866e5b51 | 9837 | |
63bfc685 | 9838 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 FC |
9839 | // 953:24: -> ^( INTEGER ( ctfBody )? ) |
9840 | { | |
9841 | // Grammar/CTFParser.g:953:27: ^( INTEGER ( ctfBody )? ) | |
9842 | { | |
63bfc685 MK |
9843 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
9844 | root_1 = (CommonTree) adaptor.becomeRoot( | |
9845 | adaptor.create(INTEGER, "INTEGER"), root_1); | |
866e5b51 | 9846 | |
63bfc685 MK |
9847 | // Grammar/CTFParser.g:953:37: ( ctfBody )? |
9848 | if (stream_ctfBody.hasNext()) { | |
9849 | adaptor.addChild(root_1, | |
9850 | stream_ctfBody.nextTree()); | |
866e5b51 | 9851 | |
63bfc685 MK |
9852 | } |
9853 | stream_ctfBody.reset(); | |
866e5b51 | 9854 | |
63bfc685 | 9855 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
9856 | } |
9857 | ||
9858 | } | |
9859 | ||
63bfc685 MK |
9860 | retval.tree = root_0; |
9861 | } | |
9862 | } | |
9863 | break; | |
9864 | case 3: | |
9865 | // Grammar/CTFParser.g:954:5: STRINGTOK ( ctfBody )? | |
9866 | { | |
9867 | STRINGTOK171 = (Token) match(input, STRINGTOK, | |
9868 | FOLLOW_STRINGTOK_in_ctfTypeSpecifier3280); | |
9869 | if (state.failed) { | |
9870 | return retval; | |
9871 | } | |
9872 | if (state.backtracking == 0) { | |
9873 | stream_STRINGTOK.add(STRINGTOK171); | |
9874 | } | |
866e5b51 | 9875 | |
63bfc685 MK |
9876 | // Grammar/CTFParser.g:954:15: ( ctfBody )? |
9877 | int alt54 = 2; | |
9878 | alt54 = dfa54.predict(input); | |
9879 | switch (alt54) { | |
9880 | case 1: | |
9881 | // Grammar/CTFParser.g:954:15: ctfBody | |
9882 | { | |
9883 | pushFollow(FOLLOW_ctfBody_in_ctfTypeSpecifier3282); | |
9884 | ctfBody172 = ctfBody(); | |
866e5b51 | 9885 | |
63bfc685 MK |
9886 | state._fsp--; |
9887 | if (state.failed) { | |
9888 | return retval; | |
9889 | } | |
9890 | if (state.backtracking == 0) { | |
9891 | stream_ctfBody.add(ctfBody172.getTree()); | |
866e5b51 FC |
9892 | } |
9893 | ||
63bfc685 MK |
9894 | } |
9895 | break; | |
866e5b51 | 9896 | |
63bfc685 | 9897 | } |
866e5b51 | 9898 | |
63bfc685 MK |
9899 | // AST REWRITE |
9900 | // elements: ctfBody | |
9901 | // token labels: | |
9902 | // rule labels: retval | |
9903 | // token list labels: | |
9904 | // rule list labels: | |
9905 | // wildcard labels: | |
9906 | if (state.backtracking == 0) { | |
866e5b51 | 9907 | retval.tree = root_0; |
63bfc685 MK |
9908 | // RewriteRuleSubtreeStream stream_retval = |
9909 | new RewriteRuleSubtreeStream( | |
9910 | adaptor, "rule retval", | |
9911 | retval != null ? retval.tree : null); | |
866e5b51 | 9912 | |
63bfc685 | 9913 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 FC |
9914 | // 954:24: -> ^( STRING ( ctfBody )? ) |
9915 | { | |
9916 | // Grammar/CTFParser.g:954:27: ^( STRING ( ctfBody )? ) | |
9917 | { | |
63bfc685 MK |
9918 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
9919 | root_1 = (CommonTree) adaptor.becomeRoot( | |
9920 | adaptor.create(STRING, "STRING"), root_1); | |
866e5b51 | 9921 | |
63bfc685 MK |
9922 | // Grammar/CTFParser.g:954:36: ( ctfBody )? |
9923 | if (stream_ctfBody.hasNext()) { | |
9924 | adaptor.addChild(root_1, | |
9925 | stream_ctfBody.nextTree()); | |
866e5b51 | 9926 | |
63bfc685 MK |
9927 | } |
9928 | stream_ctfBody.reset(); | |
866e5b51 | 9929 | |
63bfc685 | 9930 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
9931 | } |
9932 | ||
9933 | } | |
9934 | ||
63bfc685 MK |
9935 | retval.tree = root_0; |
9936 | } | |
9937 | } | |
9938 | break; | |
866e5b51 FC |
9939 | |
9940 | } | |
9941 | retval.stop = input.LT(-1); | |
9942 | ||
63bfc685 | 9943 | if (state.backtracking == 0) { |
866e5b51 | 9944 | |
63bfc685 MK |
9945 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
9946 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
9947 | retval.stop); | |
866e5b51 | 9948 | } |
63bfc685 | 9949 | if (state.backtracking == 0) { |
866e5b51 FC |
9950 | |
9951 | exit("ctfTypeSpecifier"); | |
9952 | ||
9953 | } | |
9954 | } | |
9955 | ||
63bfc685 MK |
9956 | catch (RecognitionException e) { |
9957 | throw e; | |
9958 | ||
866e5b51 FC |
9959 | } |
9960 | return retval; | |
9961 | } | |
63bfc685 | 9962 | |
866e5b51 FC |
9963 | // $ANTLR end "ctfTypeSpecifier" |
9964 | ||
9965 | public static class ctfBody_return extends ParserRuleReturnScope { | |
9966 | CommonTree tree; | |
63bfc685 | 9967 | |
866e5b51 | 9968 | @Override |
63bfc685 MK |
9969 | public Object getTree() { |
9970 | return tree; | |
9971 | } | |
9972 | } | |
866e5b51 FC |
9973 | |
9974 | // $ANTLR start "ctfBody" | |
63bfc685 MK |
9975 | // Grammar/CTFParser.g:957:1: ctfBody : LCURL ( ctfAssignmentExpressionList |
9976 | // )? RCURL -> ( ctfAssignmentExpressionList )? ; | |
866e5b51 FC |
9977 | public final CTFParser.ctfBody_return ctfBody() throws RecognitionException { |
9978 | Symbols_stack.push(new Symbols_scope()); | |
9979 | ||
9980 | CTFParser.ctfBody_return retval = new CTFParser.ctfBody_return(); | |
9981 | retval.start = input.LT(1); | |
9982 | ||
9983 | CommonTree root_0 = null; | |
9984 | ||
63bfc685 MK |
9985 | Token LCURL173 = null; |
9986 | Token RCURL175 = null; | |
866e5b51 FC |
9987 | CTFParser.ctfAssignmentExpressionList_return ctfAssignmentExpressionList174 = null; |
9988 | ||
63bfc685 MK |
9989 | CommonTree LCURL173_tree = null; |
9990 | CommonTree RCURL175_tree = null; | |
9991 | RewriteRuleTokenStream stream_LCURL = new RewriteRuleTokenStream( | |
9992 | adaptor, "token LCURL"); | |
9993 | RewriteRuleTokenStream stream_RCURL = new RewriteRuleTokenStream( | |
9994 | adaptor, "token RCURL"); | |
9995 | RewriteRuleSubtreeStream stream_ctfAssignmentExpressionList = new RewriteRuleSubtreeStream( | |
9996 | adaptor, "rule ctfAssignmentExpressionList"); | |
866e5b51 | 9997 | |
63bfc685 MK |
9998 | enter("ctfBody"); |
9999 | debug_print("Scope push " + +Symbols_stack.size()); | |
10000 | ((Symbols_scope) Symbols_stack.peek()).types = new HashSet<String>(); | |
866e5b51 | 10001 | |
63bfc685 MK |
10002 | try { |
10003 | // Grammar/CTFParser.g:968:1: ( LCURL ( ctfAssignmentExpressionList | |
10004 | // )? RCURL -> ( ctfAssignmentExpressionList )? ) | |
10005 | // Grammar/CTFParser.g:969:3: LCURL ( ctfAssignmentExpressionList )? | |
10006 | // RCURL | |
10007 | { | |
10008 | LCURL173 = (Token) match(input, LCURL, | |
10009 | FOLLOW_LCURL_in_ctfBody3320); | |
10010 | if (state.failed) { | |
10011 | return retval; | |
10012 | } | |
10013 | if (state.backtracking == 0) { | |
10014 | stream_LCURL.add(LCURL173); | |
10015 | } | |
10016 | ||
10017 | // Grammar/CTFParser.g:969:9: ( ctfAssignmentExpressionList )? | |
10018 | int alt56 = 2; | |
10019 | int LA56_0 = input.LA(1); | |
10020 | ||
10021 | if ((((LA56_0 >= ALIGNTOK) && (LA56_0 <= CLOCKTOK)) | |
10022 | || (LA56_0 == SIGN) || (LA56_0 == OCTAL_LITERAL) | |
10023 | || (LA56_0 == DECIMAL_LITERAL) | |
10024 | || (LA56_0 == HEX_LITERAL) | |
10025 | || (LA56_0 == CHARACTER_LITERAL) | |
10026 | || (LA56_0 == STRING_LITERAL) || (LA56_0 == IDENTIFIER))) { | |
10027 | alt56 = 1; | |
10028 | } | |
10029 | switch (alt56) { | |
10030 | case 1: | |
10031 | // Grammar/CTFParser.g:969:9: ctfAssignmentExpressionList | |
10032 | { | |
866e5b51 | 10033 | pushFollow(FOLLOW_ctfAssignmentExpressionList_in_ctfBody3322); |
63bfc685 | 10034 | ctfAssignmentExpressionList174 = ctfAssignmentExpressionList(); |
866e5b51 FC |
10035 | |
10036 | state._fsp--; | |
63bfc685 MK |
10037 | if (state.failed) { |
10038 | return retval; | |
866e5b51 | 10039 | } |
63bfc685 MK |
10040 | if (state.backtracking == 0) { |
10041 | stream_ctfAssignmentExpressionList | |
10042 | .add(ctfAssignmentExpressionList174.getTree()); | |
10043 | } | |
10044 | ||
10045 | } | |
866e5b51 FC |
10046 | break; |
10047 | ||
63bfc685 | 10048 | } |
866e5b51 | 10049 | |
63bfc685 MK |
10050 | RCURL175 = (Token) match(input, RCURL, |
10051 | FOLLOW_RCURL_in_ctfBody3325); | |
10052 | if (state.failed) { | |
10053 | return retval; | |
10054 | } | |
10055 | if (state.backtracking == 0) { | |
10056 | stream_RCURL.add(RCURL175); | |
10057 | } | |
866e5b51 | 10058 | |
63bfc685 MK |
10059 | // AST REWRITE |
10060 | // elements: ctfAssignmentExpressionList | |
10061 | // token labels: | |
10062 | // rule labels: retval | |
10063 | // token list labels: | |
10064 | // rule list labels: | |
10065 | // wildcard labels: | |
10066 | if (state.backtracking == 0) { | |
10067 | retval.tree = root_0; | |
10068 | // RewriteRuleSubtreeStream stream_retval = | |
10069 | new RewriteRuleSubtreeStream( | |
10070 | adaptor, "rule retval", | |
10071 | retval != null ? retval.tree : null); | |
866e5b51 | 10072 | |
63bfc685 MK |
10073 | root_0 = (CommonTree) adaptor.nil(); |
10074 | // 969:44: -> ( ctfAssignmentExpressionList )? | |
10075 | { | |
10076 | // Grammar/CTFParser.g:969:47: ( | |
10077 | // ctfAssignmentExpressionList )? | |
10078 | if (stream_ctfAssignmentExpressionList.hasNext()) { | |
10079 | adaptor.addChild(root_0, | |
10080 | stream_ctfAssignmentExpressionList | |
10081 | .nextTree()); | |
866e5b51 | 10082 | |
63bfc685 MK |
10083 | } |
10084 | stream_ctfAssignmentExpressionList.reset(); | |
866e5b51 | 10085 | |
63bfc685 | 10086 | } |
866e5b51 | 10087 | |
63bfc685 | 10088 | retval.tree = root_0; |
866e5b51 | 10089 | } |
866e5b51 FC |
10090 | } |
10091 | ||
10092 | retval.stop = input.LT(-1); | |
10093 | ||
63bfc685 | 10094 | if (state.backtracking == 0) { |
866e5b51 | 10095 | |
63bfc685 MK |
10096 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
10097 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
10098 | retval.stop); | |
866e5b51 | 10099 | } |
63bfc685 | 10100 | if (state.backtracking == 0) { |
866e5b51 | 10101 | |
63bfc685 | 10102 | debug_print("Scope pop " + +Symbols_stack.size()); |
866e5b51 FC |
10103 | exit("ctfBody"); |
10104 | ||
10105 | } | |
10106 | } | |
10107 | ||
63bfc685 MK |
10108 | catch (RecognitionException e) { |
10109 | throw e; | |
10110 | } finally { | |
866e5b51 FC |
10111 | Symbols_stack.pop(); |
10112 | ||
10113 | } | |
10114 | return retval; | |
10115 | } | |
63bfc685 | 10116 | |
866e5b51 FC |
10117 | // $ANTLR end "ctfBody" |
10118 | ||
63bfc685 MK |
10119 | public static class ctfAssignmentExpressionList_return extends |
10120 | ParserRuleReturnScope { | |
866e5b51 | 10121 | CommonTree tree; |
63bfc685 | 10122 | |
866e5b51 | 10123 | @Override |
63bfc685 MK |
10124 | public Object getTree() { |
10125 | return tree; | |
10126 | } | |
10127 | } | |
866e5b51 FC |
10128 | |
10129 | // $ANTLR start "ctfAssignmentExpressionList" | |
63bfc685 MK |
10130 | // Grammar/CTFParser.g:972:1: ctfAssignmentExpressionList : ( |
10131 | // ctfAssignmentExpression TERM )+ ; | |
10132 | public final CTFParser.ctfAssignmentExpressionList_return ctfAssignmentExpressionList() | |
10133 | throws RecognitionException { | |
866e5b51 FC |
10134 | CTFParser.ctfAssignmentExpressionList_return retval = new CTFParser.ctfAssignmentExpressionList_return(); |
10135 | retval.start = input.LT(1); | |
10136 | ||
10137 | CommonTree root_0 = null; | |
10138 | ||
63bfc685 | 10139 | Token TERM177 = null; |
866e5b51 FC |
10140 | CTFParser.ctfAssignmentExpression_return ctfAssignmentExpression176 = null; |
10141 | ||
63bfc685 | 10142 | CommonTree TERM177_tree = null; |
866e5b51 FC |
10143 | |
10144 | try { | |
10145 | // Grammar/CTFParser.g:972:29: ( ( ctfAssignmentExpression TERM )+ ) | |
10146 | // Grammar/CTFParser.g:973:3: ( ctfAssignmentExpression TERM )+ | |
10147 | { | |
63bfc685 | 10148 | root_0 = (CommonTree) adaptor.nil(); |
866e5b51 | 10149 | |
63bfc685 MK |
10150 | // Grammar/CTFParser.g:973:3: ( ctfAssignmentExpression TERM )+ |
10151 | int cnt57 = 0; | |
10152 | loop57: do { | |
10153 | int alt57 = 2; | |
10154 | int LA57_0 = input.LA(1); | |
866e5b51 | 10155 | |
63bfc685 MK |
10156 | if ((((LA57_0 >= ALIGNTOK) && (LA57_0 <= CLOCKTOK)) |
10157 | || (LA57_0 == SIGN) || (LA57_0 == OCTAL_LITERAL) | |
10158 | || (LA57_0 == DECIMAL_LITERAL) | |
10159 | || (LA57_0 == HEX_LITERAL) | |
10160 | || (LA57_0 == CHARACTER_LITERAL) | |
10161 | || (LA57_0 == STRING_LITERAL) || (LA57_0 == IDENTIFIER))) { | |
10162 | alt57 = 1; | |
10163 | } | |
866e5b51 | 10164 | |
63bfc685 MK |
10165 | switch (alt57) { |
10166 | case 1: | |
10167 | // Grammar/CTFParser.g:973:4: ctfAssignmentExpression TERM | |
10168 | { | |
10169 | pushFollow(FOLLOW_ctfAssignmentExpression_in_ctfAssignmentExpressionList3344); | |
10170 | ctfAssignmentExpression176 = ctfAssignmentExpression(); | |
866e5b51 | 10171 | |
63bfc685 MK |
10172 | state._fsp--; |
10173 | if (state.failed) { | |
10174 | return retval; | |
10175 | } | |
10176 | if (state.backtracking == 0) { | |
10177 | adaptor.addChild(root_0, | |
10178 | ctfAssignmentExpression176.getTree()); | |
10179 | } | |
10180 | TERM177 = (Token) match(input, TERM, | |
10181 | FOLLOW_TERM_in_ctfAssignmentExpressionList3346); | |
10182 | if (state.failed) { | |
10183 | return retval; | |
10184 | } | |
866e5b51 | 10185 | |
63bfc685 MK |
10186 | } |
10187 | break; | |
866e5b51 | 10188 | |
63bfc685 MK |
10189 | default: |
10190 | if (cnt57 >= 1) { | |
10191 | break loop57; | |
10192 | } | |
10193 | if (state.backtracking > 0) { | |
10194 | state.failed = true; | |
10195 | return retval; | |
10196 | } | |
10197 | EarlyExitException eee = new EarlyExitException(57, | |
10198 | input); | |
866e5b51 | 10199 | throw eee; |
63bfc685 MK |
10200 | } |
10201 | cnt57++; | |
10202 | } while (true); | |
866e5b51 FC |
10203 | |
10204 | } | |
10205 | ||
10206 | retval.stop = input.LT(-1); | |
10207 | ||
63bfc685 | 10208 | if (state.backtracking == 0) { |
866e5b51 | 10209 | |
63bfc685 MK |
10210 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
10211 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
10212 | retval.stop); | |
866e5b51 FC |
10213 | } |
10214 | } | |
10215 | ||
63bfc685 MK |
10216 | catch (RecognitionException e) { |
10217 | throw e; | |
10218 | ||
866e5b51 FC |
10219 | } |
10220 | return retval; | |
10221 | } | |
63bfc685 | 10222 | |
866e5b51 FC |
10223 | // $ANTLR end "ctfAssignmentExpressionList" |
10224 | ||
63bfc685 MK |
10225 | public static class ctfAssignmentExpression_return extends |
10226 | ParserRuleReturnScope { | |
866e5b51 | 10227 | CommonTree tree; |
63bfc685 | 10228 | |
866e5b51 | 10229 | @Override |
63bfc685 MK |
10230 | public Object getTree() { |
10231 | return tree; | |
10232 | } | |
10233 | } | |
866e5b51 FC |
10234 | |
10235 | // $ANTLR start "ctfAssignmentExpression" | |
63bfc685 MK |
10236 | // Grammar/CTFParser.g:977:1: ctfAssignmentExpression : ( (left= |
10237 | // unaryExpression ( (assignment= ASSIGNMENT right1= unaryExpression ) -> ^( | |
10238 | // CTF_EXPRESSION_VAL ^( CTF_LEFT $left) ^( CTF_RIGHT $right1) ) | | |
10239 | // (type_assignment= TYPE_ASSIGNMENT right2= typeSpecifier ) -> ^( | |
10240 | // CTF_EXPRESSION_TYPE ^( CTF_LEFT $left) ^( CTF_RIGHT ^( | |
10241 | // TYPE_SPECIFIER_LIST $right2) ) ) ) ) | ( declarationSpecifiers {...}? | |
10242 | // declaratorList ) -> ^( TYPEDEF declaratorList declarationSpecifiers ) | | |
10243 | // typealiasDecl ); | |
10244 | public final CTFParser.ctfAssignmentExpression_return ctfAssignmentExpression() | |
10245 | throws RecognitionException { | |
866e5b51 FC |
10246 | CTFParser.ctfAssignmentExpression_return retval = new CTFParser.ctfAssignmentExpression_return(); |
10247 | retval.start = input.LT(1); | |
10248 | ||
10249 | CommonTree root_0 = null; | |
10250 | ||
63bfc685 MK |
10251 | Token assignment = null; |
10252 | Token type_assignment = null; | |
866e5b51 FC |
10253 | CTFParser.unaryExpression_return left = null; |
10254 | ||
10255 | CTFParser.unaryExpression_return right1 = null; | |
10256 | ||
10257 | CTFParser.typeSpecifier_return right2 = null; | |
10258 | ||
10259 | CTFParser.declarationSpecifiers_return declarationSpecifiers178 = null; | |
10260 | ||
10261 | CTFParser.declaratorList_return declaratorList179 = null; | |
10262 | ||
10263 | CTFParser.typealiasDecl_return typealiasDecl180 = null; | |
10264 | ||
63bfc685 MK |
10265 | CommonTree assignment_tree = null; |
10266 | CommonTree type_assignment_tree = null; | |
10267 | RewriteRuleTokenStream stream_ASSIGNMENT = new RewriteRuleTokenStream( | |
10268 | adaptor, "token ASSIGNMENT"); | |
10269 | RewriteRuleTokenStream stream_TYPE_ASSIGNMENT = new RewriteRuleTokenStream( | |
10270 | adaptor, "token TYPE_ASSIGNMENT"); | |
10271 | RewriteRuleSubtreeStream stream_declaratorList = new RewriteRuleSubtreeStream( | |
10272 | adaptor, "rule declaratorList"); | |
10273 | RewriteRuleSubtreeStream stream_unaryExpression = new RewriteRuleSubtreeStream( | |
10274 | adaptor, "rule unaryExpression"); | |
10275 | RewriteRuleSubtreeStream stream_declarationSpecifiers = new RewriteRuleSubtreeStream( | |
10276 | adaptor, "rule declarationSpecifiers"); | |
10277 | RewriteRuleSubtreeStream stream_typeSpecifier = new RewriteRuleSubtreeStream( | |
10278 | adaptor, "rule typeSpecifier"); | |
10279 | ||
10280 | enter("ctfAssignmentExpression"); | |
866e5b51 FC |
10281 | |
10282 | try { | |
63bfc685 MK |
10283 | // Grammar/CTFParser.g:987:1: ( (left= unaryExpression ( |
10284 | // (assignment= ASSIGNMENT right1= unaryExpression ) -> ^( | |
10285 | // CTF_EXPRESSION_VAL ^( CTF_LEFT $left) ^( CTF_RIGHT $right1) ) | | |
10286 | // (type_assignment= TYPE_ASSIGNMENT right2= typeSpecifier ) -> ^( | |
10287 | // CTF_EXPRESSION_TYPE ^( CTF_LEFT $left) ^( CTF_RIGHT ^( | |
10288 | // TYPE_SPECIFIER_LIST $right2) ) ) ) ) | ( declarationSpecifiers | |
10289 | // {...}? declaratorList ) -> ^( TYPEDEF declaratorList | |
10290 | // declarationSpecifiers ) | typealiasDecl ) | |
10291 | int alt59 = 3; | |
10292 | switch (input.LA(1)) { | |
10293 | case IDENTIFIER: { | |
866e5b51 FC |
10294 | int LA59_1 = input.LA(2); |
10295 | ||
63bfc685 MK |
10296 | if ((((LA59_1 >= CONSTTOK) && (LA59_1 <= ENUMTOK)) |
10297 | || ((LA59_1 >= FLOATINGPOINTTOK) && (LA59_1 <= SIGNEDTOK)) | |
10298 | || ((LA59_1 >= STRINGTOK) && (LA59_1 <= STRUCTTOK)) | |
10299 | || ((LA59_1 >= TYPEDEFTOK) && (LA59_1 <= IMAGINARYTOK)) | |
10300 | || (LA59_1 == POINTER) || (LA59_1 == IDENTIFIER)) | |
10301 | && ((inTypealiasAlias() || isTypeName(input.LT(1) | |
10302 | .getText())))) { | |
10303 | alt59 = 2; | |
10304 | } else if ((((LA59_1 >= ASSIGNMENT) && (LA59_1 <= TYPE_ASSIGNMENT)) | |
10305 | || (LA59_1 == OPENBRAC) || ((LA59_1 >= ARROW) && (LA59_1 <= DOT)))) { | |
10306 | alt59 = 1; | |
10307 | } else { | |
10308 | if (state.backtracking > 0) { | |
10309 | state.failed = true; | |
10310 | return retval; | |
10311 | } | |
10312 | NoViableAltException nvae = new NoViableAltException("", | |
10313 | 59, 1, input); | |
866e5b51 FC |
10314 | |
10315 | throw nvae; | |
10316 | } | |
63bfc685 | 10317 | } |
866e5b51 FC |
10318 | break; |
10319 | case ALIGNTOK: | |
10320 | case EVENTTOK: | |
10321 | case STREAMTOK: | |
10322 | case TRACETOK: | |
10323 | case ENVTOK: | |
10324 | case CLOCKTOK: | |
10325 | case SIGN: | |
10326 | case OCTAL_LITERAL: | |
10327 | case DECIMAL_LITERAL: | |
10328 | case HEX_LITERAL: | |
10329 | case CHARACTER_LITERAL: | |
63bfc685 MK |
10330 | case STRING_LITERAL: { |
10331 | alt59 = 1; | |
10332 | } | |
866e5b51 | 10333 | break; |
63bfc685 MK |
10334 | case SIGNEDTOK: { |
10335 | switch (input.LA(2)) { | |
866e5b51 FC |
10336 | case ASSIGNMENT: |
10337 | case TYPE_ASSIGNMENT: | |
10338 | case OPENBRAC: | |
10339 | case ARROW: | |
63bfc685 MK |
10340 | case DOT: { |
10341 | alt59 = 1; | |
10342 | } | |
866e5b51 FC |
10343 | break; |
10344 | case CONSTTOK: | |
10345 | case CHARTOK: | |
10346 | case DOUBLETOK: | |
10347 | case ENUMTOK: | |
10348 | case FLOATINGPOINTTOK: | |
10349 | case FLOATTOK: | |
10350 | case INTEGERTOK: | |
10351 | case INTTOK: | |
10352 | case LONGTOK: | |
10353 | case SHORTTOK: | |
10354 | case SIGNEDTOK: | |
10355 | case STRINGTOK: | |
10356 | case STRUCTTOK: | |
10357 | case UNSIGNEDTOK: | |
10358 | case VARIANTTOK: | |
10359 | case VOIDTOK: | |
10360 | case BOOLTOK: | |
10361 | case COMPLEXTOK: | |
10362 | case IMAGINARYTOK: | |
10363 | case POINTER: | |
63bfc685 MK |
10364 | case IDENTIFIER: { |
10365 | alt59 = 2; | |
10366 | } | |
866e5b51 | 10367 | break; |
63bfc685 MK |
10368 | case TYPEDEFTOK: { |
10369 | alt59 = 2; | |
10370 | } | |
866e5b51 FC |
10371 | break; |
10372 | default: | |
63bfc685 MK |
10373 | if (state.backtracking > 0) { |
10374 | state.failed = true; | |
10375 | return retval; | |
10376 | } | |
10377 | NoViableAltException nvae = new NoViableAltException("", | |
10378 | 59, 3, input); | |
866e5b51 FC |
10379 | |
10380 | throw nvae; | |
10381 | } | |
10382 | ||
63bfc685 | 10383 | } |
866e5b51 FC |
10384 | break; |
10385 | case CONSTTOK: | |
10386 | case CHARTOK: | |
10387 | case DOUBLETOK: | |
10388 | case ENUMTOK: | |
10389 | case FLOATINGPOINTTOK: | |
10390 | case FLOATTOK: | |
10391 | case INTEGERTOK: | |
10392 | case INTTOK: | |
10393 | case LONGTOK: | |
10394 | case SHORTTOK: | |
10395 | case STRUCTTOK: | |
10396 | case TYPEDEFTOK: | |
10397 | case UNSIGNEDTOK: | |
10398 | case VARIANTTOK: | |
10399 | case VOIDTOK: | |
10400 | case BOOLTOK: | |
10401 | case COMPLEXTOK: | |
63bfc685 MK |
10402 | case IMAGINARYTOK: { |
10403 | alt59 = 2; | |
10404 | } | |
866e5b51 | 10405 | break; |
63bfc685 MK |
10406 | case STRINGTOK: { |
10407 | switch (input.LA(2)) { | |
866e5b51 FC |
10408 | case ASSIGNMENT: |
10409 | case TYPE_ASSIGNMENT: | |
10410 | case OPENBRAC: | |
10411 | case ARROW: | |
63bfc685 MK |
10412 | case DOT: { |
10413 | alt59 = 1; | |
10414 | } | |
866e5b51 FC |
10415 | break; |
10416 | case CONSTTOK: | |
10417 | case CHARTOK: | |
10418 | case DOUBLETOK: | |
10419 | case ENUMTOK: | |
10420 | case FLOATINGPOINTTOK: | |
10421 | case FLOATTOK: | |
10422 | case INTEGERTOK: | |
10423 | case INTTOK: | |
10424 | case LONGTOK: | |
10425 | case SHORTTOK: | |
10426 | case SIGNEDTOK: | |
10427 | case STRINGTOK: | |
10428 | case STRUCTTOK: | |
10429 | case UNSIGNEDTOK: | |
10430 | case VARIANTTOK: | |
10431 | case VOIDTOK: | |
10432 | case BOOLTOK: | |
10433 | case COMPLEXTOK: | |
10434 | case IMAGINARYTOK: | |
10435 | case LCURL: | |
10436 | case POINTER: | |
63bfc685 MK |
10437 | case IDENTIFIER: { |
10438 | alt59 = 2; | |
10439 | } | |
866e5b51 | 10440 | break; |
63bfc685 MK |
10441 | case TYPEDEFTOK: { |
10442 | alt59 = 2; | |
10443 | } | |
866e5b51 FC |
10444 | break; |
10445 | default: | |
63bfc685 MK |
10446 | if (state.backtracking > 0) { |
10447 | state.failed = true; | |
10448 | return retval; | |
10449 | } | |
10450 | NoViableAltException nvae = new NoViableAltException("", | |
10451 | 59, 5, input); | |
866e5b51 FC |
10452 | |
10453 | throw nvae; | |
10454 | } | |
10455 | ||
63bfc685 | 10456 | } |
866e5b51 | 10457 | break; |
63bfc685 MK |
10458 | case TYPEALIASTOK: { |
10459 | alt59 = 3; | |
10460 | } | |
866e5b51 FC |
10461 | break; |
10462 | default: | |
63bfc685 MK |
10463 | if (state.backtracking > 0) { |
10464 | state.failed = true; | |
10465 | return retval; | |
10466 | } | |
10467 | NoViableAltException nvae = new NoViableAltException("", 59, 0, | |
10468 | input); | |
866e5b51 FC |
10469 | |
10470 | throw nvae; | |
10471 | } | |
10472 | ||
10473 | switch (alt59) { | |
63bfc685 MK |
10474 | case 1: |
10475 | // Grammar/CTFParser.g:988:3: (left= unaryExpression ( (assignment= | |
10476 | // ASSIGNMENT right1= unaryExpression ) -> ^( CTF_EXPRESSION_VAL ^( | |
10477 | // CTF_LEFT $left) ^( CTF_RIGHT $right1) ) | (type_assignment= | |
10478 | // TYPE_ASSIGNMENT right2= typeSpecifier ) -> ^( CTF_EXPRESSION_TYPE | |
10479 | // ^( CTF_LEFT $left) ^( CTF_RIGHT ^( TYPE_SPECIFIER_LIST $right2) ) | |
10480 | // ) ) ) | |
10481 | { | |
10482 | // Grammar/CTFParser.g:988:3: (left= unaryExpression ( | |
10483 | // (assignment= ASSIGNMENT right1= unaryExpression ) -> ^( | |
10484 | // CTF_EXPRESSION_VAL ^( CTF_LEFT $left) ^( CTF_RIGHT $right1) ) | |
10485 | // | (type_assignment= TYPE_ASSIGNMENT right2= typeSpecifier ) | |
10486 | // -> ^( CTF_EXPRESSION_TYPE ^( CTF_LEFT $left) ^( CTF_RIGHT ^( | |
10487 | // TYPE_SPECIFIER_LIST $right2) ) ) ) ) | |
10488 | // Grammar/CTFParser.g:989:5: left= unaryExpression ( | |
10489 | // (assignment= ASSIGNMENT right1= unaryExpression ) -> ^( | |
10490 | // CTF_EXPRESSION_VAL ^( CTF_LEFT $left) ^( CTF_RIGHT $right1) ) | |
10491 | // | (type_assignment= TYPE_ASSIGNMENT right2= typeSpecifier ) | |
10492 | // -> ^( CTF_EXPRESSION_TYPE ^( CTF_LEFT $left) ^( CTF_RIGHT ^( | |
10493 | // TYPE_SPECIFIER_LIST $right2) ) ) ) | |
10494 | { | |
866e5b51 | 10495 | pushFollow(FOLLOW_unaryExpression_in_ctfAssignmentExpression3381); |
63bfc685 | 10496 | left = unaryExpression(); |
866e5b51 FC |
10497 | |
10498 | state._fsp--; | |
63bfc685 MK |
10499 | if (state.failed) { |
10500 | return retval; | |
10501 | } | |
10502 | if (state.backtracking == 0) { | |
10503 | stream_unaryExpression.add(left.getTree()); | |
10504 | } | |
10505 | // Grammar/CTFParser.g:990:5: ( (assignment= ASSIGNMENT | |
10506 | // right1= unaryExpression ) -> ^( CTF_EXPRESSION_VAL ^( | |
10507 | // CTF_LEFT $left) ^( CTF_RIGHT $right1) ) | | |
10508 | // (type_assignment= TYPE_ASSIGNMENT right2= typeSpecifier ) | |
10509 | // -> ^( CTF_EXPRESSION_TYPE ^( CTF_LEFT $left) ^( CTF_RIGHT | |
10510 | // ^( TYPE_SPECIFIER_LIST $right2) ) ) ) | |
10511 | int alt58 = 2; | |
866e5b51 FC |
10512 | int LA58_0 = input.LA(1); |
10513 | ||
63bfc685 MK |
10514 | if ((LA58_0 == ASSIGNMENT)) { |
10515 | alt58 = 1; | |
10516 | } else if ((LA58_0 == TYPE_ASSIGNMENT)) { | |
10517 | alt58 = 2; | |
10518 | } else { | |
10519 | if (state.backtracking > 0) { | |
10520 | state.failed = true; | |
10521 | return retval; | |
10522 | } | |
10523 | NoViableAltException nvae = new NoViableAltException( | |
10524 | "", 58, 0, input); | |
866e5b51 FC |
10525 | |
10526 | throw nvae; | |
10527 | } | |
10528 | switch (alt58) { | |
63bfc685 MK |
10529 | case 1: |
10530 | // Grammar/CTFParser.g:991:9: (assignment= ASSIGNMENT | |
10531 | // right1= unaryExpression ) | |
10532 | { | |
10533 | // Grammar/CTFParser.g:991:9: (assignment= ASSIGNMENT | |
10534 | // right1= unaryExpression ) | |
10535 | // Grammar/CTFParser.g:991:10: assignment= ASSIGNMENT | |
10536 | // right1= unaryExpression | |
10537 | { | |
10538 | assignment = (Token) match(input, ASSIGNMENT, | |
10539 | FOLLOW_ASSIGNMENT_in_ctfAssignmentExpression3400); | |
10540 | if (state.failed) { | |
10541 | return retval; | |
10542 | } | |
10543 | if (state.backtracking == 0) { | |
10544 | stream_ASSIGNMENT.add(assignment); | |
10545 | } | |
866e5b51 FC |
10546 | |
10547 | pushFollow(FOLLOW_unaryExpression_in_ctfAssignmentExpression3404); | |
63bfc685 | 10548 | right1 = unaryExpression(); |
866e5b51 FC |
10549 | |
10550 | state._fsp--; | |
63bfc685 MK |
10551 | if (state.failed) { |
10552 | return retval; | |
10553 | } | |
10554 | if (state.backtracking == 0) { | |
10555 | stream_unaryExpression.add(right1.getTree()); | |
866e5b51 FC |
10556 | } |
10557 | ||
63bfc685 | 10558 | } |
866e5b51 | 10559 | |
63bfc685 MK |
10560 | // AST REWRITE |
10561 | // elements: right1, left | |
10562 | // token labels: | |
10563 | // rule labels: retval, left, right1 | |
10564 | // token list labels: | |
10565 | // rule list labels: | |
10566 | // wildcard labels: | |
10567 | if (state.backtracking == 0) { | |
866e5b51 | 10568 | retval.tree = root_0; |
63bfc685 MK |
10569 | RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream( |
10570 | adaptor, "rule retval", | |
10571 | retval != null ? retval.tree : null); | |
10572 | RewriteRuleSubtreeStream stream_left = new RewriteRuleSubtreeStream( | |
10573 | adaptor, "rule left", | |
10574 | left != null ? left.tree : null); | |
10575 | RewriteRuleSubtreeStream stream_right1 = new RewriteRuleSubtreeStream( | |
10576 | adaptor, "rule right1", | |
10577 | right1 != null ? right1.tree : null); | |
10578 | ||
10579 | root_0 = (CommonTree) adaptor.nil(); | |
10580 | // 991:56: -> ^( CTF_EXPRESSION_VAL ^( CTF_LEFT | |
10581 | // $left) ^( CTF_RIGHT $right1) ) | |
866e5b51 | 10582 | { |
63bfc685 MK |
10583 | // Grammar/CTFParser.g:991:59: ^( |
10584 | // CTF_EXPRESSION_VAL ^( CTF_LEFT $left) ^( | |
10585 | // CTF_RIGHT $right1) ) | |
866e5b51 | 10586 | { |
63bfc685 MK |
10587 | CommonTree root_1 = (CommonTree) adaptor |
10588 | .nil(); | |
10589 | root_1 = (CommonTree) adaptor.becomeRoot( | |
10590 | adaptor.create(CTF_EXPRESSION_VAL, | |
10591 | "CTF_EXPRESSION_VAL"), | |
10592 | root_1); | |
10593 | ||
10594 | // Grammar/CTFParser.g:991:80: ^( CTF_LEFT | |
10595 | // $left) | |
10596 | { | |
10597 | CommonTree root_2 = (CommonTree) adaptor | |
10598 | .nil(); | |
10599 | root_2 = (CommonTree) adaptor | |
10600 | .becomeRoot(adaptor.create( | |
10601 | CTF_LEFT, "CTF_LEFT"), | |
10602 | root_2); | |
866e5b51 | 10603 | |
63bfc685 MK |
10604 | adaptor.addChild(root_2, |
10605 | stream_left.nextTree()); | |
866e5b51 | 10606 | |
63bfc685 MK |
10607 | adaptor.addChild(root_1, root_2); |
10608 | } | |
10609 | // Grammar/CTFParser.g:991:98: ^( CTF_RIGHT | |
10610 | // $right1) | |
10611 | { | |
10612 | CommonTree root_2 = (CommonTree) adaptor | |
10613 | .nil(); | |
10614 | root_2 = (CommonTree) adaptor | |
10615 | .becomeRoot( | |
10616 | adaptor.create( | |
10617 | CTF_RIGHT, | |
10618 | "CTF_RIGHT"), | |
10619 | root_2); | |
10620 | ||
10621 | adaptor.addChild(root_2, | |
10622 | stream_right1.nextTree()); | |
10623 | ||
10624 | adaptor.addChild(root_1, root_2); | |
10625 | } | |
866e5b51 | 10626 | |
63bfc685 | 10627 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
10628 | } |
10629 | ||
10630 | } | |
10631 | ||
63bfc685 MK |
10632 | retval.tree = root_0; |
10633 | } | |
10634 | } | |
10635 | break; | |
10636 | case 2: | |
10637 | // Grammar/CTFParser.g:992:9: (type_assignment= | |
10638 | // TYPE_ASSIGNMENT right2= typeSpecifier ) | |
10639 | { | |
10640 | // Grammar/CTFParser.g:992:9: (type_assignment= | |
10641 | // TYPE_ASSIGNMENT right2= typeSpecifier ) | |
10642 | // Grammar/CTFParser.g:992:10: type_assignment= | |
10643 | // TYPE_ASSIGNMENT right2= typeSpecifier | |
10644 | { | |
10645 | type_assignment = (Token) match(input, | |
10646 | TYPE_ASSIGNMENT, | |
10647 | FOLLOW_TYPE_ASSIGNMENT_in_ctfAssignmentExpression3438); | |
10648 | if (state.failed) { | |
10649 | return retval; | |
10650 | } | |
10651 | if (state.backtracking == 0) { | |
10652 | stream_TYPE_ASSIGNMENT.add(type_assignment); | |
866e5b51 | 10653 | } |
866e5b51 FC |
10654 | |
10655 | pushFollow(FOLLOW_typeSpecifier_in_ctfAssignmentExpression3443); | |
63bfc685 | 10656 | right2 = typeSpecifier(); |
866e5b51 FC |
10657 | |
10658 | state._fsp--; | |
63bfc685 MK |
10659 | if (state.failed) { |
10660 | return retval; | |
10661 | } | |
10662 | if (state.backtracking == 0) { | |
10663 | stream_typeSpecifier.add(right2.getTree()); | |
866e5b51 FC |
10664 | } |
10665 | ||
63bfc685 | 10666 | } |
866e5b51 | 10667 | |
63bfc685 MK |
10668 | // AST REWRITE |
10669 | // elements: left, right2 | |
10670 | // token labels: | |
10671 | // rule labels: retval, left, right2 | |
10672 | // token list labels: | |
10673 | // rule list labels: | |
10674 | // wildcard labels: | |
10675 | if (state.backtracking == 0) { | |
866e5b51 | 10676 | retval.tree = root_0; |
63bfc685 MK |
10677 | RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream( |
10678 | adaptor, "rule retval", | |
10679 | retval != null ? retval.tree : null); | |
10680 | RewriteRuleSubtreeStream stream_left = new RewriteRuleSubtreeStream( | |
10681 | adaptor, "rule left", | |
10682 | left != null ? left.tree : null); | |
10683 | RewriteRuleSubtreeStream stream_right2 = new RewriteRuleSubtreeStream( | |
10684 | adaptor, "rule right2", | |
10685 | right2 != null ? right2.tree : null); | |
10686 | ||
10687 | root_0 = (CommonTree) adaptor.nil(); | |
10688 | // 992:65: -> ^( CTF_EXPRESSION_TYPE ^( CTF_LEFT | |
10689 | // $left) ^( CTF_RIGHT ^( TYPE_SPECIFIER_LIST | |
10690 | // $right2) ) ) | |
866e5b51 | 10691 | { |
63bfc685 MK |
10692 | // Grammar/CTFParser.g:992:68: ^( |
10693 | // CTF_EXPRESSION_TYPE ^( CTF_LEFT $left) ^( | |
10694 | // CTF_RIGHT ^( TYPE_SPECIFIER_LIST $right2) ) ) | |
866e5b51 | 10695 | { |
63bfc685 MK |
10696 | CommonTree root_1 = (CommonTree) adaptor |
10697 | .nil(); | |
10698 | root_1 = (CommonTree) adaptor.becomeRoot( | |
10699 | adaptor.create(CTF_EXPRESSION_TYPE, | |
10700 | "CTF_EXPRESSION_TYPE"), | |
10701 | root_1); | |
10702 | ||
10703 | // Grammar/CTFParser.g:992:90: ^( CTF_LEFT | |
10704 | // $left) | |
10705 | { | |
10706 | CommonTree root_2 = (CommonTree) adaptor | |
10707 | .nil(); | |
10708 | root_2 = (CommonTree) adaptor | |
10709 | .becomeRoot(adaptor.create( | |
10710 | CTF_LEFT, "CTF_LEFT"), | |
10711 | root_2); | |
866e5b51 | 10712 | |
63bfc685 MK |
10713 | adaptor.addChild(root_2, |
10714 | stream_left.nextTree()); | |
866e5b51 | 10715 | |
63bfc685 MK |
10716 | adaptor.addChild(root_1, root_2); |
10717 | } | |
10718 | // Grammar/CTFParser.g:992:108: ^( CTF_RIGHT | |
10719 | // ^( TYPE_SPECIFIER_LIST $right2) ) | |
10720 | { | |
10721 | CommonTree root_2 = (CommonTree) adaptor | |
10722 | .nil(); | |
10723 | root_2 = (CommonTree) adaptor | |
10724 | .becomeRoot( | |
10725 | adaptor.create( | |
10726 | CTF_RIGHT, | |
10727 | "CTF_RIGHT"), | |
10728 | root_2); | |
10729 | ||
10730 | // Grammar/CTFParser.g:992:120: ^( | |
10731 | // TYPE_SPECIFIER_LIST $right2) | |
10732 | { | |
10733 | CommonTree root_3 = (CommonTree) adaptor | |
10734 | .nil(); | |
10735 | root_3 = (CommonTree) adaptor | |
10736 | .becomeRoot( | |
10737 | adaptor.create( | |
10738 | TYPE_SPECIFIER_LIST, | |
10739 | "TYPE_SPECIFIER_LIST"), | |
10740 | root_3); | |
10741 | ||
10742 | adaptor.addChild(root_3, | |
10743 | stream_right2.nextTree()); | |
10744 | ||
10745 | adaptor.addChild(root_2, root_3); | |
10746 | } | |
10747 | ||
10748 | adaptor.addChild(root_1, root_2); | |
10749 | } | |
866e5b51 | 10750 | |
63bfc685 | 10751 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
10752 | } |
10753 | ||
10754 | } | |
10755 | ||
63bfc685 MK |
10756 | retval.tree = root_0; |
10757 | } | |
866e5b51 | 10758 | } |
63bfc685 | 10759 | break; |
866e5b51 FC |
10760 | |
10761 | } | |
10762 | ||
63bfc685 | 10763 | } |
866e5b51 | 10764 | |
63bfc685 MK |
10765 | } |
10766 | break; | |
10767 | case 2: | |
10768 | // Grammar/CTFParser.g:998:5: ( declarationSpecifiers {...}? | |
10769 | // declaratorList ) | |
10770 | { | |
10771 | // Grammar/CTFParser.g:998:5: ( declarationSpecifiers {...}? | |
10772 | // declaratorList ) | |
10773 | // Grammar/CTFParser.g:998:6: declarationSpecifiers {...}? | |
10774 | // declaratorList | |
10775 | { | |
866e5b51 | 10776 | pushFollow(FOLLOW_declarationSpecifiers_in_ctfAssignmentExpression3493); |
63bfc685 | 10777 | declarationSpecifiers178 = declarationSpecifiers(); |
866e5b51 FC |
10778 | |
10779 | state._fsp--; | |
63bfc685 MK |
10780 | if (state.failed) { |
10781 | return retval; | |
10782 | } | |
10783 | if (state.backtracking == 0) { | |
10784 | stream_declarationSpecifiers | |
10785 | .add(declarationSpecifiers178.getTree()); | |
10786 | } | |
10787 | if (!((inTypedef()))) { | |
10788 | if (state.backtracking > 0) { | |
10789 | state.failed = true; | |
10790 | return retval; | |
10791 | } | |
10792 | throw new FailedPredicateException(input, | |
10793 | "ctfAssignmentExpression", "inTypedef()"); | |
866e5b51 FC |
10794 | } |
10795 | pushFollow(FOLLOW_declaratorList_in_ctfAssignmentExpression3497); | |
63bfc685 | 10796 | declaratorList179 = declaratorList(); |
866e5b51 FC |
10797 | |
10798 | state._fsp--; | |
63bfc685 MK |
10799 | if (state.failed) { |
10800 | return retval; | |
10801 | } | |
10802 | if (state.backtracking == 0) { | |
10803 | stream_declaratorList.add(declaratorList179.getTree()); | |
866e5b51 FC |
10804 | } |
10805 | ||
63bfc685 | 10806 | } |
866e5b51 | 10807 | |
63bfc685 MK |
10808 | // AST REWRITE |
10809 | // elements: declaratorList, declarationSpecifiers | |
10810 | // token labels: | |
10811 | // rule labels: retval | |
10812 | // token list labels: | |
10813 | // rule list labels: | |
10814 | // wildcard labels: | |
10815 | if (state.backtracking == 0) { | |
866e5b51 | 10816 | retval.tree = root_0; |
63bfc685 MK |
10817 | RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream( |
10818 | adaptor, "rule retval", | |
10819 | retval != null ? retval.tree : null); | |
866e5b51 | 10820 | |
63bfc685 MK |
10821 | root_0 = (CommonTree) adaptor.nil(); |
10822 | // 999:5: -> ^( TYPEDEF declaratorList declarationSpecifiers | |
10823 | // ) | |
866e5b51 | 10824 | { |
63bfc685 MK |
10825 | // Grammar/CTFParser.g:999:8: ^( TYPEDEF declaratorList |
10826 | // declarationSpecifiers ) | |
866e5b51 | 10827 | { |
63bfc685 MK |
10828 | CommonTree root_1 = (CommonTree) adaptor.nil(); |
10829 | root_1 = (CommonTree) adaptor.becomeRoot( | |
10830 | adaptor.create(TYPEDEF, "TYPEDEF"), root_1); | |
866e5b51 | 10831 | |
63bfc685 MK |
10832 | adaptor.addChild(root_1, |
10833 | stream_declaratorList.nextTree()); | |
10834 | adaptor.addChild(root_1, | |
10835 | stream_declarationSpecifiers.nextTree()); | |
866e5b51 | 10836 | |
63bfc685 | 10837 | adaptor.addChild(root_0, root_1); |
866e5b51 FC |
10838 | } |
10839 | ||
10840 | } | |
10841 | ||
63bfc685 MK |
10842 | retval.tree = root_0; |
10843 | } | |
10844 | } | |
10845 | break; | |
10846 | case 3: | |
10847 | // Grammar/CTFParser.g:1002:5: typealiasDecl | |
10848 | { | |
10849 | root_0 = (CommonTree) adaptor.nil(); | |
866e5b51 | 10850 | |
63bfc685 MK |
10851 | pushFollow(FOLLOW_typealiasDecl_in_ctfAssignmentExpression3525); |
10852 | typealiasDecl180 = typealiasDecl(); | |
866e5b51 | 10853 | |
63bfc685 MK |
10854 | state._fsp--; |
10855 | if (state.failed) { | |
10856 | return retval; | |
10857 | } | |
10858 | if (state.backtracking == 0) { | |
10859 | adaptor.addChild(root_0, typealiasDecl180.getTree()); | |
10860 | } | |
866e5b51 | 10861 | |
63bfc685 MK |
10862 | } |
10863 | break; | |
866e5b51 FC |
10864 | |
10865 | } | |
10866 | retval.stop = input.LT(-1); | |
10867 | ||
63bfc685 | 10868 | if (state.backtracking == 0) { |
866e5b51 | 10869 | |
63bfc685 MK |
10870 | retval.tree = (CommonTree) adaptor.rulePostProcessing(root_0); |
10871 | adaptor.setTokenBoundaries(retval.tree, retval.start, | |
10872 | retval.stop); | |
866e5b51 | 10873 | } |
63bfc685 | 10874 | if (state.backtracking == 0) { |
866e5b51 FC |
10875 | |
10876 | if (inTypedef()) { | |
63bfc685 | 10877 | typedefOff(); |
866e5b51 FC |
10878 | } |
10879 | exit("ctfAssignmentExpression"); | |
10880 | ||
10881 | } | |
10882 | } | |
10883 | ||
63bfc685 MK |
10884 | catch (RecognitionException e) { |
10885 | throw e; | |
10886 | ||
866e5b51 FC |
10887 | } |
10888 | return retval; | |
10889 | } | |
63bfc685 | 10890 | |
866e5b51 FC |
10891 | // $ANTLR end "ctfAssignmentExpression" |
10892 | ||
10893 | // $ANTLR start synpred1_CTFParser | |
63bfc685 | 10894 | public final void synpred1_CTFParser_fragment() throws RecognitionException { |
866e5b51 FC |
10895 | // Grammar/CTFParser.g:250:5: ( IDENTIFIER ) |
10896 | // Grammar/CTFParser.g:250:6: IDENTIFIER | |
10897 | { | |
63bfc685 MK |
10898 | match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_synpred1_CTFParser470); |
10899 | if (state.failed) { | |
10900 | return; | |
10901 | } | |
866e5b51 FC |
10902 | |
10903 | } | |
10904 | } | |
63bfc685 | 10905 | |
866e5b51 FC |
10906 | // $ANTLR end synpred1_CTFParser |
10907 | ||
10908 | // $ANTLR start synpred2_CTFParser | |
63bfc685 | 10909 | public final void synpred2_CTFParser_fragment() throws RecognitionException { |
866e5b51 FC |
10910 | // Grammar/CTFParser.g:251:5: ( ctfKeyword ) |
10911 | // Grammar/CTFParser.g:251:6: ctfKeyword | |
10912 | { | |
63bfc685 MK |
10913 | pushFollow(FOLLOW_ctfKeyword_in_synpred2_CTFParser492); |
10914 | ctfKeyword(); | |
866e5b51 | 10915 | |
63bfc685 MK |
10916 | state._fsp--; |
10917 | if (state.failed) { | |
10918 | return; | |
10919 | } | |
866e5b51 FC |
10920 | |
10921 | } | |
10922 | } | |
63bfc685 | 10923 | |
866e5b51 FC |
10924 | // $ANTLR end synpred2_CTFParser |
10925 | ||
10926 | // $ANTLR start synpred3_CTFParser | |
63bfc685 | 10927 | public final void synpred3_CTFParser_fragment() throws RecognitionException { |
866e5b51 FC |
10928 | // Grammar/CTFParser.g:252:5: ( STRING_LITERAL ) |
10929 | // Grammar/CTFParser.g:252:6: STRING_LITERAL | |
10930 | { | |
63bfc685 MK |
10931 | match(input, STRING_LITERAL, |
10932 | FOLLOW_STRING_LITERAL_in_synpred3_CTFParser512); | |
10933 | if (state.failed) { | |
10934 | return; | |
10935 | } | |
866e5b51 FC |
10936 | |
10937 | } | |
10938 | } | |
63bfc685 | 10939 | |
866e5b51 FC |
10940 | // $ANTLR end synpred3_CTFParser |
10941 | ||
10942 | // Delegated rules | |
10943 | ||
10944 | public final boolean synpred2_CTFParser() { | |
10945 | state.backtracking++; | |
10946 | int start = input.mark(); | |
10947 | try { | |
10948 | synpred2_CTFParser_fragment(); // can never throw exception | |
10949 | } catch (RecognitionException re) { | |
63bfc685 MK |
10950 | if(System.err != null) {//findbugs |
10951 | System.err.println("impossible: " + re); | |
10952 | } | |
866e5b51 FC |
10953 | } |
10954 | boolean success = !state.failed; | |
10955 | input.rewind(start); | |
10956 | state.backtracking--; | |
63bfc685 | 10957 | state.failed = false; |
866e5b51 FC |
10958 | return success; |
10959 | } | |
63bfc685 | 10960 | |
866e5b51 FC |
10961 | public final boolean synpred1_CTFParser() { |
10962 | state.backtracking++; | |
10963 | int start = input.mark(); | |
10964 | try { | |
10965 | synpred1_CTFParser_fragment(); // can never throw exception | |
10966 | } catch (RecognitionException re) { | |
63bfc685 MK |
10967 | if( System.err != null ) {//findbugs |
10968 | System.err.println("impossible: " + re); | |
10969 | } | |
866e5b51 FC |
10970 | } |
10971 | boolean success = !state.failed; | |
10972 | input.rewind(start); | |
10973 | state.backtracking--; | |
63bfc685 | 10974 | state.failed = false; |
866e5b51 FC |
10975 | return success; |
10976 | } | |
63bfc685 | 10977 | |
866e5b51 FC |
10978 | public final boolean synpred3_CTFParser() { |
10979 | state.backtracking++; | |
10980 | int start = input.mark(); | |
10981 | try { | |
10982 | synpred3_CTFParser_fragment(); // can never throw exception | |
10983 | } catch (RecognitionException re) { | |
63bfc685 MK |
10984 | if( System.err != null ) { //findbugs |
10985 | System.err.println("impossible: " + re); | |
10986 | } | |
866e5b51 FC |
10987 | } |
10988 | boolean success = !state.failed; | |
10989 | input.rewind(start); | |
10990 | state.backtracking--; | |
63bfc685 | 10991 | state.failed = false; |
866e5b51 FC |
10992 | return success; |
10993 | } | |
10994 | ||
866e5b51 FC |
10995 | protected DFA10 dfa10 = new DFA10(this); |
10996 | protected DFA17 dfa17 = new DFA17(this); | |
10997 | protected DFA24 dfa24 = new DFA24(this); | |
10998 | protected DFA32 dfa32 = new DFA32(this); | |
10999 | protected DFA54 dfa54 = new DFA54(this); | |
63bfc685 MK |
11000 | static final String DFA10_eotS = "\16\uffff"; |
11001 | static final String DFA10_eofS = "\16\uffff"; | |
11002 | static final String DFA10_minS = "\1\4\15\uffff"; | |
11003 | static final String DFA10_maxS = "\1\116\15\uffff"; | |
11004 | static final String DFA10_acceptS = "\1\uffff\2\1\7\uffff\1\2\3\uffff"; | |
11005 | static final String DFA10_specialS = "\16\uffff}>"; | |
866e5b51 | 11006 | static final String[] DFA10_transitionS = { |
63bfc685 MK |
11007 | "\1\1\4\uffff\1\2\6\uffff\1\1\1\12\1\1\1\uffff\1\12\10\uffff" |
11008 | + "\2\12\22\uffff\1\1\4\uffff\1\1\1\uffff\1\1\2\uffff\1\1\10\uffff" | |
11009 | + "\1\1\2\uffff\1\1\6\uffff\1\1", "", "", "", "", "", "", | |
11010 | "", "", "", "", "", "", "" }; | |
866e5b51 FC |
11011 | |
11012 | static final short[] DFA10_eot = DFA.unpackEncodedString(DFA10_eotS); | |
11013 | static final short[] DFA10_eof = DFA.unpackEncodedString(DFA10_eofS); | |
63bfc685 MK |
11014 | static final char[] DFA10_min = DFA |
11015 | .unpackEncodedStringToUnsignedChars(DFA10_minS); | |
11016 | static final char[] DFA10_max = DFA | |
11017 | .unpackEncodedStringToUnsignedChars(DFA10_maxS); | |
866e5b51 | 11018 | static final short[] DFA10_accept = DFA.unpackEncodedString(DFA10_acceptS); |
63bfc685 MK |
11019 | static final short[] DFA10_special = DFA |
11020 | .unpackEncodedString(DFA10_specialS); | |
866e5b51 FC |
11021 | static final short[][] DFA10_transition; |
11022 | ||
11023 | static { | |
11024 | int numStates = DFA10_transitionS.length; | |
11025 | DFA10_transition = new short[numStates][]; | |
63bfc685 | 11026 | for (int i = 0; i < numStates; i++) { |
866e5b51 FC |
11027 | DFA10_transition[i] = DFA.unpackEncodedString(DFA10_transitionS[i]); |
11028 | } | |
11029 | } | |
11030 | ||
787bc247 | 11031 | static class DFA10 extends DFA { |
866e5b51 FC |
11032 | |
11033 | public DFA10(BaseRecognizer recognizer) { | |
11034 | this.recognizer = recognizer; | |
11035 | this.decisionNumber = 10; | |
11036 | this.eot = DFA10_eot; | |
11037 | this.eof = DFA10_eof; | |
11038 | this.min = DFA10_min; | |
11039 | this.max = DFA10_max; | |
11040 | this.accept = DFA10_accept; | |
11041 | this.special = DFA10_special; | |
11042 | this.transition = DFA10_transition; | |
11043 | } | |
63bfc685 | 11044 | |
866e5b51 FC |
11045 | @Override |
11046 | public String getDescription() { | |
11047 | return "281:1: postfixExpression : ( ( primaryExpression ) ( postfixExpressionSuffix )* | ( ( ctfSpecifierHead ) ( postfixExpressionSuffix )+ ) );"; | |
11048 | } | |
11049 | } | |
63bfc685 MK |
11050 | |
11051 | static final String DFA17_eotS = "\22\uffff"; | |
11052 | static final String DFA17_eofS = "\22\uffff"; | |
11053 | static final String DFA17_minS = "\1\6\21\uffff"; | |
11054 | static final String DFA17_maxS = "\1\116\21\uffff"; | |
11055 | static final String DFA17_acceptS = "\1\uffff\1\1\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11\1\12\1\13\1\14\1" | |
11056 | + "\15\1\16\1\17\1\20\1\21"; | |
11057 | static final String DFA17_specialS = "\1\0\21\uffff}>"; | |
866e5b51 | 11058 | static final String[] DFA17_transitionS = { |
63bfc685 MK |
11059 | "\1\7\1\10\1\17\1\uffff\1\20\1\1\1\20\1\2\1\3\1\4\1\5\1\uffff" |
11060 | + "\1\20\1\15\3\uffff\1\6\1\16\1\11\1\12\1\13\1\14\61\uffff\1\21", | |
11061 | "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; | |
866e5b51 FC |
11062 | |
11063 | static final short[] DFA17_eot = DFA.unpackEncodedString(DFA17_eotS); | |
11064 | static final short[] DFA17_eof = DFA.unpackEncodedString(DFA17_eofS); | |
63bfc685 MK |
11065 | static final char[] DFA17_min = DFA |
11066 | .unpackEncodedStringToUnsignedChars(DFA17_minS); | |
11067 | static final char[] DFA17_max = DFA | |
11068 | .unpackEncodedStringToUnsignedChars(DFA17_maxS); | |
866e5b51 | 11069 | static final short[] DFA17_accept = DFA.unpackEncodedString(DFA17_acceptS); |
63bfc685 MK |
11070 | static final short[] DFA17_special = DFA |
11071 | .unpackEncodedString(DFA17_specialS); | |
866e5b51 FC |
11072 | static final short[][] DFA17_transition; |
11073 | ||
11074 | static { | |
11075 | int numStates = DFA17_transitionS.length; | |
11076 | DFA17_transition = new short[numStates][]; | |
63bfc685 | 11077 | for (int i = 0; i < numStates; i++) { |
866e5b51 FC |
11078 | DFA17_transition[i] = DFA.unpackEncodedString(DFA17_transitionS[i]); |
11079 | } | |
11080 | } | |
11081 | ||
11082 | class DFA17 extends DFA { | |
11083 | ||
11084 | public DFA17(BaseRecognizer recognizer) { | |
11085 | this.recognizer = recognizer; | |
11086 | this.decisionNumber = 17; | |
11087 | this.eot = DFA17_eot; | |
11088 | this.eof = DFA17_eof; | |
11089 | this.min = DFA17_min; | |
11090 | this.max = DFA17_max; | |
11091 | this.accept = DFA17_accept; | |
11092 | this.special = DFA17_special; | |
11093 | this.transition = DFA17_transition; | |
11094 | } | |
63bfc685 | 11095 | |
866e5b51 FC |
11096 | @Override |
11097 | public String getDescription() { | |
11098 | return "384:1: typeSpecifier : ( FLOATTOK | INTTOK | LONGTOK | SHORTTOK | SIGNEDTOK | UNSIGNEDTOK | CHARTOK | DOUBLETOK | VOIDTOK | BOOLTOK | COMPLEXTOK | IMAGINARYTOK | structSpecifier | variantSpecifier | enumSpecifier | ctfTypeSpecifier | {...}? => typedefName );"; | |
11099 | } | |
63bfc685 MK |
11100 | |
11101 | @SuppressWarnings({ "synthetic-access" }) | |
866e5b51 | 11102 | @Override |
63bfc685 MK |
11103 | public int specialStateTransition(final int inputS, IntStream _input) |
11104 | throws NoViableAltException { | |
11105 | TokenStream input = (TokenStream) _input; | |
11106 | int _s = inputS; | |
11107 | int s = inputS; | |
11108 | switch (s) { | |
11109 | case 0: | |
11110 | int LA17_0 = input.LA(1); | |
866e5b51 | 11111 | |
63bfc685 MK |
11112 | int index17_0 = input.index(); |
11113 | input.rewind(); | |
11114 | s = -1; | |
11115 | if ((LA17_0 == FLOATTOK)) { | |
11116 | s = 1; | |
11117 | } | |
866e5b51 | 11118 | |
63bfc685 MK |
11119 | else if ((LA17_0 == INTTOK)) { |
11120 | s = 2; | |
11121 | } | |
866e5b51 | 11122 | |
63bfc685 MK |
11123 | else if ((LA17_0 == LONGTOK)) { |
11124 | s = 3; | |
11125 | } | |
866e5b51 | 11126 | |
63bfc685 MK |
11127 | else if ((LA17_0 == SHORTTOK)) { |
11128 | s = 4; | |
11129 | } | |
866e5b51 | 11130 | |
63bfc685 MK |
11131 | else if ((LA17_0 == SIGNEDTOK)) { |
11132 | s = 5; | |
11133 | } | |
866e5b51 | 11134 | |
63bfc685 MK |
11135 | else if ((LA17_0 == UNSIGNEDTOK)) { |
11136 | s = 6; | |
11137 | } | |
866e5b51 | 11138 | |
63bfc685 MK |
11139 | else if ((LA17_0 == CHARTOK)) { |
11140 | s = 7; | |
11141 | } | |
866e5b51 | 11142 | |
63bfc685 MK |
11143 | else if ((LA17_0 == DOUBLETOK)) { |
11144 | s = 8; | |
11145 | } | |
866e5b51 | 11146 | |
63bfc685 MK |
11147 | else if ((LA17_0 == VOIDTOK)) { |
11148 | s = 9; | |
11149 | } | |
866e5b51 | 11150 | |
63bfc685 MK |
11151 | else if ((LA17_0 == BOOLTOK)) { |
11152 | s = 10; | |
11153 | } | |
866e5b51 | 11154 | |
63bfc685 MK |
11155 | else if ((LA17_0 == COMPLEXTOK)) { |
11156 | s = 11; | |
11157 | } | |
866e5b51 | 11158 | |
63bfc685 MK |
11159 | else if ((LA17_0 == IMAGINARYTOK)) { |
11160 | s = 12; | |
11161 | } | |
866e5b51 | 11162 | |
63bfc685 MK |
11163 | else if ((LA17_0 == STRUCTTOK)) { |
11164 | s = 13; | |
11165 | } | |
866e5b51 | 11166 | |
63bfc685 MK |
11167 | else if ((LA17_0 == VARIANTTOK)) { |
11168 | s = 14; | |
11169 | } | |
866e5b51 | 11170 | |
63bfc685 MK |
11171 | else if ((LA17_0 == ENUMTOK)) { |
11172 | s = 15; | |
11173 | } | |
866e5b51 | 11174 | |
63bfc685 MK |
11175 | else if (((LA17_0 == FLOATINGPOINTTOK) |
11176 | || (LA17_0 == INTEGERTOK) || (LA17_0 == STRINGTOK))) { | |
11177 | s = 16; | |
11178 | } | |
866e5b51 | 11179 | |
63bfc685 MK |
11180 | else if ((LA17_0 == IDENTIFIER) |
11181 | && ((inTypealiasAlias() || isTypeName(input.LT(1) | |
11182 | .getText())))) { | |
11183 | s = 17; | |
11184 | } | |
866e5b51 | 11185 | |
63bfc685 MK |
11186 | input.seek(index17_0); |
11187 | if (s >= 0) { | |
11188 | return s; | |
11189 | } | |
11190 | break; | |
866e5b51 | 11191 | } |
63bfc685 MK |
11192 | if (state.backtracking > 0) { |
11193 | state.failed = true; | |
11194 | return -1; | |
11195 | } | |
11196 | NoViableAltException nvae = new NoViableAltException( | |
11197 | getDescription(), 17, _s, input); | |
866e5b51 FC |
11198 | error(nvae); |
11199 | throw nvae; | |
11200 | } | |
11201 | } | |
63bfc685 MK |
11202 | |
11203 | static final String DFA24_eotS = "\6\uffff"; | |
11204 | static final String DFA24_eofS = "\6\uffff"; | |
11205 | static final String DFA24_minS = "\1\60\1\5\1\0\1\5\2\uffff"; | |
11206 | static final String DFA24_maxS = "\2\116\1\0\1\116\2\uffff"; | |
11207 | static final String DFA24_acceptS = "\4\uffff\1\1\1\2"; | |
11208 | static final String DFA24_specialS = "\2\uffff\1\0\3\uffff}>"; | |
11209 | static final String[] DFA24_transitionS = { "\1\1\35\uffff\1\2", | |
11210 | "\1\3\52\uffff\1\1\35\uffff\1\2", "\1\uffff", | |
11211 | "\1\3\52\uffff\1\1\35\uffff\1\2", "", "" }; | |
866e5b51 FC |
11212 | |
11213 | static final short[] DFA24_eot = DFA.unpackEncodedString(DFA24_eotS); | |
11214 | static final short[] DFA24_eof = DFA.unpackEncodedString(DFA24_eofS); | |
63bfc685 MK |
11215 | static final char[] DFA24_min = DFA |
11216 | .unpackEncodedStringToUnsignedChars(DFA24_minS); | |
11217 | static final char[] DFA24_max = DFA | |
11218 | .unpackEncodedStringToUnsignedChars(DFA24_maxS); | |
866e5b51 | 11219 | static final short[] DFA24_accept = DFA.unpackEncodedString(DFA24_acceptS); |
63bfc685 MK |
11220 | static final short[] DFA24_special = DFA |
11221 | .unpackEncodedString(DFA24_specialS); | |
866e5b51 FC |
11222 | static final short[][] DFA24_transition; |
11223 | ||
11224 | static { | |
11225 | int numStates = DFA24_transitionS.length; | |
11226 | DFA24_transition = new short[numStates][]; | |
63bfc685 | 11227 | for (int i = 0; i < numStates; i++) { |
866e5b51 FC |
11228 | DFA24_transition[i] = DFA.unpackEncodedString(DFA24_transitionS[i]); |
11229 | } | |
11230 | } | |
11231 | ||
11232 | class DFA24 extends DFA { | |
11233 | ||
11234 | public DFA24(BaseRecognizer recognizer) { | |
11235 | this.recognizer = recognizer; | |
11236 | this.decisionNumber = 24; | |
11237 | this.eot = DFA24_eot; | |
11238 | this.eof = DFA24_eof; | |
11239 | this.min = DFA24_min; | |
11240 | this.max = DFA24_max; | |
11241 | this.accept = DFA24_accept; | |
11242 | this.special = DFA24_special; | |
11243 | this.transition = DFA24_transition; | |
11244 | } | |
63bfc685 | 11245 | |
866e5b51 FC |
11246 | @Override |
11247 | public String getDescription() { | |
11248 | return "521:7: ({...}? => declaratorList -> ^( TYPEDEF declaratorList declarationSpecifiers ) | structOrVariantDeclaratorList -> ^( SV_DECLARATION declarationSpecifiers structOrVariantDeclaratorList ) )"; | |
11249 | } | |
63bfc685 | 11250 | |
866e5b51 | 11251 | @Override |
63bfc685 MK |
11252 | public int specialStateTransition(int s, IntStream _input) |
11253 | throws NoViableAltException { | |
11254 | TokenStream input = (TokenStream) _input; | |
11255 | int _s = s; | |
11256 | switch (s) { | |
11257 | case 0: | |
11258 | int LA24_2 = input.LA(1); | |
11259 | ||
11260 | int index24_2 = input.index(); | |
11261 | input.rewind(); | |
11262 | s = -1; | |
11263 | if (((inTypedef()))) { | |
11264 | s = 4; | |
11265 | } | |
11266 | ||
11267 | else if ((true)) { | |
11268 | s = 5; | |
11269 | } | |
11270 | ||
11271 | input.seek(index24_2); | |
11272 | if (s >= 0) { | |
11273 | return s; | |
11274 | } | |
11275 | break; | |
866e5b51 | 11276 | } |
63bfc685 MK |
11277 | if (state.backtracking > 0) { |
11278 | state.failed = true; | |
11279 | return -1; | |
11280 | } | |
11281 | NoViableAltException nvae = new NoViableAltException( | |
11282 | getDescription(), 24, _s, input); | |
866e5b51 FC |
11283 | error(nvae); |
11284 | throw nvae; | |
11285 | } | |
11286 | } | |
63bfc685 MK |
11287 | |
11288 | static final String DFA32_eotS = "\35\uffff"; | |
11289 | static final String DFA32_eofS = "\1\3\34\uffff"; | |
11290 | static final String DFA32_minS = "\1\5\34\uffff"; | |
11291 | static final String DFA32_maxS = "\1\116\34\uffff"; | |
11292 | static final String DFA32_acceptS = "\1\uffff\1\1\1\2\1\3\31\uffff"; | |
11293 | static final String DFA32_specialS = "\35\uffff}>"; | |
866e5b51 | 11294 | static final String[] DFA32_transitionS = { |
63bfc685 MK |
11295 | "\4\3\1\uffff\7\3\1\uffff\2\3\2\uffff\7\3\6\uffff\1\1\2\uffff" |
11296 | + "\1\3\4\uffff\1\3\1\uffff\1\2\1\uffff\2\3\35\uffff\1\3", | |
11297 | "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", | |
11298 | "", "", "", "", "", "", "", "", "", "", "" }; | |
866e5b51 FC |
11299 | |
11300 | static final short[] DFA32_eot = DFA.unpackEncodedString(DFA32_eotS); | |
11301 | static final short[] DFA32_eof = DFA.unpackEncodedString(DFA32_eofS); | |
63bfc685 MK |
11302 | static final char[] DFA32_min = DFA |
11303 | .unpackEncodedStringToUnsignedChars(DFA32_minS); | |
11304 | static final char[] DFA32_max = DFA | |
11305 | .unpackEncodedStringToUnsignedChars(DFA32_maxS); | |
866e5b51 | 11306 | static final short[] DFA32_accept = DFA.unpackEncodedString(DFA32_acceptS); |
63bfc685 MK |
11307 | static final short[] DFA32_special = DFA |
11308 | .unpackEncodedString(DFA32_specialS); | |
866e5b51 FC |
11309 | static final short[][] DFA32_transition; |
11310 | ||
11311 | static { | |
11312 | int numStates = DFA32_transitionS.length; | |
11313 | DFA32_transition = new short[numStates][]; | |
63bfc685 | 11314 | for (int i = 0; i < numStates; i++) { |
866e5b51 FC |
11315 | DFA32_transition[i] = DFA.unpackEncodedString(DFA32_transitionS[i]); |
11316 | } | |
11317 | } | |
11318 | ||
787bc247 | 11319 | static class DFA32 extends DFA { |
866e5b51 FC |
11320 | |
11321 | public DFA32(BaseRecognizer recognizer) { | |
11322 | this.recognizer = recognizer; | |
11323 | this.decisionNumber = 32; | |
11324 | this.eot = DFA32_eot; | |
11325 | this.eof = DFA32_eof; | |
11326 | this.min = DFA32_min; | |
11327 | this.max = DFA32_max; | |
11328 | this.accept = DFA32_accept; | |
11329 | this.special = DFA32_special; | |
11330 | this.transition = DFA32_transition; | |
11331 | } | |
63bfc685 | 11332 | |
866e5b51 FC |
11333 | @Override |
11334 | public String getDescription() { | |
11335 | return "655:4: ( enumContainerType enumBody | enumBody | )"; | |
11336 | } | |
11337 | } | |
63bfc685 MK |
11338 | |
11339 | static final String DFA54_eotS = "\34\uffff"; | |
11340 | static final String DFA54_eofS = "\1\2\33\uffff"; | |
11341 | static final String DFA54_minS = "\1\5\33\uffff"; | |
11342 | static final String DFA54_maxS = "\1\116\33\uffff"; | |
11343 | static final String DFA54_acceptS = "\1\uffff\1\1\1\2\31\uffff"; | |
11344 | static final String DFA54_specialS = "\34\uffff}>"; | |
866e5b51 | 11345 | static final String[] DFA54_transitionS = { |
63bfc685 MK |
11346 | "\4\2\1\uffff\7\2\1\uffff\2\2\2\uffff\7\2\11\uffff\1\2\4\uffff" |
11347 | + "\1\2\1\uffff\1\1\1\uffff\2\2\35\uffff\1\2", "", "", "", | |
11348 | "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", | |
11349 | "", "", "", "", "", "", "" }; | |
866e5b51 FC |
11350 | |
11351 | static final short[] DFA54_eot = DFA.unpackEncodedString(DFA54_eotS); | |
11352 | static final short[] DFA54_eof = DFA.unpackEncodedString(DFA54_eofS); | |
63bfc685 MK |
11353 | static final char[] DFA54_min = DFA |
11354 | .unpackEncodedStringToUnsignedChars(DFA54_minS); | |
11355 | static final char[] DFA54_max = DFA | |
11356 | .unpackEncodedStringToUnsignedChars(DFA54_maxS); | |
866e5b51 | 11357 | static final short[] DFA54_accept = DFA.unpackEncodedString(DFA54_acceptS); |
63bfc685 MK |
11358 | static final short[] DFA54_special = DFA |
11359 | .unpackEncodedString(DFA54_specialS); | |
866e5b51 FC |
11360 | static final short[][] DFA54_transition; |
11361 | ||
11362 | static { | |
11363 | int numStates = DFA54_transitionS.length; | |
11364 | DFA54_transition = new short[numStates][]; | |
63bfc685 | 11365 | for (int i = 0; i < numStates; i++) { |
866e5b51 FC |
11366 | DFA54_transition[i] = DFA.unpackEncodedString(DFA54_transitionS[i]); |
11367 | } | |
11368 | } | |
11369 | ||
787bc247 | 11370 | static class DFA54 extends DFA { |
866e5b51 FC |
11371 | |
11372 | public DFA54(BaseRecognizer recognizer) { | |
11373 | this.recognizer = recognizer; | |
11374 | this.decisionNumber = 54; | |
11375 | this.eot = DFA54_eot; | |
11376 | this.eof = DFA54_eof; | |
11377 | this.min = DFA54_min; | |
11378 | this.max = DFA54_max; | |
11379 | this.accept = DFA54_accept; | |
11380 | this.special = DFA54_special; | |
11381 | this.transition = DFA54_transition; | |
11382 | } | |
63bfc685 | 11383 | |
866e5b51 FC |
11384 | @Override |
11385 | public String getDescription() { | |
11386 | return "954:15: ( ctfBody )?"; | |
11387 | } | |
11388 | } | |
63bfc685 MK |
11389 | |
11390 | public static final BitSet FOLLOW_declaration_in_parse321 = new BitSet( | |
11391 | new long[] { 0x000000007FFFFFE0L, 0x0000000000004000L }); | |
11392 | public static final BitSet FOLLOW_EOF_in_parse324 = new BitSet( | |
11393 | new long[] { 0x0000000000000002L }); | |
11394 | public static final BitSet FOLLOW_SIGN_in_numberLiteral357 = new BitSet( | |
11395 | new long[] { 0x0942000000000000L }); | |
11396 | public static final BitSet FOLLOW_HEX_LITERAL_in_numberLiteral362 = new BitSet( | |
11397 | new long[] { 0x0000000000000002L }); | |
11398 | public static final BitSet FOLLOW_DECIMAL_LITERAL_in_numberLiteral379 = new BitSet( | |
11399 | new long[] { 0x0000000000000002L }); | |
11400 | public static final BitSet FOLLOW_OCTAL_LITERAL_in_numberLiteral396 = new BitSet( | |
11401 | new long[] { 0x0000000000000002L }); | |
11402 | public static final BitSet FOLLOW_numberLiteral_in_constant432 = new BitSet( | |
11403 | new long[] { 0x0000000000000002L }); | |
11404 | public static final BitSet FOLLOW_enumConstant_in_constant438 = new BitSet( | |
11405 | new long[] { 0x0000000000000002L }); | |
11406 | public static final BitSet FOLLOW_CHARACTER_LITERAL_in_constant444 = new BitSet( | |
11407 | new long[] { 0x0000000000000002L }); | |
11408 | public static final BitSet FOLLOW_IDENTIFIER_in_primaryExpression475 = new BitSet( | |
11409 | new long[] { 0x0000000000000002L }); | |
11410 | public static final BitSet FOLLOW_ctfKeyword_in_primaryExpression497 = new BitSet( | |
11411 | new long[] { 0x0000000000000002L }); | |
11412 | public static final BitSet FOLLOW_STRING_LITERAL_in_primaryExpression517 = new BitSet( | |
11413 | new long[] { 0x0000000000000002L }); | |
11414 | public static final BitSet FOLLOW_constant_in_primaryExpression538 = new BitSet( | |
11415 | new long[] { 0x0000000000000002L }); | |
11416 | public static final BitSet FOLLOW_DOT_in_reference564 = new BitSet( | |
11417 | new long[] { 0x0000000000000000L, 0x0000000000004000L }); | |
11418 | public static final BitSet FOLLOW_ARROW_in_reference570 = new BitSet( | |
11419 | new long[] { 0x0000000000000000L, 0x0000000000004000L }); | |
11420 | public static final BitSet FOLLOW_IDENTIFIER_in_reference573 = new BitSet( | |
11421 | new long[] { 0x0000000000000002L }); | |
11422 | public static final BitSet FOLLOW_OPENBRAC_in_postfixExpressionSuffix612 = new BitSet( | |
11423 | new long[] { 0x0942000060170210L, 0x0000000000004090L }); | |
11424 | public static final BitSet FOLLOW_unaryExpression_in_postfixExpressionSuffix614 = new BitSet( | |
11425 | new long[] { 0x0000040000000000L }); | |
11426 | public static final BitSet FOLLOW_CLOSEBRAC_in_postfixExpressionSuffix616 = new BitSet( | |
11427 | new long[] { 0x0000000000000002L }); | |
11428 | public static final BitSet FOLLOW_reference_in_postfixExpressionSuffix624 = new BitSet( | |
11429 | new long[] { 0x0000000000000002L }); | |
11430 | public static final BitSet FOLLOW_primaryExpression_in_postfixExpression648 = new BitSet( | |
11431 | new long[] { 0x000C020000000002L }); | |
11432 | public static final BitSet FOLLOW_postfixExpressionSuffix_in_postfixExpression652 = new BitSet( | |
11433 | new long[] { 0x000C020000000002L }); | |
11434 | public static final BitSet FOLLOW_ctfSpecifierHead_in_postfixExpression661 = new BitSet( | |
11435 | new long[] { 0x000C020000000000L }); | |
11436 | public static final BitSet FOLLOW_postfixExpressionSuffix_in_postfixExpression666 = new BitSet( | |
11437 | new long[] { 0x000C020000000002L }); | |
11438 | public static final BitSet FOLLOW_postfixExpression_in_unaryExpression700 = new BitSet( | |
11439 | new long[] { 0x0000000000000002L }); | |
11440 | public static final BitSet FOLLOW_STRING_LITERAL_in_enumConstant725 = new BitSet( | |
11441 | new long[] { 0x0000000000000002L }); | |
11442 | public static final BitSet FOLLOW_IDENTIFIER_in_enumConstant741 = new BitSet( | |
11443 | new long[] { 0x0000000000000002L }); | |
11444 | public static final BitSet FOLLOW_ctfKeyword_in_enumConstant757 = new BitSet( | |
11445 | new long[] { 0x0000000000000002L }); | |
11446 | public static final BitSet FOLLOW_declarationSpecifiers_in_declaration790 = new BitSet( | |
11447 | new long[] { 0x0001800000000000L, 0x0000000000004000L }); | |
11448 | public static final BitSet FOLLOW_declaratorList_in_declaration792 = new BitSet( | |
11449 | new long[] { 0x0000800000000000L }); | |
11450 | public static final BitSet FOLLOW_TERM_in_declaration795 = new BitSet( | |
11451 | new long[] { 0x0000000000000002L }); | |
11452 | public static final BitSet FOLLOW_ctfSpecifier_in_declaration844 = new BitSet( | |
11453 | new long[] { 0x0000800000000000L }); | |
11454 | public static final BitSet FOLLOW_TERM_in_declaration846 = new BitSet( | |
11455 | new long[] { 0x0000000000000002L }); | |
11456 | public static final BitSet FOLLOW_storageClassSpecifier_in_declarationSpecifiers891 = new BitSet( | |
11457 | new long[] { 0x000000001FCDFDE2L, 0x0000000000004000L }); | |
11458 | public static final BitSet FOLLOW_typeQualifier_in_declarationSpecifiers898 = new BitSet( | |
11459 | new long[] { 0x000000001FCDFDE2L, 0x0000000000004000L }); | |
11460 | public static final BitSet FOLLOW_typeSpecifier_in_declarationSpecifiers905 = new BitSet( | |
11461 | new long[] { 0x000000001FCDFDE2L, 0x0000000000004000L }); | |
11462 | public static final BitSet FOLLOW_declarator_in_declaratorList946 = new BitSet( | |
11463 | new long[] { 0x0000000400000002L }); | |
11464 | public static final BitSet FOLLOW_SEPARATOR_in_declaratorList949 = new BitSet( | |
11465 | new long[] { 0x0001000000000000L, 0x0000000000004000L }); | |
11466 | public static final BitSet FOLLOW_declarator_in_declaratorList951 = new BitSet( | |
11467 | new long[] { 0x0000000400000002L }); | |
11468 | public static final BitSet FOLLOW_abstractDeclarator_in_abstractDeclaratorList985 = new BitSet( | |
11469 | new long[] { 0x0000000400000002L }); | |
11470 | public static final BitSet FOLLOW_SEPARATOR_in_abstractDeclaratorList988 = new BitSet( | |
11471 | new long[] { 0x0001080000000000L, 0x0000000000004000L }); | |
11472 | public static final BitSet FOLLOW_abstractDeclarator_in_abstractDeclaratorList990 = new BitSet( | |
11473 | new long[] { 0x0000000400000002L }); | |
11474 | public static final BitSet FOLLOW_TYPEDEFTOK_in_storageClassSpecifier1014 = new BitSet( | |
11475 | new long[] { 0x0000000000000002L }); | |
11476 | public static final BitSet FOLLOW_FLOATTOK_in_typeSpecifier1040 = new BitSet( | |
11477 | new long[] { 0x0000000000000002L }); | |
11478 | public static final BitSet FOLLOW_INTTOK_in_typeSpecifier1046 = new BitSet( | |
11479 | new long[] { 0x0000000000000002L }); | |
11480 | public static final BitSet FOLLOW_LONGTOK_in_typeSpecifier1052 = new BitSet( | |
11481 | new long[] { 0x0000000000000002L }); | |
11482 | public static final BitSet FOLLOW_SHORTTOK_in_typeSpecifier1058 = new BitSet( | |
11483 | new long[] { 0x0000000000000002L }); | |
11484 | public static final BitSet FOLLOW_SIGNEDTOK_in_typeSpecifier1064 = new BitSet( | |
11485 | new long[] { 0x0000000000000002L }); | |
11486 | public static final BitSet FOLLOW_UNSIGNEDTOK_in_typeSpecifier1070 = new BitSet( | |
11487 | new long[] { 0x0000000000000002L }); | |
11488 | public static final BitSet FOLLOW_CHARTOK_in_typeSpecifier1076 = new BitSet( | |
11489 | new long[] { 0x0000000000000002L }); | |
11490 | public static final BitSet FOLLOW_DOUBLETOK_in_typeSpecifier1082 = new BitSet( | |
11491 | new long[] { 0x0000000000000002L }); | |
11492 | public static final BitSet FOLLOW_VOIDTOK_in_typeSpecifier1088 = new BitSet( | |
11493 | new long[] { 0x0000000000000002L }); | |
11494 | public static final BitSet FOLLOW_BOOLTOK_in_typeSpecifier1094 = new BitSet( | |
11495 | new long[] { 0x0000000000000002L }); | |
11496 | public static final BitSet FOLLOW_COMPLEXTOK_in_typeSpecifier1100 = new BitSet( | |
11497 | new long[] { 0x0000000000000002L }); | |
11498 | public static final BitSet FOLLOW_IMAGINARYTOK_in_typeSpecifier1106 = new BitSet( | |
11499 | new long[] { 0x0000000000000002L }); | |
11500 | public static final BitSet FOLLOW_structSpecifier_in_typeSpecifier1112 = new BitSet( | |
11501 | new long[] { 0x0000000000000002L }); | |
11502 | public static final BitSet FOLLOW_variantSpecifier_in_typeSpecifier1118 = new BitSet( | |
11503 | new long[] { 0x0000000000000002L }); | |
11504 | public static final BitSet FOLLOW_enumSpecifier_in_typeSpecifier1124 = new BitSet( | |
11505 | new long[] { 0x0000000000000002L }); | |
11506 | public static final BitSet FOLLOW_ctfTypeSpecifier_in_typeSpecifier1130 = new BitSet( | |
11507 | new long[] { 0x0000000000000002L }); | |
11508 | public static final BitSet FOLLOW_typedefName_in_typeSpecifier1140 = new BitSet( | |
11509 | new long[] { 0x0000000000000002L }); | |
11510 | public static final BitSet FOLLOW_CONSTTOK_in_typeQualifier1163 = new BitSet( | |
11511 | new long[] { 0x0000000000000002L }); | |
11512 | public static final BitSet FOLLOW_ALIGNTOK_in_alignAttribute1176 = new BitSet( | |
11513 | new long[] { 0x0000080000000000L }); | |
11514 | public static final BitSet FOLLOW_LPAREN_in_alignAttribute1178 = new BitSet( | |
11515 | new long[] { 0x0942000060170210L, 0x0000000000004090L }); | |
11516 | public static final BitSet FOLLOW_unaryExpression_in_alignAttribute1180 = new BitSet( | |
11517 | new long[] { 0x0000100000000000L }); | |
11518 | public static final BitSet FOLLOW_RPAREN_in_alignAttribute1182 = new BitSet( | |
11519 | new long[] { 0x0000000000000002L }); | |
11520 | public static final BitSet FOLLOW_LCURL_in_structBody1223 = new BitSet( | |
11521 | new long[] { 0x000040007FFFFFE0L, 0x0000000000004000L }); | |
11522 | public static final BitSet FOLLOW_structOrVariantDeclarationList_in_structBody1225 = new BitSet( | |
11523 | new long[] { 0x0000400000000000L }); | |
11524 | public static final BitSet FOLLOW_RCURL_in_structBody1228 = new BitSet( | |
11525 | new long[] { 0x0000000000000002L }); | |
11526 | public static final BitSet FOLLOW_STRUCTTOK_in_structSpecifier1266 = new BitSet( | |
11527 | new long[] { 0x0000200000000000L, 0x0000000000004000L }); | |
11528 | public static final BitSet FOLLOW_structName_in_structSpecifier1288 = new BitSet( | |
11529 | new long[] { 0x0000200000000012L, 0x0000000000004000L }); | |
11530 | public static final BitSet FOLLOW_alignAttribute_in_structSpecifier1304 = new BitSet( | |
11531 | new long[] { 0x0000000000000002L }); | |
11532 | public static final BitSet FOLLOW_structBody_in_structSpecifier1333 = new BitSet( | |
11533 | new long[] { 0x0000000000000012L }); | |
11534 | public static final BitSet FOLLOW_alignAttribute_in_structSpecifier1358 = new BitSet( | |
11535 | new long[] { 0x0000000000000002L }); | |
11536 | public static final BitSet FOLLOW_structBody_in_structSpecifier1456 = new BitSet( | |
11537 | new long[] { 0x0000000000000012L }); | |
11538 | public static final BitSet FOLLOW_alignAttribute_in_structSpecifier1474 = new BitSet( | |
11539 | new long[] { 0x0000000000000002L }); | |
11540 | public static final BitSet FOLLOW_IDENTIFIER_in_structName1550 = new BitSet( | |
11541 | new long[] { 0x0000000000000002L }); | |
11542 | public static final BitSet FOLLOW_structOrVariantDeclaration_in_structOrVariantDeclarationList1581 = new BitSet( | |
11543 | new long[] { 0x000000007FFFFFE2L, 0x0000000000004000L }); | |
11544 | public static final BitSet FOLLOW_declarationSpecifiers_in_structOrVariantDeclaration1619 = new BitSet( | |
11545 | new long[] { 0x0001000000000000L, 0x0000000000004000L }); | |
11546 | public static final BitSet FOLLOW_declaratorList_in_structOrVariantDeclaration1651 = new BitSet( | |
11547 | new long[] { 0x0000800000000000L }); | |
11548 | public static final BitSet FOLLOW_structOrVariantDeclaratorList_in_structOrVariantDeclaration1685 = new BitSet( | |
11549 | new long[] { 0x0000800000000000L }); | |
11550 | public static final BitSet FOLLOW_typealiasDecl_in_structOrVariantDeclaration1735 = new BitSet( | |
11551 | new long[] { 0x0000800000000000L }); | |
11552 | public static final BitSet FOLLOW_TERM_in_structOrVariantDeclaration1747 = new BitSet( | |
11553 | new long[] { 0x0000000000000002L }); | |
11554 | public static final BitSet FOLLOW_typeQualifier_in_specifierQualifierList1771 = new BitSet( | |
11555 | new long[] { 0x000000001FCDFDE2L, 0x0000000000004000L }); | |
11556 | public static final BitSet FOLLOW_typeSpecifier_in_specifierQualifierList1775 = new BitSet( | |
11557 | new long[] { 0x000000001FCDFDE2L, 0x0000000000004000L }); | |
11558 | public static final BitSet FOLLOW_structOrVariantDeclarator_in_structOrVariantDeclaratorList1812 = new BitSet( | |
11559 | new long[] { 0x0000000400000002L }); | |
11560 | public static final BitSet FOLLOW_SEPARATOR_in_structOrVariantDeclaratorList1815 = new BitSet( | |
11561 | new long[] { 0x0001000000000000L, 0x0000000000004000L }); | |
11562 | public static final BitSet FOLLOW_structOrVariantDeclarator_in_structOrVariantDeclaratorList1817 = new BitSet( | |
11563 | new long[] { 0x0000000400000002L }); | |
11564 | public static final BitSet FOLLOW_declarator_in_structOrVariantDeclarator1858 = new BitSet( | |
11565 | new long[] { 0x0000000800000002L }); | |
11566 | public static final BitSet FOLLOW_COLON_in_structOrVariantDeclarator1861 = new BitSet( | |
11567 | new long[] { 0x0942000000000000L }); | |
11568 | public static final BitSet FOLLOW_numberLiteral_in_structOrVariantDeclarator1863 = new BitSet( | |
11569 | new long[] { 0x0000000000000002L }); | |
11570 | public static final BitSet FOLLOW_VARIANTTOK_in_variantSpecifier1897 = new BitSet( | |
11571 | new long[] { 0x0000208000000000L, 0x0000000000004000L }); | |
11572 | public static final BitSet FOLLOW_variantName_in_variantSpecifier1915 = new BitSet( | |
11573 | new long[] { 0x0000208000000000L, 0x0000000000004000L }); | |
11574 | public static final BitSet FOLLOW_variantTag_in_variantSpecifier1946 = new BitSet( | |
11575 | new long[] { 0x0000208000000002L, 0x0000000000004000L }); | |
11576 | public static final BitSet FOLLOW_variantBody_in_variantSpecifier1972 = new BitSet( | |
11577 | new long[] { 0x0000000000000002L }); | |
11578 | public static final BitSet FOLLOW_variantBody_in_variantSpecifier2040 = new BitSet( | |
11579 | new long[] { 0x0000000000000002L }); | |
11580 | public static final BitSet FOLLOW_variantTag_in_variantSpecifier2065 = new BitSet( | |
11581 | new long[] { 0x0000208000000000L, 0x0000000000004000L }); | |
11582 | public static final BitSet FOLLOW_variantBody_in_variantSpecifier2067 = new BitSet( | |
11583 | new long[] { 0x0000000000000002L }); | |
11584 | public static final BitSet FOLLOW_variantBody_in_variantSpecifier2078 = new BitSet( | |
11585 | new long[] { 0x0000000000000002L }); | |
11586 | public static final BitSet FOLLOW_IDENTIFIER_in_variantName2120 = new BitSet( | |
11587 | new long[] { 0x0000000000000002L }); | |
11588 | public static final BitSet FOLLOW_LCURL_in_variantBody2156 = new BitSet( | |
11589 | new long[] { 0x000000007FFFFFE0L, 0x0000000000004000L }); | |
11590 | public static final BitSet FOLLOW_structOrVariantDeclarationList_in_variantBody2158 = new BitSet( | |
11591 | new long[] { 0x0000400000000000L }); | |
11592 | public static final BitSet FOLLOW_RCURL_in_variantBody2160 = new BitSet( | |
11593 | new long[] { 0x0000000000000002L }); | |
11594 | public static final BitSet FOLLOW_LT_in_variantTag2191 = new BitSet( | |
11595 | new long[] { 0x0000000000000000L, 0x0000000000004000L }); | |
11596 | public static final BitSet FOLLOW_IDENTIFIER_in_variantTag2193 = new BitSet( | |
11597 | new long[] { 0x0000010000000000L }); | |
11598 | public static final BitSet FOLLOW_GT_in_variantTag2195 = new BitSet( | |
11599 | new long[] { 0x0000000000000002L }); | |
11600 | public static final BitSet FOLLOW_ENUMTOK_in_enumSpecifier2225 = new BitSet( | |
11601 | new long[] { 0x0000200800000000L, 0x0000000000004000L }); | |
11602 | public static final BitSet FOLLOW_enumName_in_enumSpecifier2240 = new BitSet( | |
11603 | new long[] { 0x0000200800000002L, 0x0000000000004000L }); | |
11604 | public static final BitSet FOLLOW_enumContainerType_in_enumSpecifier2251 = new BitSet( | |
11605 | new long[] { 0x0000200800000000L, 0x0000000000004000L }); | |
11606 | public static final BitSet FOLLOW_enumBody_in_enumSpecifier2253 = new BitSet( | |
11607 | new long[] { 0x0000000000000002L }); | |
11608 | public static final BitSet FOLLOW_enumBody_in_enumSpecifier2265 = new BitSet( | |
11609 | new long[] { 0x0000000000000002L }); | |
11610 | public static final BitSet FOLLOW_enumContainerType_in_enumSpecifier2300 = new BitSet( | |
11611 | new long[] { 0x0000200800000000L, 0x0000000000004000L }); | |
11612 | public static final BitSet FOLLOW_enumBody_in_enumSpecifier2302 = new BitSet( | |
11613 | new long[] { 0x0000000000000002L }); | |
11614 | public static final BitSet FOLLOW_enumBody_in_enumSpecifier2311 = new BitSet( | |
11615 | new long[] { 0x0000000000000002L }); | |
11616 | public static final BitSet FOLLOW_IDENTIFIER_in_enumName2356 = new BitSet( | |
11617 | new long[] { 0x0000000000000002L }); | |
11618 | public static final BitSet FOLLOW_LCURL_in_enumBody2389 = new BitSet( | |
11619 | new long[] { 0x0000000000050210L, 0x0000000000004080L }); | |
11620 | public static final BitSet FOLLOW_enumeratorList_in_enumBody2391 = new BitSet( | |
11621 | new long[] { 0x0000400400000000L }); | |
11622 | public static final BitSet FOLLOW_SEPARATOR_in_enumBody2394 = new BitSet( | |
11623 | new long[] { 0x0000400000000000L }); | |
11624 | public static final BitSet FOLLOW_RCURL_in_enumBody2396 = new BitSet( | |
11625 | new long[] { 0x0000000000000002L }); | |
11626 | public static final BitSet FOLLOW_RCURL_in_enumBody2400 = new BitSet( | |
11627 | new long[] { 0x0000000000000002L }); | |
11628 | public static final BitSet FOLLOW_COLON_in_enumContainerType2432 = new BitSet( | |
11629 | new long[] { 0x000000001FCDFDE0L, 0x0000000000004000L }); | |
11630 | public static final BitSet FOLLOW_declarationSpecifiers_in_enumContainerType2434 = new BitSet( | |
11631 | new long[] { 0x0000000000000002L }); | |
11632 | public static final BitSet FOLLOW_enumerator_in_enumeratorList2465 = new BitSet( | |
11633 | new long[] { 0x0000000400000002L }); | |
11634 | public static final BitSet FOLLOW_SEPARATOR_in_enumeratorList2468 = new BitSet( | |
11635 | new long[] { 0x0000000000050210L, 0x0000000000004080L }); | |
11636 | public static final BitSet FOLLOW_enumerator_in_enumeratorList2470 = new BitSet( | |
11637 | new long[] { 0x0000000400000002L }); | |
11638 | public static final BitSet FOLLOW_enumConstant_in_enumerator2506 = new BitSet( | |
11639 | new long[] { 0x0000002000000002L }); | |
11640 | public static final BitSet FOLLOW_enumeratorValue_in_enumerator2508 = new BitSet( | |
11641 | new long[] { 0x0000000000000002L }); | |
11642 | public static final BitSet FOLLOW_ASSIGNMENT_in_enumeratorValue2532 = new BitSet( | |
11643 | new long[] { 0x0942000060170210L, 0x0000000000004090L }); | |
11644 | public static final BitSet FOLLOW_unaryExpression_in_enumeratorValue2536 = new BitSet( | |
11645 | new long[] { 0x0000001000000002L }); | |
11646 | public static final BitSet FOLLOW_ELIPSES_in_enumeratorValue2562 = new BitSet( | |
11647 | new long[] { 0x0942000060170210L, 0x0000000000004090L }); | |
11648 | public static final BitSet FOLLOW_unaryExpression_in_enumeratorValue2566 = new BitSet( | |
11649 | new long[] { 0x0000000000000002L }); | |
11650 | public static final BitSet FOLLOW_pointer_in_declarator2608 = new BitSet( | |
11651 | new long[] { 0x0001000000000000L, 0x0000000000004000L }); | |
11652 | public static final BitSet FOLLOW_directDeclarator_in_declarator2611 = new BitSet( | |
11653 | new long[] { 0x0000000000000002L }); | |
11654 | public static final BitSet FOLLOW_IDENTIFIER_in_directDeclarator2655 = new BitSet( | |
11655 | new long[] { 0x0000020000000002L }); | |
11656 | public static final BitSet FOLLOW_directDeclaratorSuffix_in_directDeclarator2673 = new BitSet( | |
11657 | new long[] { 0x0000020000000002L }); | |
11658 | public static final BitSet FOLLOW_OPENBRAC_in_directDeclaratorSuffix2686 = new BitSet( | |
11659 | new long[] { 0x0942000060170210L, 0x0000000000004090L }); | |
11660 | public static final BitSet FOLLOW_directDeclaratorLength_in_directDeclaratorSuffix2688 = new BitSet( | |
11661 | new long[] { 0x0000040000000000L }); | |
11662 | public static final BitSet FOLLOW_CLOSEBRAC_in_directDeclaratorSuffix2690 = new BitSet( | |
11663 | new long[] { 0x0000000000000002L }); | |
11664 | public static final BitSet FOLLOW_unaryExpression_in_directDeclaratorLength2711 = new BitSet( | |
11665 | new long[] { 0x0000000000000002L }); | |
11666 | public static final BitSet FOLLOW_pointer_in_abstractDeclarator2742 = new BitSet( | |
11667 | new long[] { 0x0001080000000002L, 0x0000000000004000L }); | |
11668 | public static final BitSet FOLLOW_directAbstractDeclarator_in_abstractDeclarator2745 = new BitSet( | |
11669 | new long[] { 0x0000000000000002L }); | |
11670 | public static final BitSet FOLLOW_directAbstractDeclarator_in_abstractDeclarator2765 = new BitSet( | |
11671 | new long[] { 0x0000000000000002L }); | |
11672 | public static final BitSet FOLLOW_IDENTIFIER_in_directAbstractDeclarator2805 = new BitSet( | |
11673 | new long[] { 0x0000020000000002L }); | |
11674 | public static final BitSet FOLLOW_LPAREN_in_directAbstractDeclarator2814 = new BitSet( | |
11675 | new long[] { 0x0001080000000000L, 0x0000000000004000L }); | |
11676 | public static final BitSet FOLLOW_abstractDeclarator_in_directAbstractDeclarator2816 = new BitSet( | |
11677 | new long[] { 0x0000100000000000L }); | |
11678 | public static final BitSet FOLLOW_RPAREN_in_directAbstractDeclarator2818 = new BitSet( | |
11679 | new long[] { 0x0000020000000002L }); | |
11680 | public static final BitSet FOLLOW_OPENBRAC_in_directAbstractDeclarator2833 = new BitSet( | |
11681 | new long[] { 0x0942040060170210L, 0x0000000000004090L }); | |
11682 | public static final BitSet FOLLOW_unaryExpression_in_directAbstractDeclarator2835 = new BitSet( | |
11683 | new long[] { 0x0000040000000000L }); | |
11684 | public static final BitSet FOLLOW_CLOSEBRAC_in_directAbstractDeclarator2838 = new BitSet( | |
11685 | new long[] { 0x0000000000000002L }); | |
11686 | public static final BitSet FOLLOW_POINTER_in_pointer2866 = new BitSet( | |
11687 | new long[] { 0x0000000000000022L }); | |
11688 | public static final BitSet FOLLOW_typeQualifierList_in_pointer2868 = new BitSet( | |
11689 | new long[] { 0x0000000000000002L }); | |
11690 | public static final BitSet FOLLOW_typeQualifier_in_typeQualifierList2891 = new BitSet( | |
11691 | new long[] { 0x0000000000000022L }); | |
11692 | public static final BitSet FOLLOW_IDENTIFIER_in_typedefName2917 = new BitSet( | |
11693 | new long[] { 0x0000000000000002L }); | |
11694 | public static final BitSet FOLLOW_declarationSpecifiers_in_typealiasTarget2945 = new BitSet( | |
11695 | new long[] { 0x0001080000000002L, 0x0000000000004000L }); | |
11696 | public static final BitSet FOLLOW_abstractDeclaratorList_in_typealiasTarget2947 = new BitSet( | |
11697 | new long[] { 0x0000000000000002L }); | |
11698 | public static final BitSet FOLLOW_abstractDeclaratorList_in_typealiasAlias2980 = new BitSet( | |
11699 | new long[] { 0x0000000000000002L }); | |
11700 | public static final BitSet FOLLOW_declarationSpecifiers_in_typealiasAlias2989 = new BitSet( | |
11701 | new long[] { 0x0001080000000002L, 0x0000000000004000L }); | |
11702 | public static final BitSet FOLLOW_abstractDeclaratorList_in_typealiasAlias2991 = new BitSet( | |
11703 | new long[] { 0x0000000000000002L }); | |
11704 | public static final BitSet FOLLOW_TYPEALIASTOK_in_typealiasDecl3023 = new BitSet( | |
11705 | new long[] { 0x000000001FCDFDE0L, 0x0000000000004000L }); | |
11706 | public static final BitSet FOLLOW_typealiasTarget_in_typealiasDecl3025 = new BitSet( | |
11707 | new long[] { 0x0000004000000000L }); | |
11708 | public static final BitSet FOLLOW_TYPE_ASSIGNMENT_in_typealiasDecl3027 = new BitSet( | |
11709 | new long[] { 0x000108001FCDFDE0L, 0x0000000000004000L }); | |
11710 | public static final BitSet FOLLOW_typealiasAlias_in_typealiasDecl3029 = new BitSet( | |
11711 | new long[] { 0x0000000000000002L }); | |
11712 | public static final BitSet FOLLOW_set_in_ctfKeyword0 = new BitSet( | |
11713 | new long[] { 0x0000000000000002L }); | |
11714 | public static final BitSet FOLLOW_ctfSpecifierHead_in_ctfSpecifier3123 = new BitSet( | |
11715 | new long[] { 0x0000200000000000L }); | |
11716 | public static final BitSet FOLLOW_ctfBody_in_ctfSpecifier3125 = new BitSet( | |
11717 | new long[] { 0x0000000000000002L }); | |
11718 | public static final BitSet FOLLOW_typealiasDecl_in_ctfSpecifier3144 = new BitSet( | |
11719 | new long[] { 0x0000000000000002L }); | |
11720 | public static final BitSet FOLLOW_EVENTTOK_in_ctfSpecifierHead3176 = new BitSet( | |
11721 | new long[] { 0x0000000000000002L }); | |
11722 | public static final BitSet FOLLOW_STREAMTOK_in_ctfSpecifierHead3185 = new BitSet( | |
11723 | new long[] { 0x0000000000000002L }); | |
11724 | public static final BitSet FOLLOW_TRACETOK_in_ctfSpecifierHead3194 = new BitSet( | |
11725 | new long[] { 0x0000000000000002L }); | |
11726 | public static final BitSet FOLLOW_ENVTOK_in_ctfSpecifierHead3203 = new BitSet( | |
11727 | new long[] { 0x0000000000000002L }); | |
11728 | public static final BitSet FOLLOW_CLOCKTOK_in_ctfSpecifierHead3212 = new BitSet( | |
11729 | new long[] { 0x0000000000000002L }); | |
11730 | public static final BitSet FOLLOW_FLOATINGPOINTTOK_in_ctfTypeSpecifier3246 = new BitSet( | |
11731 | new long[] { 0x0000200000000000L }); | |
11732 | public static final BitSet FOLLOW_ctfBody_in_ctfTypeSpecifier3248 = new BitSet( | |
11733 | new long[] { 0x0000000000000002L }); | |
11734 | public static final BitSet FOLLOW_INTEGERTOK_in_ctfTypeSpecifier3263 = new BitSet( | |
11735 | new long[] { 0x0000200000000000L }); | |
11736 | public static final BitSet FOLLOW_ctfBody_in_ctfTypeSpecifier3265 = new BitSet( | |
11737 | new long[] { 0x0000000000000002L }); | |
11738 | public static final BitSet FOLLOW_STRINGTOK_in_ctfTypeSpecifier3280 = new BitSet( | |
11739 | new long[] { 0x0000200000000002L }); | |
11740 | public static final BitSet FOLLOW_ctfBody_in_ctfTypeSpecifier3282 = new BitSet( | |
11741 | new long[] { 0x0000000000000002L }); | |
11742 | public static final BitSet FOLLOW_LCURL_in_ctfBody3320 = new BitSet( | |
11743 | new long[] { 0x094240007FFFFFF0L, 0x0000000000004090L }); | |
11744 | public static final BitSet FOLLOW_ctfAssignmentExpressionList_in_ctfBody3322 = new BitSet( | |
11745 | new long[] { 0x0000400000000000L }); | |
11746 | public static final BitSet FOLLOW_RCURL_in_ctfBody3325 = new BitSet( | |
11747 | new long[] { 0x0000000000000002L }); | |
11748 | public static final BitSet FOLLOW_ctfAssignmentExpression_in_ctfAssignmentExpressionList3344 = new BitSet( | |
11749 | new long[] { 0x0000800000000000L }); | |
11750 | public static final BitSet FOLLOW_TERM_in_ctfAssignmentExpressionList3346 = new BitSet( | |
11751 | new long[] { 0x094200007FFFFFF2L, 0x0000000000004090L }); | |
11752 | public static final BitSet FOLLOW_unaryExpression_in_ctfAssignmentExpression3381 = new BitSet( | |
11753 | new long[] { 0x0000006000000000L }); | |
11754 | public static final BitSet FOLLOW_ASSIGNMENT_in_ctfAssignmentExpression3400 = new BitSet( | |
11755 | new long[] { 0x0942000060170210L, 0x0000000000004090L }); | |
11756 | public static final BitSet FOLLOW_unaryExpression_in_ctfAssignmentExpression3404 = new BitSet( | |
11757 | new long[] { 0x0000000000000002L }); | |
11758 | public static final BitSet FOLLOW_TYPE_ASSIGNMENT_in_ctfAssignmentExpression3438 = new BitSet( | |
11759 | new long[] { 0x000000001FCDFDE0L, 0x0000000000004000L }); | |
11760 | public static final BitSet FOLLOW_typeSpecifier_in_ctfAssignmentExpression3443 = new BitSet( | |
11761 | new long[] { 0x0000000000000002L }); | |
11762 | public static final BitSet FOLLOW_declarationSpecifiers_in_ctfAssignmentExpression3493 = new BitSet( | |
11763 | new long[] { 0x0001000000000000L, 0x0000000000004000L }); | |
11764 | public static final BitSet FOLLOW_declaratorList_in_ctfAssignmentExpression3497 = new BitSet( | |
11765 | new long[] { 0x0000000000000002L }); | |
11766 | public static final BitSet FOLLOW_typealiasDecl_in_ctfAssignmentExpression3525 = new BitSet( | |
11767 | new long[] { 0x0000000000000002L }); | |
11768 | public static final BitSet FOLLOW_IDENTIFIER_in_synpred1_CTFParser470 = new BitSet( | |
11769 | new long[] { 0x0000000000000002L }); | |
11770 | public static final BitSet FOLLOW_ctfKeyword_in_synpred2_CTFParser492 = new BitSet( | |
11771 | new long[] { 0x0000000000000002L }); | |
11772 | public static final BitSet FOLLOW_STRING_LITERAL_in_synpred3_CTFParser512 = new BitSet( | |
11773 | new long[] { 0x0000000000000002L }); | |
866e5b51 FC |
11774 | |
11775 | } |