1
#ifndef INC_JavaStoreWalker_hpp_
2
#define INC_JavaStoreWalker_hpp_
10
#include <qstringlist.h>
11
#include <qvaluestack.h>
12
#include <qfileinfo.h>
14
#line 15 "JavaStoreWalker.hpp"
15
#include <antlr/config.hpp>
16
#include "JavaStoreWalkerTokenTypes.hpp"
17
/* $ANTLR 2.7.7 (20061129): "java.store.g" -> "JavaStoreWalker.hpp"$ */
18
#include <antlr/TreeParser.hpp>
20
#line 13 "java.store.g"
22
#include <codemodel.h>
26
#line 27 "JavaStoreWalker.hpp"
27
/** Java 1.2 AST Recognizer Grammar
30
* Terence Parr parrt@magelang.com
32
* Version tracking now done with following ID:
34
* $Id: JavaStoreWalker.hpp 626096 2007-01-22 06:35:06Z okellogg $
36
* This grammar is in the PUBLIC DOMAIN
40
class CUSTOM_API JavaStoreWalker : public ANTLR_USE_NAMESPACE(antlr)TreeParser, public JavaStoreWalkerTokenTypes
42
#line 43 "java.store.g"
45
QStringList m_currentScope;
48
QValueStack<ClassDom> m_currentClass;
51
ANTLR_USE_NAMESPACE(antlr)JavaASTFactory ast_factory;
54
void setCodeModel( CodeModel* model )
59
void setFile( FileDom file )
66
m_currentScope.clear();
67
m_currentAccess = CodeModelItem::Public;
70
initializeASTFactory (ast_factory);
71
setASTFactory (&ast_factory);
73
#line 44 "JavaStoreWalker.hpp"
76
static void initializeASTFactory( ANTLR_USE_NAMESPACE(antlr)ASTFactory& factory );
77
int getNumTokens() const
79
return JavaStoreWalker::NUM_TOKENS;
81
const char* getTokenName( int type ) const
83
if( type > getNumTokens() ) return 0;
84
return JavaStoreWalker::tokenNames[type];
86
const char* const* getTokenNames() const
88
return JavaStoreWalker::tokenNames;
90
public: void compilationUnit(RefJavaAST _t);
91
public: QString packageDefinition(RefJavaAST _t);
92
public: QString importDefinition(RefJavaAST _t);
93
public: void typeDefinition(RefJavaAST _t);
94
public: QString identifier(RefJavaAST _t);
95
public: QString identifierStar(RefJavaAST _t);
96
public: QStringList modifiers(RefJavaAST _t);
97
public: QStringList extendsClause(RefJavaAST _t);
98
public: QStringList implementsClause(RefJavaAST _t);
99
public: void objBlock(RefJavaAST _t,
102
public: void interfaceBlock(RefJavaAST _t,
105
public: QString typeSpec(RefJavaAST _t);
106
public: QString typeSpecArray(RefJavaAST _t);
107
public: QString type(RefJavaAST _t);
108
public: void builtInType(RefJavaAST _t);
109
public: void modifier(RefJavaAST _t);
110
public: FunctionDom methodDecl(RefJavaAST _t);
111
public: VariableDom variableDef(RefJavaAST _t);
112
public: FunctionDom ctorDef(RefJavaAST _t);
113
public: FunctionDom methodDef(RefJavaAST _t);
114
public: void slist(RefJavaAST _t);
115
public: void methodHead(RefJavaAST _t,
118
public: void variableDeclarator(RefJavaAST _t,
121
public: void varInitializer(RefJavaAST _t);
122
public: ArgumentDom parameterDef(RefJavaAST _t);
123
public: void objectinitializer(RefJavaAST _t);
124
public: void initializer(RefJavaAST _t);
125
public: void expression(RefJavaAST _t);
126
public: void arrayInitializer(RefJavaAST _t);
127
public: void throwsClause(RefJavaAST _t);
128
public: void stat(RefJavaAST _t);
129
public: void elist(RefJavaAST _t);
130
public: void caseGroup(RefJavaAST _t);
131
public: void tryBlock(RefJavaAST _t);
132
public: void handler(RefJavaAST _t);
133
public: void expr(RefJavaAST _t);
134
public: void primaryExpression(RefJavaAST _t);
135
public: void arrayIndex(RefJavaAST _t);
136
public: void newExpression(RefJavaAST _t);
137
public: void constant(RefJavaAST _t);
138
public: void newArrayDeclarator(RefJavaAST _t);
140
ANTLR_USE_NAMESPACE(antlr)RefAST getAST()
142
return ANTLR_USE_NAMESPACE(antlr)RefAST(returnAST);
146
RefJavaAST returnAST;
149
static const char* tokenNames[];
150
#ifndef NO_STATIC_CONSTS
151
static const int NUM_TOKENS = 153;
158
static const unsigned long _tokenSet_0_data_[];
159
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_0;
160
static const unsigned long _tokenSet_1_data_[];
161
static const ANTLR_USE_NAMESPACE(antlr)BitSet _tokenSet_1;
164
#endif /*INC_JavaStoreWalker_hpp_*/