mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 15:23:02 +00:00
* src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
macros. Use them to declare the variables which are global or local to `yyparse'.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
2000-11-17 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
|
||||||
|
macros.
|
||||||
|
Use them to declare the variables which are global or local to
|
||||||
|
`yyparse'.
|
||||||
|
|
||||||
2000-11-17 Akim Demaille <akim@epita.fr>
|
2000-11-17 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* acconfig.h: Remove, no longer used.
|
* acconfig.h: Remove, no longer used.
|
||||||
|
|||||||
66
src/bison.s1
66
src/bison.s1
@@ -3,7 +3,7 @@
|
|||||||
/* This file comes from bison-@bison_version@. */
|
/* This file comes from bison-@bison_version@. */
|
||||||
|
|
||||||
/* Skeleton output parser for bison,
|
/* Skeleton output parser for bison,
|
||||||
Copyright 1984, 1989, 1990 Free Software Foundation, Inc.
|
Copyright 1984, 1989, 1990, 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -138,25 +138,6 @@ while (0)
|
|||||||
#endif /* !YYPURE */
|
#endif /* !YYPURE */
|
||||||
|
|
||||||
|
|
||||||
/* If nonreentrant, generate the variables here. */
|
|
||||||
|
|
||||||
#if !YYPURE
|
|
||||||
/* The lookahead symbol. */
|
|
||||||
int yychar;
|
|
||||||
|
|
||||||
/* The semantic value of the lookahead symbol. */
|
|
||||||
YYSTYPE yylval;
|
|
||||||
|
|
||||||
# if YYLSP_NEEDED
|
|
||||||
/* Location data for the lookahead symbol. */
|
|
||||||
YYLTYPE yylloc;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
/* Number of parse errors so far. */
|
|
||||||
int yynerrs;
|
|
||||||
#endif /* !YYPURE */
|
|
||||||
|
|
||||||
|
|
||||||
/* Enable debugging if requested. */
|
/* Enable debugging if requested. */
|
||||||
#if YYDEBUG
|
#if YYDEBUG
|
||||||
# define YYDPRINTF(Args) \
|
# define YYDPRINTF(Args) \
|
||||||
@@ -262,10 +243,46 @@ int yyparse (void);
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
|
||||||
|
variables are global, or local to YYPARSE. */
|
||||||
|
|
||||||
|
#define _YY_DECL_VARIABLES \
|
||||||
|
/* The lookahead symbol. */ \
|
||||||
|
int yychar; \
|
||||||
|
\
|
||||||
|
/* The semantic value of the lookahead symbol. */ \
|
||||||
|
YYSTYPE yylval; \
|
||||||
|
\
|
||||||
|
/* Number of parse errors so far. */ \
|
||||||
|
int yynerrs;
|
||||||
|
|
||||||
|
#if YYLSP_NEEDED
|
||||||
|
# define YY_DECL_VARIABLES \
|
||||||
|
_YY_DECL_VARIABLES \
|
||||||
|
\
|
||||||
|
/* Location data for the lookahead symbol. */ \
|
||||||
|
YYLTYPE yylloc;
|
||||||
|
#else
|
||||||
|
# define YY_DECL_VARIABLES \
|
||||||
|
_YY_DECL_VARIABLES
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* If nonreentrant, generate the variables here. */
|
||||||
|
|
||||||
|
#if !YYPURE
|
||||||
|
YY_DECL_VARIABLES
|
||||||
|
#endif /* !YYPURE */
|
||||||
|
|
||||||
int
|
int
|
||||||
yyparse (YYPARSE_PARAM_ARG)
|
yyparse (YYPARSE_PARAM_ARG)
|
||||||
YYPARSE_PARAM_DECL
|
YYPARSE_PARAM_DECL
|
||||||
{
|
{
|
||||||
|
/* If reentrant, generate the variables here. */
|
||||||
|
#if YYPURE
|
||||||
|
YY_DECL_VARIABLES
|
||||||
|
#endif /* !YYPURE */
|
||||||
|
|
||||||
register int yystate;
|
register int yystate;
|
||||||
register int yyn;
|
register int yyn;
|
||||||
/* Number of tokens to shift before error messages enabled. */
|
/* Number of tokens to shift before error messages enabled. */
|
||||||
@@ -307,15 +324,6 @@ yyparse (YYPARSE_PARAM_ARG)
|
|||||||
int yystacksize = YYINITDEPTH;
|
int yystacksize = YYINITDEPTH;
|
||||||
int yyfree_stacks = 0;
|
int yyfree_stacks = 0;
|
||||||
|
|
||||||
#if YYPURE
|
|
||||||
int yychar;
|
|
||||||
YYSTYPE yylval;
|
|
||||||
int yynerrs;
|
|
||||||
# if YYLSP_NEEDED
|
|
||||||
YYLTYPE yylloc;
|
|
||||||
# endif
|
|
||||||
#endif /* !YYPURE */
|
|
||||||
|
|
||||||
|
|
||||||
/* The variables used to return semantic value and location from the
|
/* The variables used to return semantic value and location from the
|
||||||
action routines. */
|
action routines. */
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
/* This file comes from bison-@bison_version@. */
|
/* This file comes from bison-@bison_version@. */
|
||||||
|
|
||||||
/* Skeleton output parser for bison,
|
/* Skeleton output parser for bison,
|
||||||
Copyright 1984, 1989, 1990 Free Software Foundation, Inc.
|
Copyright 1984, 1989, 1990, 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -138,25 +138,6 @@ while (0)
|
|||||||
#endif /* !YYPURE */
|
#endif /* !YYPURE */
|
||||||
|
|
||||||
|
|
||||||
/* If nonreentrant, generate the variables here. */
|
|
||||||
|
|
||||||
#if !YYPURE
|
|
||||||
/* The lookahead symbol. */
|
|
||||||
int yychar;
|
|
||||||
|
|
||||||
/* The semantic value of the lookahead symbol. */
|
|
||||||
YYSTYPE yylval;
|
|
||||||
|
|
||||||
# if YYLSP_NEEDED
|
|
||||||
/* Location data for the lookahead symbol. */
|
|
||||||
YYLTYPE yylloc;
|
|
||||||
# endif
|
|
||||||
|
|
||||||
/* Number of parse errors so far. */
|
|
||||||
int yynerrs;
|
|
||||||
#endif /* !YYPURE */
|
|
||||||
|
|
||||||
|
|
||||||
/* Enable debugging if requested. */
|
/* Enable debugging if requested. */
|
||||||
#if YYDEBUG
|
#if YYDEBUG
|
||||||
# define YYDPRINTF(Args) \
|
# define YYDPRINTF(Args) \
|
||||||
@@ -262,10 +243,46 @@ int yyparse (void);
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
|
||||||
|
variables are global, or local to YYPARSE. */
|
||||||
|
|
||||||
|
#define _YY_DECL_VARIABLES \
|
||||||
|
/* The lookahead symbol. */ \
|
||||||
|
int yychar; \
|
||||||
|
\
|
||||||
|
/* The semantic value of the lookahead symbol. */ \
|
||||||
|
YYSTYPE yylval; \
|
||||||
|
\
|
||||||
|
/* Number of parse errors so far. */ \
|
||||||
|
int yynerrs;
|
||||||
|
|
||||||
|
#if YYLSP_NEEDED
|
||||||
|
# define YY_DECL_VARIABLES \
|
||||||
|
_YY_DECL_VARIABLES \
|
||||||
|
\
|
||||||
|
/* Location data for the lookahead symbol. */ \
|
||||||
|
YYLTYPE yylloc;
|
||||||
|
#else
|
||||||
|
# define YY_DECL_VARIABLES \
|
||||||
|
_YY_DECL_VARIABLES
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* If nonreentrant, generate the variables here. */
|
||||||
|
|
||||||
|
#if !YYPURE
|
||||||
|
YY_DECL_VARIABLES
|
||||||
|
#endif /* !YYPURE */
|
||||||
|
|
||||||
int
|
int
|
||||||
yyparse (YYPARSE_PARAM_ARG)
|
yyparse (YYPARSE_PARAM_ARG)
|
||||||
YYPARSE_PARAM_DECL
|
YYPARSE_PARAM_DECL
|
||||||
{
|
{
|
||||||
|
/* If reentrant, generate the variables here. */
|
||||||
|
#if YYPURE
|
||||||
|
YY_DECL_VARIABLES
|
||||||
|
#endif /* !YYPURE */
|
||||||
|
|
||||||
register int yystate;
|
register int yystate;
|
||||||
register int yyn;
|
register int yyn;
|
||||||
/* Number of tokens to shift before error messages enabled. */
|
/* Number of tokens to shift before error messages enabled. */
|
||||||
@@ -307,15 +324,6 @@ yyparse (YYPARSE_PARAM_ARG)
|
|||||||
int yystacksize = YYINITDEPTH;
|
int yystacksize = YYINITDEPTH;
|
||||||
int yyfree_stacks = 0;
|
int yyfree_stacks = 0;
|
||||||
|
|
||||||
#if YYPURE
|
|
||||||
int yychar;
|
|
||||||
YYSTYPE yylval;
|
|
||||||
int yynerrs;
|
|
||||||
# if YYLSP_NEEDED
|
|
||||||
YYLTYPE yylloc;
|
|
||||||
# endif
|
|
||||||
#endif /* !YYPURE */
|
|
||||||
|
|
||||||
|
|
||||||
/* The variables used to return semantic value and location from the
|
/* The variables used to return semantic value and location from the
|
||||||
action routines. */
|
action routines. */
|
||||||
|
|||||||
Reference in New Issue
Block a user