[antlr-interest] Re: StringTemplate enhancement question

Terence Parr parrt at cs.usfca.edu
Tue Jun 22 14:22:56 PDT 2004


On Jun 22, 2004, at 2:08 PM, birmanstefan wrote:
>> st.setAttribute("tokens.name,type", new Object[] {"Ter","342"});
>>
>> is not the cleanest solution given Java's "issues" ;)
>
>     I would use this one. Maybe, instead of parsing first argument
> make it like :
>   st.setAttribute("tokens", new Object[]{"name","type"}
>                           , new Object[]{"Ter","342"})
>
> just for the sake of simplicity : I don't have to build "tokens.name,.
> .." and you don't have to parse it).

Stefan,

An interesting alternative.  I think that the "tokens.name,type" is 
faster to type though ;)

I'm guessing that it won't cost much in code/time to interpret the 
attribute name.  Perhaps I should make it more obvious though like 
"tokens.{name,type}".

Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
Cofounder, http://www.knowspam.net enjoy email again!
Cofounder, http://www.peerscope.com pure link sharing





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list