mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 14:53:03 +00:00
* src/scan-skel.l: Output the base name parts of the parser and
header file names. * tests/output.at (AT_CHECK_OUTPUT): Support subdirectorioes, and additional checks. Use this to exercise C++ outputs in subdirs. Reported by Oleg Smolsky.
This commit is contained in:
@@ -53,6 +53,10 @@
|
||||
char const *file_name = yytext + sizeof "@output " - 1;
|
||||
yytext[yyleng - 1] = '\0';
|
||||
|
||||
/* Decode special file names. They include the directory part,
|
||||
contrary to their "free" occurrences, used for issuing #includes,
|
||||
which must not include the directory part. */
|
||||
|
||||
if (*file_name == '@')
|
||||
{
|
||||
if (strcmp (file_name, "@output_header_name@") == 0)
|
||||
@@ -80,8 +84,8 @@
|
||||
"@oline@" fprintf (yyout, "%d", lineno + 1);
|
||||
"@ofile@" QPUTS (outname);
|
||||
"@dir_prefix@" QPUTS (dir_prefix);
|
||||
"@output_parser_name@" QPUTS (parser_file_name);
|
||||
"@output_header_name@" QPUTS (spec_defines_file);
|
||||
"@output_parser_name@" QPUTS (base_name (parser_file_name));
|
||||
"@output_header_name@" QPUTS (base_name (spec_defines_file));
|
||||
|
||||
/* This pattern must not match more than the previous @ patterns. */
|
||||
@[^{}@\n]* fatal ("invalid @ in skeleton: %s", yytext);
|
||||
|
||||
@@ -62,6 +62,9 @@ typedef size_t uintptr_t;
|
||||
|
||||
#include <stpcpy.h>
|
||||
|
||||
/* From lib/basename.c. */
|
||||
char *base_name (char const *name);
|
||||
|
||||
|
||||
/*-----------------.
|
||||
| GCC extensions. |
|
||||
|
||||
Reference in New Issue
Block a user