OpenMW
Public Member Functions | Private Attributes
Compiler::ScriptParser Class Reference

#include <scriptparser.hpp>

List of all members.

Public Member Functions

 ScriptParser (ErrorHandler &errorHandler, Context &context, Locals &locals, bool end=false)
void getCode (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)
virtual void parseEOF (Scanner &scanner)
 Handle EOF token.
void reset ()
 Reset parser to clean state.

Private Attributes

Output mOutput
LineParser mLineParser
ControlParser mControlParser
bool mEnd

Constructor & Destructor Documentation

Compiler::ScriptParser::ScriptParser ( ErrorHandler errorHandler,
Context context,
Locals locals,
bool  end = false 
)
Parameters:
endof script is marked by end keyword.

Member Function Documentation

void Compiler::ScriptParser::getCode ( std::vector< Interpreter::Type_Code > &  code) const

store generated code in \æ code.

void Compiler::ScriptParser::parseEOF ( Scanner scanner) [virtual]

Handle EOF token.

Reimplemented from Compiler::Parser.

bool Compiler::ScriptParser::parseKeyword ( int  keyword,
const TokenLoc loc,
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.

bool Compiler::ScriptParser::parseSpecial ( int  code,
const TokenLoc loc,
Scanner scanner 
) [virtual]

Handle a special character token.

Returns:
fetch another token?

Reimplemented from Compiler::Parser.

void Compiler::ScriptParser::reset ( ) [virtual]

Reset parser to clean state.

Reimplemented from Compiler::Parser.


Member Data Documentation


The documentation for this class was generated from the following files: