[antlr-interest] Remembering Skipped Tokens
David Holroyd
dave at badgers-in-foil.co.uk
Fri Mar 2 02:38:04 PST 2007
On Thu, Mar 01, 2007 at 11:03:18PM -0700, jason heddings wrote:
> I have set up a token in my lexer for matching whitespace, and set the type
> to Token.SKIP to make the parser easier to write. However, in order to
> check proper syle, I need to keep whitespace information in my resulting
> AST. Is there an easy way to do this, so I don't have to put (WS)* in every
> parser rule I write?
If you're using v2, have a look at this:
http://www.antlr.org/article/whitespace/index.html
ta,
dave
--
http://david.holroyd.me.uk/
More information about the antlr-interest
mailing list