1 // $ANTLR 3.4 /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/simplecTreeParser/SimpleCWalker.g 2012-02-16 17:56: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 /* treeParserHeaderFile */ 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 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 globalAttributeScopeInterface 54 /* globalAttributeScopeInterface */ 55 @interface Symbols_Scope : SymbolsScope { 56 CommonTree * tree; 57 } 58 /* start of globalAttributeScopeInterface properties */ 59 @property (assign, getter=gettree, setter=settree:) CommonTree * tree; 60 /* end globalAttributeScopeInterface properties */ 61 + (Symbols_Scope *)newSymbols_Scope; 62 - (id) init; 63 /* start of globalAttributeScopeInterface methodsDecl */ 64 - (CommonTree *)gettree; 65 - (void)settree:(CommonTree *)aVal; 66 /* End of globalAttributeScopeInterface methodsDecl */ 67 @end /* end of Symbols_Scope interface */ 68 69 #pragma mark Dynamic Rule Scopes ruleAttributeScopeInterface 70 #pragma mark Rule Return Scopes returnScopeInterface 71 /* returnScopeInterface SimpleCWalker_expr_return */ 72 @interface SimpleCWalker_expr_return : TreeRuleReturnScope { /* returnScopeInterface line 1838 */ 73 /* ObjC start of memVars() */ 74 75 } 76 /* start property declarations */ 77 78 79 /* start of method declarations */ 80 81 + (SimpleCWalker_expr_return *)newSimpleCWalker_expr_return; 82 /* this is start of set and get methods */ 83 /* methodsDecl */ 84 85 @end /* end of returnScopeInterface interface */ 86 87 88 89 /* Interface grammar class */ 90 @interface SimpleCWalker : TreeParser { /* line 572 */ 91 #pragma mark Dynamic Rule Scopes ruleAttributeScopeDecl 92 #pragma mark Dynamic Global Rule Scopes globalAttributeScopeMemVar 93 /* globalAttributeScopeMemVar */ 94 SymbolStack *Symbols_stack; 95 Symbols_Scope *Symbols_scope; 96 97 98 /* ObjC start of actions.(actionScope).memVars */ 99 /* ObjC end of actions.(actionScope).memVars */ 100 /* ObjC start of memVars */ 101 /* ObjC end of memVars */ 102 103 } 104 105 /* ObjC start of actions.(actionScope).properties */ 106 /* ObjC end of actions.(actionScope).properties */ 107 /* ObjC start of properties */ 108 /* ObjC end of properties */ 109 110 + (void) initialize; 111 + (id) newSimpleCWalker:(id<TreeNodeStream>)aStream; 112 /* ObjC start of actions.(actionScope).methodsDecl */ 113 /* ObjC end of actions.(actionScope).methodsDecl */ 114 115 /* ObjC start of methodsDecl */ 116 /* ObjC end of methodsDecl */ 117 118 - (void)program; 119 - (void)declaration; 120 - (void)variable; 121 - (void)declarator; 122 - (void)functionHeader; 123 - (void)formalParameter; 124 - (void)type; 125 - (void)block; 126 - (void)stat; 127 - (void)forStat; 128 - (SimpleCWalker_expr_return *)expr; 129 - (void)atom; 130 131 132 @end /* end of SimpleCWalker interface */ 133 134