1// $ANTLR ${project.version} ${buildNumber} SimpleCTP.g 2011-05-06 15:09:28 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/* treeParserHeaderFile */ 13#ifndef ANTLR3TokenTypeAlreadyDefined 14#define ANTLR3TokenTypeAlreadyDefined 15typedef enum { 16 ANTLR_EOF = -1, 17 INVALID, 18 EOR, 19 DOWN, 20 UP, 21 MIN 22} ANTLR3TokenType; 23#endif 24 25#pragma mark Tokens 26#ifdef EOF 27#undef EOF 28#endif 29#define EOF -1 30#define ARG_DEF 4 31#define BLOCK 5 32#define FUNC_DECL 6 33#define FUNC_DEF 7 34#define FUNC_HDR 8 35#define K_CHAR 9 36#define K_COMMA 10 37#define K_EQ 11 38#define K_EQEQ 12 39#define K_FOR 13 40#define K_ID 14 41#define K_INT 15 42#define K_INT_TYPE 16 43#define K_LCURLY 17 44#define K_LCURVE 18 45#define K_LT 19 46#define K_PLUS 20 47#define K_RCURLY 21 48#define K_RCURVE 22 49#define K_SEMICOLON 23 50#define K_VOID 24 51#define VAR_DEF 25 52#define WS 26 53#pragma mark Dynamic Global Scopes 54/* globalAttributeScopeInterface */ 55@interface Symbols_Scope : ANTLRSymbolsScope { 56ANTLRCommonTree * tree; 57 58} 59/* start of globalAttributeScopeInterface properties */ 60 61@property (assign, getter=gettree, setter=settree:) ANTLRCommonTree * tree; 62 63/* end globalAttributeScopeInterface properties */ 64 65 66+ (Symbols_Scope *)newSymbols_Scope; 67- (id) init; 68/* start of globalAttributeScopeInterface methodsDecl */ 69 70- (ANTLRCommonTree *)gettree; 71- (void)settree:(ANTLRCommonTree *)aVal; 72 73/* End of globalAttributeScopeInterface methodsDecl */ 74 75@end /* end of Symbols_Scope interface */ 76 77#pragma mark Dynamic Rule Scopes 78#pragma mark Rule Return Scopes start 79/* returnScopeInterface SimpleCTP_expr_return */ 80@interface SimpleCTP_expr_return :ANTLRTreeRuleReturnScope { /* returnScopeInterface line 1838 */ 81 /* ObjC start of memVars() */ 82} 83/* start properties */ 84+ (SimpleCTP_expr_return *)newSimpleCTP_expr_return; 85/* this is start of set and get methods */ 86 /* methodsDecl */ 87@end /* end of returnScopeInterface interface */ 88 89 90 91 92/* Interface grammar class */ 93@interface SimpleCTP : ANTLRTreeParser { /* line 572 */ 94/* ObjC start of ruleAttributeScopeMemVar */ 95 96 97/* ObjC end of ruleAttributeScopeMemVar */ 98/* ObjC start of globalAttributeScopeMemVar */ 99/* globalAttributeScopeMemVar */ 100//ANTLRSymbolStack *gStack; 101ANTLRSymbolStack *Symbols_stack; 102Symbols_Scope *Symbols_scope; 103 104/* ObjC end of globalAttributeScopeMemVar */ 105/* ObjC start of actions.(actionScope).memVars */ 106/* ObjC end of actions.(actionScope).memVars */ 107/* ObjC start of memVars */ 108/* ObjC end of memVars */ 109 110 } 111 112/* ObjC start of actions.(actionScope).properties */ 113/* ObjC end of actions.(actionScope).properties */ 114/* ObjC start of properties */ 115/* ObjC end of properties */ 116 117+ (void) initialize; 118+ (id) newSimpleCTP:(id<ANTLRTreeNodeStream>)aStream; 119/* ObjC start of actions.(actionScope).methodsDecl */ 120/* ObjC end of actions.(actionScope).methodsDecl */ 121 122/* ObjC start of methodsDecl */ 123/* ObjC end of methodsDecl */ 124 125- (void)program; 126- (void)declaration; 127- (void)variable; 128- (void)declarator; 129- (void)functionHeader; 130- (void)formalParameter; 131- (void)type; 132- (void)block; 133- (void)stat; 134- (void)forStat; 135- (SimpleCTP_expr_return *)expr; 136- (void)atom; 137 138 139@end /* end of SimpleCTP interface */ 140 141