[antlr-interest] Re: treeparser to copy input to output
lgcraymer
lgc at mail1.jpl.nasa.gov
Mon Feb 2 17:11:37 PST 2004
Just delete the setType(Token.SKIP)--the "SKIP" says "ignore this token".
--Loring
--- In antlr-interest at yahoogroups.com, SainTiss <saintiss at a...> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hmm...
>
> I get the impression that changing the token from SKIP to something else isn't
> that straightforward...
> I added a token to the "tokens{}" section, and then changed
> setType(Token.SKIP) to setType(<new token>), but the parser doesn't seem to
> recognize java anymore...
> Is there something I'm missing here?
>
> Thanks,
>
> Hans
>
> On Monday 02 February 2004 23:29, Terence Parr wrote:
> > Ah. Yeah, the WS cannot be SKIP or else the rewrite engine won't see
> > the token...
> >
> > Ter
> >
> > On Feb 2, 2004, at 1:16 PM, SainTiss wrote:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > Hi,
> > >
> > > Thanks for that article... It's certainly going in the right
> > > direction, except
> > > I can't get the engine to remember whitespace.
> > > I did remove the rewriteEngine.discard(MyLexer.WS) call though...
> > > I'm using the java.g grammar. Could the problem be that the lexer
> > > assigns the
> > > token "SKIP" to whitespace?
> > >
> > > Thanks,
> > >
> > > Hans
> > >
> > > On Monday 02 February 2004 21:06, parrt2000 wrote:
> > >> Howdy...yahoooooooo again snarfed my earlier reply...ugh.
> > >>
> > >> Anyway, have you seen:
> > >>
> > >> http://www.antlr.org/article/rewrite.engine/index.tml
> > >>
> > >> ?
> > >>
> > >> Terence
> > >>
> > >>
> > >>
> > >>
> > >> 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/
> > >
> > > - --
> > > Ark Linux - Linux for the Masses (http://arklinux.org)
> > >
> > > Capitalism:
> > > You don't have any cows. The bank will not lend you money to buy cows,
> > > because you don't have any cows to put up as collateral.
> > >
> > > Representative Democracy:
> > > You have two cows. Your neighbors pick someone to tell you who gets
> > > the milk.
> > >
> > > In a world without walls and fences, who needs windows and gates?
> > >
> > > Hans Schippers
> > > 2LIC INF
> > > UA 2003-2004
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.2.3 (GNU/Linux)
> > >
> > > iD8DBQFAHr5MXlnUYIbmLOQRAg66AJ48cxsoEkQET4E2SPBhrcIZnieTvQCdHi4/
> > > e12jVR7gw/JSy9+HJrB649Q=
> > > =pWBa
> > > -----END PGP SIGNATURE-----
> > >
> > >
> > >
> > >
> > > 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/
> >
> > --
> > Professor Comp. Sci., University of San Francisco
> > Creator, ANTLR Parser Generator, http://www.antlr.org
> > Co-founder, http://www.jguru.com
> > Co-founder, http://www.knowspam.net enjoy email again!
> > Co-founder, http://www.peerscope.com pure link sharing
> >
> >
> >
> >
> >
> >
> > 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/
>
> - --
> Ark Linux - Linux for the Masses (http://arklinux.org)
>
> Capitalism:
> You don't have any cows. The bank will not lend you money to buy cows,
> because you don't have any cows to put up as collateral.
>
> Representative Democracy:
> You have two cows. Your neighbors pick someone to tell you who gets the milk.
>
> In a world without walls and fences, who needs windows and gates?
>
> Hans Schippers
> 2LIC INF
> UA 2003-2004
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (GNU/Linux)
>
> iD8DBQFAHt86XlnUYIbmLOQRAhOYAJ0a8vHxlnaA2PiiIC+/cGKBCeLJawCZARtN
> 5grFc2qXhfeoC/GjPtWjHIw=
> =h2vW
> -----END PGP SIGNATURE-----
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