#include <controlparser.hpp>
List of all members.
Public Member Functions |
| ControlParser (ErrorHandler &errorHandler, Context &context, Locals &locals, Literals &literals) |
void | appendCode (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) |
void | reset () |
| Reset parser to clean state.
|
Private Types |
enum | State {
StartState,
IfEndState,
IfBodyState,
IfElseifEndState,
IfElseifBodyState,
IfElseEndState,
IfElseBodyState,
IfEndifState,
WhileEndState,
WhileBodyState,
WhileEndwhileState
} |
typedef std::vector
< Interpreter::Type_Code > | Codes |
typedef std::vector< std::pair
< Codes, Codes > > | IfCodes |
Private Member Functions |
bool | parseIfBody (int keyword, const TokenLoc &loc, Scanner &scanner) |
bool | parseWhileBody (int keyword, const TokenLoc &loc, Scanner &scanner) |
Private Attributes |
Locals & | mLocals |
Literals & | mLiterals |
Codes | mCode |
Codes | mCodeBlock |
IfCodes | mIfCode |
LineParser | mLineParser |
ExprParser | mExprParser |
State | mState |
Member Typedef Documentation
Member Enumeration Documentation
- Enumerator:
StartState |
|
IfEndState |
|
IfBodyState |
|
IfElseifEndState |
|
IfElseifBodyState |
|
IfElseEndState |
|
IfElseBodyState |
|
IfEndifState |
|
WhileEndState |
|
WhileBodyState |
|
WhileEndwhileState |
|
Constructor & Destructor Documentation
Member Function Documentation
store generated code in \æ code.
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: