[antlr-interest] Proper handling of newlines with gUnit???? (was: Null Pointer Exception from valid gUnit test)...

Gavin Lambert antlr at mirality.co.nz
Fri Jul 10 15:16:51 PDT 2009


At 08:28 11/07/2009, Sylvain, Gregory [USA] wrote:
 >I'm suspecting that it may be the way gunit is handling multiple 

 >newlines?  The grammar defines a EOL as follows:
 >
 >EOL	: ( CRCRLF | CRLF | LF ) ;
 >fragment CRCRLF : '\r\r\n' ;
 >fragment CRLF : '\r\n' ;
 >fragment LF : '\n' ;

I don't have a direct answer to your question, but you could try 
rewriting that rule like this and see if it helps:

EOL : ('\r' '\r'?)? '\n' ;



More information about the antlr-interest mailing list