1 |
/* -*- c++ -*- |
/* -*- c++ -*- |
2 |
* |
* |
3 |
* Copyright (c) 2014 Christian Schoenebeck and Andreas Persson |
* Copyright (c) 2014 - 2016 Christian Schoenebeck and Andreas Persson |
4 |
* |
* |
5 |
* http://www.linuxsampler.org |
* http://www.linuxsampler.org |
6 |
* |
* |
42 |
Node(); |
Node(); |
43 |
virtual ~Node(); |
virtual ~Node(); |
44 |
virtual void dump(int level = 0) = 0; |
virtual void dump(int level = 0) = 0; |
45 |
|
virtual bool isPolyphonic() const = 0; |
46 |
void printIndents(int n); |
void printIndents(int n); |
47 |
}; |
}; |
48 |
typedef Ref<Node> NodeRef; |
typedef Ref<Node> NodeRef; |
78 |
int evalInt(); |
int evalInt(); |
79 |
void dump(int level = 0); |
void dump(int level = 0); |
80 |
bool isConstExpr() const { return true; } |
bool isConstExpr() const { return true; } |
81 |
|
bool isPolyphonic() const { return false; } |
82 |
}; |
}; |
83 |
typedef Ref<IntLiteral,Node> IntLiteralRef; |
typedef Ref<IntLiteral,Node> IntLiteralRef; |
84 |
|
|
89 |
bool isConstExpr() const { return true; } |
bool isConstExpr() const { return true; } |
90 |
void dump(int level = 0); |
void dump(int level = 0); |
91 |
String evalStr() { return value; } |
String evalStr() { return value; } |
92 |
|
bool isPolyphonic() const { return false; } |
93 |
}; |
}; |
94 |
typedef Ref<StringLiteral,Node> StringLiteralRef; |
typedef Ref<StringLiteral,Node> StringLiteralRef; |
95 |
|
|
100 |
void dump(int level = 0); |
void dump(int level = 0); |
101 |
int argsCount() const { return args.size(); } |
int argsCount() const { return args.size(); } |
102 |
VMExpr* arg(int i) { return (i >= 0 && i < argsCount()) ? &*args.at(i) : NULL; } |
VMExpr* arg(int i) { return (i >= 0 && i < argsCount()) ? &*args.at(i) : NULL; } |
103 |
|
bool isPolyphonic() const; |
104 |
}; |
}; |
105 |
typedef Ref<Args,Node> ArgsRef; |
typedef Ref<Args,Node> ArgsRef; |
106 |
|
|
107 |
class Variable : virtual public Expression { |
class Variable : virtual public Expression { |
108 |
public: |
public: |
109 |
virtual bool isConstExpr() const { return bConst; } |
virtual bool isConstExpr() const { return bConst; } |
110 |
|
virtual bool isAssignable() const { return !bConst; } |
111 |
virtual void assign(Expression* expr) = 0; |
virtual void assign(Expression* expr) = 0; |
112 |
protected: |
protected: |
113 |
Variable(ParserContext* ctx, int _memPos, bool _bConst) |
Variable(ParserContext* ctx, int _memPos, bool _bConst) |
144 |
}; |
}; |
145 |
typedef Ref<ConstIntVariable,Node> ConstIntVariableRef; |
typedef Ref<ConstIntVariable,Node> ConstIntVariableRef; |
146 |
|
|
147 |
|
class BuiltInIntVariable : public IntVariable { |
148 |
|
String name; |
149 |
|
VMIntRelPtr* ptr; |
150 |
|
public: |
151 |
|
BuiltInIntVariable(const String& name, VMIntRelPtr* ptr); |
152 |
|
void assign(Expression* expr); |
153 |
|
int evalInt(); |
154 |
|
void dump(int level = 0); |
155 |
|
}; |
156 |
|
typedef Ref<BuiltInIntVariable,Node> BuiltInIntVariableRef; |
157 |
|
|
158 |
class PolyphonicIntVariable : public IntVariable { |
class PolyphonicIntVariable : public IntVariable { |
159 |
public: |
public: |
160 |
PolyphonicIntVariable(ParserContext* ctx); |
PolyphonicIntVariable(ParserContext* ctx); |
162 |
}; |
}; |
163 |
typedef Ref<PolyphonicIntVariable,Node> PolyphonicIntVariableRef; |
typedef Ref<PolyphonicIntVariable,Node> PolyphonicIntVariableRef; |
164 |
|
|
165 |
class IntArrayVariable : public Variable { |
class IntArrayVariable : public Variable, virtual public VMIntArrayExpr { |
166 |
ArrayList<int> values; |
ArrayList<int> values; |
167 |
public: |
public: |
168 |
IntArrayVariable(ParserContext* ctx, int size); |
IntArrayVariable(ParserContext* ctx, int size); |
169 |
IntArrayVariable(ParserContext* ctx, int size, ArgsRef values); |
IntArrayVariable(ParserContext* ctx, int size, ArgsRef values); |
170 |
void assign(Expression* expr) {} // ignore scalar assignment |
void assign(Expression* expr) {} // ignore scalar assignment |
171 |
String evalCastToStr() { return ""; } // ignore cast to string |
String evalCastToStr() { return ""; } // ignore scalar cast to string |
172 |
ExprType_t exprType() const { return INT_ARR_EXPR; } |
ExprType_t exprType() const { return INT_ARR_EXPR; } |
173 |
const int arraySize() const { return values.size(); } |
virtual int arraySize() const { return values.size(); } |
174 |
|
virtual int evalIntElement(uint i); |
175 |
|
virtual void assignIntElement(uint i, int value); |
176 |
|
void dump(int level = 0); |
177 |
|
bool isPolyphonic() const { return false; } |
178 |
|
protected: |
179 |
|
IntArrayVariable(ParserContext* ctx, bool bConst); |
180 |
|
}; |
181 |
|
typedef Ref<IntArrayVariable,Node> IntArrayVariableRef; |
182 |
|
|
183 |
|
class BuiltInIntArrayVariable : public IntArrayVariable { |
184 |
|
String name; |
185 |
|
VMInt8Array* array; |
186 |
|
public: |
187 |
|
BuiltInIntArrayVariable(const String& name, VMInt8Array* array); |
188 |
|
int arraySize() const { return array->size; } |
189 |
int evalIntElement(uint i); |
int evalIntElement(uint i); |
190 |
void assignIntElement(uint i, int value); |
void assignIntElement(uint i, int value); |
191 |
void dump(int level = 0); |
void dump(int level = 0); |
192 |
}; |
}; |
193 |
typedef Ref<IntArrayVariable,Node> IntArrayVariableRef; |
typedef Ref<BuiltInIntArrayVariable,Node> BuiltInIntArrayVariableRef; |
194 |
|
|
195 |
class IntArrayElement : public IntVariable { |
class IntArrayElement : public IntVariable { |
196 |
IntArrayVariableRef array; |
IntArrayVariableRef array; |
209 |
void assign(Expression* expr); |
void assign(Expression* expr); |
210 |
String evalStr(); |
String evalStr(); |
211 |
void dump(int level = 0); |
void dump(int level = 0); |
212 |
|
bool isPolyphonic() const { return false; } |
213 |
protected: |
protected: |
214 |
StringVariable(ParserContext* ctx, bool bConst); |
StringVariable(ParserContext* ctx, bool bConst); |
215 |
}; |
}; |
233 |
public: |
public: |
234 |
BinaryOp(ExpressionRef lhs, ExpressionRef rhs) : lhs(lhs), rhs(rhs) { } |
BinaryOp(ExpressionRef lhs, ExpressionRef rhs) : lhs(lhs), rhs(rhs) { } |
235 |
bool isConstExpr() const { return lhs->isConstExpr() && rhs->isConstExpr(); } |
bool isConstExpr() const { return lhs->isConstExpr() && rhs->isConstExpr(); } |
236 |
|
bool isPolyphonic() const { return lhs->isPolyphonic() || rhs->isPolyphonic(); } |
237 |
}; |
}; |
238 |
typedef Ref<BinaryOp,Node> BinaryOpRef; |
typedef Ref<BinaryOp,Node> BinaryOpRef; |
239 |
|
|
290 |
NoOperation() : Statement() {} |
NoOperation() : Statement() {} |
291 |
StmtType_t statementType() const { return STMT_LEAF; } |
StmtType_t statementType() const { return STMT_LEAF; } |
292 |
void dump(int level = 0) {} |
void dump(int level = 0) {} |
293 |
|
bool isPolyphonic() const { return false; } |
294 |
}; |
}; |
295 |
typedef Ref<NoOperation,Node> NoOperationRef; |
typedef Ref<NoOperation,Node> NoOperationRef; |
296 |
|
|
310 |
void dump(int level = 0); |
void dump(int level = 0); |
311 |
StmtType_t statementType() const { return STMT_LIST; } |
StmtType_t statementType() const { return STMT_LIST; } |
312 |
virtual Statement* statement(uint i); |
virtual Statement* statement(uint i); |
313 |
|
bool isPolyphonic() const; |
314 |
}; |
}; |
315 |
typedef Ref<Statements,Node> StatementsRef; |
typedef Ref<Statements,Node> StatementsRef; |
316 |
|
|
321 |
virtual Statements* branch(uint i) const = 0; |
virtual Statements* branch(uint i) const = 0; |
322 |
}; |
}; |
323 |
|
|
324 |
|
class DynamicVariableCall : public Variable, virtual public IntExpr, virtual public StringExpr { |
325 |
|
VMDynVar* dynVar; |
326 |
|
String varName; |
327 |
|
public: |
328 |
|
DynamicVariableCall(const String& name, ParserContext* ctx, VMDynVar* v); |
329 |
|
ExprType_t exprType() const OVERRIDE { return dynVar->exprType(); } |
330 |
|
bool isConstExpr() const OVERRIDE { return dynVar->isConstExpr(); } |
331 |
|
bool isAssignable() const OVERRIDE { return dynVar->isAssignable(); } |
332 |
|
bool isPolyphonic() const OVERRIDE { return false; } |
333 |
|
void assign(Expression* expr) OVERRIDE { dynVar->assign(expr); } |
334 |
|
int evalInt() OVERRIDE; |
335 |
|
String evalStr() OVERRIDE; |
336 |
|
String evalCastToStr() OVERRIDE; |
337 |
|
void dump(int level = 0) OVERRIDE; |
338 |
|
}; |
339 |
|
typedef Ref<DynamicVariableCall,Node> DynamicVariableCallRef; |
340 |
|
|
341 |
class FunctionCall : virtual public LeafStatement, virtual public IntExpr, virtual public StringExpr { |
class FunctionCall : virtual public LeafStatement, virtual public IntExpr, virtual public StringExpr { |
342 |
String functionName; |
String functionName; |
343 |
ArgsRef args; |
ArgsRef args; |
352 |
bool isConstExpr() const { return false; } |
bool isConstExpr() const { return false; } |
353 |
ExprType_t exprType() const; |
ExprType_t exprType() const; |
354 |
String evalCastToStr(); |
String evalCastToStr(); |
355 |
|
bool isPolyphonic() const { return args->isPolyphonic(); } |
356 |
protected: |
protected: |
357 |
VMFnResult* execVMFn(); |
VMFnResult* execVMFn(); |
358 |
}; |
}; |
360 |
|
|
361 |
class EventHandler : virtual public Statements, virtual public VMEventHandler { |
class EventHandler : virtual public Statements, virtual public VMEventHandler { |
362 |
StatementsRef statements; |
StatementsRef statements; |
363 |
|
bool usingPolyphonics; |
364 |
public: |
public: |
365 |
void dump(int level = 0); |
void dump(int level = 0); |
366 |
StmtFlags_t exec(); |
StmtFlags_t exec(); |
367 |
EventHandler(StatementsRef statements) { this->statements = statements; } |
EventHandler(StatementsRef statements); |
368 |
Statement* statement(uint i) { return statements->statement(i); } |
Statement* statement(uint i) { return statements->statement(i); } |
369 |
|
bool isPolyphonic() const { return usingPolyphonics; } |
370 |
}; |
}; |
371 |
typedef Ref<EventHandler,Node> EventHandlerRef; |
typedef Ref<EventHandler,Node> EventHandlerRef; |
372 |
|
|
373 |
class OnNote : public EventHandler { |
class OnNote : public EventHandler { |
374 |
public: |
public: |
375 |
OnNote(StatementsRef statements) : EventHandler(statements) {} |
OnNote(StatementsRef statements) : EventHandler(statements) {} |
376 |
|
VMEventHandlerType_t eventHandlerType() const { return VM_EVENT_HANDLER_NOTE; } |
377 |
String eventHandlerName() const { return "note"; } |
String eventHandlerName() const { return "note"; } |
378 |
}; |
}; |
379 |
typedef Ref<OnNote,Node> OnNoteRef; |
typedef Ref<OnNote,Node> OnNoteRef; |
381 |
class OnInit : public EventHandler { |
class OnInit : public EventHandler { |
382 |
public: |
public: |
383 |
OnInit(StatementsRef statements) : EventHandler(statements) {} |
OnInit(StatementsRef statements) : EventHandler(statements) {} |
384 |
|
VMEventHandlerType_t eventHandlerType() const { return VM_EVENT_HANDLER_INIT; } |
385 |
String eventHandlerName() const { return "init"; } |
String eventHandlerName() const { return "init"; } |
386 |
}; |
}; |
387 |
typedef Ref<OnInit,Node> OnInitRef; |
typedef Ref<OnInit,Node> OnInitRef; |
389 |
class OnRelease : public EventHandler { |
class OnRelease : public EventHandler { |
390 |
public: |
public: |
391 |
OnRelease(StatementsRef statements) : EventHandler(statements) {} |
OnRelease(StatementsRef statements) : EventHandler(statements) {} |
392 |
|
VMEventHandlerType_t eventHandlerType() const { return VM_EVENT_HANDLER_RELEASE; } |
393 |
String eventHandlerName() const { return "release"; } |
String eventHandlerName() const { return "release"; } |
394 |
}; |
}; |
395 |
typedef Ref<OnRelease,Node> OnReleaseRef; |
typedef Ref<OnRelease,Node> OnReleaseRef; |
397 |
class OnController : public EventHandler { |
class OnController : public EventHandler { |
398 |
public: |
public: |
399 |
OnController(StatementsRef statements) : EventHandler(statements) {} |
OnController(StatementsRef statements) : EventHandler(statements) {} |
400 |
|
VMEventHandlerType_t eventHandlerType() const { return VM_EVENT_HANDLER_CONTROLLER; } |
401 |
String eventHandlerName() const { return "controller"; } |
String eventHandlerName() const { return "controller"; } |
402 |
}; |
}; |
403 |
typedef Ref<OnController,Node> OnControllerRef; |
typedef Ref<OnController,Node> OnControllerRef; |
413 |
EventHandler* eventHandlerByName(const String& name) const; |
EventHandler* eventHandlerByName(const String& name) const; |
414 |
EventHandler* eventHandler(uint index) const; |
EventHandler* eventHandler(uint index) const; |
415 |
inline uint size() const { return args.size(); } |
inline uint size() const { return args.size(); } |
416 |
|
bool isPolyphonic() const; |
417 |
}; |
}; |
418 |
typedef Ref<EventHandlers,Node> EventHandlersRef; |
typedef Ref<EventHandlers,Node> EventHandlersRef; |
419 |
|
|
425 |
Assignment(VariableRef variable, ExpressionRef value); |
Assignment(VariableRef variable, ExpressionRef value); |
426 |
void dump(int level = 0); |
void dump(int level = 0); |
427 |
StmtFlags_t exec(); |
StmtFlags_t exec(); |
428 |
|
bool isPolyphonic() const { return (variable && variable->isPolyphonic()) || (value && value->isPolyphonic()); } |
429 |
}; |
}; |
430 |
typedef Ref<Assignment,Node> AssignmentRef; |
typedef Ref<Assignment,Node> AssignmentRef; |
431 |
|
|
441 |
void dump(int level = 0); |
void dump(int level = 0); |
442 |
int evalBranch(); |
int evalBranch(); |
443 |
Statements* branch(uint i) const; |
Statements* branch(uint i) const; |
444 |
|
bool isPolyphonic() const; |
445 |
}; |
}; |
446 |
typedef Ref<If,Node> IfRef; |
typedef Ref<If,Node> IfRef; |
447 |
|
|
465 |
//void addBranch(IntExprRef from, IntExprRef to, StatementsRef statements); |
//void addBranch(IntExprRef from, IntExprRef to, StatementsRef statements); |
466 |
//void addBranch(CaseBranchRef branch); |
//void addBranch(CaseBranchRef branch); |
467 |
//void addBranches(CaseBranchesRef branches); |
//void addBranches(CaseBranchesRef branches); |
468 |
|
bool isPolyphonic() const; |
469 |
}; |
}; |
470 |
typedef Ref<SelectCase,Node> SelectCaseRef; |
typedef Ref<SelectCase,Node> SelectCaseRef; |
471 |
|
|
479 |
void dump(int level = 0); |
void dump(int level = 0); |
480 |
bool evalLoopStartCondition(); |
bool evalLoopStartCondition(); |
481 |
Statements* statements() const; |
Statements* statements() const; |
482 |
|
bool isPolyphonic() const { return m_condition->isPolyphonic() || m_statements->isPolyphonic(); } |
483 |
}; |
}; |
484 |
|
|
485 |
class Neg : public IntExpr { |
class Neg : public IntExpr { |
489 |
int evalInt() { return (expr) ? -expr->evalInt() : 0; } |
int evalInt() { return (expr) ? -expr->evalInt() : 0; } |
490 |
void dump(int level = 0); |
void dump(int level = 0); |
491 |
bool isConstExpr() const { return expr->isConstExpr(); } |
bool isConstExpr() const { return expr->isConstExpr(); } |
492 |
|
bool isPolyphonic() const { return expr->isPolyphonic(); } |
493 |
}; |
}; |
494 |
typedef Ref<Neg,Node> NegRef; |
typedef Ref<Neg,Node> NegRef; |
495 |
|
|
501 |
String evalStr(); |
String evalStr(); |
502 |
void dump(int level = 0); |
void dump(int level = 0); |
503 |
bool isConstExpr() const; |
bool isConstExpr() const; |
504 |
|
bool isPolyphonic() const { return lhs->isPolyphonic() || rhs->isPolyphonic(); } |
505 |
}; |
}; |
506 |
typedef Ref<ConcatString,Node> ConcatStringRef; |
typedef Ref<ConcatString,Node> ConcatStringRef; |
507 |
|
|
520 |
int evalInt(); |
int evalInt(); |
521 |
void dump(int level = 0); |
void dump(int level = 0); |
522 |
bool isConstExpr() const; |
bool isConstExpr() const; |
523 |
|
bool isPolyphonic() const { return lhs->isPolyphonic() || rhs->isPolyphonic(); } |
524 |
private: |
private: |
525 |
IntExprRef lhs; |
IntExprRef lhs; |
526 |
IntExprRef rhs; |
IntExprRef rhs; |
536 |
}; |
}; |
537 |
typedef Ref<Or,Node> OrRef; |
typedef Ref<Or,Node> OrRef; |
538 |
|
|
539 |
|
class BitwiseOr : virtual public BinaryOp, virtual public IntExpr { |
540 |
|
public: |
541 |
|
BitwiseOr(IntExprRef lhs, IntExprRef rhs) : BinaryOp(lhs,rhs) {} |
542 |
|
int evalInt(); |
543 |
|
void dump(int level = 0); |
544 |
|
}; |
545 |
|
typedef Ref<BitwiseOr,Node> BitwiseOrRef; |
546 |
|
|
547 |
class And : virtual public BinaryOp, virtual public IntExpr { |
class And : virtual public BinaryOp, virtual public IntExpr { |
548 |
public: |
public: |
549 |
And(IntExprRef lhs, IntExprRef rhs) : BinaryOp(lhs,rhs) {} |
And(IntExprRef lhs, IntExprRef rhs) : BinaryOp(lhs,rhs) {} |
552 |
}; |
}; |
553 |
typedef Ref<And,Node> AndRef; |
typedef Ref<And,Node> AndRef; |
554 |
|
|
555 |
|
class BitwiseAnd : virtual public BinaryOp, virtual public IntExpr { |
556 |
|
public: |
557 |
|
BitwiseAnd(IntExprRef lhs, IntExprRef rhs) : BinaryOp(lhs,rhs) {} |
558 |
|
int evalInt(); |
559 |
|
void dump(int level = 0); |
560 |
|
}; |
561 |
|
typedef Ref<BitwiseAnd,Node> BitwiseAndRef; |
562 |
|
|
563 |
class Not : virtual public IntExpr { |
class Not : virtual public IntExpr { |
564 |
IntExprRef expr; |
IntExprRef expr; |
565 |
public: |
public: |
567 |
int evalInt() { return !expr->evalInt(); } |
int evalInt() { return !expr->evalInt(); } |
568 |
void dump(int level = 0); |
void dump(int level = 0); |
569 |
bool isConstExpr() const { return expr->isConstExpr(); } |
bool isConstExpr() const { return expr->isConstExpr(); } |
570 |
|
bool isPolyphonic() const { return expr->isPolyphonic(); } |
571 |
}; |
}; |
572 |
typedef Ref<Not,Node> NotRef; |
typedef Ref<Not,Node> NotRef; |
573 |
|
|
574 |
|
class BitwiseNot : virtual public IntExpr { |
575 |
|
IntExprRef expr; |
576 |
|
public: |
577 |
|
BitwiseNot(IntExprRef expr) : expr(expr) {} |
578 |
|
int evalInt() { return ~expr->evalInt(); } |
579 |
|
void dump(int level = 0); |
580 |
|
bool isConstExpr() const { return expr->isConstExpr(); } |
581 |
|
bool isPolyphonic() const { return expr->isPolyphonic(); } |
582 |
|
}; |
583 |
|
typedef Ref<BitwiseNot,Node> BitwiseNotRef; |
584 |
|
|
585 |
class ParserContext : public VMParserContext { |
class ParserContext : public VMParserContext { |
586 |
public: |
public: |
587 |
struct Error { |
struct Error { |
592 |
|
|
593 |
void* scanner; |
void* scanner; |
594 |
std::istream* is; |
std::istream* is; |
595 |
std::vector<ParserIssue> errors; |
std::vector<ParserIssue> vErrors; |
596 |
std::vector<ParserIssue> warnings; |
std::vector<ParserIssue> vWarnings; |
597 |
std::vector<ParserIssue> issues; |
std::vector<ParserIssue> vIssues; |
598 |
|
|
599 |
std::set<String> builtinPreprocessorConditions; |
std::set<String> builtinPreprocessorConditions; |
600 |
std::set<String> userPreprocessorConditions; |
std::set<String> userPreprocessorConditions; |
613 |
|
|
614 |
ArrayList<int>* globalIntMemory; |
ArrayList<int>* globalIntMemory; |
615 |
ArrayList<String>* globalStrMemory; |
ArrayList<String>* globalStrMemory; |
616 |
|
int requiredMaxStackSize; |
617 |
|
|
618 |
VMFunctionProvider* functionProvider; |
VMFunctionProvider* functionProvider; |
619 |
|
|
622 |
ParserContext(VMFunctionProvider* parent) : |
ParserContext(VMFunctionProvider* parent) : |
623 |
scanner(NULL), is(NULL), |
scanner(NULL), is(NULL), |
624 |
globalIntVarCount(0), globalStrVarCount(0), polyphonicIntVarCount(0), |
globalIntVarCount(0), globalStrVarCount(0), polyphonicIntVarCount(0), |
625 |
globalIntMemory(NULL), globalStrMemory(NULL), functionProvider(parent), |
globalIntMemory(NULL), globalStrMemory(NULL), requiredMaxStackSize(-1), |
626 |
execContext(NULL) |
functionProvider(parent), execContext(NULL) |
627 |
{ |
{ |
628 |
} |
} |
629 |
virtual ~ParserContext() { destroyScanner(); } |
virtual ~ParserContext(); |
630 |
VariableRef globalVar(const String& name); |
VariableRef globalVar(const String& name); |
631 |
IntVariableRef globalIntVar(const String& name); |
IntVariableRef globalIntVar(const String& name); |
632 |
StringVariableRef globalStrVar(const String& name); |
StringVariableRef globalStrVar(const String& name); |
633 |
VariableRef variableByName(const String& name); |
VariableRef variableByName(const String& name); |
634 |
void addErr(int line, const char* txt); |
void addErr(int firstLine, int lastLine, int firstColumn, int lastColumn, const char* txt); |
635 |
void addWrn(int line, const char* txt); |
void addWrn(int firstLine, int lastLine, int firstColumn, int lastColumn, const char* txt); |
636 |
void createScanner(std::istream* is); |
void createScanner(std::istream* is); |
637 |
void destroyScanner(); |
void destroyScanner(); |
638 |
bool setPreprocessorCondition(const char* name); |
bool setPreprocessorCondition(const char* name); |
639 |
bool resetPreprocessorCondition(const char* name); |
bool resetPreprocessorCondition(const char* name); |
640 |
bool isPreprocessorConditionSet(const char* name); |
bool isPreprocessorConditionSet(const char* name); |
641 |
|
std::vector<ParserIssue> issues() const OVERRIDE; |
642 |
|
std::vector<ParserIssue> errors() const OVERRIDE; |
643 |
|
std::vector<ParserIssue> warnings() const OVERRIDE; |
644 |
|
VMEventHandler* eventHandler(uint index) OVERRIDE; |
645 |
|
VMEventHandler* eventHandlerByName(const String& name) OVERRIDE; |
646 |
|
void registerBuiltInConstIntVariables(const std::map<String,int>& vars); |
647 |
|
void registerBuiltInIntVariables(const std::map<String,VMIntRelPtr*>& vars); |
648 |
|
void registerBuiltInIntArrayVariables(const std::map<String,VMInt8Array*>& vars); |
649 |
|
void registerBuiltInDynVariables(const std::map<String,VMDynVar*>& vars); |
650 |
}; |
}; |
651 |
|
|
652 |
class ExecContext : public VMExecContext { |
class ExecContext : public VMExecContext { |
693 |
stackFrame = -1; |
stackFrame = -1; |
694 |
} |
} |
695 |
|
|
696 |
int suspensionTimeMicroseconds() const { |
int suspensionTimeMicroseconds() const OVERRIDE { |
697 |
return suspendMicroseconds; |
return suspendMicroseconds; |
698 |
} |
} |
699 |
}; |
}; |