OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
declarationparser.hpp
Go to the documentation of this file.
1 #ifndef COMPILER_DECLARATIONPARSER_H_INCLUDED
2 #define COMPILER_DECLARATIONPARSER_H_INCLUDED
3 
4 #include "parser.hpp"
5 
6 namespace Compiler
7 {
8  class Locals;
9 
10  class DeclarationParser : public Parser
11  {
12  enum State
13  {
15  };
16 
19  char mType;
20 
21  public:
22 
23  DeclarationParser (ErrorHandler& errorHandler, const Context& context, Locals& locals);
24 
25  virtual bool parseName (const std::string& name, const TokenLoc& loc,
26  Scanner& scanner);
29 
30  virtual bool parseKeyword (int keyword, const TokenLoc& loc, Scanner& scanner);
33 
34  virtual bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner);
37 
38  void reset();
39 
40  };
41 }
42 
43 #endif
Definition: context.hpp:10
Location of a token in a source file.
Definition: tokenloc.hpp:10
State
Definition: declarationparser.hpp:12
Locals & mLocals
Definition: declarationparser.hpp:17
State mState
Definition: declarationparser.hpp:18
DeclarationParser(ErrorHandler &errorHandler, const Context &context, Locals &locals)
Definition: declarationparser.cpp:10
Definition: declarationparser.hpp:14
Error handling.
Definition: errorhandler.hpp:14
Definition: declarationparser.hpp:10
virtual bool parseName(const std::string &name, const TokenLoc &loc, Scanner &scanner)
Definition: declarationparser.cpp:15
virtual bool parseSpecial(int code, const TokenLoc &loc, Scanner &scanner)
Definition: declarationparser.cpp:71
void reset()
Reset parser to clean state.
Definition: declarationparser.cpp:79
char mType
Definition: declarationparser.hpp:19
int code
Definition: crashcatcher.cpp:70
Definition: declarationparser.hpp:14
Parser base class.
Definition: parser.hpp:17
virtual bool parseKeyword(int keyword, const TokenLoc &loc, Scanner &scanner)
Definition: declarationparser.cpp:43
Definition: declarationparser.hpp:14
Local variable declarations.
Definition: locals.hpp:12
Scanner.
Definition: scanner.hpp:21
const char * name
Definition: crashcatcher.cpp:59