Hello,

I am using antlr-dotnet-tool-3.3.1.7705 and beginning work on a template to
translate from a high level language to bytecode.

One of my rules looks something like this:

script : (g+=globalVar)+
-> file(globalVars={$g})

globalVar
: ^(VAR_DECL TYPE ID .?)
-> vardec(type={$TYPE.text}, id={$ID.text})
;

It appears that the code being generated in this case to collect the
templates is slightly off. The type of list to hold the returned result is:

List<MyAST> list_g = null;

But when the collection is done, it is expecting the list to hold a
stringtemplate:

if (list_g==null) list_g=new List<StringTemplate>();
list_g.Add(g.Template);

I have confirmed my output is set correctly:

options {
language = 'CSharp3';
tokenVocab = MyVocab;
ASTLabelType = MyAST;
output = template;
}


Is there anything else I need to do?

Thank you very much for any help.
-- 
David Daeschler

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to