I'm not opposed to allowing things to alter the output template
easily; I always envisioned this kind of thing, which is why I use
@name-of-action rather than a keyword like members. So, you would do
@timestamp { <grammar.name>... }
in the grammar file... I am pretty sure these automatically get
stored in a hash table and templates could then ask for
<actions.timestamp> or whatever. The dynamic binding and template
mechanism of ST allows you to refer to attributes within the template
you specify as you see above.
Give it a try. my guess is it will just work.
Ter
PS hooray for ST ;)
On May 20, 2009, at 12:56 PM, Sam Harwell wrote:
> "timestamp" works for the timestamp, but not for the line/column
> numbers
> throughout. That is the type of option I'm referring to though.
>
> Would we make it two options, or find a name that means something for
> both items?
>
> Sam
>
> -----Original Message-----
> From: Jim Idle [mailto:[email protected]]
> Sent: Wednesday, May 20, 2009 2:47 PM
> To: Terence Parr
> Cc: Sam Harwell; [email protected]
> Subject: Re: [antlr-interest] Unnecessary Java output file diffs
>
> Terence Parr wrote:
>> All you have to do is alter the line in Java.stg template file. We
>> could add an action variable like @members that fills in the version
>> template string.
>>
> Changing the template means they have to do it for every release
> though,
>
> which is probably a pain. I like that latter idea actually, probably
> better than options { timestamp = false; } as then you can make it
> hold
> whatever you like.
>
>
> Jim
>
>
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---