mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-08-17 22:55:15 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
659376b590 | ||
|
|
0343acbe89 | ||
|
|
5d9ccd5a87 | ||
|
|
ad9b8a069f | ||
|
|
ec3375ab4e | ||
|
|
12c8e427c7 | ||
|
|
9f8f3d2e77 |
+1
-1
@@ -1 +1 @@
|
|||||||
3.7.90
|
3.8
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
GNU Bison NEWS
|
GNU Bison NEWS
|
||||||
|
|
||||||
* Noteworthy changes in release 3.7.91 (2021-09-02) [beta]
|
* Noteworthy changes in release 3.8.1 (2021-09-11) [stable]
|
||||||
|
|
||||||
Portability issues in the test suite and in C++ skeletons.
|
The generation of prototypes for yylex and yyerror in Yacc mode is
|
||||||
|
breaking existing grammar files. To avoid breaking too many grammars, the
|
||||||
|
prototypes are now generated when `-y/--yacc` is used *and* the
|
||||||
|
`POSIXLY_CORRECT` environment variable is defined.
|
||||||
|
|
||||||
* Noteworthy changes in release 3.7.90 (2021-08-13) [beta]
|
Avoid using `-y`/`--yacc` simply to comply with Yacc's file name
|
||||||
|
conventions, rather, use `-o y.tab.c`. Autoconf's AC_PROG_YACC macro uses
|
||||||
|
`-y`. Avoid it if possible, for instance by using gnulib's gl_PROG_BISON.
|
||||||
|
|
||||||
|
* Noteworthy changes in release 3.8 (2021-09-07) [stable]
|
||||||
|
|
||||||
** Backward incompatible changes
|
** Backward incompatible changes
|
||||||
|
|
||||||
@@ -4707,7 +4714,7 @@ LocalWords: autocompletion bistromathic submessages Cayuela lexcalc hoc
|
|||||||
LocalWords: yytoken YYUNDEF YYerror basename Automake's UTF ifdef ffile
|
LocalWords: yytoken YYUNDEF YYerror basename Automake's UTF ifdef ffile
|
||||||
LocalWords: gotos readline Imbimbo Wcounterexamples Wcex Nonunifying rcex
|
LocalWords: gotos readline Imbimbo Wcounterexamples Wcex Nonunifying rcex
|
||||||
LocalWords: Vais xsltproc YYNOMEM YYLOCATION signedness YYBISON MITRE's
|
LocalWords: Vais xsltproc YYNOMEM YYLOCATION signedness YYBISON MITRE's
|
||||||
LocalWords: libreadline YYMALLOC YYFREE MSVC redefinitions
|
LocalWords: libreadline YYMALLOC YYFREE MSVC redefinitions POSIXLY
|
||||||
|
|
||||||
Local Variables:
|
Local Variables:
|
||||||
ispell-dictionary: "american"
|
ispell-dictionary: "american"
|
||||||
|
|||||||
+1
-1
@@ -45,7 +45,7 @@ gnulib_modules='
|
|||||||
realloc-posix
|
realloc-posix
|
||||||
relocatable-prog relocatable-script
|
relocatable-prog relocatable-script
|
||||||
rename
|
rename
|
||||||
spawn-pipe stdbool stpcpy stpncpy strdup-posix strerror strverscmp
|
spawn-pipe stdbool stpcpy stpncpy strdup-posix strerror strtod strverscmp
|
||||||
sys_ioctl
|
sys_ioctl
|
||||||
termios
|
termios
|
||||||
timevar
|
timevar
|
||||||
|
|||||||
@@ -1110,6 +1110,7 @@ b4_percent_define_if_define([token_ctor], [api.token.constructor])
|
|||||||
b4_percent_define_if_define([locations]) # Whether locations are tracked.
|
b4_percent_define_if_define([locations]) # Whether locations are tracked.
|
||||||
b4_percent_define_if_define([parse.assert])
|
b4_percent_define_if_define([parse.assert])
|
||||||
b4_percent_define_if_define([parse.trace])
|
b4_percent_define_if_define([parse.trace])
|
||||||
|
b4_percent_define_if_define([posix])
|
||||||
|
|
||||||
|
|
||||||
# b4_bison_locations_if([IF-TRUE])
|
# b4_bison_locations_if([IF-TRUE])
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ m4_define([b4_declare_yyparse],
|
|||||||
# Comply with POSIX Yacc.
|
# Comply with POSIX Yacc.
|
||||||
# <https://austingroupbugs.net/view.php?id=1388#c5220>
|
# <https://austingroupbugs.net/view.php?id=1388#c5220>
|
||||||
m4_define([b4_declare_yyerror_and_yylex],
|
m4_define([b4_declare_yyerror_and_yylex],
|
||||||
[b4_yacc_if([[#if !defined ]b4_prefix[error && !defined ]b4_api_PREFIX[ERROR_IS_DECLARED
|
[b4_posix_if([[#if !defined ]b4_prefix[error && !defined ]b4_api_PREFIX[ERROR_IS_DECLARED
|
||||||
]b4_function_declare([b4_prefix[error]], void, b4_yyerror_formals)[
|
]b4_function_declare([b4_prefix[error]], void, b4_yyerror_formals)[
|
||||||
#endif
|
#endif
|
||||||
#if !defined ]b4_prefix[lex && !defined ]b4_api_PREFIX[LEX_IS_DECLARED
|
#if !defined ]b4_prefix[lex && !defined ]b4_api_PREFIX[LEX_IS_DECLARED
|
||||||
|
|||||||
+4
-1
@@ -11877,7 +11877,10 @@ Generate different diagnostics (it implies @option{-Wyacc}).
|
|||||||
Generate @code{#define} statements in addition to an @code{enum} to
|
Generate @code{#define} statements in addition to an @code{enum} to
|
||||||
associate token codes with token kind names.
|
associate token codes with token kind names.
|
||||||
@item
|
@item
|
||||||
Generate prototypes for @code{yyerror} and @code{yylex} (since Bison 3.8):
|
If the @code{POSIXLY_CORRECT} environment variable is defined, generate
|
||||||
|
prototypes for @code{yyerror} and @code{yylex}@footnote{See
|
||||||
|
@url{https://austingroupbugs.net/view.php?id=1388#c5220}.} (since Bison
|
||||||
|
3.8):
|
||||||
@example
|
@example
|
||||||
int yylex (void);
|
int yylex (void);
|
||||||
void yyerror (const char *);
|
void yyerror (const char *);
|
||||||
|
|||||||
@@ -391,6 +391,7 @@
|
|||||||
/stripslash.c
|
/stripslash.c
|
||||||
/strndup.c
|
/strndup.c
|
||||||
/strnlen.c
|
/strnlen.c
|
||||||
|
/strtod.c
|
||||||
/strverscmp.c
|
/strverscmp.c
|
||||||
/sys
|
/sys
|
||||||
/sys_ioctl.in.h
|
/sys_ioctl.in.h
|
||||||
|
|||||||
@@ -216,6 +216,7 @@
|
|||||||
/strings_h.m4
|
/strings_h.m4
|
||||||
/strndup.m4
|
/strndup.m4
|
||||||
/strnlen.m4
|
/strnlen.m4
|
||||||
|
/strtod.m4
|
||||||
/strverscmp.m4
|
/strverscmp.m4
|
||||||
/sys_ioctl_h.m4
|
/sys_ioctl_h.m4
|
||||||
/sys_resource_h.m4
|
/sys_resource_h.m4
|
||||||
|
|||||||
@@ -57,12 +57,12 @@
|
|||||||
|
|
||||||
/** The time limit before printing an assurance message to the user to
|
/** The time limit before printing an assurance message to the user to
|
||||||
* indicate that the search is still running. */
|
* indicate that the search is still running. */
|
||||||
#define ASSURANCE_LIMIT 2.0f
|
#define ASSURANCE_LIMIT 2.0
|
||||||
|
|
||||||
/* The time limit before giving up looking for unifying counterexample. */
|
/* The time limit before giving up looking for unifying counterexample. */
|
||||||
static float time_limit = 5.0f;
|
static double time_limit = 5.0;
|
||||||
|
|
||||||
#define CUMULATIVE_TIME_LIMIT 120.0f
|
#define CUMULATIVE_TIME_LIMIT 120.0
|
||||||
|
|
||||||
// This is the fastest way to get the tail node from the gl_list API.
|
// This is the fastest way to get the tail node from the gl_list API.
|
||||||
static gl_list_node_t
|
static gl_list_node_t
|
||||||
@@ -1164,7 +1164,7 @@ unifying_example (state_item_number itm1,
|
|||||||
}
|
}
|
||||||
if (TIME_LIMIT_ENFORCED)
|
if (TIME_LIMIT_ENFORCED)
|
||||||
{
|
{
|
||||||
float time_passed = difftime (time (NULL), start);
|
double time_passed = difftime (time (NULL), start);
|
||||||
if (!assurance_printed && time_passed > ASSURANCE_LIMIT
|
if (!assurance_printed && time_passed > ASSURANCE_LIMIT
|
||||||
&& stage3result)
|
&& stage3result)
|
||||||
{
|
{
|
||||||
@@ -1218,7 +1218,7 @@ counterexample_init (void)
|
|||||||
if (cp)
|
if (cp)
|
||||||
{
|
{
|
||||||
char *end = NULL;
|
char *end = NULL;
|
||||||
float v = strtof (cp, &end);
|
double v = strtod (cp, &end);
|
||||||
if (*end == '\0' && errno == 0)
|
if (*end == '\0' && errno == 0)
|
||||||
time_limit = v;
|
time_limit = v;
|
||||||
}
|
}
|
||||||
|
|||||||
+14
-3
@@ -71,6 +71,18 @@ struct bison_language const *language = &valid_languages[0];
|
|||||||
|
|
||||||
typedef int* (xargmatch_fn) (const char *context, const char *arg);
|
typedef int* (xargmatch_fn) (const char *context, const char *arg);
|
||||||
|
|
||||||
|
void
|
||||||
|
set_yacc (location loc)
|
||||||
|
{
|
||||||
|
yacc_loc = loc;
|
||||||
|
if (getenv ("POSIXLY_CORRECT"))
|
||||||
|
muscle_percent_define_insert ("posix",
|
||||||
|
loc,
|
||||||
|
muscle_keyword, "",
|
||||||
|
MUSCLE_PERCENT_DEFINE_D);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Decode an option's key.
|
/** Decode an option's key.
|
||||||
*
|
*
|
||||||
* \param opt option being decoded.
|
* \param opt option being decoded.
|
||||||
@@ -631,8 +643,7 @@ static struct option const long_options[] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Build a location for the current command line argument. */
|
/* Build a location for the current command line argument. */
|
||||||
static
|
static location
|
||||||
location
|
|
||||||
command_line_location (void)
|
command_line_location (void)
|
||||||
{
|
{
|
||||||
location res;
|
location res;
|
||||||
@@ -835,7 +846,7 @@ getargs (int argc, char *argv[])
|
|||||||
|
|
||||||
case 'y':
|
case 'y':
|
||||||
warning_argmatch ("yacc", 0, 0);
|
warning_argmatch ("yacc", 0, 0);
|
||||||
yacc_loc = loc;
|
set_yacc (loc);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COLOR_OPTION:
|
case COLOR_OPTION:
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ void getargs (int argc, char *argv[]);
|
|||||||
/* Used by parse-gram.y. */
|
/* Used by parse-gram.y. */
|
||||||
void language_argmatch (char const *arg, int prio, location loc);
|
void language_argmatch (char const *arg, int prio, location loc);
|
||||||
void skeleton_arg (const char *arg, int prio, location loc);
|
void skeleton_arg (const char *arg, int prio, location loc);
|
||||||
|
void set_yacc (location loc);
|
||||||
|
|
||||||
/** In the string \c s, replace all characters \c from by \c to. */
|
/** In the string \c s, replace all characters \c from by \c to. */
|
||||||
void tr (char *s, char from, char to);
|
void tr (char *s, char from, char to);
|
||||||
|
|||||||
+4
-4
@@ -1,4 +1,4 @@
|
|||||||
/* A Bison parser, made by GNU Bison 3.7.5.297-b46a. */
|
/* A Bison parser, made by GNU Bison 3.8. */
|
||||||
|
|
||||||
/* Bison implementation for Yacc-like parsers in C
|
/* Bison implementation for Yacc-like parsers in C
|
||||||
|
|
||||||
@@ -46,10 +46,10 @@
|
|||||||
USER NAME SPACE" below. */
|
USER NAME SPACE" below. */
|
||||||
|
|
||||||
/* Identify Bison output, and Bison version. */
|
/* Identify Bison output, and Bison version. */
|
||||||
#define YYBISON 30705
|
#define YYBISON 30800
|
||||||
|
|
||||||
/* Bison version string. */
|
/* Bison version string. */
|
||||||
#define YYBISON_VERSION "3.7.5.297-b46a"
|
#define YYBISON_VERSION "3.8"
|
||||||
|
|
||||||
/* Skeleton name. */
|
/* Skeleton name. */
|
||||||
#define YYSKELETON_NAME "yacc.c"
|
#define YYSKELETON_NAME "yacc.c"
|
||||||
@@ -3129,7 +3129,7 @@ handle_yacc (location const *loc)
|
|||||||
const char *directive = "%yacc";
|
const char *directive = "%yacc";
|
||||||
bison_directive (loc, directive);
|
bison_directive (loc, directive);
|
||||||
if (location_empty (yacc_loc))
|
if (location_empty (yacc_loc))
|
||||||
yacc_loc = *loc;
|
set_yacc (*loc);
|
||||||
else
|
else
|
||||||
duplicate_directive (directive, yacc_loc, *loc);
|
duplicate_directive (directive, yacc_loc, *loc);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -1,4 +1,4 @@
|
|||||||
/* A Bison parser, made by GNU Bison 3.7.5.297-b46a. */
|
/* A Bison parser, made by GNU Bison 3.8. */
|
||||||
|
|
||||||
/* Bison interface for Yacc-like parsers in C
|
/* Bison interface for Yacc-like parsers in C
|
||||||
|
|
||||||
@@ -215,6 +215,7 @@ struct GRAM_LTYPE
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int gram_parse (void);
|
int gram_parse (void);
|
||||||
|
|
||||||
/* "%code provides" blocks. */
|
/* "%code provides" blocks. */
|
||||||
|
|||||||
+1
-1
@@ -1112,7 +1112,7 @@ handle_yacc (location const *loc)
|
|||||||
const char *directive = "%yacc";
|
const char *directive = "%yacc";
|
||||||
bison_directive (loc, directive);
|
bison_directive (loc, directive);
|
||||||
if (location_empty (yacc_loc))
|
if (location_empty (yacc_loc))
|
||||||
yacc_loc = *loc;
|
set_yacc (*loc);
|
||||||
else
|
else
|
||||||
duplicate_directive (directive, yacc_loc, *loc);
|
duplicate_directive (directive, yacc_loc, *loc);
|
||||||
}
|
}
|
||||||
|
|||||||
+13
-1
@@ -268,7 +268,7 @@ read_integer (]AT_YYLEX_FORMALS[)
|
|||||||
|
|
||||||
|
|
||||||
m4_define([_AT_DATA_CALC_Y(c)],
|
m4_define([_AT_DATA_CALC_Y(c)],
|
||||||
[AT_DATA_GRAMMAR([calc.y],
|
[AT_DATA_GRAMMAR([calc.y.tmp],
|
||||||
[[/* Infix notation calculator--calc */
|
[[/* Infix notation calculator--calc */
|
||||||
]$4[
|
]$4[
|
||||||
%code requires
|
%code requires
|
||||||
@@ -493,6 +493,18 @@ location_print (FILE *o, Span s)
|
|||||||
[AT_CALC_YYLEX
|
[AT_CALC_YYLEX
|
||||||
AT_CALC_MAIN])])
|
AT_CALC_MAIN])])
|
||||||
|
|
||||||
|
# Remove the generated prototypes.
|
||||||
|
AT_CHECK(
|
||||||
|
[AT_YACC_IF([[
|
||||||
|
if "$POSIXLY_CORRECT_IS_EXPORTED"; then
|
||||||
|
sed -e '/\/\* !POSIX \*\//d' calc.y.tmp >calc.y
|
||||||
|
else
|
||||||
|
mv calc.y.tmp calc.y
|
||||||
|
fi
|
||||||
|
]],
|
||||||
|
[[mv calc.y.tmp calc.y]])
|
||||||
|
])
|
||||||
|
|
||||||
AT_HEADER_IF([AT_DATA_SOURCE([[calc-lex.]AT_LANG_EXT],
|
AT_HEADER_IF([AT_DATA_SOURCE([[calc-lex.]AT_LANG_EXT],
|
||||||
[[#include "calc.]AT_LANG_HDR["
|
[[#include "calc.]AT_LANG_HDR["
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -687,8 +687,8 @@ m4_define([AT_YYERROR_DECLARE_EXTERN(c)],
|
|||||||
m4_define([AT_YYERROR_DECLARE(c)],
|
m4_define([AT_YYERROR_DECLARE(c)],
|
||||||
[[#include <stdio.h>
|
[[#include <stdio.h>
|
||||||
]AT_LOCATION_PRINT_DECLARE[
|
]AT_LOCATION_PRINT_DECLARE[
|
||||||
]AT_YACC_IF([], [[static ]AT_YYERROR_DECLARE_EXTERN])])
|
/* !POSIX */ static ]AT_YYERROR_DECLARE_EXTERN[]dnl
|
||||||
|
])
|
||||||
|
|
||||||
# "%define parse.error custom" uses a different format, easy to check.
|
# "%define parse.error custom" uses a different format, easy to check.
|
||||||
# The "verbose" one can be computed from it (see _AT_CHECK_CALC_ERROR).
|
# The "verbose" one can be computed from it (see _AT_CHECK_CALC_ERROR).
|
||||||
@@ -733,7 +733,7 @@ yyreport_syntax_error (const yypcontext_t *ctx]AT_PARAM_IF([, AT_PARSE_PARAMS])[
|
|||||||
]])[
|
]])[
|
||||||
|
|
||||||
/* A C error reporting function. */
|
/* A C error reporting function. */
|
||||||
]AT_YACC_IF([], [static])[
|
/* !POSIX */ static
|
||||||
]AT_YYERROR_PROTOTYPE[
|
]AT_YYERROR_PROTOTYPE[
|
||||||
{]m4_bpatsubst(m4_defn([AT_PARSE_PARAMS]),
|
{]m4_bpatsubst(m4_defn([AT_PARSE_PARAMS]),
|
||||||
[[^,]+[^A-Za-z_0-9]\([A-Za-z_][A-Za-z_0-9]*\),* *], [
|
[[^,]+[^A-Za-z_0-9]\([A-Za-z_][A-Za-z_0-9]*\),* *], [
|
||||||
|
|||||||
Reference in New Issue
Block a user