ylwrap: various fixes
authorAkim Demaille <akim@lrde.epita.fr>
Wed, 19 Dec 2012 13:51:58 +0000 (14:51 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 21 Dec 2012 18:32:31 +0000 (19:32 +0100)
commit27eb4254ec9acdd435bbd76a54201955a1b0fa78
tree70ac4046705e8514c66cbc19ef2fe6848570279e
parentb9951d654abb76c5419f1e2b453f1ca06fdb331b
ylwrap: various fixes

Rename properly header guards in generated header files, instead of
leaving Y_TAB_H.

Convert header guards in implementation files.  Because ylwrap failed
to rename properly #include in the implementation files, current
versions of Bison (e.g., 2.7) duplicate the generated header file in
the implementation file.  The header guard then protects the
implementation file from duplicate definitions from the header file.

Generate header guards with a single '_' for series of non alphabetic
characters, instead of several.  This is what Bison does.

Makes the test t/yacc-d-basic.sh pass again.

* lib/ylwrap (guard): Properly honor $1 to rename properly the
header guards.
Keep a single _ instead of several.
(rename_sed): Rename as...
(sed_fix_filenames): this.
Suggested by Stefano Lattarini.
(sed_fix_header_guards): New.
Use it.
NEWS
lib/ylwrap