[antlr-interest] Fundamental tree parsing question
Benjamin Niemann
pink at odahoda.de
Tue Jul 10 13:11:14 PDT 2007
Ted Villalba wrote:
> Here is the grammar attached below, with your most recent suggestion. I
> can walk it without issue, with input like :
> query=(city AND mountain dwellers)
>
> until I try to add the use of the imaginary tokens, for example, in the
> 'field' rule below:
> The grammar:
> [...]
Mmm... I can't reproduce the problem. I can step through the input and get
the output:
AST:
(= (TAG (TAG query)) (VALUE (AND (TERMS city) (TERMS mountain
dwellers))))
Probably not what you finally want (redundant TAG and some WS not omitted),
but at least it does not crash...
I used ANTLRWorks 1.0.2 and "Java(TM) 2 Runtime Environment, Standard
Edition (build 1.5.0_12-b04)" on Debian GNU/Linux. What's your setup?
--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
More information about the antlr-interest
mailing list