[antlr-interest] greedy=false for lexersBy default

Terence Parr parrt at cs.usfca.edu
Fri May 23 15:32:31 PDT 2008


hi,

  I'm thinking of changing lexers to use greedy=false by default so  
that things like

STRING : '"' ('\\' '"'|.)* '"' ;

  so I don't have to say

STRING : '"' (options {greedy=false;}:'\\' '"'|.)* '"' ;

I think with a dot in there it works now:

CMT : '//' .* '\n' ;

Any objections to me flipping this real quick for 3.1?

Ter


More information about the antlr-interest mailing list