[stringtemplate-interest] Force single-valued template
sohail at taggedtype.net
sohail at taggedtype.net
Sun Nov 20 10:23:06 PST 2005
> [forgot to send to list]
>
> On Nov 20, 2005, at 10:01 AM, Terence Parr wrote:
>> On Nov 20, 2005, at 9:47 AM, sohail at taggedtype.net wrote:
>>> The primary motivation is implementation of right and left
>>> associative
>>> operators:
>>>
>>> power(lhs,rhs)::=<<std::power(<lhs>,<rhs>)>>
>>>
>>> for 2**3**5, this should give:
>>>
>>> std::power(2,std::power(3,5))
>>>
>>> I don't think there is a way to do it without forcing lhs and rhs
>>> to be
>>> single valued.
>>
>> How about using first(lhs) to get the first element?
>>
>> Also, I would stay away from using :: and such inside your template
>> names...i'll probably use :: for group inheritance soon...
I look forward to the inheritance! Is there a way to escape the charaters?
It is not possible for me to not use ::
More information about the stringtemplate-interest
mailing list