%fixed-output-files: detach from %yacc

The name fixed-output-files is pretty clear: generate y.tab.c, as Yacc
does.  So let's detach this from %yacc which does more: it requires
POSIX Yacc behavior.

This directive is obsolete since December 29th 2001
8c9a50bee1.  It does not show in the
doc.  I don't want to spend more time on improving its diagnostics, it
could be removed just as well as far as I'm concerned.

* src/scan-gram.l, src/parse-gram.y (%fixed-output-files): Detach from
%yacc.
This commit is contained in:
Akim Demaille
2019-07-07 15:04:19 +02:00
parent f99956b550
commit 44a56b20ac
5 changed files with 22 additions and 49 deletions

View File

@@ -2538,14 +2538,12 @@ fix-it:"input.y":{13:1-13:15}:"%file-prefix"
input.y:14.1-16.5: warning: duplicate directive: '%file-prefix\n =' [-Wother]
input.y:13.1-20: previous declaration
fix-it:"input.y":{14:1-16:6}:""
input.y:17.9-27: warning: deprecated directive: '%fixed-output_files', use '%fixed-output-files' [-Wdeprecated]
fix-it:"input.y":{17:2-17:21}:"%fixed-output-files"
input.y:18.9-27: warning: duplicate directive: '%fixed_output-files' [-Wother]
input.y:17.9-27: previous declaration
fix-it:"input.y":{18:9-18:28}:""
input.y:19.1-19: warning: duplicate directive: '%fixed-output-files' [-Wother]
input.y:17.9-27: previous declaration
fix-it:"input.y":{19:1-19:20}:""
input.y:17.9-27: warning: deprecated directive: '%fixed-output_files', use '%output "y.tab.c"' [-Wdeprecated]
fix-it:"input.y":{17:2-17:21}:"%output \"y.tab.c\""
input.y:18.9-27: warning: deprecated directive: '%fixed_output-files', use '%output "y.tab.c"' [-Wdeprecated]
fix-it:"input.y":{18:9-18:28}:"%output \"y.tab.c\""
input.y:19.1-19: warning: deprecated directive: '%fixed-output-files', use '%output "y.tab.c"' [-Wdeprecated]
fix-it:"input.y":{19:1-19:20}:"%output \"y.tab.c\""
input.y:20.1-19: warning: deprecated directive: '%name-prefix= "foo"', use '%define api.prefix {foo}' [-Wdeprecated]
fix-it:"input.y":{20:1-20:20}:"%define api.prefix {foo}"
input.y:21.1-16: warning: deprecated directive: '%no-default_prec', use '%no-default-prec' [-Wdeprecated]
@@ -2596,8 +2594,9 @@ AT_CHECK([sed -e '1,8d' input.y], [],
%define parse.error verbose
%expect-rr 0
%file-prefix "foo"
%fixed-output-files
@&t@
%output "y.tab.c"
%output "y.tab.c"
%output "y.tab.c"
%define api.prefix {foo}
%no-default-prec
%no-default-prec
@@ -2674,7 +2673,6 @@ AT_DATA_GRAMMAR([[input.y]],
%file-prefix "foo"
%file-prefix
"bar"
%fixed-output-files
%no-default-prec
%no-lines
%output "foo"