This commit is contained in:
Akim Demaille
2019-10-26 10:38:53 +02:00
parent 3be912e4af
commit a5fc4e3b44
2 changed files with 10 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
/* A Bison parser, made by GNU Bison 3.4.2.191-54c5d. */ /* A Bison parser, made by GNU Bison 3.4.2.213-aa24. */
/* Bison implementation for Yacc-like parsers in C /* Bison implementation for Yacc-like parsers in C
@@ -48,7 +48,7 @@
#define YYBISON 1 #define YYBISON 1
/* Bison version. */ /* Bison version. */
#define YYBISON_VERSION "3.4.2.191-54c5d" #define YYBISON_VERSION "3.4.2.213-aa24"
/* Skeleton name. */ /* Skeleton name. */
#define YYSKELETON_NAME "yacc.c" #define YYSKELETON_NAME "yacc.c"
@@ -1821,8 +1821,8 @@ YYLTYPE yylloc = yyloc_default;
{ {
/* Bison's grammar can initial empty locations, hence a default /* Bison's grammar can initial empty locations, hence a default
location is needed. */ location is needed. */
boundary_set (&yylloc.start, current_file, 1, 1, 1); boundary_set (&yylloc.start, grammar_file, 1, 1, 1);
boundary_set (&yylloc.end, current_file, 1, 1, 1); boundary_set (&yylloc.end, grammar_file, 1, 1, 1);
} }
@@ -1840,7 +1840,7 @@ yynewstate:
/*--------------------------------------------------------------------. /*--------------------------------------------------------------------.
| yynewstate -- set current state (the top of the stack) to yystate. | | yysetstate -- set current state (the top of the stack) to yystate. |
`--------------------------------------------------------------------*/ `--------------------------------------------------------------------*/
yysetstate: yysetstate:
YYDPRINTF ((stderr, "Entering state %d\n", yystate)); YYDPRINTF ((stderr, "Entering state %d\n", yystate));
@@ -3042,16 +3042,16 @@ handle_skeleton (location const *loc, char const *skel)
char const *skeleton_user = skel; char const *skeleton_user = skel;
if (strchr (skeleton_user, '/')) if (strchr (skeleton_user, '/'))
{ {
size_t dir_length = strlen (current_file); size_t dir_length = strlen (grammar_file);
while (dir_length && current_file[dir_length - 1] != '/') while (dir_length && grammar_file[dir_length - 1] != '/')
--dir_length; --dir_length;
while (dir_length && current_file[dir_length - 1] == '/') while (dir_length && grammar_file[dir_length - 1] == '/')
--dir_length; --dir_length;
char *skeleton_build = char *skeleton_build =
xmalloc (dir_length + 1 + strlen (skeleton_user) + 1); xmalloc (dir_length + 1 + strlen (skeleton_user) + 1);
if (dir_length > 0) if (dir_length > 0)
{ {
memcpy (skeleton_build, current_file, dir_length); memcpy (skeleton_build, grammar_file, dir_length);
skeleton_build[dir_length++] = '/'; skeleton_build[dir_length++] = '/';
} }
strcpy (skeleton_build + dir_length, skeleton_user); strcpy (skeleton_build + dir_length, skeleton_user);

View File

@@ -1,4 +1,4 @@
/* A Bison parser, made by GNU Bison 3.4.2.191-54c5d. */ /* A Bison parser, made by GNU Bison 3.4.2.213-aa24. */
/* Bison interface for Yacc-like parsers in C /* Bison interface for Yacc-like parsers in C