[antlr-interest] "return" in rule code

Paul J. Lucas dude at darkfigure.org
Thu Nov 7 11:46:38 PST 2002


Is it "OK" to have a "return" statement in a rule?

	FOO
		: "foo" { if ( cond ) return; } "bar"
		;

Will the above match only "foo" if cond is true, i.e., abort the matching?

- Paul


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list