1 // $ANTLR 3.4 /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/treerewrite/TreeRewrite.g 2012-02-16 17:42:35 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 Tokens 26 #ifdef EOF 27 #undef EOF 28 #endif 29 #define EOF -1 30 #define INT 4 31 #define WS 5 32 #pragma mark Dynamic Global Scopes globalAttributeScopeInterface 33 #pragma mark Dynamic Rule Scopes ruleAttributeScopeInterface 34 #pragma mark Rule Return Scopes returnScopeInterface 35 /* returnScopeInterface TreeRewriteParser_rule_return */ 36 @interface TreeRewriteParser_rule_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */ 37 /* AST returnScopeInterface.memVars */ 38 CommonTree *tree; /* ObjC start of memVars() */ 39 40 } 41 /* start property declarations */ 42 /* AST returnScopeInterface.properties */ 43 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree; 44 45 /* start of method declarations */ 46 47 + (TreeRewriteParser_rule_return *)newTreeRewriteParser_rule_return; 48 /* this is start of set and get methods */ 49 /* AST returnScopeInterface.methodsDecl */ 50 - (CommonTree *)getTree; 51 52 - (void) setTree:(CommonTree *)aTree; 53 /* methodsDecl */ 54 55 @end /* end of returnScopeInterface interface */ 56 57 58 /* returnScopeInterface TreeRewriteParser_subrule_return */ 59 @interface TreeRewriteParser_subrule_return : ParserRuleReturnScope { /* returnScopeInterface line 1838 */ 60 /* AST returnScopeInterface.memVars */ 61 CommonTree *tree; /* ObjC start of memVars() */ 62 63 } 64 /* start property declarations */ 65 /* AST returnScopeInterface.properties */ 66 @property (retain, getter=getTree, setter=setTree:) CommonTree *tree; 67 68 /* start of method declarations */ 69 70 + (TreeRewriteParser_subrule_return *)newTreeRewriteParser_subrule_return; 71 /* this is start of set and get methods */ 72 /* AST returnScopeInterface.methodsDecl */ 73 - (CommonTree *)getTree; 74 75 - (void) setTree:(CommonTree *)aTree; 76 /* methodsDecl */ 77 78 @end /* end of returnScopeInterface interface */ 79 80 81 82 /* Interface grammar class */ 83 @interface TreeRewriteParser : Parser { /* line 572 */ 84 #pragma mark Dynamic Rule Scopes ruleAttributeScopeDecl 85 #pragma mark Dynamic Global Rule Scopes globalAttributeScopeMemVar 86 87 88 /* ObjC start of actions.(actionScope).memVars */ 89 /* ObjC end of actions.(actionScope).memVars */ 90 /* ObjC start of memVars */ 91 /* AST parserHeaderFile.memVars */ 92 NSInteger ruleLevel; 93 NSArray *ruleNames; 94 /* AST super.memVars */ 95 /* AST parserMemVars */ 96 id<TreeAdaptor> treeAdaptor; /* AST parserMemVars */ 97 /* ObjC end of memVars */ 98 99 } 100 101 /* ObjC start of actions.(actionScope).properties */ 102 /* ObjC end of actions.(actionScope).properties */ 103 /* ObjC start of properties */ 104 /* AST parserHeaderFile.properties */ 105 /* AST super.properties */ 106 /* AST parserProperties */ 107 @property (retain, getter=getTreeAdaptor, setter=setTreeAdaptor:) id<TreeAdaptor> treeAdaptor; /* AST parserproperties */ 108 /* ObjC end of properties */ 109 110 + (void) initialize; 111 + (id) newTreeRewriteParser:(id<TokenStream>)aStream; 112 /* ObjC start of actions.(actionScope).methodsDecl */ 113 /* ObjC end of actions.(actionScope).methodsDecl */ 114 115 /* ObjC start of methodsDecl */ 116 /* AST parserHeaderFile.methodsDecl */ 117 /* AST super.methodsDecl */ 118 /* AST parserMethodsDecl */ 119 - (id<TreeAdaptor>) getTreeAdaptor; 120 - (void) setTreeAdaptor:(id<TreeAdaptor>)theTreeAdaptor; /* AST parsermethodsDecl */ 121 /* ObjC end of methodsDecl */ 122 123 - (TreeRewriteParser_rule_return *)rule; 124 - (TreeRewriteParser_subrule_return *)subrule; 125 126 127 @end /* end of TreeRewriteParser interface */ 128 129