1 #ifndef COMPILER_CONTROLPARSER_H_INCLUDED
2 #define COMPILER_CONTROLPARSER_H_INCLUDED
33 typedef std::vector<Interpreter::Type_Code>
Codes;
34 typedef std::vector<std::pair<Codes, Codes> >
IfCodes;
std::vector< std::pair< Codes, Codes > > IfCodes
Definition: controlparser.hpp:34
State mState
Definition: controlparser.hpp:43
Definition: controlparser.hpp:30
Definition: controlparser.hpp:23
void reset()
Reset parser to clean state.
Definition: controlparser.cpp:264
Definition: controlparser.hpp:25
Definition: context.hpp:10
Location of a token in a source file.
Definition: tokenloc.hpp:10
Definition: exprparser.hpp:16
Definition: controlparser.hpp:26
Codes mCodeBlock
Definition: controlparser.hpp:39
Definition: controlparser.hpp:29
Definition: controlparser.hpp:24
std::vector< Interpreter::Type_Code > Codes
Definition: controlparser.hpp:33
Definition: controlparser.hpp:25
Error handling.
Definition: errorhandler.hpp:14
IfCodes mIfCode
Definition: controlparser.hpp:40
ExprParser mExprParser
Definition: controlparser.hpp:42
Definition: controlparser.hpp:28
Codes mCode
Definition: controlparser.hpp:38
ControlParser(ErrorHandler &errorHandler, const Context &context, Locals &locals, Literals &literals)
Definition: controlparser.cpp:157
Definition: controlparser.hpp:27
bool parseIfBody(int keyword, const TokenLoc &loc, Scanner &scanner)
Definition: controlparser.cpp:14
Definition: controlparser.hpp:28
Definition: controlparser.hpp:19
virtual bool parseSpecial(int code, const TokenLoc &loc, Scanner &scanner)
Definition: controlparser.cpp:225
virtual bool parseKeyword(int keyword, const TokenLoc &loc, Scanner &scanner)
Definition: controlparser.cpp:186
bool parseWhileBody(int keyword, const TokenLoc &loc, Scanner &scanner)
Definition: controlparser.cpp:101
int code
Definition: crashcatcher.cpp:70
Locals & mLocals
Definition: controlparser.hpp:36
Literal values.
Definition: literals.hpp:13
virtual bool parseName(const std::string &name, const TokenLoc &loc, Scanner &scanner)
Definition: controlparser.cpp:172
LineParser mLineParser
Definition: controlparser.hpp:41
Parser base class.
Definition: parser.hpp:17
Definition: controlparser.hpp:26
Definition: controlparser.hpp:24
Literals & mLiterals
Definition: controlparser.hpp:37
void appendCode(std::vector< Interpreter::Type_Code > &code) const
store generated code in code.
Definition: controlparser.cpp:167
State
Definition: controlparser.hpp:21
Local variable declarations.
Definition: locals.hpp:12
Scanner.
Definition: scanner.hpp:21
const char * name
Definition: crashcatcher.cpp:59
Line parser, to be used in console scripts and as part of ScriptParser.
Definition: lineparser.hpp:20