From: Marc Autret Date: Sun, 20 Jan 2002 15:46:19 +0000 (+0000) Subject: * tests/output.at: New test. X-Git-Tag: before-m4-back-end~16 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/5e5d541531bda9507136d3c578315a2882d67412?hp=52d1aeee3d484fa748b22416a0876fdeed2c4597 * tests/output.at: New test. * src/files.c (compute_base_names): Don't map extensions when the YACC flag is set, use defaults. Reported by Evgeny Stambulchik. --- diff --git a/ChangeLog b/ChangeLog index 1e67823f..246bd4fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-01-20 Marc Autret + + * tests/output.at: New test. + * src/files.c (compute_base_names): Don't map extensions when + the YACC flag is set, use defaults. + Reported by Evgeny Stambulchik. + 2002-01-20 Marc Autret * src/system.h: Need to define __attribute__ away for non-GCC diff --git a/THANKS b/THANKS index a88bd6a1..c592a8f6 100644 --- a/THANKS +++ b/THANKS @@ -10,6 +10,7 @@ Daniel Hagerty hag@gnu.org David J. MacKenzie djm@gnu.org Dick Streefland dick.streefland@altium.nl Enrico Scholz enrico.scholz@informatik.tu-chemnitz.de +Evgeny Stambulchik fnevgeny@plasma-gate.weizmann.ac.il Fabrice Bauzac noon@cote-dazur.com H. Merijn Brand h.m.brand@hccnet.nl Hans Aberg haberg@matematik.su.se diff --git a/src/files.c b/src/files.c index 11de06e7..a27a2772 100644 --- a/src/files.c +++ b/src/files.c @@ -403,7 +403,7 @@ compute_base_names (void) /* Computes the extensions from the grammar file name. */ filename_split (infile, &base, &tab, &ext); - if (ext) + if (ext && !yacc_flag) compute_exts_from_gf (ext); } } @@ -425,7 +425,7 @@ compute_output_file_names (void) src_extension = ".c"; if (!header_extension) header_extension = ".h"; - + /* It the defines filename if not given, we create it. */ if (!spec_defines_file) spec_defines_file = stringappend (full_base_name, header_extension); diff --git a/tests/output.at b/tests/output.at index ee50d6a1..4332372d 100644 --- a/tests/output.at +++ b/tests/output.at @@ -53,6 +53,9 @@ AT_CHECK_OUTPUT([foo.y], [%defines %verbose], [], AT_CHECK_OUTPUT([foo.y], [%defines %verbose %yacc],[], [y.output y.tab.c y.tab.h]) +AT_CHECK_OUTPUT([foo.yy], [%defines %verbose %yacc],[], + [y.output y.tab.c y.tab.h]) + # Exercise %output and %file-prefix AT_CHECK_OUTPUT([foo.y], [%file-prefix="bar" %defines %verbose], [], [bar.output bar.tab.c bar.tab.h])