1 // $ANTLR 3.2 Aug 23, 2010 07:48:06 /usr/local/ANTLR3-ObjC2.0-Runtime/Framework/examples/simplecTreeParser/SimpleC.g 2010-08-23 07:54:46
2 
3 /* =============================================================================
4  * Standard antlr3 OBJC runtime definitions
5  */
6 #import <Cocoa/Cocoa.h>
7 #import "antlr3.h"
8 /* End of standard antlr3 runtime definitions
9  * =============================================================================
10  */
11 
12 #pragma mark Cyclic DFA interface start DFA2
13 @interface DFA2 : ANTLRDFA {
14 }
15 + newDFA2WithRecognizer:(ANTLRBaseRecognizer *)theRecognizer;
16 - initWithRecognizer:(ANTLRBaseRecognizer *)recognizer;
17 @end /* end of DFA2 interface  */
18 
19 #pragma mark Cyclic DFA interface end DFA2
20 #pragma mark Tokens
21 #define K_ID 10
22 #define T__26 26
23 #define T__25 25
24 #define T__24 24
25 #define T__23 23
26 #define K_EQEQ 16
27 #define T__22 22
28 #define K_INT 11
29 #define T__21 21
30 #define K_FOR 14
31 #define FUNC_HDR 6
32 #define FUNC_DEF 8
33 #define EOF -1
34 #define K_INT_TYPE 19
35 #define FUNC_DECL 7
36 #define ARG_DEF 5
37 #define WS 20
38 #define K_EQ 15
39 #define BLOCK 9
40 #define K_LT 17
41 #define K_CHAR 12
42 #define K_VOID 13
43 #define VAR_DEF 4
44 #define K_PLUS 18
45 #pragma mark Dynamic Global Scopes
46 #pragma mark Dynamic Rule Scopes
47 #pragma mark Rule Return Scopes start
48 @interface SimpleCParser_program_return :ANTLRParserRuleReturnScope { // line 1672
49 /* AST returnScopeInterface.memVars */
50 ANTLRCommonTree *tree; // start of memVars()
51 }
52 
53 // start properties
54 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree;
55 + (SimpleCParser_program_return *)newSimpleCParser_program_return;
56 // this is start of set and get methods
57 /* AST returnScopeInterface.methodsdecl */
58 - (ANTLRCommonTree *)getTree;
59 - (void) setTree:(ANTLRCommonTree *)aTree;
60   // methodsDecl
61 @end /* end of returnScopeInterface interface */
62 @interface SimpleCParser_declaration_return :ANTLRParserRuleReturnScope { // line 1672
63 /* AST returnScopeInterface.memVars */
64 ANTLRCommonTree *tree; // start of memVars()
65 }
66 
67 // start properties
68 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree;
69 + (SimpleCParser_declaration_return *)newSimpleCParser_declaration_return;
70 // this is start of set and get methods
71 /* AST returnScopeInterface.methodsdecl */
72 - (ANTLRCommonTree *)getTree;
73 - (void) setTree:(ANTLRCommonTree *)aTree;
74   // methodsDecl
75 @end /* end of returnScopeInterface interface */
76 @interface SimpleCParser_variable_return :ANTLRParserRuleReturnScope { // line 1672
77 /* AST returnScopeInterface.memVars */
78 ANTLRCommonTree *tree; // start of memVars()
79 }
80 
81 // start properties
82 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree;
83 + (SimpleCParser_variable_return *)newSimpleCParser_variable_return;
84 // this is start of set and get methods
85 /* AST returnScopeInterface.methodsdecl */
86 - (ANTLRCommonTree *)getTree;
87 - (void) setTree:(ANTLRCommonTree *)aTree;
88   // methodsDecl
89 @end /* end of returnScopeInterface interface */
90 @interface SimpleCParser_declarator_return :ANTLRParserRuleReturnScope { // line 1672
91 /* AST returnScopeInterface.memVars */
92 ANTLRCommonTree *tree; // start of memVars()
93 }
94 
95 // start properties
96 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree;
97 + (SimpleCParser_declarator_return *)newSimpleCParser_declarator_return;
98 // this is start of set and get methods
99 /* AST returnScopeInterface.methodsdecl */
100 - (ANTLRCommonTree *)getTree;
101 - (void) setTree:(ANTLRCommonTree *)aTree;
102   // methodsDecl
103 @end /* end of returnScopeInterface interface */
104 @interface SimpleCParser_functionHeader_return :ANTLRParserRuleReturnScope { // line 1672
105 /* AST returnScopeInterface.memVars */
106 ANTLRCommonTree *tree; // start of memVars()
107 }
108 
109 // start properties
110 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree;
111 + (SimpleCParser_functionHeader_return *)newSimpleCParser_functionHeader_return;
112 // this is start of set and get methods
113 /* AST returnScopeInterface.methodsdecl */
114 - (ANTLRCommonTree *)getTree;
115 - (void) setTree:(ANTLRCommonTree *)aTree;
116   // methodsDecl
117 @end /* end of returnScopeInterface interface */
118 @interface SimpleCParser_formalParameter_return :ANTLRParserRuleReturnScope { // line 1672
119 /* AST returnScopeInterface.memVars */
120 ANTLRCommonTree *tree; // start of memVars()
121 }
122 
123 // start properties
124 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree;
125 + (SimpleCParser_formalParameter_return *)newSimpleCParser_formalParameter_return;
126 // this is start of set and get methods
127 /* AST returnScopeInterface.methodsdecl */
128 - (ANTLRCommonTree *)getTree;
129 - (void) setTree:(ANTLRCommonTree *)aTree;
130   // methodsDecl
131 @end /* end of returnScopeInterface interface */
132 @interface SimpleCParser_type_return :ANTLRParserRuleReturnScope { // line 1672
133 /* AST returnScopeInterface.memVars */
134 ANTLRCommonTree *tree; // start of memVars()
135 }
136 
137 // start properties
138 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree;
139 + (SimpleCParser_type_return *)newSimpleCParser_type_return;
140 // this is start of set and get methods
141 /* AST returnScopeInterface.methodsdecl */
142 - (ANTLRCommonTree *)getTree;
143 - (void) setTree:(ANTLRCommonTree *)aTree;
144   // methodsDecl
145 @end /* end of returnScopeInterface interface */
146 @interface SimpleCParser_block_return :ANTLRParserRuleReturnScope { // line 1672
147 /* AST returnScopeInterface.memVars */
148 ANTLRCommonTree *tree; // start of memVars()
149 }
150 
151 // start properties
152 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree;
153 + (SimpleCParser_block_return *)newSimpleCParser_block_return;
154 // this is start of set and get methods
155 /* AST returnScopeInterface.methodsdecl */
156 - (ANTLRCommonTree *)getTree;
157 - (void) setTree:(ANTLRCommonTree *)aTree;
158   // methodsDecl
159 @end /* end of returnScopeInterface interface */
160 @interface SimpleCParser_stat_return :ANTLRParserRuleReturnScope { // line 1672
161 /* AST returnScopeInterface.memVars */
162 ANTLRCommonTree *tree; // start of memVars()
163 }
164 
165 // start properties
166 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree;
167 + (SimpleCParser_stat_return *)newSimpleCParser_stat_return;
168 // this is start of set and get methods
169 /* AST returnScopeInterface.methodsdecl */
170 - (ANTLRCommonTree *)getTree;
171 - (void) setTree:(ANTLRCommonTree *)aTree;
172   // methodsDecl
173 @end /* end of returnScopeInterface interface */
174 @interface SimpleCParser_forStat_return :ANTLRParserRuleReturnScope { // line 1672
175 /* AST returnScopeInterface.memVars */
176 ANTLRCommonTree *tree; // start of memVars()
177 }
178 
179 // start properties
180 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree;
181 + (SimpleCParser_forStat_return *)newSimpleCParser_forStat_return;
182 // this is start of set and get methods
183 /* AST returnScopeInterface.methodsdecl */
184 - (ANTLRCommonTree *)getTree;
185 - (void) setTree:(ANTLRCommonTree *)aTree;
186   // methodsDecl
187 @end /* end of returnScopeInterface interface */
188 @interface SimpleCParser_assignStat_return :ANTLRParserRuleReturnScope { // line 1672
189 /* AST returnScopeInterface.memVars */
190 ANTLRCommonTree *tree; // start of memVars()
191 }
192 
193 // start properties
194 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree;
195 + (SimpleCParser_assignStat_return *)newSimpleCParser_assignStat_return;
196 // this is start of set and get methods
197 /* AST returnScopeInterface.methodsdecl */
198 - (ANTLRCommonTree *)getTree;
199 - (void) setTree:(ANTLRCommonTree *)aTree;
200   // methodsDecl
201 @end /* end of returnScopeInterface interface */
202 @interface SimpleCParser_expr_return :ANTLRParserRuleReturnScope { // line 1672
203 /* AST returnScopeInterface.memVars */
204 ANTLRCommonTree *tree; // start of memVars()
205 }
206 
207 // start properties
208 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree;
209 + (SimpleCParser_expr_return *)newSimpleCParser_expr_return;
210 // this is start of set and get methods
211 /* AST returnScopeInterface.methodsdecl */
212 - (ANTLRCommonTree *)getTree;
213 - (void) setTree:(ANTLRCommonTree *)aTree;
214   // methodsDecl
215 @end /* end of returnScopeInterface interface */
216 @interface SimpleCParser_condExpr_return :ANTLRParserRuleReturnScope { // line 1672
217 /* AST returnScopeInterface.memVars */
218 ANTLRCommonTree *tree; // start of memVars()
219 }
220 
221 // start properties
222 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree;
223 + (SimpleCParser_condExpr_return *)newSimpleCParser_condExpr_return;
224 // this is start of set and get methods
225 /* AST returnScopeInterface.methodsdecl */
226 - (ANTLRCommonTree *)getTree;
227 - (void) setTree:(ANTLRCommonTree *)aTree;
228   // methodsDecl
229 @end /* end of returnScopeInterface interface */
230 @interface SimpleCParser_aexpr_return :ANTLRParserRuleReturnScope { // line 1672
231 /* AST returnScopeInterface.memVars */
232 ANTLRCommonTree *tree; // start of memVars()
233 }
234 
235 // start properties
236 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree;
237 + (SimpleCParser_aexpr_return *)newSimpleCParser_aexpr_return;
238 // this is start of set and get methods
239 /* AST returnScopeInterface.methodsdecl */
240 - (ANTLRCommonTree *)getTree;
241 - (void) setTree:(ANTLRCommonTree *)aTree;
242   // methodsDecl
243 @end /* end of returnScopeInterface interface */
244 @interface SimpleCParser_atom_return :ANTLRParserRuleReturnScope { // line 1672
245 /* AST returnScopeInterface.memVars */
246 ANTLRCommonTree *tree; // start of memVars()
247 }
248 
249 // start properties
250 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree;
251 + (SimpleCParser_atom_return *)newSimpleCParser_atom_return;
252 // this is start of set and get methods
253 /* AST returnScopeInterface.methodsdecl */
254 - (ANTLRCommonTree *)getTree;
255 - (void) setTree:(ANTLRCommonTree *)aTree;
256   // methodsDecl
257 @end /* end of returnScopeInterface interface */
258 
259 #pragma mark Rule return scopes end
260 @interface SimpleCParser : ANTLRParser { // line 529
261 // start of globalAttributeScopeMemVar
262 
263 
264 // start of action-actionScope-memVars
265 // start of ruleAttributeScopeMemVar
266 
267 
268 // Start of memVars
269 /* AST parserHeaderFile.memVars */
270 /* AST parsermemVars */
271 id<ANTLRTreeAdaptor> treeAdaptor;
272 
273 DFA2 *dfa2;
274  }
275 
276 // start of action-actionScope-methodsDecl
277 
278 /* AST parserHeaderFile.methodsdecl */
279 /* AST parserMethodsDecl */
280 - (id<ANTLRTreeAdaptor>) getTreeAdaptor;
281 - (void) setTreeAdaptor:(id<ANTLRTreeAdaptor>)theTreeAdaptor;
282 
283 - (SimpleCParser_program_return *)program;
284 - (SimpleCParser_declaration_return *)declaration;
285 - (SimpleCParser_variable_return *)variable;
286 - (SimpleCParser_declarator_return *)declarator;
287 - (SimpleCParser_functionHeader_return *)functionHeader;
288 - (SimpleCParser_formalParameter_return *)formalParameter;
289 - (SimpleCParser_type_return *)type;
290 - (SimpleCParser_block_return *)block;
291 - (SimpleCParser_stat_return *)stat;
292 - (SimpleCParser_forStat_return *)forStat;
293 - (SimpleCParser_assignStat_return *)assignStat;
294 - (SimpleCParser_expr_return *)expr;
295 - (SimpleCParser_condExpr_return *)condExpr;
296 - (SimpleCParser_aexpr_return *)aexpr;
297 - (SimpleCParser_atom_return *)atom;
298 
299 
300 @end /* end of SimpleCParser interface */
301