diff options
Diffstat (limited to 'engines/parallaction/parallaction.cpp')
-rw-r--r-- | engines/parallaction/parallaction.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index b2893ebfca..af0a34e409 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -849,6 +849,30 @@ int Table::lookup(const char* s) { return notFound; } +void Parallaction::pushParserTables(const Opcode* opcodes, Table *statements) { + + _opcodes.push(_currentOpcodes); + _statements.push(_currentStatements); + + _currentOpcodes = opcodes; + _currentStatements = statements; + +} + +void Parallaction::popParserTables() { + assert(_opcodes.size() > 0); + + _currentOpcodes = _opcodes.pop(); + _currentStatements = _statements.pop(); +} + +void Parallaction::parseStatement() { + assert(_currentOpcodes != 0); + + _lookup = _currentStatements->lookup(_tokens[0]); + (this->*(_currentOpcodes[_lookup]))(); +} + void Parallaction::initOpcodes() { static const Opcode op0[] = { @@ -998,6 +1022,9 @@ void Parallaction::initOpcodes() { _locationAnimParsers = op6; + _currentOpcodes = 0; + _currentStatements = 0; + } } // namespace Parallaction |