[antlr-interest] Non-greedy lexer rule in ANTLR4
Gavin Lambert
antlr at mirality.co.nz
Fri Oct 12 17:03:29 PDT 2012
At 11:56 13/10/2012, Terence Parr wrote:
>oh. if no newline and such what Bart suggests might be
best. maybe
>'<<' (~[\r\n] | .)* '>>' which is nongreedy
Doesn't the "." alt cancel out the first alt?
--
Gavin Lambert, Mirality Systems
<http://www.mirality.co.nz/>
<http://lambert.geek.nz/>
----
Anyone who goes to a psychiatrist ought to have their head
examined.
Few women admit their age. Few men act theirs.
More information about the antlr-interest
mailing list