mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-20 17:53:02 +00:00
* data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
(yyuserMerge): Provide a default case if b4_mergers is empty. * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE. * tests/glr-regression.at (Improper handling of embedded actions and dollar(-N) in GLR parsers): YYSTYPE is char *, not char const *, so that strcpy ($$, ...) works.
This commit is contained in:
@@ -1,6 +1,12 @@
|
|||||||
2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
|
2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
Fix problems reported by twlevo@xs4all.nl.
|
Fix problems reported by twlevo@xs4all.nl.
|
||||||
|
* data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
|
||||||
|
(yyuserMerge): Provide a default case if b4_mergers is empty.
|
||||||
|
* tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
|
||||||
|
* tests/glr-regression.at
|
||||||
|
(Improper handling of embedded actions and dollar(-N) in GLR parsers):
|
||||||
|
YYSTYPE is char *, not char const *, so that strcpy ($$, ...) works.
|
||||||
* tests/glr-regression.at (Improper merging of GLR delayed action
|
* tests/glr-regression.at (Improper merging of GLR delayed action
|
||||||
sets): Declare yylex before using it.
|
sets): Declare yylex before using it.
|
||||||
* tests/Makefile.am (maintainer-check-g++): Fix a stray
|
* tests/Makefile.am (maintainer-check-g++): Fix a stray
|
||||||
|
|||||||
16
data/glr.c
16
data/glr.c
@@ -556,13 +556,14 @@ int yydebug;
|
|||||||
properly redirected to new data. */
|
properly redirected to new data. */
|
||||||
#define YYHEADROOM 2
|
#define YYHEADROOM 2
|
||||||
|
|
||||||
#if (! defined (YYSTACKEXPANDABLE) \
|
#ifndef YYSTACKEXPANDABLE
|
||||||
&& (! defined (__cplusplus) \
|
# if (! defined (__cplusplus) \
|
||||||
|| (]b4_location_if([[defined (YYLTYPE_IS_TRIVIAL) && YYLTYPE_IS_TRIVIAL \
|
|| (]b4_location_if([[defined (YYLTYPE_IS_TRIVIAL) && YYLTYPE_IS_TRIVIAL \
|
||||||
&& ]])[defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
|
&& ]])[defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))
|
||||||
#define YYSTACKEXPANDABLE 1
|
# define YYSTACKEXPANDABLE 1
|
||||||
#else
|
# else
|
||||||
#define YYSTACKEXPANDABLE 0
|
# define YYSTACKEXPANDABLE 0
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if YYERROR_VERBOSE
|
#if YYERROR_VERBOSE
|
||||||
@@ -812,6 +813,7 @@ yyuserMerge (int yyn, YYSTYPE* yy0, YYSTYPE* yy1)
|
|||||||
switch (yyn)
|
switch (yyn)
|
||||||
{
|
{
|
||||||
b4_mergers
|
b4_mergers
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ $1
|
|||||||
]m4_bmatch([$2], [stmtMerge],
|
]m4_bmatch([$2], [stmtMerge],
|
||||||
[ static YYSTYPE stmtMerge (YYSTYPE x0, YYSTYPE x1);])[
|
[ static YYSTYPE stmtMerge (YYSTYPE x0, YYSTYPE x1);])[
|
||||||
#define YYINITDEPTH 10
|
#define YYINITDEPTH 10
|
||||||
|
#define YYSTACKEXPANDABLE 1
|
||||||
static char *format (char const *, ...);
|
static char *format (char const *, ...);
|
||||||
struct YYLTYPE;
|
struct YYLTYPE;
|
||||||
#if YYPURE
|
#if YYPURE
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ AT_DATA_GRAMMAR([glr-regr2a.y],
|
|||||||
/* Reported by S. Eken */
|
/* Reported by S. Eken */
|
||||||
|
|
||||||
%{
|
%{
|
||||||
#define YYSTYPE char const *
|
#define YYSTYPE char *
|
||||||
#define yyfalse 0
|
#define yyfalse 0
|
||||||
#define yytrue 1
|
#define yytrue 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user