[antlr-interest] Greedy matching to end of line

Pop Qvarnström pop.qvarnstrom at gmail.com
Fri Jan 28 06:28:09 PST 2011

Just a thought: depending on what you do with the things after a 'Comment:',
you could just match .+ :

asline  : 'Comment:' .+;


2011/1/28 Robert J. Hansen <rjh at sixdemonbag.org>

> > Same apology goes here, attached is cap of my run of NOCHandle in the
> interpreter, grammar cut and pasted from your original mail. The interpreter
> has quirks though, have you tried running it in the debugger instead? And
> what versions of antlr/antlrworks are you running?
> I have tried running it in the debugger: same result.  words derives into
> two NoViableAltException(0@[null]).
> I'm running ANTLRworks 1.4.2, the OS X-specific app package version of it,
> with ANTLR 3.3 on the CLASSPATH.

More information about the antlr-interest mailing list