[antlr-interest] Mask shift-reduce warning?

David Holroyd dave at badgers-in-foil.co.uk
Thu Nov 15 05:24:53 PST 2007


On Thu, Nov 15, 2007 at 01:18:18PM +1100, Clifford Heath wrote:
> I have a grammar which has an unavoidable shift-reduce ambiguity,
> and I'm happy with the default reduce behaviour. However, I don't
> like my code to compile with expected warnings, as they tend to
> mask unexpected warnings.
> 
> Can I tell ANTLR that a given (sub-)rule is known to be ambiguous
> and not to warn me about it every time?

I do this, just to get rid of the warning,

  ifStatement
	:	IF^ condition statement
		((ELSE)=>elseClause)?
	;

ta,
dave

-- 
http://david.holroyd.me.uk/


More information about the antlr-interest mailing list