mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-27 13:13:04 +00:00
Remove unnecessary commentary and white space differences from
1_29-branch. Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE). (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY, YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial constructors or destructors. (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
This commit is contained in:
@@ -89,6 +89,13 @@ m4_divert(0)dnl
|
|||||||
It was written by Richard Stallman by simplifying the hairy parser
|
It was written by Richard Stallman by simplifying the hairy parser
|
||||||
used when %semantic_parser is specified. */
|
used when %semantic_parser is specified. */
|
||||||
|
|
||||||
|
/* All symbols defined below should begin with yy or YY, to avoid
|
||||||
|
infringing on user name space. This should be done even for local
|
||||||
|
variables, as they might otherwise be expanded by user macros.
|
||||||
|
There are some unavoidable exceptions within include files to
|
||||||
|
define necessary library symbols; they are noted "INFRINGES ON
|
||||||
|
USER NAME SPACE" below. */
|
||||||
|
|
||||||
/* Identify Bison output. */
|
/* Identify Bison output. */
|
||||||
#define YYBISON 1
|
#define YYBISON 1
|
||||||
|
|
||||||
@@ -151,14 +158,7 @@ typedef struct yyltype
|
|||||||
/* Line __line__ of __file__. */
|
/* Line __line__ of __file__. */
|
||||||
#line __oline__ "__ofile__"
|
#line __oline__ "__ofile__"
|
||||||
|
|
||||||
/* All symbols defined below should begin with yy or YY, to avoid
|
#if ! defined (yyoverflow) || YYERROR_VERBOSE
|
||||||
infringing on user name space. This should be done even for local
|
|
||||||
variables, as they might otherwise be expanded by user macros.
|
|
||||||
There are some unavoidable exceptions within include files to
|
|
||||||
define necessary library symbols; they are noted "INFRINGES ON
|
|
||||||
USER NAME SPACE" below. */
|
|
||||||
|
|
||||||
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
|
|
||||||
|
|
||||||
/* The parser invokes alloca or malloc; define the necessary symbols. */
|
/* The parser invokes alloca or malloc; define the necessary symbols. */
|
||||||
|
|
||||||
@@ -187,6 +187,12 @@ typedef struct yyltype
|
|||||||
# define YYSTACK_ALLOC malloc
|
# define YYSTACK_ALLOC malloc
|
||||||
# define YYSTACK_FREE free
|
# define YYSTACK_FREE free
|
||||||
# endif
|
# endif
|
||||||
|
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
|
||||||
|
|
||||||
|
|
||||||
|
#if (! defined (yyoverflow) \
|
||||||
|
&& (! defined (__cplusplus) \
|
||||||
|
|| (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
|
||||||
|
|
||||||
/* A type that is properly aligned for any stack member. */
|
/* A type that is properly aligned for any stack member. */
|
||||||
union yyalloc
|
union yyalloc
|
||||||
@@ -205,12 +211,12 @@ union yyalloc
|
|||||||
N elements. */
|
N elements. */
|
||||||
# if YYLSP_NEEDED
|
# if YYLSP_NEEDED
|
||||||
# define YYSTACK_BYTES(N) \
|
# define YYSTACK_BYTES(N) \
|
||||||
((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
|
((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
|
||||||
+ 2 * YYSTACK_GAP_MAX)
|
+ 2 * YYSTACK_GAP_MAX)
|
||||||
# else
|
# else
|
||||||
# define YYSTACK_BYTES(N) \
|
# define YYSTACK_BYTES(N) \
|
||||||
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
|
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
|
||||||
+ YYSTACK_GAP_MAX)
|
+ YYSTACK_GAP_MAX)
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/* Copy COUNT objects from FROM to TO. The source and destination do
|
/* Copy COUNT objects from FROM to TO. The source and destination do
|
||||||
@@ -247,7 +253,7 @@ union yyalloc
|
|||||||
} \
|
} \
|
||||||
while (0)
|
while (0)
|
||||||
|
|
||||||
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
|
#endif
|
||||||
|
|
||||||
/* Tokens. */
|
/* Tokens. */
|
||||||
b4_token_defines(b4_tokens)
|
b4_token_defines(b4_tokens)
|
||||||
@@ -469,8 +475,8 @@ do { \
|
|||||||
if (yydebug) \
|
if (yydebug) \
|
||||||
YYFPRINTF Args; \
|
YYFPRINTF Args; \
|
||||||
} while (0)
|
} while (0)
|
||||||
/* Nonzero means print parse trace. Since this is uninitialized, it
|
/* Nonzero means print parse trace. It is left uninitialized so that
|
||||||
does not stop multiple parsers from coexisting. */
|
multiple parsers can coexist. */
|
||||||
int yydebug;
|
int yydebug;
|
||||||
#else /* !YYDEBUG */
|
#else /* !YYDEBUG */
|
||||||
# define YYDPRINTF(Args)
|
# define YYDPRINTF(Args)
|
||||||
@@ -738,6 +744,9 @@ yyparse (YYPARSE_PARAM_ARG)
|
|||||||
yyvs = yyvs1;
|
yyvs = yyvs1;
|
||||||
}
|
}
|
||||||
#else /* no yyoverflow */
|
#else /* no yyoverflow */
|
||||||
|
# ifndef YYSTACK_RELOCATE
|
||||||
|
goto yyoverflowlab;
|
||||||
|
# else
|
||||||
/* Extend the stack our own way. */
|
/* Extend the stack our own way. */
|
||||||
if (yystacksize >= YYMAXDEPTH)
|
if (yystacksize >= YYMAXDEPTH)
|
||||||
goto yyoverflowlab;
|
goto yyoverflowlab;
|
||||||
@@ -753,13 +762,14 @@ yyparse (YYPARSE_PARAM_ARG)
|
|||||||
goto yyoverflowlab;
|
goto yyoverflowlab;
|
||||||
YYSTACK_RELOCATE (yyss);
|
YYSTACK_RELOCATE (yyss);
|
||||||
YYSTACK_RELOCATE (yyvs);
|
YYSTACK_RELOCATE (yyvs);
|
||||||
# if YYLSP_NEEDED
|
# if YYLSP_NEEDED
|
||||||
YYSTACK_RELOCATE (yyls);
|
YYSTACK_RELOCATE (yyls);
|
||||||
# endif
|
# endif
|
||||||
# undef YYSTACK_RELOCATE
|
# undef YYSTACK_RELOCATE
|
||||||
if (yyss1 != yyssa)
|
if (yyss1 != yyssa)
|
||||||
YYSTACK_FREE (yyss1);
|
YYSTACK_FREE (yyss1);
|
||||||
}
|
}
|
||||||
|
# endif
|
||||||
#endif /* no yyoverflow */
|
#endif /* no yyoverflow */
|
||||||
|
|
||||||
yyssp = yyss + yysize - 1;
|
yyssp = yyss + yysize - 1;
|
||||||
@@ -1058,7 +1068,7 @@ yyerrlab1:
|
|||||||
/* Else will try to reuse lookahead token after shifting the error
|
/* Else will try to reuse lookahead token after shifting the error
|
||||||
token. */
|
token. */
|
||||||
|
|
||||||
yyerrstatus = 3; /* Each real token shifted decrements this. */
|
yyerrstatus = 3; /* Each real token shifted decrements this. */
|
||||||
|
|
||||||
goto yyerrhandle;
|
goto yyerrhandle;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user