OpenMW
Public Member Functions | Private Types | Private Attributes
Compiler::FileParser Class Reference

#include <fileparser.hpp>

List of all members.

Public Member Functions

 FileParser (ErrorHandler &errorHandler, Context &context)
std::string getName () const
 Return script name.
void getCode (std::vector< Interpreter::Type_Code > &code) const
 store generated code in \æ code.
const LocalsgetLocals () const
 get local variable declarations.
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 Types

enum  State {
  BeginState, NameState, BeginCompleteState, EndNameState,
  EndCompleteState
}

Private Attributes

ScriptParser mScriptParser
State mState
std::string mName
Locals mLocals

Member Enumeration Documentation

Enumerator:
BeginState 
NameState 
BeginCompleteState 
EndNameState 
EndCompleteState 

Constructor & Destructor Documentation

Compiler::FileParser::FileParser ( ErrorHandler errorHandler,
Context context 
)

Member Function Documentation

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

store generated code in \æ code.

get local variable declarations.

std::string Compiler::FileParser::getName ( ) const

Return script name.

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

Handle EOF token.

Reimplemented from Compiler::Parser.

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

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

Handle a special character token.

Returns:
fetch another token?

Reimplemented from Compiler::Parser.

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

Reset parser to clean state.

Reimplemented from Compiler::Parser.


Member Data Documentation

std::string Compiler::FileParser::mName [private]

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