mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
POSIX: warn if %prec's token was not defined.
Reported by Florian Krohm at
<http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
* NEWS (2.4.2): Document.
* src/reader.c (grammar_rule_check): Implement.
(grammar_current_rule_prec_set): Add comments explaining that we
here assume a %prec identifier is a token, but we still manage
to support POSIX.
* tests/input.at (%prec's token must be defined): New test
group.
(cherry picked from commit f1ceed0774)
This commit is contained in:
10
NEWS
10
NEWS
@@ -182,6 +182,16 @@ Bison News
|
||||
|
||||
* Changes in version 2.4.2 (????-??-??):
|
||||
|
||||
** `%prec IDENTIFIER' requires IDENTIFIER to be defined separately.
|
||||
|
||||
POSIX specifies that an error be reported for any identifier that does
|
||||
not appear on the LHS of a grammar rule and that is not defined by
|
||||
%token, %left, %right, or %nonassoc. Bison 2.3b and later lost this
|
||||
error report for the case when an identifier appears only after a
|
||||
%prec directive. It is now restored. However, for backward
|
||||
compatibility with recent Bison releases, it is only a warning for
|
||||
now. In Bison 2.5 and later, it will return to being an error.
|
||||
|
||||
** Detection of GNU M4 1.4.6 or newer during configure is improved.
|
||||
|
||||
** Warnings from gcc's -Wundef option about undefined YYENABLE_NLS,
|
||||
|
||||
Reference in New Issue
Block a user