[antlr-interest] Question about preserving spaces in quoted strings

Gavin Lambert antlr at mirality.co.nz
Thu Jul 2 12:52:25 PDT 2009


At 07:27 3/07/2009, Penningroth, Mark wrote:
 >dqcon
 >	: '"'
 >	(  (~'"')=>
 >	   (   ('\\')=>'\\'.
 >	   | .
 >	   )
 >	)*
 >	'"';

Like you were already told, this should be a lexer rule:

DQTEXT
   : '"' ('\\' . | ~('\\' | '"'))* '"'
   ;



More information about the antlr-interest mailing list