[antlr-interest] Matching Last Line in ANTLR?

consiliens at gmail.com consiliens at gmail.com
Tue Aug 18 15:40:40 PDT 2009


On 09-08-18 03:22 PM, David-Sarah Hopwood wrote:
> Alternatively, you might want to match bare '\r' as a newline (as used
> in original MacOS). In that case change MC_QUESTION and MC_INCORRECT as
> above, but use:
>
> fragment NOTNEWLINE : ~('\r' | '\n');
> fragment NEWLINE : '\r' '\n'? | '\n';
>
I really appreciate all the help from the mailing list. The above 
appears to work quite well. Thank you.


More information about the antlr-interest mailing list