help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [REQUEST] Infinite recursion warning


From: Valentin Tolmer
Subject: Re: [REQUEST] Infinite recursion warning
Date: Tue, 10 Dec 2013 20:34:13 +0100

> Hi Valentin,
>
> I suppose you mean that the message should be clearer?
>
> $ cat foo.yy
> %%
> exp: "NIL" | "NIL" list
> list: "NIL" list
> $ LC_ALL=C bison foo.yy
> foo.yy: warning: 1 nonterminal useless in grammar [-Wother]
> foo.yy: warning: 2 rules useless in grammar [-Wother]
> foo.yy:2.20-23: warning: nonterminal useless in grammar: list [-Wother]
>  exp: "NIL" | "NIL" list
>                     ^^^^
> foo.yy:2.14-23: warning: rule useless in grammar [-Wother]
>  exp: "NIL" | "NIL" list
>               ^^^^^^^^^^
> foo.yy:3.7-16: warning: rule useless in grammar [-Wother]
>  list: "NIL" list
>        ^^^^^^^^^^
>
Hi Akim,

Sorry I forgot to include the error message.
Yes indeed, it could be clearer to mention an infinite recursion, or
no words matched, or something like that.
The current error makes you think that the rule was useless because it
could not be reached, or that another rule always takes precedence
over this one.

-- 
Valentin Tolmer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]