[stringtemplate-interest] Order of Attributes

Terence Parr parrt at cs.usfca.edu
Tue Mar 4 11:33:47 PST 2008


still not sure why you want this.  so, you want to examine the chunks  
within the template and ask when certain attributes are referenced?

Ter
On Mar 4, 2008, at 1:28 AM, Rabea Gransberger wrote:

> Terence Parr schrieb:
>>
>> On Feb 23, 2008, at 4:29 AM, Rabea Gransberger wrote:
>>
>>> Hello,
>>>
>>> is there any way to question the Order of attributes in a  
>>> StringTemplate?
>>>
>>> I'd like to have some internationalization and have some properties
>>> files with entries like:
>>> plus=$right$ + $left§
>>>
>>> I take the String for plus and make a StringTemplate out of it,  
>>> and then
>>> I'd like to know if $right§ occurs first in the template or $left$.
>>
>> Do you mean the references to the templates or the order which they  
>> were
>> set? The order of the attributes is undefined unless you are talking
>> about the order in which you reference them.
>
> I mean the reference to the templates. In my example I'd like to get 1
> if I request something like
> getReferenceOfAttribute("right")
> and 2 for
> getReferenceOfAttribute("left")
>
> A list of numbers would also be okay, if the attribute is referenced
> more than once.
>
> Greetings,
> Rabea
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest



More information about the stringtemplate-interest mailing list