[antlr-interest] Re: tree parser separation

Adrian Sandor aditsu at yahoo.com
Sun Aug 3 10:12:06 PDT 2003

thank you, it worked :)
I saw that option before, but I thought it referred to the characters
in the vocabulary..
I was pretty close: it actually refers to tokens, and for lexers
tokens are characters, but I forgot that tokens can be more for parsers :)

afterwards I found out the hard way that modifications in the parser
can lead to changes in token values, which require recompilation of
the separate tree parser.. anyway now I'm making good progress towards
the first quasi-usable alpha version of my C++ source code formatter :)


--- In antlr-interest at yahoogroups.com, Terence Parr <parrt at c...> wrote:
> you need to importVocab.  See the examples. :)
> Terence
> On Saturday, August 2, 2003, at 01:38 AM, Adrian Sandor wrote:
> > How can I keep a lexer and a parser in one file, and a tree parser in
> > another file? If I put them all in one grammar file, then it works,
> > but when I move the tree parser to another file, I get "unexpected AST
> > node" errors. Is there some "#include" directive for grammars? Or any
> > other solution?
> >
> > thanks
> > Adrian
> --
> Professor Comp. Sci., University of San Francisco
> Creator, ANTLR Parser Generator, http://www.antlr.org
> Co-founder, http://www.jguru.com
> Co-founder, http://www.knowspam.net enjoy email again!
> Co-founder, http://www.peerscope.com pure link sharing


Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 

More information about the antlr-interest mailing list