[antlr-interest] Tokenizing question

Andrew Lentvorski bsder at allcaps.org
Tue Jul 24 21:58:36 PDT 2007


Jonathan Thomas wrote:
> Your TT rule also matches whitespace.
> A quick fix - make your WS a fragment, and add | WS to your TT rule, so 
> it also doesn't match the whitespace.

Yes, it's true that my TT rule matches whitespace, but why does the 
whitespace even get down to it?

I expected the MWS and TT rules to match and the MWS takes precedence 
because it matches first.

Why is this not occurring?

-a


More information about the antlr-interest mailing list