mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 05:43:03 +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:
16
data/glr.c
16
data/glr.c
@@ -556,13 +556,14 @@ int yydebug;
|
||||
properly redirected to new data. */
|
||||
#define YYHEADROOM 2
|
||||
|
||||
#if (! defined (YYSTACKEXPANDABLE) \
|
||||
&& (! defined (__cplusplus) \
|
||||
|| (]b4_location_if([[defined (YYLTYPE_IS_TRIVIAL) && YYLTYPE_IS_TRIVIAL \
|
||||
&& ]])[defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
|
||||
#define YYSTACKEXPANDABLE 1
|
||||
#else
|
||||
#define YYSTACKEXPANDABLE 0
|
||||
#ifndef YYSTACKEXPANDABLE
|
||||
# if (! defined (__cplusplus) \
|
||||
|| (]b4_location_if([[defined (YYLTYPE_IS_TRIVIAL) && YYLTYPE_IS_TRIVIAL \
|
||||
&& ]])[defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))
|
||||
# define YYSTACKEXPANDABLE 1
|
||||
# else
|
||||
# define YYSTACKEXPANDABLE 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if YYERROR_VERBOSE
|
||||
@@ -812,6 +813,7 @@ yyuserMerge (int yyn, YYSTYPE* yy0, YYSTYPE* yy1)
|
||||
switch (yyn)
|
||||
{
|
||||
b4_mergers
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user