[antlr-interest] Suppressing spurious warnings

Vaclav Barta vbar at comp.cz
Sat Mar 1 06:42:54 PST 2008


Steve Bennett wrote:
> In the current ANTLR 3, there are lots of warnings generated that are
> basically meaningless. Is there a way to suppress them?
> 
> For example:
> #1
> [00:15:28] warning(105): C:\antlr\mediawiki12.g:996:12: no lexer rule
> corresponding to token: PRE_OPEN
> 
> There is no lexer rule but I'm setting it explicitly:
> ...
>     | (PRE_OPEN_ACTUAL) => PRE_OPEN_ACTUAL { $type=PRE_OPEN;
> in_pre=true; in_noparse=true;}
> ...
In that case I think you can define PRE_OPEN as a fragment rule to get
rid of the warning.

	Bye
		Vasek
--
http://www.mangrove.cz/
Open Source integration



More information about the antlr-interest mailing list