#include <fileparser.hpp>
|
| FileParser (ErrorHandler &errorHandler, Context &context) |
|
std::string | getName () const |
| Return script name. More...
|
|
void | getCode (std::vector< Interpreter::Type_Code > &code) const |
| store generated code in code. More...
|
|
const Locals & | getLocals () const |
| get local variable declarations. 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...
|
|
Enumerator |
---|
BeginState |
|
NameState |
|
BeginCompleteState |
|
EndNameState |
|
EndCompleteState |
|
store generated code in code.
const Locals & Compiler::FileParser::getLocals |
( |
| ) |
const |
get local variable declarations.
std::string Compiler::FileParser::getName |
( |
| ) |
const |
void Compiler::FileParser::parseEOF |
( |
Scanner & |
scanner | ) |
|
|
virtual |
Handle a keyword token.
- Returns
- fetch another token?
- Todo:
- allow this workaround to be disabled for newer scripts
Reimplemented from Compiler::Parser.
bool Compiler::FileParser::parseName |
( |
const std::string & |
name, |
|
|
const TokenLoc & |
loc, |
|
|
Scanner & |
scanner |
|
) |
| |
|
virtual |
Handle a name token.
- Returns
- fetch another token?
- Todo:
- allow this workaround to be disabled for newer scripts
Reimplemented from Compiler::Parser.
Handle a special character token.
- Returns
- fetch another token?
Reimplemented from Compiler::Parser.
void Compiler::FileParser::reset |
( |
| ) |
|
|
virtual |
Locals Compiler::FileParser::mLocals |
|
private |
std::string Compiler::FileParser::mName |
|
private |
State Compiler::FileParser::mState |
|
private |
The documentation for this class was generated from the following files: