[antlr-interest] Duplicate nodes on a parse tree
Markus Kuhla
bace.spam at gmx.net
Fri Jun 22 09:46:43 PDT 2007
Morning,
I passed the parser to the ParseTreeBuilder constructor. In the methods of this class where child nodes are added, I checked parser.getBacktrackingLevel(). It always returned 0 (I don't use the explicit option backtrack in the grammar).
Any further hints?
Thanks,
Markus
> Hmm...shoot. Ok, it needs to have a constructor with a pointer to the
> parser itself so it can ask for the backtracking state. can you try
> that out?
>
> Ter
> On Jun 22, 2007, at 10:07 AM, Markus Kuhla wrote:
>
> > Hi!
> >
> > Vadim Tropashko vadimtro at yahoo.com wrote:
> >> OK, I see the coloring (when tree is in chart form).
> >> It must be the Tree.getType() method that does this.
> > (http://www.antlr.org/pipermail/antlr-interest/2007-March/
> > 019566.html)
> >
> > I'm using the ParseTree and was wondering if there is a way to
> > remove these duplicate nodes (for backtracking) from the ParseTree?
> > As I checked the above described getType() for each node in the
> > tree, I always got 0 (zero).
> >
> >
> > Thanks folks for you help!!!
> > Best,
> > Markus
> > --
> > GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
> > Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
More information about the antlr-interest
mailing list