X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/8b807f1177634400b307b32f120f16adfd0cead0..09add9c24f4524f4c362cf51a1b555f8c49a6157:/NEWS diff --git a/NEWS b/NEWS index 9489c51f..564b087e 100644 --- a/NEWS +++ b/NEWS @@ -362,6 +362,28 @@ GNU Bison NEWS %nonassoc '=' ^^^ +** Empty rules + + Empty rules (i.e., with an empty right-hand side) can now be explicitly + marked by the new %empty directive. Using %empty on a non-empty rule is + an error. The new -Wempty-rule warning reports empty rules without + %empty. On the following grammar: + + %% + s: a b c; + a: ; + b: %empty; + c: 'a' %empty; + + bison reports: + + 3.4-5: warning: empty rule without %empty [-Wempty-rule] + a: {} + ^^ + 5.8-13: error: %empty on non-empty rule + c: 'a' %empty {}; + ^^^^^^ + ** Java skeleton improvements Contributed by Paolo Bonzini.