xref: /aosp_15_r20/external/antlr/runtime/ObjC/Framework/examples/simplecTreeParser/SimpleCParser.h (revision 16467b971bd3e2009fad32dd79016f2c7e421deb)
1 // $ANTLR 3.4 /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/simplecTreeParser/SimpleC.g 2012-02-16 17:40:52
2 
3 /* =============================================================================
4  * Standard antlr OBJC runtime definitions
5  */
6 #import <Foundation/Foundation.h>
7 #import <ANTLR/ANTLR.h>
8 /* End of standard antlr3 runtime definitions
9  * =============================================================================
10  */
11 
12 /* parserHeaderFile */
13 #ifndef ANTLR3TokenTypeAlreadyDefined
14 #define ANTLR3TokenTypeAlreadyDefined
15 typedef enum {
16     ANTLR_EOF = -1,
17     INVALID,
18     EOR,
19     DOWN,
20     UP,
21     MIN
22 } ANTLR3TokenType;
23 #endif
24 
25 #pragma mark Cyclic DFA interface start DFA2
26 @interface DFA2 : DFA {
27 }
28 + (DFA2 *) newDFA2WithRecognizer:(BaseRecognizer *)theRecognizer;
29 - initWithRecognizer:(BaseRecognizer *)recognizer;
30 @end /* end of DFA2 interface  */
31 
32 #pragma mark Cyclic DFA interface end DFA2
33 
34 #pragma mark Tokens
35 #ifdef EOF
36 #undef EOF
37 #endif
38 #define EOF -1
39 #define ARG_DEF 4
40 #define BLOCK 5
41 #define FUNC_DECL 6
42 #define FUNC_DEF 7
43 #define FUNC_HDR 8
44 #define K_CHAR 9
45 #define K_COMMA 10
46 #define K_EQ 11
47 #define K_EQEQ 12
48 #define K_FOR 13
49 #define K_ID 14
50 #define K_INT 15
51 #define K_INT_TYPE 16
52 #define K_LCURLY 17
53 #define K_LCURVE 18
54 #define K_LT 19
55 #define K_PLUS 20
56 #define K_RCURLY 21
57 #define K_RCURVE 22
58 #define K_SEMICOLON 23
59 #define K_VOID 24
60 #define VAR_DEF 25
61 #define WS 26
62 #pragma mark Dynamic Global Scopes globalAttributeScopeInterface
63 #pragma mark Dynamic Rule Scopes ruleAttributeScopeInterface
64 #pragma mark Rule Return Scopes returnScopeInterface
65 /* returnScopeInterface SimpleCParser_program_return */
66 @interface SimpleCParser_program_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */
67 /* AST returnScopeInterface.memVars */
68 CommonTree *tree; /* ObjC start of memVars() */
69 
70 }
71 /* start property declarations */
72 /* AST returnScopeInterface.properties */
73 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree;
74 
75 /* start of method declarations */
76 
77 + (SimpleCParser_program_return *)newSimpleCParser_program_return;
78 /* this is start of set and get methods */
79 /* AST returnScopeInterface.methodsDecl */
80 - (CommonTree *)getTree;
81 
82 - (void) setTree:(CommonTree *)aTree;
83   /* methodsDecl */
84 
85 @end /* end of returnScopeInterface interface */
86 
87 
88 /* returnScopeInterface SimpleCParser_declaration_return */
89 @interface SimpleCParser_declaration_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */
90 /* AST returnScopeInterface.memVars */
91 CommonTree *tree; /* ObjC start of memVars() */
92 
93 }
94 /* start property declarations */
95 /* AST returnScopeInterface.properties */
96 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree;
97 
98 /* start of method declarations */
99 
100 + (SimpleCParser_declaration_return *)newSimpleCParser_declaration_return;
101 /* this is start of set and get methods */
102 /* AST returnScopeInterface.methodsDecl */
103 - (CommonTree *)getTree;
104 
105 - (void) setTree:(CommonTree *)aTree;
106   /* methodsDecl */
107 
108 @end /* end of returnScopeInterface interface */
109 
110 
111 /* returnScopeInterface SimpleCParser_variable_return */
112 @interface SimpleCParser_variable_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */
113 /* AST returnScopeInterface.memVars */
114 CommonTree *tree; /* ObjC start of memVars() */
115 
116 }
117 /* start property declarations */
118 /* AST returnScopeInterface.properties */
119 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree;
120 
121 /* start of method declarations */
122 
123 + (SimpleCParser_variable_return *)newSimpleCParser_variable_return;
124 /* this is start of set and get methods */
125 /* AST returnScopeInterface.methodsDecl */
126 - (CommonTree *)getTree;
127 
128 - (void) setTree:(CommonTree *)aTree;
129   /* methodsDecl */
130 
131 @end /* end of returnScopeInterface interface */
132 
133 
134 /* returnScopeInterface SimpleCParser_declarator_return */
135 @interface SimpleCParser_declarator_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */
136 /* AST returnScopeInterface.memVars */
137 CommonTree *tree; /* ObjC start of memVars() */
138 
139 }
140 /* start property declarations */
141 /* AST returnScopeInterface.properties */
142 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree;
143 
144 /* start of method declarations */
145 
146 + (SimpleCParser_declarator_return *)newSimpleCParser_declarator_return;
147 /* this is start of set and get methods */
148 /* AST returnScopeInterface.methodsDecl */
149 - (CommonTree *)getTree;
150 
151 - (void) setTree:(CommonTree *)aTree;
152   /* methodsDecl */
153 
154 @end /* end of returnScopeInterface interface */
155 
156 
157 /* returnScopeInterface SimpleCParser_functionHeader_return */
158 @interface SimpleCParser_functionHeader_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */
159 /* AST returnScopeInterface.memVars */
160 CommonTree *tree; /* ObjC start of memVars() */
161 
162 }
163 /* start property declarations */
164 /* AST returnScopeInterface.properties */
165 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree;
166 
167 /* start of method declarations */
168 
169 + (SimpleCParser_functionHeader_return *)newSimpleCParser_functionHeader_return;
170 /* this is start of set and get methods */
171 /* AST returnScopeInterface.methodsDecl */
172 - (CommonTree *)getTree;
173 
174 - (void) setTree:(CommonTree *)aTree;
175   /* methodsDecl */
176 
177 @end /* end of returnScopeInterface interface */
178 
179 
180 /* returnScopeInterface SimpleCParser_formalParameter_return */
181 @interface SimpleCParser_formalParameter_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */
182 /* AST returnScopeInterface.memVars */
183 CommonTree *tree; /* ObjC start of memVars() */
184 
185 }
186 /* start property declarations */
187 /* AST returnScopeInterface.properties */
188 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree;
189 
190 /* start of method declarations */
191 
192 + (SimpleCParser_formalParameter_return *)newSimpleCParser_formalParameter_return;
193 /* this is start of set and get methods */
194 /* AST returnScopeInterface.methodsDecl */
195 - (CommonTree *)getTree;
196 
197 - (void) setTree:(CommonTree *)aTree;
198   /* methodsDecl */
199 
200 @end /* end of returnScopeInterface interface */
201 
202 
203 /* returnScopeInterface SimpleCParser_type_return */
204 @interface SimpleCParser_type_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */
205 /* AST returnScopeInterface.memVars */
206 CommonTree *tree; /* ObjC start of memVars() */
207 
208 }
209 /* start property declarations */
210 /* AST returnScopeInterface.properties */
211 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree;
212 
213 /* start of method declarations */
214 
215 + (SimpleCParser_type_return *)newSimpleCParser_type_return;
216 /* this is start of set and get methods */
217 /* AST returnScopeInterface.methodsDecl */
218 - (CommonTree *)getTree;
219 
220 - (void) setTree:(CommonTree *)aTree;
221   /* methodsDecl */
222 
223 @end /* end of returnScopeInterface interface */
224 
225 
226 /* returnScopeInterface SimpleCParser_block_return */
227 @interface SimpleCParser_block_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */
228 /* AST returnScopeInterface.memVars */
229 CommonTree *tree; /* ObjC start of memVars() */
230 
231 }
232 /* start property declarations */
233 /* AST returnScopeInterface.properties */
234 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree;
235 
236 /* start of method declarations */
237 
238 + (SimpleCParser_block_return *)newSimpleCParser_block_return;
239 /* this is start of set and get methods */
240 /* AST returnScopeInterface.methodsDecl */
241 - (CommonTree *)getTree;
242 
243 - (void) setTree:(CommonTree *)aTree;
244   /* methodsDecl */
245 
246 @end /* end of returnScopeInterface interface */
247 
248 
249 /* returnScopeInterface SimpleCParser_stat_return */
250 @interface SimpleCParser_stat_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */
251 /* AST returnScopeInterface.memVars */
252 CommonTree *tree; /* ObjC start of memVars() */
253 
254 }
255 /* start property declarations */
256 /* AST returnScopeInterface.properties */
257 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree;
258 
259 /* start of method declarations */
260 
261 + (SimpleCParser_stat_return *)newSimpleCParser_stat_return;
262 /* this is start of set and get methods */
263 /* AST returnScopeInterface.methodsDecl */
264 - (CommonTree *)getTree;
265 
266 - (void) setTree:(CommonTree *)aTree;
267   /* methodsDecl */
268 
269 @end /* end of returnScopeInterface interface */
270 
271 
272 /* returnScopeInterface SimpleCParser_forStat_return */
273 @interface SimpleCParser_forStat_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */
274 /* AST returnScopeInterface.memVars */
275 CommonTree *tree; /* ObjC start of memVars() */
276 
277 }
278 /* start property declarations */
279 /* AST returnScopeInterface.properties */
280 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree;
281 
282 /* start of method declarations */
283 
284 + (SimpleCParser_forStat_return *)newSimpleCParser_forStat_return;
285 /* this is start of set and get methods */
286 /* AST returnScopeInterface.methodsDecl */
287 - (CommonTree *)getTree;
288 
289 - (void) setTree:(CommonTree *)aTree;
290   /* methodsDecl */
291 
292 @end /* end of returnScopeInterface interface */
293 
294 
295 /* returnScopeInterface SimpleCParser_assignStat_return */
296 @interface SimpleCParser_assignStat_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */
297 /* AST returnScopeInterface.memVars */
298 CommonTree *tree; /* ObjC start of memVars() */
299 
300 }
301 /* start property declarations */
302 /* AST returnScopeInterface.properties */
303 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree;
304 
305 /* start of method declarations */
306 
307 + (SimpleCParser_assignStat_return *)newSimpleCParser_assignStat_return;
308 /* this is start of set and get methods */
309 /* AST returnScopeInterface.methodsDecl */
310 - (CommonTree *)getTree;
311 
312 - (void) setTree:(CommonTree *)aTree;
313   /* methodsDecl */
314 
315 @end /* end of returnScopeInterface interface */
316 
317 
318 /* returnScopeInterface SimpleCParser_expr_return */
319 @interface SimpleCParser_expr_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */
320 /* AST returnScopeInterface.memVars */
321 CommonTree *tree; /* ObjC start of memVars() */
322 
323 }
324 /* start property declarations */
325 /* AST returnScopeInterface.properties */
326 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree;
327 
328 /* start of method declarations */
329 
330 + (SimpleCParser_expr_return *)newSimpleCParser_expr_return;
331 /* this is start of set and get methods */
332 /* AST returnScopeInterface.methodsDecl */
333 - (CommonTree *)getTree;
334 
335 - (void) setTree:(CommonTree *)aTree;
336   /* methodsDecl */
337 
338 @end /* end of returnScopeInterface interface */
339 
340 
341 /* returnScopeInterface SimpleCParser_condExpr_return */
342 @interface SimpleCParser_condExpr_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */
343 /* AST returnScopeInterface.memVars */
344 CommonTree *tree; /* ObjC start of memVars() */
345 
346 }
347 /* start property declarations */
348 /* AST returnScopeInterface.properties */
349 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree;
350 
351 /* start of method declarations */
352 
353 + (SimpleCParser_condExpr_return *)newSimpleCParser_condExpr_return;
354 /* this is start of set and get methods */
355 /* AST returnScopeInterface.methodsDecl */
356 - (CommonTree *)getTree;
357 
358 - (void) setTree:(CommonTree *)aTree;
359   /* methodsDecl */
360 
361 @end /* end of returnScopeInterface interface */
362 
363 
364 /* returnScopeInterface SimpleCParser_aexpr_return */
365 @interface SimpleCParser_aexpr_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */
366 /* AST returnScopeInterface.memVars */
367 CommonTree *tree; /* ObjC start of memVars() */
368 
369 }
370 /* start property declarations */
371 /* AST returnScopeInterface.properties */
372 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree;
373 
374 /* start of method declarations */
375 
376 + (SimpleCParser_aexpr_return *)newSimpleCParser_aexpr_return;
377 /* this is start of set and get methods */
378 /* AST returnScopeInterface.methodsDecl */
379 - (CommonTree *)getTree;
380 
381 - (void) setTree:(CommonTree *)aTree;
382   /* methodsDecl */
383 
384 @end /* end of returnScopeInterface interface */
385 
386 
387 /* returnScopeInterface SimpleCParser_atom_return */
388 @interface SimpleCParser_atom_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */
389 /* AST returnScopeInterface.memVars */
390 CommonTree *tree; /* ObjC start of memVars() */
391 
392 }
393 /* start property declarations */
394 /* AST returnScopeInterface.properties */
395 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree;
396 
397 /* start of method declarations */
398 
399 + (SimpleCParser_atom_return *)newSimpleCParser_atom_return;
400 /* this is start of set and get methods */
401 /* AST returnScopeInterface.methodsDecl */
402 - (CommonTree *)getTree;
403 
404 - (void) setTree:(CommonTree *)aTree;
405   /* methodsDecl */
406 
407 @end /* end of returnScopeInterface interface */
408 
409 
410 
411 /* Interface grammar class */
412 @interface SimpleCParser  : Parser { /* line 572 */
413 #pragma mark Dynamic Rule Scopes ruleAttributeScopeDecl
414 #pragma mark Dynamic Global Rule Scopes globalAttributeScopeMemVar
415 
416 
417 /* ObjC start of actions.(actionScope).memVars */
418 /* ObjC end of actions.(actionScope).memVars */
419 /* ObjC start of memVars */
420 /* AST parserHeaderFile.memVars */
421 NSInteger ruleLevel;
422 NSArray *ruleNames;
423   /* AST super.memVars */
424 /* AST parserMemVars */
425 id<TreeAdaptor> treeAdaptor;   /* AST parserMemVars */
426 /* ObjC end of memVars */
427 
428 DFA2 *dfa2;
429  }
430 
431 /* ObjC start of actions.(actionScope).properties */
432 /* ObjC end of actions.(actionScope).properties */
433 /* ObjC start of properties */
434 /* AST parserHeaderFile.properties */
435   /* AST super.properties */
436 /* AST parserProperties */
437 @property (retain, getter=getTreeAdaptor, setter=setTreeAdaptor:) id<TreeAdaptor> treeAdaptor;   /* AST parserproperties */
438 /* ObjC end of properties */
439 
440 + (void) initialize;
441 + (id) newSimpleCParser:(id<TokenStream>)aStream;
442 /* ObjC start of actions.(actionScope).methodsDecl */
443 /* ObjC end of actions.(actionScope).methodsDecl */
444 
445 /* ObjC start of methodsDecl */
446 /* AST parserHeaderFile.methodsDecl */
447   /* AST super.methodsDecl */
448 /* AST parserMethodsDecl */
449 - (id<TreeAdaptor>) getTreeAdaptor;
450 - (void) setTreeAdaptor:(id<TreeAdaptor>)theTreeAdaptor;   /* AST parsermethodsDecl */
451 /* ObjC end of methodsDecl */
452 
453 - (SimpleCParser_program_return *)program;
454 - (SimpleCParser_declaration_return *)declaration;
455 - (SimpleCParser_variable_return *)variable;
456 - (SimpleCParser_declarator_return *)declarator;
457 - (SimpleCParser_functionHeader_return *)functionHeader;
458 - (SimpleCParser_formalParameter_return *)formalParameter;
459 - (SimpleCParser_type_return *)type;
460 - (SimpleCParser_block_return *)block;
461 - (SimpleCParser_stat_return *)stat;
462 - (SimpleCParser_forStat_return *)forStat;
463 - (SimpleCParser_assignStat_return *)assignStat;
464 - (SimpleCParser_expr_return *)expr;
465 - (SimpleCParser_condExpr_return *)condExpr;
466 - (SimpleCParser_aexpr_return *)aexpr;
467 - (SimpleCParser_atom_return *)atom;
468 
469 
470 @end /* end of SimpleCParser interface */
471 
472