[prev in list] [next in list] [prev in thread] [next in thread] 

List:       stringtemplate-interest
Subject:    [stringtemplate-interest] Order of Attributes
From:       parrt () cs ! usfca ! edu (Terence Parr)
Date:       2008-03-04 19:33:47
Message-ID: 88529F04-EA2B-49E7-8F6B-ED63D5C3F6B6 () cs ! usfca ! edu
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic