#include <scriptparser.hpp>
|
| ScriptParser (ErrorHandler &errorHandler, const Context &context, Locals &locals, bool end=false) |
|
void | getCode (std::vector< Interpreter::Type_Code > &code) const |
| store generated code in code. More...
|
|
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. More...
|
|
void | reset () |
| Reset parser to clean state. More...
|
|
| Parser (ErrorHandler &errorHandler, const Context &context) |
| constructor More...
|
|
virtual | ~Parser () |
| destructor More...
|
|
virtual bool | parseInt (int value, const TokenLoc &loc, Scanner &scanner) |
|
virtual bool | parseFloat (float value, const TokenLoc &loc, Scanner &scanner) |
|
virtual bool | parseComment (const std::string &comment, const TokenLoc &loc, Scanner &scanner) |
|
void | setOptional (bool optional) |
|
void | start () |
| Mark parser as non-empty (at least one token has been parser). More...
|
|
bool | isEmpty () const |
| Has anything been parsed? More...
|
|
- Parameters
-
end | of script is marked by end keyword. |
store generated code in code.
void Compiler::ScriptParser::parseEOF |
( |
Scanner & |
scanner | ) |
|
|
virtual |
Handle a keyword token.
- Returns
- fetch another token?
- Todo:
- add an option to disable this nonsense
Reimplemented from Compiler::Parser.
bool Compiler::ScriptParser::parseName |
( |
const std::string & |
name, |
|
|
const TokenLoc & |
loc, |
|
|
Scanner & |
scanner |
|
) |
| |
|
virtual |
Handle a name token.
- Returns
- fetch another token?
Reimplemented from Compiler::Parser.
Handle a special character token.
- Returns
- fetch another token?
- Todo:
- Option to switch this off
Reimplemented from Compiler::Parser.
void Compiler::ScriptParser::reset |
( |
| ) |
|
|
virtual |
bool Compiler::ScriptParser::mEnd |
|
private |
Output Compiler::ScriptParser::mOutput |
|
private |
The documentation for this class was generated from the following files: