#include <stringparser.hpp>
|
| StringParser (ErrorHandler &errorHandler, const Context &context, Literals &literals) |
|
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) |
|
void | append (std::vector< Interpreter::Type_Code > &code) |
| Append code for parsed string. More...
|
|
void | smashCase () |
| Transform all scanned strings to lower case. More...
|
|
void | reset () |
| Reset parser to clean state (this includes the smashCase function). More...
|
|
const TokenLoc & | getTokenLoc () const |
|
void | discard () |
|
| 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) |
|
virtual void | parseEOF (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 |
---|
StartState |
|
CommaState |
|
Append code for parsed string.
void Compiler::StringParser::discard |
( |
| ) |
|
If parsing a string, do not add it to the literal table and do not create code for it.
const TokenLoc & Compiler::StringParser::getTokenLoc |
( |
| ) |
const |
Returns TokenLoc object for string. If no string has been parsed, the TokenLoc object will be default initialised.
Handle a keyword token.
- Returns
- fetch another token?
Reimplemented from Compiler::Parser.
bool Compiler::StringParser::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?
Reimplemented from Compiler::Parser.
void Compiler::StringParser::reset |
( |
| ) |
|
|
virtual |
Reset parser to clean state (this includes the smashCase function).
Reimplemented from Compiler::Parser.
void Compiler::StringParser::smashCase |
( |
| ) |
|
Transform all scanned strings to lower case.
bool Compiler::StringParser::mDiscard |
|
private |
Literals& Compiler::StringParser::mLiterals |
|
private |
bool Compiler::StringParser::mSmashCase |
|
private |
State Compiler::StringParser::mState |
|
private |
TokenLoc Compiler::StringParser::mTokenLoc |
|
private |
The documentation for this class was generated from the following files: