[antlr-interest] Getting Object[] instead of String[]

Bernardo Elayda belayda at gmail.com
Wed May 30 17:41:28 PDT 2007


Hi,

I'm using Antlr 3's new stringtemplate combined feature.

I'm trying to pass a list of tokens to a template, where I want the token
text listed:

my anltr 3 code:

program myabc=MYABC mydigits+=MYNUM+ -> array2(mytext={$mydigits}) ;


my template which is in a stringtempalte group file:

array2(mytext) ::= <<
static const u16_t fpgadata2[] = {
<mytext; separator=", ">
}
>>

The template lists all the items in the 'mydigits' list with a comma
seperated but it's not listing the token text.  I have a Java hack that gets
around this.  I would really like a generic languate neutral solution.  I've
looked in the Antlr book and on the Wiki but I couldn't find something that
really applied.

Suggestions?
thx in advance!
-Bernardo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070530/e0594421/attachment.html 


More information about the antlr-interest mailing list