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:
Paul Eggert
2002-04-24 05:55:48 +00:00
parent 5c0a0514da
commit cf44a9aea7

View File

@@ -89,6 +89,13 @@ m4_divert(0)dnl
It was written by Richard Stallman by simplifying the hairy parser
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. */
#define YYBISON 1
@@ -151,14 +158,7 @@ typedef struct yyltype
/* Line __line__ of __file__. */
#line __oline__ "__ofile__"
/* 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. */
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
#if ! defined (yyoverflow) || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
@@ -187,6 +187,12 @@ typedef struct yyltype
# define YYSTACK_ALLOC malloc
# define YYSTACK_FREE free
# 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. */
union yyalloc
@@ -205,12 +211,12 @@ union yyalloc
N elements. */
# if YYLSP_NEEDED
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAX)
((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAX)
# else
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAX)
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAX)
# endif
/* Copy COUNT objects from FROM to TO. The source and destination do
@@ -247,7 +253,7 @@ union yyalloc
} \
while (0)
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
#endif
/* Tokens. */
b4_token_defines(b4_tokens)
@@ -469,8 +475,8 @@ do { \
if (yydebug) \
YYFPRINTF Args; \
} while (0)
/* Nonzero means print parse trace. Since this is uninitialized, it
does not stop multiple parsers from coexisting. */
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
@@ -738,6 +744,9 @@ yyparse (YYPARSE_PARAM_ARG)
yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
goto yyoverflowlab;
# else
/* Extend the stack our own way. */
if (yystacksize >= YYMAXDEPTH)
goto yyoverflowlab;
@@ -753,13 +762,14 @@ yyparse (YYPARSE_PARAM_ARG)
goto yyoverflowlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
# if YYLSP_NEEDED
# if YYLSP_NEEDED
YYSTACK_RELOCATE (yyls);
# endif
# undef YYSTACK_RELOCATE
# endif
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
@@ -1058,7 +1068,7 @@ yyerrlab1:
/* Else will try to reuse lookahead token after shifting the error
token. */
yyerrstatus = 3; /* Each real token shifted decrements this. */
yyerrstatus = 3; /* Each real token shifted decrements this. */
goto yyerrhandle;