[antlr-interest] disable warnings in v3?

Gavin Lambert antlr at mirality.co.nz
Wed Jan 10 01:50:15 PST 2007


At 21:04 9/01/2007, fhaupt at informatik.uni-wuerzburg.de wrote:
 >: '<verbatim>' (options {greedy=false;} : a=.
 >{
 >	verbatime.addContent(a.getText());
 >}
 >)*  '</verbatim>'
 >;

IIRC, the greedy option needs to be in the same scope as both the 
. and the *.  Try writing it like this:

: '<verbatim>' (options {greedy=false;} :
   (a=. { verbatime.addContent(a.getText()); }
   )*) '</verbatim>'
;

(Haven't tested this, but it seems plausible.)



More information about the antlr-interest mailing list