> 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 _______________________________________________ [email protected] https://lists.gnu.org/mailman/listinfo/help-bison
