[antlr-interest] Problem with multiple treeparser ...

Gavin Lambert antlr at mirality.co.nz
Wed Oct 15 12:28:03 PDT 2008


At 07:56 16/10/2008, LdK ^^ wrote:
>I have a problem when i use multiple treeparser,
>the first is in same file that the parser

You can't make a tree parser in the same grammar file as your 
lexer/parser.

>but the second is in a other file and i always get an "" when i 
>make a get.text() in this tree parser

When you construct the tree parser (in your driver code), you need 
to pass the AST node stream from the parser into it and you need 
to give it access to the underlying token stream as well.



More information about the antlr-interest mailing list