1 // $ANTLR ${project.version} ${buildNumber} SimpleC.g 2011-05-06 15:09:17 2 3 /* ============================================================================= 4 * Standard antlr3 OBJC runtime definitions 5 */ 6 #import <Cocoa/Cocoa.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 : ANTLRDFA { 27 } 28 + newDFA2WithRecognizer:(ANTLRBaseRecognizer *)theRecognizer; 29 - initWithRecognizer:(ANTLRBaseRecognizer *)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 63 #pragma mark Dynamic Rule Scopes 64 #pragma mark Rule Return Scopes start 65 /* returnScopeInterface SimpleCParser_program_return */ 66 @interface SimpleCParser_program_return :ANTLRParserRuleReturnScope { /* returnScopeInterface line 1838 */ 67 /* AST returnScopeInterface.memVars */ 68 ANTLRCommonTree *tree; /* ObjC start of memVars() */ 69 } 70 /* start properties */ 71 /* AST returnScopeInterface.properties */ 72 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree; 73 + (SimpleCParser_program_return *)newSimpleCParser_program_return; 74 /* this is start of set and get methods */ 75 /* AST returnScopeInterface.methodsDecl */ 76 - (ANTLRCommonTree *)getTree; 77 78 - (void) setTree:(ANTLRCommonTree *)aTree; 79 /* methodsDecl */ 80 @end /* end of returnScopeInterface interface */ 81 82 83 84 /* returnScopeInterface SimpleCParser_declaration_return */ 85 @interface SimpleCParser_declaration_return :ANTLRParserRuleReturnScope { /* returnScopeInterface line 1838 */ 86 /* AST returnScopeInterface.memVars */ 87 ANTLRCommonTree *tree; /* ObjC start of memVars() */ 88 } 89 /* start properties */ 90 /* AST returnScopeInterface.properties */ 91 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree; 92 + (SimpleCParser_declaration_return *)newSimpleCParser_declaration_return; 93 /* this is start of set and get methods */ 94 /* AST returnScopeInterface.methodsDecl */ 95 - (ANTLRCommonTree *)getTree; 96 97 - (void) setTree:(ANTLRCommonTree *)aTree; 98 /* methodsDecl */ 99 @end /* end of returnScopeInterface interface */ 100 101 102 103 /* returnScopeInterface SimpleCParser_variable_return */ 104 @interface SimpleCParser_variable_return :ANTLRParserRuleReturnScope { /* returnScopeInterface line 1838 */ 105 /* AST returnScopeInterface.memVars */ 106 ANTLRCommonTree *tree; /* ObjC start of memVars() */ 107 } 108 /* start properties */ 109 /* AST returnScopeInterface.properties */ 110 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree; 111 + (SimpleCParser_variable_return *)newSimpleCParser_variable_return; 112 /* this is start of set and get methods */ 113 /* AST returnScopeInterface.methodsDecl */ 114 - (ANTLRCommonTree *)getTree; 115 116 - (void) setTree:(ANTLRCommonTree *)aTree; 117 /* methodsDecl */ 118 @end /* end of returnScopeInterface interface */ 119 120 121 122 /* returnScopeInterface SimpleCParser_declarator_return */ 123 @interface SimpleCParser_declarator_return :ANTLRParserRuleReturnScope { /* returnScopeInterface line 1838 */ 124 /* AST returnScopeInterface.memVars */ 125 ANTLRCommonTree *tree; /* ObjC start of memVars() */ 126 } 127 /* start properties */ 128 /* AST returnScopeInterface.properties */ 129 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree; 130 + (SimpleCParser_declarator_return *)newSimpleCParser_declarator_return; 131 /* this is start of set and get methods */ 132 /* AST returnScopeInterface.methodsDecl */ 133 - (ANTLRCommonTree *)getTree; 134 135 - (void) setTree:(ANTLRCommonTree *)aTree; 136 /* methodsDecl */ 137 @end /* end of returnScopeInterface interface */ 138 139 140 141 /* returnScopeInterface SimpleCParser_functionHeader_return */ 142 @interface SimpleCParser_functionHeader_return :ANTLRParserRuleReturnScope { /* returnScopeInterface line 1838 */ 143 /* AST returnScopeInterface.memVars */ 144 ANTLRCommonTree *tree; /* ObjC start of memVars() */ 145 } 146 /* start properties */ 147 /* AST returnScopeInterface.properties */ 148 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree; 149 + (SimpleCParser_functionHeader_return *)newSimpleCParser_functionHeader_return; 150 /* this is start of set and get methods */ 151 /* AST returnScopeInterface.methodsDecl */ 152 - (ANTLRCommonTree *)getTree; 153 154 - (void) setTree:(ANTLRCommonTree *)aTree; 155 /* methodsDecl */ 156 @end /* end of returnScopeInterface interface */ 157 158 159 160 /* returnScopeInterface SimpleCParser_formalParameter_return */ 161 @interface SimpleCParser_formalParameter_return :ANTLRParserRuleReturnScope { /* returnScopeInterface line 1838 */ 162 /* AST returnScopeInterface.memVars */ 163 ANTLRCommonTree *tree; /* ObjC start of memVars() */ 164 } 165 /* start properties */ 166 /* AST returnScopeInterface.properties */ 167 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree; 168 + (SimpleCParser_formalParameter_return *)newSimpleCParser_formalParameter_return; 169 /* this is start of set and get methods */ 170 /* AST returnScopeInterface.methodsDecl */ 171 - (ANTLRCommonTree *)getTree; 172 173 - (void) setTree:(ANTLRCommonTree *)aTree; 174 /* methodsDecl */ 175 @end /* end of returnScopeInterface interface */ 176 177 178 179 /* returnScopeInterface SimpleCParser_type_return */ 180 @interface SimpleCParser_type_return :ANTLRParserRuleReturnScope { /* returnScopeInterface line 1838 */ 181 /* AST returnScopeInterface.memVars */ 182 ANTLRCommonTree *tree; /* ObjC start of memVars() */ 183 } 184 /* start properties */ 185 /* AST returnScopeInterface.properties */ 186 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree; 187 + (SimpleCParser_type_return *)newSimpleCParser_type_return; 188 /* this is start of set and get methods */ 189 /* AST returnScopeInterface.methodsDecl */ 190 - (ANTLRCommonTree *)getTree; 191 192 - (void) setTree:(ANTLRCommonTree *)aTree; 193 /* methodsDecl */ 194 @end /* end of returnScopeInterface interface */ 195 196 197 198 /* returnScopeInterface SimpleCParser_block_return */ 199 @interface SimpleCParser_block_return :ANTLRParserRuleReturnScope { /* returnScopeInterface line 1838 */ 200 /* AST returnScopeInterface.memVars */ 201 ANTLRCommonTree *tree; /* ObjC start of memVars() */ 202 } 203 /* start properties */ 204 /* AST returnScopeInterface.properties */ 205 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree; 206 + (SimpleCParser_block_return *)newSimpleCParser_block_return; 207 /* this is start of set and get methods */ 208 /* AST returnScopeInterface.methodsDecl */ 209 - (ANTLRCommonTree *)getTree; 210 211 - (void) setTree:(ANTLRCommonTree *)aTree; 212 /* methodsDecl */ 213 @end /* end of returnScopeInterface interface */ 214 215 216 217 /* returnScopeInterface SimpleCParser_stat_return */ 218 @interface SimpleCParser_stat_return :ANTLRParserRuleReturnScope { /* returnScopeInterface line 1838 */ 219 /* AST returnScopeInterface.memVars */ 220 ANTLRCommonTree *tree; /* ObjC start of memVars() */ 221 } 222 /* start properties */ 223 /* AST returnScopeInterface.properties */ 224 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree; 225 + (SimpleCParser_stat_return *)newSimpleCParser_stat_return; 226 /* this is start of set and get methods */ 227 /* AST returnScopeInterface.methodsDecl */ 228 - (ANTLRCommonTree *)getTree; 229 230 - (void) setTree:(ANTLRCommonTree *)aTree; 231 /* methodsDecl */ 232 @end /* end of returnScopeInterface interface */ 233 234 235 236 /* returnScopeInterface SimpleCParser_forStat_return */ 237 @interface SimpleCParser_forStat_return :ANTLRParserRuleReturnScope { /* returnScopeInterface line 1838 */ 238 /* AST returnScopeInterface.memVars */ 239 ANTLRCommonTree *tree; /* ObjC start of memVars() */ 240 } 241 /* start properties */ 242 /* AST returnScopeInterface.properties */ 243 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree; 244 + (SimpleCParser_forStat_return *)newSimpleCParser_forStat_return; 245 /* this is start of set and get methods */ 246 /* AST returnScopeInterface.methodsDecl */ 247 - (ANTLRCommonTree *)getTree; 248 249 - (void) setTree:(ANTLRCommonTree *)aTree; 250 /* methodsDecl */ 251 @end /* end of returnScopeInterface interface */ 252 253 254 255 /* returnScopeInterface SimpleCParser_assignStat_return */ 256 @interface SimpleCParser_assignStat_return :ANTLRParserRuleReturnScope { /* returnScopeInterface line 1838 */ 257 /* AST returnScopeInterface.memVars */ 258 ANTLRCommonTree *tree; /* ObjC start of memVars() */ 259 } 260 /* start properties */ 261 /* AST returnScopeInterface.properties */ 262 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree; 263 + (SimpleCParser_assignStat_return *)newSimpleCParser_assignStat_return; 264 /* this is start of set and get methods */ 265 /* AST returnScopeInterface.methodsDecl */ 266 - (ANTLRCommonTree *)getTree; 267 268 - (void) setTree:(ANTLRCommonTree *)aTree; 269 /* methodsDecl */ 270 @end /* end of returnScopeInterface interface */ 271 272 273 274 /* returnScopeInterface SimpleCParser_expr_return */ 275 @interface SimpleCParser_expr_return :ANTLRParserRuleReturnScope { /* returnScopeInterface line 1838 */ 276 /* AST returnScopeInterface.memVars */ 277 ANTLRCommonTree *tree; /* ObjC start of memVars() */ 278 } 279 /* start properties */ 280 /* AST returnScopeInterface.properties */ 281 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree; 282 + (SimpleCParser_expr_return *)newSimpleCParser_expr_return; 283 /* this is start of set and get methods */ 284 /* AST returnScopeInterface.methodsDecl */ 285 - (ANTLRCommonTree *)getTree; 286 287 - (void) setTree:(ANTLRCommonTree *)aTree; 288 /* methodsDecl */ 289 @end /* end of returnScopeInterface interface */ 290 291 292 293 /* returnScopeInterface SimpleCParser_condExpr_return */ 294 @interface SimpleCParser_condExpr_return :ANTLRParserRuleReturnScope { /* returnScopeInterface line 1838 */ 295 /* AST returnScopeInterface.memVars */ 296 ANTLRCommonTree *tree; /* ObjC start of memVars() */ 297 } 298 /* start properties */ 299 /* AST returnScopeInterface.properties */ 300 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree; 301 + (SimpleCParser_condExpr_return *)newSimpleCParser_condExpr_return; 302 /* this is start of set and get methods */ 303 /* AST returnScopeInterface.methodsDecl */ 304 - (ANTLRCommonTree *)getTree; 305 306 - (void) setTree:(ANTLRCommonTree *)aTree; 307 /* methodsDecl */ 308 @end /* end of returnScopeInterface interface */ 309 310 311 312 /* returnScopeInterface SimpleCParser_aexpr_return */ 313 @interface SimpleCParser_aexpr_return :ANTLRParserRuleReturnScope { /* returnScopeInterface line 1838 */ 314 /* AST returnScopeInterface.memVars */ 315 ANTLRCommonTree *tree; /* ObjC start of memVars() */ 316 } 317 /* start properties */ 318 /* AST returnScopeInterface.properties */ 319 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree; 320 + (SimpleCParser_aexpr_return *)newSimpleCParser_aexpr_return; 321 /* this is start of set and get methods */ 322 /* AST returnScopeInterface.methodsDecl */ 323 - (ANTLRCommonTree *)getTree; 324 325 - (void) setTree:(ANTLRCommonTree *)aTree; 326 /* methodsDecl */ 327 @end /* end of returnScopeInterface interface */ 328 329 330 331 /* returnScopeInterface SimpleCParser_atom_return */ 332 @interface SimpleCParser_atom_return :ANTLRParserRuleReturnScope { /* returnScopeInterface line 1838 */ 333 /* AST returnScopeInterface.memVars */ 334 ANTLRCommonTree *tree; /* ObjC start of memVars() */ 335 } 336 /* start properties */ 337 /* AST returnScopeInterface.properties */ 338 @property (retain, getter=getTree, setter=setTree:) ANTLRCommonTree *tree; 339 + (SimpleCParser_atom_return *)newSimpleCParser_atom_return; 340 /* this is start of set and get methods */ 341 /* AST returnScopeInterface.methodsDecl */ 342 - (ANTLRCommonTree *)getTree; 343 344 - (void) setTree:(ANTLRCommonTree *)aTree; 345 /* methodsDecl */ 346 @end /* end of returnScopeInterface interface */ 347 348 349 350 351 /* Interface grammar class */ 352 @interface SimpleCParser : ANTLRParser { /* line 572 */ 353 /* ObjC start of ruleAttributeScopeMemVar */ 354 355 356 /* ObjC end of ruleAttributeScopeMemVar */ 357 /* ObjC start of globalAttributeScopeMemVar */ 358 359 360 /* ObjC end of globalAttributeScopeMemVar */ 361 /* ObjC start of actions.(actionScope).memVars */ 362 /* ObjC end of actions.(actionScope).memVars */ 363 /* ObjC start of memVars */ 364 /* AST parserHeaderFile.memVars */ 365 NSInteger ruleLevel; 366 NSArray *ruleNames; 367 /* AST super.memVars */ 368 /* AST parserMemVars */ 369 id<ANTLRTreeAdaptor> treeAdaptor; /* AST parserMemVars */ 370 /* ObjC end of memVars */ 371 372 DFA2 *dfa2; 373 } 374 375 /* ObjC start of actions.(actionScope).properties */ 376 /* ObjC end of actions.(actionScope).properties */ 377 /* ObjC start of properties */ 378 /* AST parserHeaderFile.properties */ 379 /* AST super.properties */ 380 /* AST parserProperties */ 381 @property (retain, getter=getTreeAdaptor, setter=setTreeAdaptor:) id<ANTLRTreeAdaptor> treeAdaptor; /* AST parserproperties */ 382 /* ObjC end of properties */ 383 384 + (void) initialize; 385 + (id) newSimpleCParser:(id<ANTLRTokenStream>)aStream; 386 /* ObjC start of actions.(actionScope).methodsDecl */ 387 /* ObjC end of actions.(actionScope).methodsDecl */ 388 389 /* ObjC start of methodsDecl */ 390 /* AST parserHeaderFile.methodsDecl */ 391 /* AST super.methodsDecl */ 392 /* AST parserMethodsDecl */ 393 - (id<ANTLRTreeAdaptor>) getTreeAdaptor; 394 - (void) setTreeAdaptor:(id<ANTLRTreeAdaptor>)theTreeAdaptor; /* AST parsermethodsDecl */ 395 /* ObjC end of methodsDecl */ 396 397 - (SimpleCParser_program_return *)program; 398 - (SimpleCParser_declaration_return *)declaration; 399 - (SimpleCParser_variable_return *)variable; 400 - (SimpleCParser_declarator_return *)declarator; 401 - (SimpleCParser_functionHeader_return *)functionHeader; 402 - (SimpleCParser_formalParameter_return *)formalParameter; 403 - (SimpleCParser_type_return *)type; 404 - (SimpleCParser_block_return *)block; 405 - (SimpleCParser_stat_return *)stat; 406 - (SimpleCParser_forStat_return *)forStat; 407 - (SimpleCParser_assignStat_return *)assignStat; 408 - (SimpleCParser_expr_return *)expr; 409 - (SimpleCParser_condExpr_return *)condExpr; 410 - (SimpleCParser_aexpr_return *)aexpr; 411 - (SimpleCParser_atom_return *)atom; 412 413 414 @end /* end of SimpleCParser interface */ 415 416