On Thu, 2008-12-11 at 15:17 +0100, Sven Van Echelpoel wrote:
> Hi,
>
> According to the book you can derive imaginary nodes from real tokens to
> take over attributes (such as line number) from the latter. The syntax
> for this is :
>
> foo : b='bar' -> ^( BAR[ $b ] )
> ;
>
> However, when you do this with the C target, no line numbers or anything
> gets set. After some sleuthing I found the templates in AST.stg that
...
>
> It can be made to work by passing the second argument (the text), even
> though I have no use for that.
>
> foo : b='bar' -> ^( BAR[ $b, "" ] )
> ;
>
> Am I missing something, or should that normally work as advertised?
>
I'll take a look - does that snippet of code above reproduce it? What
options {} have you got set etc? If you have the time, then a small, but
complete, grammar would be helpful :-)
Jim
> Sven
>
>
> List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org:8080/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
-~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address