1 // $ANTLR 3.4 /Users/acondit/source/antlr/code/antlr3/runtime/ObjC/Framework/examples/hoistedPredicates/T.g 2012-02-16 17:34:26
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 T__7 7
31 #define ID 4
32 #define INT 5
33 #define WS 6
34 #pragma mark Dynamic Global Scopes globalAttributeScopeInterface
35 #pragma mark Dynamic Rule Scopes ruleAttributeScopeInterface
36 #pragma mark Rule Return Scopes returnScopeInterface
37 
38 /* Interface grammar class */
39 @interface TParser  : Parser { /* line 572 */
40 #pragma mark Dynamic Rule Scopes ruleAttributeScopeDecl
41 #pragma mark Dynamic Global Rule Scopes globalAttributeScopeMemVar
42 
43 
44 /* ObjC start of actions.(actionScope).memVars */
45 
46 /* With this true, enum is seen as a keyword.  False, it's an identifier */
47 BOOL enableEnum;
48 
49 /* ObjC end of actions.(actionScope).memVars */
50 /* ObjC start of memVars */
51 /* ObjC end of memVars */
52 
53  }
54 
55 /* ObjC start of actions.(actionScope).properties */
56 /* ObjC end of actions.(actionScope).properties */
57 /* ObjC start of properties */
58 /* ObjC end of properties */
59 
60 + (void) initialize;
61 + (id) newTParser:(id<TokenStream>)aStream;
62 /* ObjC start of actions.(actionScope).methodsDecl */
63 /* ObjC end of actions.(actionScope).methodsDecl */
64 
65 /* ObjC start of methodsDecl */
66 /* ObjC end of methodsDecl */
67 
68 - (void)stat;
69 - (void)identifier;
70 - (void)enumAsKeyword;
71 - (void)enumAsID;
72 
73 
74 @end /* end of TParser interface */
75 
76 /** Demonstrates how semantic predicates get hoisted out of the rule in
77  *  which they are found and used in other decisions.  This grammar illustrates
78  *  how predicates can be used to distinguish between enum as a keyword and
79  *  an ID *dynamically*. :)
80 
81  * Run "java org.antlr.Tool -dfa t.g" to generate DOT (graphviz) files.  See
82  * the T_dec-1.dot file to see the predicates in action.
83  */