2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2007-01-14 21:29:12 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* $URL$
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PARALLACTION_PARSER_H
|
|
|
|
#define PARALLACTION_PARSER_H
|
|
|
|
|
2007-02-19 22:34:00 +00:00
|
|
|
#include "common/stream.h"
|
2008-05-04 15:09:23 +00:00
|
|
|
#include "parallaction/objects.h"
|
2008-05-09 01:35:43 +00:00
|
|
|
#include "parallaction/walk.h"
|
2007-01-14 21:29:12 +00:00
|
|
|
|
|
|
|
namespace Parallaction {
|
|
|
|
|
2007-07-08 13:39:23 +00:00
|
|
|
char *parseNextToken(char *s, char *tok, uint16 count, const char *brk, bool ignoreQuotes = false);
|
2007-01-14 21:29:12 +00:00
|
|
|
|
2008-02-03 17:06:45 +00:00
|
|
|
#define MAX_TOKEN_LEN 50
|
|
|
|
extern char _tokens[][MAX_TOKEN_LEN];
|
2007-01-14 21:29:12 +00:00
|
|
|
|
2007-10-14 21:32:43 +00:00
|
|
|
class Script {
|
2007-02-19 22:34:00 +00:00
|
|
|
|
2007-10-14 21:32:43 +00:00
|
|
|
Common::ReadStream *_input;
|
2007-03-04 15:00:50 +00:00
|
|
|
bool _disposeSource;
|
2007-10-14 21:32:43 +00:00
|
|
|
uint _line; // for debug messages
|
|
|
|
|
|
|
|
void clearTokens();
|
|
|
|
uint16 fillTokens(char* line);
|
2007-02-19 22:34:00 +00:00
|
|
|
|
|
|
|
public:
|
2007-10-14 21:32:43 +00:00
|
|
|
Script(Common::ReadStream *, bool _disposeSource = false);
|
2007-03-04 15:00:50 +00:00
|
|
|
~Script();
|
2007-02-19 22:34:00 +00:00
|
|
|
|
|
|
|
char *readLine(char *buf, size_t bufSize);
|
2007-10-14 21:32:43 +00:00
|
|
|
uint16 readLineToken(bool errorOnEOF = false);
|
2007-02-19 22:34:00 +00:00
|
|
|
|
2007-10-14 21:32:43 +00:00
|
|
|
void skip(const char* endToken);
|
2007-02-19 22:34:00 +00:00
|
|
|
|
2007-10-14 21:32:43 +00:00
|
|
|
uint getLine() { return _line; }
|
2007-02-19 22:34:00 +00:00
|
|
|
};
|
|
|
|
|
2007-08-24 20:14:51 +00:00
|
|
|
|
2008-06-01 14:05:39 +00:00
|
|
|
typedef Common::Functor0<void> Opcode;
|
2008-05-04 15:09:23 +00:00
|
|
|
typedef Common::Array<const Opcode*> OpcodeSet;
|
|
|
|
|
|
|
|
|
|
|
|
class Parser {
|
|
|
|
|
|
|
|
public:
|
|
|
|
Parser() { reset(); }
|
|
|
|
~Parser() {}
|
|
|
|
|
|
|
|
uint _lookup;
|
|
|
|
|
|
|
|
Common::Stack<OpcodeSet*> _opcodes;
|
|
|
|
Common::Stack<Table*> _statements;
|
|
|
|
|
|
|
|
OpcodeSet *_currentOpcodes;
|
|
|
|
Table *_currentStatements;
|
|
|
|
|
2008-05-11 08:55:16 +00:00
|
|
|
void reset();
|
2008-05-04 15:09:23 +00:00
|
|
|
void pushTables(OpcodeSet *opcodes, Table* statements);
|
|
|
|
void popTables();
|
|
|
|
void parseStatement();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2008-05-09 01:35:43 +00:00
|
|
|
#define DECLARE_UNQUALIFIED_ZONE_PARSER(sig) void locZoneParse_##sig()
|
|
|
|
#define DECLARE_UNQUALIFIED_ANIM_PARSER(sig) void locAnimParse_##sig()
|
|
|
|
#define DECLARE_UNQUALIFIED_COMMAND_PARSER(sig) void cmdParse_##sig()
|
|
|
|
#define DECLARE_UNQUALIFIED_LOCATION_PARSER(sig) void locParse_##sig()
|
2008-05-10 11:11:03 +00:00
|
|
|
#define DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(sig) void instParse_##sig()
|
2008-05-04 15:09:23 +00:00
|
|
|
|
2008-05-09 01:35:43 +00:00
|
|
|
#define MAX_FORWARDS 50
|
2008-05-04 15:09:23 +00:00
|
|
|
|
2008-05-09 01:35:43 +00:00
|
|
|
class Parallaction_ns;
|
|
|
|
class Parallaction_br;
|
|
|
|
|
|
|
|
class LocationParser_ns {
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Parallaction_ns* _vm;
|
2008-05-11 22:08:32 +00:00
|
|
|
Script *_script;
|
|
|
|
Parser *_parser;
|
2008-05-09 01:35:43 +00:00
|
|
|
|
|
|
|
Table *_zoneTypeNames;
|
|
|
|
Table *_zoneFlagNames;
|
|
|
|
|
|
|
|
// location parser
|
|
|
|
OpcodeSet _locationParsers;
|
|
|
|
OpcodeSet _locationZoneParsers;
|
|
|
|
OpcodeSet _locationAnimParsers;
|
|
|
|
OpcodeSet _commandParsers;
|
|
|
|
Table *_commandsNames;
|
|
|
|
Table *_locationStmt;
|
|
|
|
Table *_locationZoneStmt;
|
|
|
|
Table *_locationAnimStmt;
|
|
|
|
|
2008-05-11 08:55:16 +00:00
|
|
|
struct ParserContext {
|
2008-05-09 01:35:43 +00:00
|
|
|
bool end;
|
|
|
|
|
|
|
|
const char *filename;
|
|
|
|
ZonePtr z;
|
|
|
|
AnimationPtr a;
|
|
|
|
int nextToken;
|
|
|
|
CommandList *list;
|
|
|
|
bool endcommands;
|
|
|
|
CommandPtr cmd;
|
|
|
|
|
|
|
|
// BRA specific
|
|
|
|
int numZones;
|
|
|
|
char *bgName;
|
|
|
|
char *maskName;
|
|
|
|
char *pathName;
|
2008-06-04 09:07:55 +00:00
|
|
|
char *characterName;
|
2008-05-11 08:55:16 +00:00
|
|
|
} ctxt;
|
2008-05-09 01:35:43 +00:00
|
|
|
|
|
|
|
void warning_unexpected();
|
|
|
|
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(endlocation);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(location);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(disk);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(nodes);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(zone);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(animation);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(localflags);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(commands);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(acommands);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(flags);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(comment);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(endcomment);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(sound);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(music);
|
|
|
|
DECLARE_UNQUALIFIED_ZONE_PARSER(limits);
|
|
|
|
DECLARE_UNQUALIFIED_ZONE_PARSER(moveto);
|
|
|
|
DECLARE_UNQUALIFIED_ZONE_PARSER(type);
|
|
|
|
DECLARE_UNQUALIFIED_ZONE_PARSER(commands);
|
|
|
|
DECLARE_UNQUALIFIED_ZONE_PARSER(label);
|
|
|
|
DECLARE_UNQUALIFIED_ZONE_PARSER(flags);
|
|
|
|
DECLARE_UNQUALIFIED_ZONE_PARSER(endzone);
|
|
|
|
DECLARE_UNQUALIFIED_ZONE_PARSER(null);
|
|
|
|
DECLARE_UNQUALIFIED_ANIM_PARSER(script);
|
|
|
|
DECLARE_UNQUALIFIED_ANIM_PARSER(commands);
|
|
|
|
DECLARE_UNQUALIFIED_ANIM_PARSER(type);
|
|
|
|
DECLARE_UNQUALIFIED_ANIM_PARSER(label);
|
|
|
|
DECLARE_UNQUALIFIED_ANIM_PARSER(flags);
|
|
|
|
DECLARE_UNQUALIFIED_ANIM_PARSER(file);
|
|
|
|
DECLARE_UNQUALIFIED_ANIM_PARSER(position);
|
|
|
|
DECLARE_UNQUALIFIED_ANIM_PARSER(moveto);
|
|
|
|
DECLARE_UNQUALIFIED_ANIM_PARSER(endanimation);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(flags);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(animation);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(zone);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(location);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(drop);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(call);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(simple);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(move);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(endcommands);
|
|
|
|
|
2008-05-11 08:55:16 +00:00
|
|
|
virtual void parseGetData(ZonePtr z);
|
|
|
|
virtual void parseExamineData(ZonePtr z);
|
|
|
|
virtual void parseDoorData(ZonePtr z);
|
|
|
|
virtual void parseMergeData(ZonePtr z);
|
|
|
|
virtual void parseHearData(ZonePtr z);
|
|
|
|
virtual void parseSpeakData(ZonePtr z);
|
2008-05-09 01:35:43 +00:00
|
|
|
|
2008-05-11 08:55:16 +00:00
|
|
|
char *parseComment();
|
|
|
|
char *parseDialogueString();
|
|
|
|
Dialogue *parseDialogue();
|
2008-05-09 01:35:43 +00:00
|
|
|
void resolveDialogueForwards(Dialogue *dialogue, uint numQuestions, Table &forwards);
|
2008-05-11 08:55:16 +00:00
|
|
|
Answer *parseAnswer();
|
|
|
|
Question *parseQuestion();
|
|
|
|
|
|
|
|
void parseZone(ZoneList &list, char *name);
|
|
|
|
void parseZoneTypeBlock(ZonePtr z);
|
2008-07-25 16:01:25 +00:00
|
|
|
void parseWalkNodes(PointList &list);
|
2008-05-11 08:55:16 +00:00
|
|
|
void parseAnimation(AnimationList &list, char *name);
|
|
|
|
void parseCommands(CommandList&);
|
2008-05-09 01:35:43 +00:00
|
|
|
void parseCommandFlags();
|
|
|
|
void saveCommandForward(const char *name, CommandPtr cmd);
|
|
|
|
void resolveCommandForwards();
|
|
|
|
void createCommand(uint id);
|
|
|
|
void addCommand();
|
|
|
|
|
|
|
|
struct CommandForwardReference {
|
|
|
|
char name[20];
|
|
|
|
CommandPtr cmd;
|
|
|
|
} _forwardedCommands[MAX_FORWARDS];
|
|
|
|
uint _numForwardedCommands;
|
|
|
|
|
2008-06-01 14:05:39 +00:00
|
|
|
void clearSet(OpcodeSet &opcodes) {
|
|
|
|
for (Common::Array<const Opcode*>::iterator i = opcodes.begin(); i != opcodes.end(); ++i)
|
|
|
|
delete *i;
|
|
|
|
opcodes.clear();
|
|
|
|
}
|
2008-05-09 01:35:43 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
LocationParser_ns(Parallaction_ns *vm) : _vm(vm) {
|
|
|
|
}
|
|
|
|
|
2008-06-03 00:49:27 +00:00
|
|
|
virtual void init();
|
|
|
|
|
2008-05-09 01:35:43 +00:00
|
|
|
virtual ~LocationParser_ns() {
|
2008-06-02 21:08:49 +00:00
|
|
|
delete _parser;
|
2008-05-09 01:35:43 +00:00
|
|
|
delete _commandsNames;
|
|
|
|
delete _locationStmt;
|
2008-06-02 21:08:49 +00:00
|
|
|
delete _locationZoneStmt;
|
|
|
|
delete _locationAnimStmt;
|
2008-05-09 01:35:43 +00:00
|
|
|
delete _zoneTypeNames;
|
|
|
|
delete _zoneFlagNames;
|
2008-06-01 14:05:39 +00:00
|
|
|
|
|
|
|
clearSet(_commandParsers);
|
|
|
|
clearSet(_locationAnimParsers);
|
|
|
|
clearSet(_locationZoneParsers);
|
|
|
|
clearSet(_locationParsers);
|
2008-05-09 01:35:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void parse(Script *script);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
class LocationParser_br : public LocationParser_ns {
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Table *_audioCommandsNames;
|
|
|
|
|
|
|
|
Parallaction_br* _vm;
|
|
|
|
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(location);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(zone);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(animation);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(localflags);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(flags);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(comment);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(endcomment);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(sound);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(music);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(redundant);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(ifchar);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(character);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(mask);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(path);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(escape);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(zeta);
|
|
|
|
DECLARE_UNQUALIFIED_LOCATION_PARSER(null);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(ifchar);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(endif);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(location);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(toggle);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(string);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(math);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(test);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(music);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(zeta);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(swap);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(give);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(text);
|
|
|
|
DECLARE_UNQUALIFIED_COMMAND_PARSER(unary);
|
|
|
|
DECLARE_UNQUALIFIED_ZONE_PARSER(limits);
|
|
|
|
DECLARE_UNQUALIFIED_ZONE_PARSER(moveto);
|
|
|
|
DECLARE_UNQUALIFIED_ZONE_PARSER(type);
|
|
|
|
DECLARE_UNQUALIFIED_ANIM_PARSER(file);
|
|
|
|
DECLARE_UNQUALIFIED_ANIM_PARSER(position);
|
|
|
|
DECLARE_UNQUALIFIED_ANIM_PARSER(moveto);
|
|
|
|
DECLARE_UNQUALIFIED_ANIM_PARSER(endanimation);
|
|
|
|
|
|
|
|
public:
|
|
|
|
LocationParser_br(Parallaction_br *vm) : LocationParser_ns((Parallaction_ns*)vm), _vm(vm) {
|
|
|
|
}
|
|
|
|
|
2008-06-03 00:49:27 +00:00
|
|
|
virtual void init();
|
|
|
|
|
2008-05-09 01:35:43 +00:00
|
|
|
virtual ~LocationParser_br() {
|
|
|
|
delete _commandsNames;
|
|
|
|
delete _locationStmt;
|
|
|
|
}
|
|
|
|
|
|
|
|
void parse(Script *script);
|
|
|
|
|
|
|
|
};
|
2008-05-04 15:09:23 +00:00
|
|
|
|
|
|
|
|
2008-05-10 11:11:03 +00:00
|
|
|
|
|
|
|
class ProgramParser_ns {
|
|
|
|
|
|
|
|
protected:
|
2008-05-11 22:08:32 +00:00
|
|
|
Parser *_parser;
|
2008-05-10 11:11:03 +00:00
|
|
|
Parallaction_ns *_vm;
|
|
|
|
|
2008-05-11 22:08:32 +00:00
|
|
|
Script *_script;
|
|
|
|
ProgramPtr _program;
|
2008-05-10 11:11:03 +00:00
|
|
|
|
|
|
|
// program parser
|
|
|
|
OpcodeSet _instructionParsers;
|
|
|
|
Table *_instructionNames;
|
|
|
|
|
2008-05-11 08:55:16 +00:00
|
|
|
struct ParserContext {
|
2008-05-10 11:11:03 +00:00
|
|
|
bool end;
|
|
|
|
AnimationPtr a;
|
|
|
|
InstructionPtr inst;
|
|
|
|
LocalVariable *locals;
|
|
|
|
|
|
|
|
// BRA specific
|
|
|
|
InstructionPtr openIf;
|
2008-05-11 08:55:16 +00:00
|
|
|
} ctxt;
|
2008-05-10 11:11:03 +00:00
|
|
|
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(defLocal);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(animation);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(loop);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(x);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(y);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(z);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(f);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(inc);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(set);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(move);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(put);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(call);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(sound);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(null);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(endscript);
|
|
|
|
|
|
|
|
void parseInstruction();
|
|
|
|
void parseLValue(ScriptVar &var, const char *str);
|
|
|
|
virtual void parseRValue(ScriptVar &var, const char *str);
|
|
|
|
|
2008-06-01 14:05:39 +00:00
|
|
|
void clearSet(OpcodeSet &opcodes) {
|
|
|
|
for (Common::Array<const Opcode*>::iterator i = opcodes.begin(); i != opcodes.end(); ++i)
|
|
|
|
delete *i;
|
|
|
|
opcodes.clear();
|
|
|
|
}
|
2008-05-10 11:11:03 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
ProgramParser_ns(Parallaction_ns *vm) : _vm(vm) {
|
|
|
|
}
|
|
|
|
|
2008-06-03 00:49:27 +00:00
|
|
|
virtual void init();
|
|
|
|
|
2008-05-10 11:11:03 +00:00
|
|
|
virtual ~ProgramParser_ns() {
|
2008-06-03 18:24:54 +00:00
|
|
|
delete _parser;
|
2008-05-10 11:11:03 +00:00
|
|
|
delete _instructionNames;
|
2008-06-03 18:24:54 +00:00
|
|
|
|
2008-06-01 14:05:39 +00:00
|
|
|
clearSet(_instructionParsers);
|
2008-05-10 11:11:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void parse(Script *script, ProgramPtr program);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class ProgramParser_br : public ProgramParser_ns {
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Parallaction_br *_vm;
|
|
|
|
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(zone);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(color);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(mask);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(print);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(text);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(if_op);
|
|
|
|
DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(endif);
|
|
|
|
|
|
|
|
virtual void parseRValue(ScriptVar &var, const char *str);
|
|
|
|
|
|
|
|
public:
|
|
|
|
ProgramParser_br(Parallaction_br *vm) : ProgramParser_ns((Parallaction_ns*)vm), _vm(vm) {
|
|
|
|
}
|
|
|
|
|
2008-06-03 00:49:27 +00:00
|
|
|
virtual void init();
|
|
|
|
|
2008-05-10 11:11:03 +00:00
|
|
|
virtual ~ProgramParser_br() {
|
|
|
|
delete _instructionNames;
|
2008-06-01 14:05:39 +00:00
|
|
|
delete _parser;
|
|
|
|
|
2008-05-10 11:11:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2007-01-14 21:29:12 +00:00
|
|
|
} // namespace Parallaction
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2008-04-06 05:40:02 +00:00
|
|
|
|
2008-05-09 01:35:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-10 11:11:03 +00:00
|
|
|
|