ylwrap: rename header inclusion in generated parsers
commitbe2bb639757a723d44809678d0c21cd429a321cd
authorAkim Demaille <akim@lrde.epita.fr>
Fri, 13 Jul 2012 12:32:22 +0000 (13 14:32 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 14 Jul 2012 10:10:22 +0000 (14 12:10 +0200)
tree547b9152638a074a3fe2871a28febfedbda8e373
parent1a871ca02705c1225a75bb024119efbf56ab19c4
ylwrap: rename header inclusion in generated parsers

Some types of Bison parsers, such as the GLR ones, generate a header
file that they include.  ylwrap, which renames the generated files,
does not rename the included file.  Fix this shortcoming, reported
for instance here:
<http://lists.gnu.org/archive/html/bug-bison/2012-06/msg00033.html>.
Fixes t/yacc-bison-skeleton.sh, see Automake bug#7648 and PR automake/491.

* lib/ylwrap (quote_for_sed): Accept arguments.
Catch more special characters.
(rename_sed): New.
Improve the previous renaming sed commands using quote_for_sed.
Suggested by Stefano Lattarini here:
<http://lists.gnu.org/archive/html/automake-patches/2012-07/msg00095.html>.
(main loop): Use rename_sed to rename the dependencies to other files.
* t/yacc-d-basic.sh: Exercise this case, even if bison/yacc was
not issuing such an include.
* t/list-of-tests.mk (XFAIL_TESTS): Adjust.
lib/ylwrap
t/list-of-tests.mk
t/yacc-d-basic.sh