[antlr-interest] 'DOWN' and <UP> tokens

Safiye Celik safisce at gmail.com
Mon Aug 24 02:15:48 PDT 2009


Yes, the problem was that my parser and tree grammars were not consistent.
And the inconsistency is about the tree of below rule a:

a : e (d^ e)* ;
e : b | c! a c! ;

How would I create the tree of a? I have no idea about dealing with
repetition of the token d, which is the root of a tree itself.
It would be good if you have any idea, and share with me. Thanks.

2009/8/21 Johannes Luber <JALuber at gmx.de>

> > Hi,
> > While parsing my AST tree, I get some errors such as "no viable
> > alternative
> > at input 'DOWN'" or "mismatched tree node:1 expecting <UP>". What are
> > those
> > UP and DOWN tokens? They are not mine :)
>
> This means that your tree grammar isn't entirely consistent with your
> parser. The UP and DOWN tokens are used to encode the two dimensional pare
> tree in a one dimensional stream. So check your rules at the appropriate
> place that what the parser actually creates is also expected by the tree
> grammar.
>
> Johannes
> >
> > --
> > -safiye
>
> --
> Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
> für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02
>



-- 
-safiye
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090824/e5970219/attachment.html 


More information about the antlr-interest mailing list