[antlr-interest] Re: Bug in antlr.g?
lgcraymer
lgc at mail1.jpl.nasa.gov
Mon Aug 2 13:23:53 PDT 2004
--- In antlr-interest at yahoogroups.com, Terence Parr <parrt at c...> wrote:
> Hi. :)
>
> Well, this is antlr itself, right? so it is fine using purely
> commontoken...it's in the generated parsers that it needs to be
Ter--
Ingo may still have a point that should be remembered for ANTLR 3.
antlr.g could be a starting point for other tools that work on antlr
grammars.
--Loring
> sensitive I would say.
>
> Ter
>
> On Aug 2, 2004, at 6:53 AM, Ingo Maier wrote:
>
> > Hi there,
> >
> > in the ACTION lexer rule a CommonToken is instantiated directly:
> >
> > CommonToken t = new CommonToken(_ttype,$getText);
> > t.setLine(actionLine);
> > t.setColumn(actionColumn);
> > $setToken(t);
> >
> > Shouldn't this be:
> >
> > Token t = makeToken(_ttype);
> > t.setText($getText);
> > t.setLine(actionLine);
> > t.setColumn(actionColumn);
> > $setToken(t);
> >
> > ?
> >
> > Otherwise, different token types cannot be used, e.g. with
> > TokenStreamRewriteEngine which needs TokenWithIndex.
> >
> > Thanks,
> > Ingo
> >
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list