OpenMW
|
#include <scriptparser.hpp>
Public Member Functions | |
ScriptParser (ErrorHandler &errorHandler, Context &context, Locals &locals, bool end=false) | |
void | getCode (std::vector< Interpreter::Type_Code > &code) const |
store generated code in \æ code. | |
virtual bool | parseName (const std::string &name, const TokenLoc &loc, Scanner &scanner) |
virtual bool | parseKeyword (int keyword, const TokenLoc &loc, Scanner &scanner) |
virtual bool | parseSpecial (int code, const TokenLoc &loc, Scanner &scanner) |
virtual void | parseEOF (Scanner &scanner) |
Handle EOF token. | |
void | reset () |
Reset parser to clean state. | |
Private Attributes | |
Output | mOutput |
LineParser | mLineParser |
ControlParser | mControlParser |
bool | mEnd |
Compiler::ScriptParser::ScriptParser | ( | ErrorHandler & | errorHandler, |
Context & | context, | ||
Locals & | locals, | ||
bool | end = false |
||
) |
end | of script is marked by end keyword. |
void Compiler::ScriptParser::getCode | ( | std::vector< Interpreter::Type_Code > & | code | ) | const |
store generated code in \æ code.
void Compiler::ScriptParser::parseEOF | ( | Scanner & | scanner | ) | [virtual] |
Handle EOF token.
Reimplemented from Compiler::Parser.
bool Compiler::ScriptParser::parseKeyword | ( | int | keyword, |
const TokenLoc & | loc, | ||
Scanner & | scanner | ||
) | [virtual] |
Handle a keyword token.
Reimplemented from Compiler::Parser.
bool Compiler::ScriptParser::parseName | ( | const std::string & | name, |
const TokenLoc & | loc, | ||
Scanner & | scanner | ||
) | [virtual] |
bool Compiler::ScriptParser::parseSpecial | ( | int | code, |
const TokenLoc & | loc, | ||
Scanner & | scanner | ||
) | [virtual] |
void Compiler::ScriptParser::reset | ( | ) | [virtual] |
Reset parser to clean state.
Reimplemented from Compiler::Parser.
bool Compiler::ScriptParser::mEnd [private] |
Output Compiler::ScriptParser::mOutput [private] |