ScriptThread and ScriptApp and InterpretedLanguageGrammar

Nov 15, 2015 at 6:58 PM
Hi All,
I noticed that if you need to evaluate you need to have ScriptThread
var output = rooAST.Evaluate(thread);

and in order to create ScriptThread object you need a ScriptApp object, but the constructor of the ScriptApp expects your grammar to be child class of InterpretedLanguageGrammar not Grammar.
I did build my grammar by subclassing Grammar and I don't know what is the best way to solve this issue (All non-terminals got theri ASTNode class).

Nov 16, 2015 at 12:13 AM
all these things are built to work together, so if you want to use evaluation machinery already there, you should follow the rules, like using InterpretedLanguageGrammar as a base class. I don't understand, what is the big problem switching to it as a base class? Just change one word in class declaration
Nov 16, 2015 at 2:15 PM
Hi Roman
Thank you very much for replying back to me. You are right, I just changed again and it worked, when I subclass InterpretedLanguageGrammar didn't work before and I thought this is only for scripting languages. I did it now and it is working.

I have one more question, should I use DoEvaluate to validate the programming syntax , to generate MSIL code, or both?