[antlr-interest] Question about tree grammar (antlr 3)

Jose Ventura jose.ventura.roda at gmail.com
Tue Jul 4 07:34:17 PDT 2006


I have this rule in a tree grammar (antlr 3)


> setDir : ^('dir' LITERAL )
>

I need to invoke a method with the LITERAL token text, I use this rule


> setDir : ^('dir' LITERAL {s.setDirIn(((Tree)$LITERAL).getText());})


Do somebody know one better, without cast?

Thank's in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060704/12bb1a6a/attachment.html


More information about the antlr-interest mailing list