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 <[email protected]>

> > 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

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to