#include <exprparser.hpp>
List of all members.
Public Member Functions |
| ExprParser (ErrorHandler &errorHandler, Context &context, Locals &locals, Literals &literals, bool argument=false) |
char | getType () const |
| Return type of parsed expression ('l' integer, 'f' float)
|
virtual bool | parseInt (int value, const TokenLoc &loc, Scanner &scanner) |
virtual bool | parseFloat (float value, const TokenLoc &loc, Scanner &scanner) |
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 | reset () |
| Reset parser to clean state.
|
char | append (std::vector< Interpreter::Type_Code > &code) |
int | parseArguments (const std::string &arguments, Scanner &scanner, std::vector< Interpreter::Type_Code > &code, bool invert=false) |
Private Member Functions |
int | getPriority (char op) const |
char | getOperandType (int Index=0) const |
char | getOperator () const |
bool | isOpen () const |
void | popOperator () |
void | popOperand () |
void | replaceBinaryOperands () |
void | pop () |
void | pushIntegerLiteral (int value) |
void | pushFloatLiteral (float value) |
void | pushBinaryOperator (char c) |
void | close () |
int | parseArguments (const std::string &arguments, Scanner &scanner) |
bool | handleMemberAccess (const std::string &name) |
Private Attributes |
Locals & | mLocals |
Literals & | mLiterals |
std::vector< char > | mOperands |
std::vector< char > | mOperators |
bool | mNextOperand |
TokenLoc | mTokenLoc |
std::vector
< Interpreter::Type_Code > | mCode |
bool | mFirst |
bool | mArgument |
std::string | mExplicit |
bool | mRefOp |
bool | mMemberOp |
Constructor & Destructor Documentation
constructor
- Parameters:
-
argument | Parser is used to parse function- or instruction- arguments (this influences the precedence rules). |
Member Function Documentation
Generate code for parsed expression.
- Returns:
- Type ('l': integer, 'f': float)
Return type of parsed expression ('l' integer, 'f' float)
Parse sequence of arguments specified by arguments.
- Parameters:
-
arguments | Each character represents one arguments ('l': integer, 'f': float, 'S': string, 'c': string (case smashed), '/': following arguments are optional) |
invert | Store arguments in reverted order. |
- Returns:
- number of optional arguments
Handle a float token.
- Returns:
- fetch another token?
Reimplemented from Compiler::Parser.
Handle an int token.
- Returns:
- fetch another token?
Reimplemented from Compiler::Parser.
Handle a keyword token.
- Returns:
- fetch another token?
Reimplemented from Compiler::Parser.
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.
Member Data Documentation
The documentation for this class was generated from the following files: