OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
discardparser.hpp
Go to the documentation of this file.
1 #ifndef COMPILER_DISCARDPARSER_H_INCLUDED
2 #define COMPILER_DISCARDPARSER_H_INCLUDED
3 
4 #include "parser.hpp"
5 #include "tokenloc.hpp"
6 
7 namespace Compiler
8 {
10  class DiscardParser : public Parser
11  {
12  enum State
13  {
15  };
16 
19 
20  public:
21 
22  DiscardParser (ErrorHandler& errorHandler, const Context& context);
23 
24  virtual bool parseInt (int value, const TokenLoc& loc, Scanner& scanner);
27 
28  virtual bool parseFloat (float value, const TokenLoc& loc, Scanner& scanner);
31 
32  virtual bool parseName (const std::string& name, const TokenLoc& loc,
33  Scanner& scanner);
36 
37  virtual bool parseSpecial (int code, const TokenLoc& loc, Scanner& scanner);
40 
41  virtual void reset();
43 
46  const TokenLoc& getTokenLoc() const;
47  };
48 }
49 
50 #endif
Definition: discardparser.hpp:14
Definition: discardparser.hpp:14
State mState
Definition: discardparser.hpp:17
State
Definition: discardparser.hpp:12
Definition: context.hpp:10
Location of a token in a source file.
Definition: tokenloc.hpp:10
virtual bool parseSpecial(int code, const TokenLoc &loc, Scanner &scanner)
Definition: discardparser.cpp:56
virtual bool parseFloat(float value, const TokenLoc &loc, Scanner &scanner)
Definition: discardparser.cpp:27
Error handling.
Definition: errorhandler.hpp:14
TokenLoc mTokenLoc
Definition: discardparser.hpp:18
virtual bool parseInt(int value, const TokenLoc &loc, Scanner &scanner)
Definition: discardparser.cpp:13
DiscardParser(ErrorHandler &errorHandler, const Context &context)
Definition: discardparser.cpp:7
Definition: discardparser.hpp:14
int code
Definition: crashcatcher.cpp:70
Parse a single optional numeric value or string and discard it.
Definition: discardparser.hpp:10
Parser base class.
Definition: parser.hpp:17
virtual bool parseName(const std::string &name, const TokenLoc &loc, Scanner &scanner)
Definition: discardparser.cpp:41
const TokenLoc & getTokenLoc() const
Definition: discardparser.cpp:90
virtual void reset()
Reset parser to clean state.
Definition: discardparser.cpp:83
Scanner.
Definition: scanner.hpp:21
const char * name
Definition: crashcatcher.cpp:59