mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
global: remove unnecessary horizontal tabs.
This change was made by applying emacs' untabify function to nearly all files in Bison's repository. Required tabs in make files, ChangeLog, regexps, and test code were manually skipped. Other notable exceptions and changes are listed below. * bootstrap: Skip because we sync this with gnulib. * data/m4sugar/foreach.m4 * data/m4sugar/m4sugar.m4: Skip because we sync these with Autoconf. * djgpp: Skip because I don't know how to test djgpp properly, and this code appears to be unmaintained anyway. * README-hacking (Hacking): Specify that tabs should be avoided where not required.
This commit is contained in:
@@ -304,8 +304,8 @@ m4_define([b4_parser_tables_define],
|
||||
m4_define([b4_flag_if],
|
||||
[m4_case(b4_$1_flag,
|
||||
[0], [$3],
|
||||
[1], [$2],
|
||||
[m4_fatal([invalid $1 value: ]$1)])])
|
||||
[1], [$2],
|
||||
[m4_fatal([invalid $1 value: ]$1)])])
|
||||
|
||||
|
||||
# b4_define_flag_if(FLAG)
|
||||
@@ -330,10 +330,10 @@ m4_define([b4_$3_if],
|
||||
# b4_FLAG_if(IF-TRUE, IF-FALSE)
|
||||
# -----------------------------
|
||||
# Expand IF-TRUE, if FLAG is true, IF-FALSE otherwise.
|
||||
b4_define_flag_if([defines]) # Whether headers are requested.
|
||||
b4_define_flag_if([glr]) # Whether a GLR parser is requested.
|
||||
b4_define_flag_if([nondeterministic]) # Whether conflicts should be handled.
|
||||
b4_define_flag_if([yacc]) # Whether POSIX Yacc is emulated.
|
||||
b4_define_flag_if([defines]) # Whether headers are requested.
|
||||
b4_define_flag_if([glr]) # Whether a GLR parser is requested.
|
||||
b4_define_flag_if([nondeterministic]) # Whether conflicts should be handled.
|
||||
b4_define_flag_if([yacc]) # Whether POSIX Yacc is emulated.
|
||||
|
||||
|
||||
## --------- ##
|
||||
@@ -435,7 +435,7 @@ m4_define([b4_type_action_],
|
||||
b4_dollar_dollar([b4_symbol([$1], [number])],
|
||||
[b4_symbol([$1], [tag])],
|
||||
[b4_symbol([$1], [type])]);
|
||||
break;
|
||||
break;
|
||||
|
||||
])])
|
||||
|
||||
@@ -629,8 +629,8 @@ m4_define([b4_percent_define_get_syncline],
|
||||
# b4_percent_define_ifdef([[foo]], [[it's defined]], [[it's undefined]])
|
||||
m4_define([b4_percent_define_ifdef],
|
||||
[m4_ifdef([b4_percent_define(]$1[)],
|
||||
[b4_percent_define_use([$1])$2],
|
||||
[$3])])
|
||||
[b4_percent_define_use([$1])$2],
|
||||
[$3])])
|
||||
|
||||
|
||||
## --------- ##
|
||||
@@ -765,7 +765,7 @@ m4_popdef([b4_macro_name])])
|
||||
m4_define([b4_percent_code_ifdef],
|
||||
[m4_ifdef([b4_percent_code(]$1[)],
|
||||
[m4_ifval([$1], [m4_define([b4_percent_code_bison_qualifiers(]$1[)])])$2],
|
||||
[$3])])
|
||||
[$3])])
|
||||
|
||||
|
||||
## ------------------ ##
|
||||
|
||||
12
data/c++.m4
12
data/c++.m4
@@ -405,24 +405,24 @@ m4_define([b4_parse_param_decl_1],
|
||||
# Extra initialisations of the constructor.
|
||||
m4_define([b4_parse_param_cons],
|
||||
[m4_ifset([b4_parse_param],
|
||||
[
|
||||
[
|
||||
b4_cc_constructor_calls(b4_parse_param)])])
|
||||
m4_define([b4_cc_constructor_calls],
|
||||
[m4_map_sep([b4_cc_constructor_call], [,
|
||||
[m4_map_sep([b4_cc_constructor_call], [,
|
||||
], [$@])])
|
||||
m4_define([b4_cc_constructor_call],
|
||||
[$2 ($2_yyarg)])
|
||||
[$2 ($2_yyarg)])
|
||||
|
||||
# b4_parse_param_vars
|
||||
# -------------------
|
||||
# Extra instance variables.
|
||||
m4_define([b4_parse_param_vars],
|
||||
[m4_ifset([b4_parse_param],
|
||||
[
|
||||
[
|
||||
/* User arguments. */
|
||||
b4_cc_var_decls(b4_parse_param)])])
|
||||
m4_define([b4_cc_var_decls],
|
||||
[m4_map_sep([b4_cc_var_decl], [
|
||||
[m4_map_sep([b4_cc_var_decl], [
|
||||
], [$@])])
|
||||
m4_define([b4_cc_var_decl],
|
||||
[ $1;])
|
||||
[ $1;])
|
||||
|
||||
26
data/c.m4
26
data/c.m4
@@ -146,7 +146,7 @@ m4_define([b4_int_type],
|
||||
|
||||
m4_eval([0 <= $1]), [1], [unsigned int],
|
||||
|
||||
[int])])
|
||||
[int])])
|
||||
|
||||
|
||||
# b4_int_type_for(NAME)
|
||||
@@ -235,7 +235,7 @@ m4_define([b4_token_enums],
|
||||
enum yytokentype {
|
||||
m4_map_sep([ b4_token_enum], [,
|
||||
],
|
||||
[$@])
|
||||
[$@])
|
||||
};
|
||||
#endif
|
||||
])])
|
||||
@@ -314,7 +314,7 @@ $1 (b4_c_ansi_formals(m4_shift2($@)))[]dnl
|
||||
m4_define([b4_c_ansi_formals],
|
||||
[m4_if([$#], [0], [void],
|
||||
[$#$1], [1], [void],
|
||||
[m4_map_sep([b4_c_ansi_formal], [, ], [$@])])])
|
||||
[m4_map_sep([b4_c_ansi_formal], [, ], [$@])])])
|
||||
|
||||
m4_define([b4_c_ansi_formal],
|
||||
[$1])
|
||||
@@ -335,9 +335,9 @@ m4_define([b4_c_knr_formal_name],
|
||||
# Output the K&R argument declarations.
|
||||
m4_define([b4_c_knr_formal_decls],
|
||||
[m4_map_sep([b4_c_knr_formal_decl],
|
||||
[
|
||||
[
|
||||
],
|
||||
[$@])])
|
||||
[$@])])
|
||||
|
||||
m4_define([b4_c_knr_formal_decl],
|
||||
[ $1;])
|
||||
@@ -457,7 +457,7 @@ b4_parse_param_use[]dnl
|
||||
{
|
||||
]b4_symbol_foreach([b4_symbol_destructor])dnl
|
||||
[ default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}]dnl
|
||||
])
|
||||
@@ -477,9 +477,9 @@ m4_define_default([b4_yy_symbol_print_generate],
|
||||
/*ARGSUSED*/
|
||||
]$1([yy_symbol_value_print],
|
||||
[static void],
|
||||
[[FILE *yyoutput], [yyoutput]],
|
||||
[[int yytype], [yytype]],
|
||||
[[YYSTYPE const * const yyvaluep], [yyvaluep]][]dnl
|
||||
[[FILE *yyoutput], [yyoutput]],
|
||||
[[int yytype], [yytype]],
|
||||
[[YYSTYPE const * const yyvaluep], [yyvaluep]][]dnl
|
||||
b4_locations_if([, [[YYLTYPE const * const yylocationp], [yylocationp]]])[]dnl
|
||||
m4_ifset([b4_parse_param], [, b4_parse_param]))[
|
||||
{
|
||||
@@ -498,7 +498,7 @@ b4_parse_param_use[]dnl
|
||||
{
|
||||
]b4_symbol_foreach([b4_symbol_printer])dnl
|
||||
[ default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -509,9 +509,9 @@ b4_parse_param_use[]dnl
|
||||
|
||||
]$1([yy_symbol_print],
|
||||
[static void],
|
||||
[[FILE *yyoutput], [yyoutput]],
|
||||
[[int yytype], [yytype]],
|
||||
[[YYSTYPE const * const yyvaluep], [yyvaluep]][]dnl
|
||||
[[FILE *yyoutput], [yyoutput]],
|
||||
[[int yytype], [yytype]],
|
||||
[[YYSTYPE const * const yyvaluep], [yyvaluep]][]dnl
|
||||
b4_locations_if([, [[YYLTYPE const * const yylocationp], [yylocationp]]])[]dnl
|
||||
m4_ifset([b4_parse_param], [, b4_parse_param]))[
|
||||
{
|
||||
|
||||
1348
data/glr.c
1348
data/glr.c
File diff suppressed because it is too large
Load Diff
54
data/glr.cc
54
data/glr.cc
@@ -77,9 +77,9 @@ m4_define([b4_yy_symbol_print_generate],
|
||||
[[FILE *], []],
|
||||
[[int yytype], [yytype]],
|
||||
[[const b4_namespace_ref::b4_parser_class_name::semantic_type *yyvaluep],
|
||||
[yyvaluep]],
|
||||
[yyvaluep]],
|
||||
[[const b4_namespace_ref::b4_parser_class_name::location_type *yylocationp],
|
||||
[yylocationp]],
|
||||
[yylocationp]],
|
||||
b4_parse_param)[
|
||||
{
|
||||
]b4_parse_param_use[]dnl
|
||||
@@ -146,7 +146,7 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
|
||||
|
||||
inline void
|
||||
]b4_parser_class_name[::yy_symbol_value_print_ (int yytype,
|
||||
const semantic_type* yyvaluep, const location_type* yylocationp)
|
||||
const semantic_type* yyvaluep, const location_type* yylocationp)
|
||||
{
|
||||
/* Pacify ``unused variable'' warnings. */
|
||||
YYUSE (yyvaluep);
|
||||
@@ -155,18 +155,18 @@ m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
|
||||
{
|
||||
]b4_symbol_foreach([b4_symbol_printer])dnl
|
||||
[ default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
]b4_parser_class_name[::yy_symbol_print_ (int yytype,
|
||||
const semantic_type* yyvaluep, const location_type* yylocationp)
|
||||
const semantic_type* yyvaluep, const location_type* yylocationp)
|
||||
{
|
||||
*yycdebug_ << (yytype < YYNTOKENS ? "token" : "nterm")
|
||||
<< ' ' << yytname[yytype] << " ("
|
||||
<< *yylocationp << ": ";
|
||||
<< ' ' << yytname[yytype] << " ("
|
||||
<< *yylocationp << ": ";
|
||||
yy_symbol_value_print_ (yytype, yyvaluep, yylocationp);
|
||||
*yycdebug_ << ')';
|
||||
}
|
||||
@@ -205,10 +205,10 @@ b4_namespace_close[
|
||||
# Let glr.c believe that the user arguments include the parser itself.
|
||||
m4_ifset([b4_parse_param],
|
||||
[m4_pushdef([b4_parse_param],
|
||||
m4_dquote([[[b4_namespace_ref::b4_parser_class_name& yyparser], [[yyparser]]],]
|
||||
m4_dquote([[[b4_namespace_ref::b4_parser_class_name& yyparser], [[yyparser]]],]
|
||||
m4_defn([b4_parse_param])))],
|
||||
[m4_pushdef([b4_parse_param],
|
||||
[[[[b4_namespace_ref::b4_parser_class_name& yyparser], [[yyparser]]]]])
|
||||
[[[[b4_namespace_ref::b4_parser_class_name& yyparser], [[yyparser]]]]])
|
||||
])
|
||||
m4_include(b4_pkgdatadir/[glr.c])
|
||||
m4_popdef([b4_parse_param])
|
||||
@@ -244,17 +244,17 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
||||
the previous symbol: RHS[0] (always defined). */
|
||||
|
||||
#ifndef YYLLOC_DEFAULT
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
if (N) \
|
||||
{ \
|
||||
(Current).begin = YYRHSLOC (Rhs, 1).begin; \
|
||||
(Current).end = YYRHSLOC (Rhs, N).end; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
(Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
|
||||
} \
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
if (N) \
|
||||
{ \
|
||||
(Current).begin = YYRHSLOC (Rhs, 1).begin; \
|
||||
(Current).end = YYRHSLOC (Rhs, N).end; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
(Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end; \
|
||||
} \
|
||||
while (/*CONSTCOND*/ 0)
|
||||
#endif
|
||||
|
||||
@@ -298,15 +298,15 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
||||
/// \param yyvaluep Its semantic value.
|
||||
/// \param yylocationp Its location.
|
||||
virtual void yy_symbol_value_print_ (int yytype,
|
||||
const semantic_type* yyvaluep,
|
||||
const location_type* yylocationp);
|
||||
const semantic_type* yyvaluep,
|
||||
const location_type* yylocationp);
|
||||
/// \brief Report a symbol on the debug stream.
|
||||
/// \param yytype The token type.
|
||||
/// \param yyvaluep Its semantic value.
|
||||
/// \param yylocationp Its location.
|
||||
virtual void yy_symbol_print_ (int yytype,
|
||||
const semantic_type* yyvaluep,
|
||||
const location_type* yylocationp);
|
||||
const semantic_type* yyvaluep,
|
||||
const location_type* yylocationp);
|
||||
private:
|
||||
/* Debugging. */
|
||||
std::ostream* yycdebug_;
|
||||
@@ -318,9 +318,9 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++],
|
||||
/// \param yyvaluep Its semantic value.
|
||||
/// \param yylocationp Its location.
|
||||
inline void yydestruct_ (const char* yymsg,
|
||||
int yytype,
|
||||
semantic_type* yyvaluep,
|
||||
location_type* yylocationp);
|
||||
int yytype,
|
||||
semantic_type* yyvaluep,
|
||||
location_type* yylocationp);
|
||||
|
||||
]b4_parse_param_vars[
|
||||
};
|
||||
|
||||
@@ -426,14 +426,14 @@ b4_percent_code_get[]dnl
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
# define YY_REDUCE_PRINT(Rule) \
|
||||
do { \
|
||||
# define YY_REDUCE_PRINT(Rule) \
|
||||
do { \
|
||||
if (yydebug_) \
|
||||
yy_reduce_print_ (Rule); \
|
||||
yy_reduce_print_ (Rule); \
|
||||
} while (false)
|
||||
|
||||
# define YY_STACK_PRINT() \
|
||||
do { \
|
||||
# define YY_STACK_PRINT() \
|
||||
do { \
|
||||
if (yydebug_) \
|
||||
yystack_print_ (); \
|
||||
} while (false)
|
||||
@@ -575,7 +575,7 @@ b4_percent_code_get[]dnl
|
||||
{
|
||||
]b4_symbol_foreach([b4_symbol_printer])dnl
|
||||
[ default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
yyo << ')';
|
||||
}
|
||||
@@ -739,7 +739,7 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
[ yyla = b4_c_function_call([yylex], [symbol_type],
|
||||
m4_ifdef([b4_lex_param], b4_lex_param));],
|
||||
[ yyla.type = yytranslate_ (b4_c_function_call([yylex], [int],
|
||||
[[YYSTYPE*], [&yyla.value]][]dnl
|
||||
[[YYSTYPE*], [&yyla.value]][]dnl
|
||||
b4_locations_if([, [[location*], [&yyla.location]]])dnl
|
||||
m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
|
||||
yyempty = false;
|
||||
@@ -756,10 +756,10 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
|
||||
yyn = yytable_[yyn];
|
||||
if (yyn <= 0)
|
||||
{
|
||||
if (yy_table_value_is_error_ (yyn))
|
||||
goto yyerrlab;
|
||||
yyn = -yyn;
|
||||
goto yyreduce;
|
||||
if (yy_table_value_is_error_ (yyn))
|
||||
goto yyerrlab;
|
||||
yyn = -yyn;
|
||||
goto yyreduce;
|
||||
}
|
||||
|
||||
/* Discard the token being shifted. */
|
||||
@@ -818,7 +818,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
|
||||
switch (yyn)
|
||||
{
|
||||
]b4_user_actions[
|
||||
default:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -859,8 +859,8 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
|
||||
/* If not already recovering from an error, report this error. */
|
||||
if (!yyerrstatus_)
|
||||
{
|
||||
++yynerrs_;
|
||||
error (]b4_args(b4_locations_if([yyla.location]),
|
||||
++yynerrs_;
|
||||
error (]b4_args(b4_locations_if([yyla.location]),
|
||||
[[yysyntax_error_ (yystack_[0].state,
|
||||
yyempty ? yyempty_ : yyla.type)]])[);
|
||||
}
|
||||
@@ -869,7 +869,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
|
||||
yyerror_range[1].location = yyla.location;]])[
|
||||
if (yyerrstatus_ == 3)
|
||||
{
|
||||
/* If just tried and failed to reuse lookahead token after an
|
||||
/* If just tried and failed to reuse lookahead token after an
|
||||
error, discard it. */
|
||||
|
||||
/* Return failure if at end of input. */
|
||||
@@ -879,7 +879,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
|
||||
{
|
||||
yy_destroy_ ("Error: discarding", yyla);
|
||||
yyempty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Else will try to reuse lookahead token after shifting the error
|
||||
@@ -910,7 +910,7 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
|
||||
| yyerrlab1 -- common code for both syntax error and YYERROR. |
|
||||
`-------------------------------------------------------------*/
|
||||
yyerrlab1:
|
||||
yyerrstatus_ = 3; /* Each real token shifted decrements this. */
|
||||
yyerrstatus_ = 3; /* Each real token shifted decrements this. */
|
||||
{
|
||||
stack_symbol_type error_token;
|
||||
for (;;)
|
||||
@@ -965,8 +965,8 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
|
||||
yypop_ (yylen);
|
||||
while (yystack_.size () != 1)
|
||||
{
|
||||
yy_destroy_ ("Cleanup: popping", yystack_[0]);
|
||||
yypop_ ();
|
||||
yy_destroy_ ("Cleanup: popping", yystack_[0]);
|
||||
yypop_ ();
|
||||
}
|
||||
|
||||
return yyresult;
|
||||
@@ -1098,7 +1098,7 @@ b4_error_verbose_if([state_type yystate, int yytoken],
|
||||
for (stack_type::const_iterator
|
||||
i = yystack_.begin (),
|
||||
i_end = yystack_.end ();
|
||||
i != i_end; ++i)
|
||||
i != i_end; ++i)
|
||||
*yycdebug_ << ' ' << i->state;
|
||||
*yycdebug_ << std::endl;
|
||||
}
|
||||
@@ -1111,7 +1111,7 @@ b4_error_verbose_if([state_type yystate, int yytoken],
|
||||
int yynrhs = yyr2_[yyrule];
|
||||
/* Print the symbols being reduced, and their result. */
|
||||
*yycdebug_ << "Reducing stack by rule " << yyrule - 1
|
||||
<< " (line " << yylno << "):" << std::endl;
|
||||
<< " (line " << yylno << "):" << std::endl;
|
||||
/* The symbols being reduced. */
|
||||
for (int yyi = 0; yyi < yynrhs; yyi++)
|
||||
YY_SYMBOL_PRINT (" $" << yyi + 1 << " =",
|
||||
|
||||
@@ -13,32 +13,32 @@
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
dist_pkgdata_DATA = \
|
||||
data/README \
|
||||
data/bison.m4 \
|
||||
data/c++-skel.m4 \
|
||||
data/c++.m4 \
|
||||
data/c-skel.m4 \
|
||||
data/c.m4 \
|
||||
data/glr.c \
|
||||
data/glr.cc \
|
||||
data/java-skel.m4 \
|
||||
data/java.m4 \
|
||||
data/lalr1.cc \
|
||||
data/lalr1.java \
|
||||
data/location.cc \
|
||||
data/stack.hh \
|
||||
data/variant.hh \
|
||||
dist_pkgdata_DATA = \
|
||||
data/README \
|
||||
data/bison.m4 \
|
||||
data/c++-skel.m4 \
|
||||
data/c++.m4 \
|
||||
data/c-skel.m4 \
|
||||
data/c.m4 \
|
||||
data/glr.c \
|
||||
data/glr.cc \
|
||||
data/java-skel.m4 \
|
||||
data/java.m4 \
|
||||
data/lalr1.cc \
|
||||
data/lalr1.java \
|
||||
data/location.cc \
|
||||
data/stack.hh \
|
||||
data/variant.hh \
|
||||
data/yacc.c
|
||||
|
||||
m4sugardir = $(pkgdatadir)/m4sugar
|
||||
dist_m4sugar_DATA = \
|
||||
data/m4sugar/foreach.m4 \
|
||||
dist_m4sugar_DATA = \
|
||||
data/m4sugar/foreach.m4 \
|
||||
data/m4sugar/m4sugar.m4
|
||||
|
||||
xsltdir = $(pkgdatadir)/xslt
|
||||
dist_xslt_DATA = \
|
||||
data/xslt/bison.xsl \
|
||||
data/xslt/xml2dot.xsl \
|
||||
data/xslt/xml2text.xsl \
|
||||
dist_xslt_DATA = \
|
||||
data/xslt/bison.xsl \
|
||||
data/xslt/xml2dot.xsl \
|
||||
data/xslt/xml2text.xsl \
|
||||
data/xslt/xml2xhtml.xsl
|
||||
|
||||
@@ -279,8 +279,8 @@ b4_copyright([Locations for Bison parsers in C++])[
|
||||
position last = loc.end - 1;
|
||||
ostr << loc.begin;
|
||||
if (last.filename
|
||||
&& (!loc.begin.filename
|
||||
|| *loc.begin.filename != *last.filename))
|
||||
&& (!loc.begin.filename
|
||||
|| *loc.begin.filename != *last.filename))
|
||||
ostr << '-' << last;
|
||||
else if (loc.begin.line != last.line)
|
||||
ostr << '-' << last.line << '.' << last.column;
|
||||
|
||||
@@ -74,7 +74,7 @@ b4_copyright([Stack handling for Bison parsers in C++])[
|
||||
pop (unsigned int n = 1)
|
||||
{
|
||||
for (; n; --n)
|
||||
seq_.pop_front ();
|
||||
seq_.pop_front ();
|
||||
}
|
||||
|
||||
inline
|
||||
|
||||
@@ -124,20 +124,20 @@
|
||||
<xsl:with-param name="dst" select="@state"/>
|
||||
<xsl:with-param name="style">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@symbol = 'error'">
|
||||
<xsl:text>dotted</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="@type = 'shift'">
|
||||
<xsl:text>solid</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>dashed</xsl:text>
|
||||
</xsl:otherwise>
|
||||
<xsl:when test="@symbol = 'error'">
|
||||
<xsl:text>dotted</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="@type = 'shift'">
|
||||
<xsl:text>solid</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>dashed</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="label">
|
||||
<xsl:if test="not(@symbol = 'error')">
|
||||
<xsl:value-of select="@symbol"/>
|
||||
<xsl:value-of select="@symbol"/>
|
||||
</xsl:if>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
|
||||
@@ -253,9 +253,9 @@
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="transition[@type = $type]">
|
||||
<xsl:with-param name="pad">
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="transition[@type = $type]"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="transition[@type = $type]"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
@@ -266,9 +266,9 @@
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="error">
|
||||
<xsl:with-param name="pad">
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="error"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="error"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
@@ -279,9 +279,9 @@
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="reduction">
|
||||
<xsl:with-param name="pad">
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="reduction"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="reduction"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
@@ -290,7 +290,7 @@
|
||||
<xsl:template match="item">
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:param name="prev-rule-number"
|
||||
select="preceding-sibling::item[1]/@rule-number"/>
|
||||
select="preceding-sibling::item[1]/@rule-number"/>
|
||||
<xsl:apply-templates
|
||||
select="key('bison:ruleByNumber', current()/@rule-number)"
|
||||
>
|
||||
@@ -329,14 +329,14 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="$itemset != 'true' and $prev-lhs = lhs[text()]">
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="'|'"/>
|
||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 1"/>
|
||||
<xsl:with-param name="str" select="'|'"/>
|
||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$itemset = 'true' and $prev-lhs = lhs[text()]">
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="'|'"/>
|
||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 1"/>
|
||||
<xsl:with-param name="str" select="'|'"/>
|
||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
@@ -442,7 +442,7 @@
|
||||
<xsl:value-of select="@rule"/>
|
||||
<xsl:text> (</xsl:text>
|
||||
<xsl:value-of
|
||||
select="key('bison:ruleByNumber', current()/@rule)/lhs[text()]"/>
|
||||
select="key('bison:ruleByNumber', current()/@rule)/lhs[text()]"/>
|
||||
<xsl:text>)</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -479,9 +479,9 @@
|
||||
<xsl:variable name="longest">
|
||||
<xsl:for-each select="$node">
|
||||
<xsl:sort data-type="number" select="string-length(@symbol)"
|
||||
order="descending"/>
|
||||
order="descending"/>
|
||||
<xsl:if test="position() = 1">
|
||||
<xsl:value-of select="string-length(@symbol)"/>
|
||||
<xsl:value-of select="string-length(@symbol)"/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
@@ -498,7 +498,7 @@
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="$str"/>
|
||||
</xsl:otherwise>
|
||||
@@ -516,7 +516,7 @@
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$str"/>
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
@@ -31,32 +31,32 @@
|
||||
<xsl:import href="bison.xsl"/>
|
||||
|
||||
<xsl:output method="xml" encoding="UTF-8"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
|
||||
indent="yes"/>
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
|
||||
indent="yes"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
<xsl:value-of select="bison-xml-report/filename"/>
|
||||
<xsl:text> - GNU Bison XML Automaton Report</xsl:text>
|
||||
<xsl:value-of select="bison-xml-report/filename"/>
|
||||
<xsl:text> - GNU Bison XML Automaton Report</xsl:text>
|
||||
</title>
|
||||
<style type="text/css"><![CDATA[
|
||||
body {
|
||||
font-family: "Nimbus Sans L", Arial, sans-serif;
|
||||
font-size: 9pt;
|
||||
font-size: 9pt;
|
||||
}
|
||||
a:link {
|
||||
color: #1f00ff;
|
||||
text-decoration: none;
|
||||
color: #1f00ff;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:visited {
|
||||
color: #1f00ff;
|
||||
text-decoration: none;
|
||||
color: #1f00ff;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover {
|
||||
color: red;
|
||||
color: red;
|
||||
}
|
||||
#menu a {
|
||||
text-decoration: underline;
|
||||
@@ -109,21 +109,21 @@
|
||||
<li>
|
||||
<a href="#reductions">Reductions</a>
|
||||
<ul class="lower-alpha">
|
||||
<li><a href="#nonterminals_useless_in_grammar">Nonterminals useless in grammar</a></li>
|
||||
<li><a href="#terminals_unused_in_grammar">Terminals unused in grammar</a></li>
|
||||
<li><a href="#rules_useless_in_grammar">Rules useless in grammar</a></li>
|
||||
<xsl:if test="grammar/rules/rule[@usefulness='useless-in-parser']">
|
||||
<li><a href="#rules_useless_in_parser">Rules useless in parser due to conflicts</a></li>
|
||||
</xsl:if>
|
||||
<li><a href="#nonterminals_useless_in_grammar">Nonterminals useless in grammar</a></li>
|
||||
<li><a href="#terminals_unused_in_grammar">Terminals unused in grammar</a></li>
|
||||
<li><a href="#rules_useless_in_grammar">Rules useless in grammar</a></li>
|
||||
<xsl:if test="grammar/rules/rule[@usefulness='useless-in-parser']">
|
||||
<li><a href="#rules_useless_in_parser">Rules useless in parser due to conflicts</a></li>
|
||||
</xsl:if>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#conflicts">Conflicts</a></li>
|
||||
<li>
|
||||
<a href="#grammar">Grammar</a>
|
||||
<ul class="lower-alpha">
|
||||
<li><a href="#grammar">Itemset</a></li>
|
||||
<li><a href="#terminals">Terminal symbols</a></li>
|
||||
<li><a href="#nonterminals">Nonterminal symbols</a></li>
|
||||
<li><a href="#grammar">Itemset</a></li>
|
||||
<li><a href="#terminals">Terminal symbols</a></li>
|
||||
<li><a href="#nonterminals">Nonterminal symbols</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#automaton">Automaton</a></li>
|
||||
@@ -154,9 +154,9 @@
|
||||
<xsl:if test="nonterminal[@usefulness='useless-in-grammar']">
|
||||
<p class="pre">
|
||||
<xsl:for-each select="nonterminal[@usefulness='useless-in-grammar']">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:for-each>
|
||||
<xsl:text> </xsl:text>
|
||||
</p>
|
||||
@@ -173,9 +173,9 @@
|
||||
<p class="pre">
|
||||
<xsl:for-each select="terminal[@usefulness='unused-in-grammar']">
|
||||
<xsl:sort select="@symbol-number" data-type="number"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:for-each>
|
||||
<xsl:text> </xsl:text>
|
||||
</p>
|
||||
@@ -381,7 +381,7 @@
|
||||
<h3>
|
||||
<a>
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of select="concat('state_', @number)"/>
|
||||
<xsl:value-of select="concat('state_', @number)"/>
|
||||
</xsl:attribute>
|
||||
</a>
|
||||
<xsl:text>state </xsl:text>
|
||||
@@ -410,9 +410,9 @@
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="transition[@type = $type]">
|
||||
<xsl:with-param name="pad">
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="transition[@type = $type]"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="transition[@type = $type]"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
@@ -423,9 +423,9 @@
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="error">
|
||||
<xsl:with-param name="pad">
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="error"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="error"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
@@ -436,9 +436,9 @@
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:apply-templates select="reduction">
|
||||
<xsl:with-param name="pad">
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="reduction"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="max-width-symbol">
|
||||
<xsl:with-param name="node" select="reduction"/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
@@ -447,7 +447,7 @@
|
||||
<xsl:template match="item">
|
||||
<xsl:param name="pad"/>
|
||||
<xsl:param name="prev-rule-number"
|
||||
select="preceding-sibling::item[1]/@rule-number"/>
|
||||
select="preceding-sibling::item[1]/@rule-number"/>
|
||||
<xsl:apply-templates
|
||||
select="key('bison:ruleByNumber', current()/@rule-number)"
|
||||
>
|
||||
@@ -477,7 +477,7 @@
|
||||
<xsl:if test="$itemset != 'true'">
|
||||
<a>
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of select="concat('rule_', @number)"/>
|
||||
<xsl:value-of select="concat('rule_', @number)"/>
|
||||
</xsl:attribute>
|
||||
</a>
|
||||
</xsl:if>
|
||||
@@ -486,19 +486,19 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="$itemset = 'true'">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#rule_', @number)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="string(@number)"/>
|
||||
<xsl:with-param name="pad" select="number($pad)"/>
|
||||
</xsl:call-template>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#rule_', @number)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="string(@number)"/>
|
||||
<xsl:with-param name="pad" select="number($pad)"/>
|
||||
</xsl:call-template>
|
||||
</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="string(@number)"/>
|
||||
<xsl:with-param name="pad" select="number($pad)"/>
|
||||
<xsl:with-param name="str" select="string(@number)"/>
|
||||
<xsl:with-param name="pad" select="number($pad)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -508,19 +508,19 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="$itemset != 'true' and $prev-lhs = lhs[text()]">
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="'|'"/>
|
||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 2"/>
|
||||
<xsl:with-param name="str" select="'|'"/>
|
||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 2"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:when test="$itemset = 'true' and $prev-lhs = lhs[text()]">
|
||||
<xsl:call-template name="lpad">
|
||||
<xsl:with-param name="str" select="'|'"/>
|
||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 2"/>
|
||||
<xsl:with-param name="str" select="'|'"/>
|
||||
<xsl:with-param name="pad" select="number(string-length(lhs[text()])) + 2"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<span class="i">
|
||||
<xsl:value-of select="lhs"/>
|
||||
<xsl:value-of select="lhs"/>
|
||||
</span>
|
||||
<xsl:text> →</xsl:text>
|
||||
</xsl:otherwise>
|
||||
@@ -589,18 +589,18 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type = 'shift'">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#state_', @state)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="concat('shift, and go to state ', @state)"/>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#state_', @state)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="concat('shift, and go to state ', @state)"/>
|
||||
</a>
|
||||
</xsl:when>
|
||||
<xsl:when test="@type = 'goto'">
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#state_', @state)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="concat('go to state ', @state)"/>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#state_', @state)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="concat('go to state ', @state)"/>
|
||||
</a>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
@@ -637,10 +637,10 @@
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#rule_', @rule)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="concat('reduce using rule ', @rule)"/>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#rule_', @rule)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="concat('reduce using rule ', @rule)"/>
|
||||
</a>
|
||||
<xsl:text> (</xsl:text>
|
||||
<xsl:value-of
|
||||
@@ -687,9 +687,9 @@
|
||||
<xsl:variable name="longest">
|
||||
<xsl:for-each select="$node">
|
||||
<xsl:sort data-type="number" select="string-length(@symbol)"
|
||||
order="descending"/>
|
||||
order="descending"/>
|
||||
<xsl:if test="position() = 1">
|
||||
<xsl:value-of select="string-length(@symbol)"/>
|
||||
<xsl:value-of select="string-length(@symbol)"/>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
@@ -706,7 +706,7 @@
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="$str"/>
|
||||
</xsl:otherwise>
|
||||
@@ -724,7 +724,7 @@
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$str"/>
|
||||
<xsl:call-template name="space">
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
<xsl:with-param name="repeat" select="$diff"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
328
data/yacc.c
328
data/yacc.c
@@ -76,8 +76,8 @@ m4_define([b4_pure_flag],
|
||||
# Expand IF-TRUE, if %pure-parser and %parse-param, IF-FALSE otherwise.
|
||||
m4_define([b4_yacc_pure_if],
|
||||
[b4_pure_if([m4_ifset([b4_parse_param],
|
||||
[$1], [$2])],
|
||||
[$2])])
|
||||
[$1], [$2])],
|
||||
[$2])])
|
||||
|
||||
|
||||
# b4_yyerror_args
|
||||
@@ -117,7 +117,7 @@ m4_define([b4_int_type],
|
||||
|
||||
m4_eval([0 <= $1]), [1], [unsigned int],
|
||||
|
||||
[int])])
|
||||
[int])])
|
||||
|
||||
|
||||
## ----------------- ##
|
||||
@@ -464,7 +464,7 @@ b4_push_if([], [b4_lac_if([], [[
|
||||
# endif
|
||||
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
|
||||
&& ! ((defined YYMALLOC || defined malloc) \
|
||||
&& (defined YYFREE || defined free)))
|
||||
&& (defined YYFREE || defined free)))
|
||||
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
|
||||
# ifndef EXIT_SUCCESS
|
||||
# define EXIT_SUCCESS 0
|
||||
@@ -489,8 +489,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
|
||||
|
||||
#if (! defined yyoverflow \
|
||||
&& (! defined __cplusplus \
|
||||
|| (]b4_locations_if([[defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
|
||||
&& ]])[defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
|
||||
|| (]b4_locations_if([[defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
|
||||
&& ]])[defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
|
||||
|
||||
/* A type that is properly aligned for any stack member. */
|
||||
union yyalloc
|
||||
@@ -520,15 +520,15 @@ union yyalloc
|
||||
elements in the stack, and YYPTR gives the new location of the
|
||||
stack. Advance YYPTR to a properly aligned location for the next
|
||||
stack. */
|
||||
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yynewbytes; \
|
||||
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
|
||||
Stack = &yyptr->Stack_alloc; \
|
||||
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
|
||||
yyptr += yynewbytes / sizeof (*yyptr); \
|
||||
} \
|
||||
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yynewbytes; \
|
||||
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
|
||||
Stack = &yyptr->Stack_alloc; \
|
||||
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
|
||||
yyptr += yynewbytes / sizeof (*yyptr); \
|
||||
} \
|
||||
while (YYID (0))
|
||||
|
||||
#endif
|
||||
@@ -541,13 +541,13 @@ union yyalloc
|
||||
# define YYCOPY(To, From, Count) \
|
||||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||||
# else
|
||||
# define YYCOPY(To, From, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(To)[yyi] = (From)[yyi]; \
|
||||
} \
|
||||
# define YYCOPY(To, From, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(To)[yyi] = (From)[yyi]; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
# endif
|
||||
# endif
|
||||
@@ -572,7 +572,7 @@ union yyalloc
|
||||
#define YYUNDEFTOK ]b4_undef_token_number[
|
||||
#define YYMAXUTOK ]b4_user_token_number_max[
|
||||
|
||||
#define YYTRANSLATE(YYX) \
|
||||
#define YYTRANSLATE(YYX) \
|
||||
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
|
||||
|
||||
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
|
||||
@@ -617,14 +617,14 @@ static const ]b4_int_type_for([b4_toknum])[ yytoknum[] =
|
||||
|
||||
]b4_parser_tables_define[
|
||||
|
||||
#define yyerrok (yyerrstatus = 0)
|
||||
#define yyclearin (yychar = YYEMPTY)
|
||||
#define YYEMPTY (-2)
|
||||
#define YYEOF 0
|
||||
#define yyerrok (yyerrstatus = 0)
|
||||
#define yyclearin (yychar = YYEMPTY)
|
||||
#define YYEMPTY (-2)
|
||||
#define YYEOF 0
|
||||
|
||||
#define YYACCEPT goto yyacceptlab
|
||||
#define YYABORT goto yyabortlab
|
||||
#define YYERROR goto yyerrorlab
|
||||
#define YYACCEPT goto yyacceptlab
|
||||
#define YYABORT goto yyabortlab
|
||||
#define YYERROR goto yyerrorlab
|
||||
|
||||
|
||||
/* Like YYERROR except do call yyerror. This remains here temporarily
|
||||
@@ -634,7 +634,7 @@ static const ]b4_int_type_for([b4_toknum])[ yytoknum[] =
|
||||
in Bison 2.4.2's NEWS entry, where a plan to phase it out is
|
||||
discussed. */
|
||||
|
||||
#define YYFAIL goto yyerrlab
|
||||
#define YYFAIL goto yyerrlab
|
||||
#if defined YYFAIL
|
||||
/* This is here to suppress warnings from the GCC cpp's
|
||||
-Wunused-macros. Normally we don't worry about that warning, but
|
||||
@@ -644,26 +644,26 @@ static const ]b4_int_type_for([b4_toknum])[ yytoknum[] =
|
||||
|
||||
#define YYRECOVERING() (!!yyerrstatus)
|
||||
|
||||
#define YYBACKUP(Token, Value) \
|
||||
do \
|
||||
if (yychar == YYEMPTY && yylen == 1) \
|
||||
{ \
|
||||
yychar = (Token); \
|
||||
yylval = (Value); \
|
||||
YYPOPSTACK (1); \]b4_lac_if([[
|
||||
YY_LAC_DISCARD ("YYBACKUP"); \]])[
|
||||
goto yybackup; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
#define YYBACKUP(Token, Value) \
|
||||
do \
|
||||
if (yychar == YYEMPTY && yylen == 1) \
|
||||
{ \
|
||||
yychar = (Token); \
|
||||
yylval = (Value); \
|
||||
YYPOPSTACK (1); \]b4_lac_if([[
|
||||
YY_LAC_DISCARD ("YYBACKUP"); \]])[
|
||||
goto yybackup; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
yyerror (]b4_yyerror_args[YY_("syntax error: cannot back up")); \
|
||||
YYERROR; \
|
||||
} \
|
||||
YYERROR; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
|
||||
|
||||
#define YYTERROR 1
|
||||
#define YYERRCODE 256
|
||||
#define YYTERROR 1
|
||||
#define YYERRCODE 256
|
||||
|
||||
|
||||
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
|
||||
@@ -672,22 +672,22 @@ while (YYID (0))
|
||||
|
||||
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
|
||||
#ifndef YYLLOC_DEFAULT
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
# define YYLLOC_DEFAULT(Current, Rhs, N) \
|
||||
do \
|
||||
if (YYID (N)) \
|
||||
{ \
|
||||
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
|
||||
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
|
||||
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
|
||||
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
(Current).first_line = (Current).last_line = \
|
||||
YYRHSLOC (Rhs, 0).last_line; \
|
||||
(Current).first_column = (Current).last_column = \
|
||||
YYRHSLOC (Rhs, 0).last_column; \
|
||||
} \
|
||||
{ \
|
||||
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
|
||||
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
|
||||
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
|
||||
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
(Current).first_line = (Current).last_line = \
|
||||
YYRHSLOC (Rhs, 0).last_line; \
|
||||
(Current).first_column = (Current).last_column = \
|
||||
YYRHSLOC (Rhs, 0).last_column; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
#endif]b4_locations_if([[
|
||||
|
||||
@@ -698,10 +698,10 @@ while (YYID (0))
|
||||
|
||||
#ifndef YY_LOCATION_PRINT
|
||||
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
fprintf (File, "%d.%d-%d.%d", \
|
||||
(Loc).first_line, (Loc).first_column, \
|
||||
(Loc).last_line, (Loc).last_column)
|
||||
# define YY_LOCATION_PRINT(File, Loc) \
|
||||
fprintf (File, "%d.%d-%d.%d", \
|
||||
(Loc).first_line, (Loc).first_column, \
|
||||
(Loc).last_line, (Loc).last_column)
|
||||
# else
|
||||
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
|
||||
# endif
|
||||
@@ -731,21 +731,21 @@ while (YYID (0))
|
||||
# define YYFPRINTF fprintf
|
||||
# endif
|
||||
|
||||
# define YYDPRINTF(Args) \
|
||||
do { \
|
||||
if (yydebug) \
|
||||
YYFPRINTF Args; \
|
||||
# define YYDPRINTF(Args) \
|
||||
do { \
|
||||
if (yydebug) \
|
||||
YYFPRINTF Args; \
|
||||
} while (YYID (0))
|
||||
|
||||
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
|
||||
do { \
|
||||
if (yydebug) \
|
||||
{ \
|
||||
YYFPRINTF (stderr, "%s ", Title); \
|
||||
yy_symbol_print (stderr, \
|
||||
Type, Value]b4_locations_if([, Location])[]b4_user_args[); \
|
||||
YYFPRINTF (stderr, "\n"); \
|
||||
} \
|
||||
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
|
||||
do { \
|
||||
if (yydebug) \
|
||||
{ \
|
||||
YYFPRINTF (stderr, "%s ", Title); \
|
||||
yy_symbol_print (stderr, \
|
||||
Type, Value]b4_locations_if([, Location])[]b4_user_args[); \
|
||||
YYFPRINTF (stderr, "\n"); \
|
||||
} \
|
||||
} while (YYID (0))
|
||||
|
||||
]b4_yy_symbol_print_generate([b4_c_function_def])[
|
||||
@@ -756,8 +756,8 @@ do { \
|
||||
`------------------------------------------------------------------*/
|
||||
|
||||
]b4_c_function_def([yy_stack_print], [static void],
|
||||
[[yytype_int16 *yybottom], [yybottom]],
|
||||
[[yytype_int16 *yytop], [yytop]])[
|
||||
[[yytype_int16 *yybottom], [yybottom]],
|
||||
[[yytype_int16 *yytop], [yytop]])[
|
||||
{
|
||||
YYFPRINTF (stderr, "Stack now");
|
||||
for (; yybottom <= yytop; yybottom++)
|
||||
@@ -768,10 +768,10 @@ do { \
|
||||
YYFPRINTF (stderr, "\n");
|
||||
}
|
||||
|
||||
# define YY_STACK_PRINT(Bottom, Top) \
|
||||
do { \
|
||||
if (yydebug) \
|
||||
yy_stack_print ((Bottom), (Top)); \
|
||||
# define YY_STACK_PRINT(Bottom, Top) \
|
||||
do { \
|
||||
if (yydebug) \
|
||||
yy_stack_print ((Bottom), (Top)); \
|
||||
} while (YYID (0))
|
||||
|
||||
|
||||
@@ -804,9 +804,9 @@ do { \
|
||||
}
|
||||
}
|
||||
|
||||
# define YY_REDUCE_PRINT(Rule) \
|
||||
do { \
|
||||
if (yydebug) \
|
||||
# define YY_REDUCE_PRINT(Rule) \
|
||||
do { \
|
||||
if (yydebug) \
|
||||
yy_reduce_print (yyssp, yyvsp, ]b4_locations_if([yylsp, ])[Rule]b4_user_args[); \
|
||||
} while (YYID (0))
|
||||
|
||||
@@ -822,7 +822,7 @@ int yydebug;
|
||||
|
||||
|
||||
/* YYINITDEPTH -- initial size of the parser's stacks. */
|
||||
#ifndef YYINITDEPTH
|
||||
#ifndef YYINITDEPTH
|
||||
# define YYINITDEPTH ]b4_stack_depth_init[
|
||||
#endif
|
||||
|
||||
@@ -1129,27 +1129,27 @@ yytnamerr (char *yyres, const char *yystr)
|
||||
char const *yyp = yystr;
|
||||
|
||||
for (;;)
|
||||
switch (*++yyp)
|
||||
{
|
||||
case '\'':
|
||||
case ',':
|
||||
goto do_not_strip_quotes;
|
||||
switch (*++yyp)
|
||||
{
|
||||
case '\'':
|
||||
case ',':
|
||||
goto do_not_strip_quotes;
|
||||
|
||||
case '\\':
|
||||
if (*++yyp != '\\')
|
||||
goto do_not_strip_quotes;
|
||||
/* Fall through. */
|
||||
default:
|
||||
if (yyres)
|
||||
yyres[yyn] = *yyp;
|
||||
yyn++;
|
||||
break;
|
||||
case '\\':
|
||||
if (*++yyp != '\\')
|
||||
goto do_not_strip_quotes;
|
||||
/* Fall through. */
|
||||
default:
|
||||
if (yyres)
|
||||
yyres[yyn] = *yyp;
|
||||
yyn++;
|
||||
break;
|
||||
|
||||
case '"':
|
||||
if (yyres)
|
||||
yyres[yyn] = '\0';
|
||||
return yyn;
|
||||
}
|
||||
case '"':
|
||||
if (yyres)
|
||||
yyres[yyn] = '\0';
|
||||
return yyn;
|
||||
}
|
||||
do_not_strip_quotes: ;
|
||||
}
|
||||
|
||||
@@ -1552,26 +1552,26 @@ m4_ifdef([b4_at_dollar_used], [[ yylsp[0] = yylloc;
|
||||
|
||||
#ifdef yyoverflow
|
||||
{
|
||||
/* Give user a chance to reallocate the stack. Use copies of
|
||||
these so that the &'s don't force the real ones into
|
||||
memory. */
|
||||
YYSTYPE *yyvs1 = yyvs;
|
||||
yytype_int16 *yyss1 = yyss;]b4_locations_if([
|
||||
YYLTYPE *yyls1 = yyls;])[
|
||||
/* Give user a chance to reallocate the stack. Use copies of
|
||||
these so that the &'s don't force the real ones into
|
||||
memory. */
|
||||
YYSTYPE *yyvs1 = yyvs;
|
||||
yytype_int16 *yyss1 = yyss;]b4_locations_if([
|
||||
YYLTYPE *yyls1 = yyls;])[
|
||||
|
||||
/* Each stack pointer address is followed by the size of the
|
||||
data in use in that stack, in bytes. This used to be a
|
||||
conditional around just the two extra args, but that might
|
||||
be undefined if yyoverflow is a macro. */
|
||||
yyoverflow (YY_("memory exhausted"),
|
||||
&yyss1, yysize * sizeof (*yyssp),
|
||||
&yyvs1, yysize * sizeof (*yyvsp),]b4_locations_if([
|
||||
&yyls1, yysize * sizeof (*yylsp),])[
|
||||
&yystacksize);
|
||||
/* Each stack pointer address is followed by the size of the
|
||||
data in use in that stack, in bytes. This used to be a
|
||||
conditional around just the two extra args, but that might
|
||||
be undefined if yyoverflow is a macro. */
|
||||
yyoverflow (YY_("memory exhausted"),
|
||||
&yyss1, yysize * sizeof (*yyssp),
|
||||
&yyvs1, yysize * sizeof (*yyvsp),]b4_locations_if([
|
||||
&yyls1, yysize * sizeof (*yylsp),])[
|
||||
&yystacksize);
|
||||
]b4_locations_if([
|
||||
yyls = yyls1;])[
|
||||
yyss = yyss1;
|
||||
yyvs = yyvs1;
|
||||
yyls = yyls1;])[
|
||||
yyss = yyss1;
|
||||
yyvs = yyvs1;
|
||||
}
|
||||
#else /* no yyoverflow */
|
||||
# ifndef YYSTACK_RELOCATE
|
||||
@@ -1579,23 +1579,23 @@ m4_ifdef([b4_at_dollar_used], [[ yylsp[0] = yylloc;
|
||||
# else
|
||||
/* Extend the stack our own way. */
|
||||
if (YYMAXDEPTH <= yystacksize)
|
||||
goto yyexhaustedlab;
|
||||
goto yyexhaustedlab;
|
||||
yystacksize *= 2;
|
||||
if (YYMAXDEPTH < yystacksize)
|
||||
yystacksize = YYMAXDEPTH;
|
||||
yystacksize = YYMAXDEPTH;
|
||||
|
||||
{
|
||||
yytype_int16 *yyss1 = yyss;
|
||||
union yyalloc *yyptr =
|
||||
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
||||
if (! yyptr)
|
||||
goto yyexhaustedlab;
|
||||
YYSTACK_RELOCATE (yyss_alloc, yyss);
|
||||
YYSTACK_RELOCATE (yyvs_alloc, yyvs);]b4_locations_if([
|
||||
YYSTACK_RELOCATE (yyls_alloc, yyls);])[
|
||||
yytype_int16 *yyss1 = yyss;
|
||||
union yyalloc *yyptr =
|
||||
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
|
||||
if (! yyptr)
|
||||
goto yyexhaustedlab;
|
||||
YYSTACK_RELOCATE (yyss_alloc, yyss);
|
||||
YYSTACK_RELOCATE (yyvs_alloc, yyvs);]b4_locations_if([
|
||||
YYSTACK_RELOCATE (yyls_alloc, yyls);])[
|
||||
# undef YYSTACK_RELOCATE
|
||||
if (yyss1 != yyssa)
|
||||
YYSTACK_FREE (yyss1);
|
||||
if (yyss1 != yyssa)
|
||||
YYSTACK_FREE (yyss1);
|
||||
}
|
||||
# endif
|
||||
#endif /* no yyoverflow */
|
||||
@@ -1605,10 +1605,10 @@ m4_ifdef([b4_at_dollar_used], [[ yylsp[0] = yylloc;
|
||||
yylsp = yyls + yysize - 1;])[
|
||||
|
||||
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
|
||||
(unsigned long int) yystacksize));
|
||||
(unsigned long int) yystacksize));
|
||||
|
||||
if (yyss + yystacksize - 1 <= yyssp)
|
||||
YYABORT;
|
||||
YYABORT;
|
||||
}
|
||||
|
||||
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
|
||||
@@ -1844,20 +1844,20 @@ yyerrlab:
|
||||
if (yyerrstatus == 3)
|
||||
{
|
||||
/* If just tried and failed to reuse lookahead token after an
|
||||
error, discard it. */
|
||||
error, discard it. */
|
||||
|
||||
if (yychar <= YYEOF)
|
||||
{
|
||||
/* Return failure if at end of input. */
|
||||
if (yychar == YYEOF)
|
||||
YYABORT;
|
||||
}
|
||||
{
|
||||
/* Return failure if at end of input. */
|
||||
if (yychar == YYEOF)
|
||||
YYABORT;
|
||||
}
|
||||
else
|
||||
{
|
||||
yydestruct ("Error: discarding",
|
||||
yytoken, &yylval]b4_locations_if([, &yylloc])[]b4_user_args[);
|
||||
yychar = YYEMPTY;
|
||||
}
|
||||
{
|
||||
yydestruct ("Error: discarding",
|
||||
yytoken, &yylval]b4_locations_if([, &yylloc])[]b4_user_args[);
|
||||
yychar = YYEMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
/* Else will try to reuse lookahead token after shifting the error
|
||||
@@ -1890,29 +1890,29 @@ yyerrorlab:
|
||||
| yyerrlab1 -- common code for both syntax error and YYERROR. |
|
||||
`-------------------------------------------------------------*/
|
||||
yyerrlab1:
|
||||
yyerrstatus = 3; /* Each real token shifted decrements this. */
|
||||
yyerrstatus = 3; /* Each real token shifted decrements this. */
|
||||
|
||||
for (;;)
|
||||
{
|
||||
yyn = yypact[yystate];
|
||||
if (!yypact_value_is_default (yyn))
|
||||
{
|
||||
yyn += YYTERROR;
|
||||
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
|
||||
{
|
||||
yyn = yytable[yyn];
|
||||
if (0 < yyn)
|
||||
break;
|
||||
}
|
||||
}
|
||||
{
|
||||
yyn += YYTERROR;
|
||||
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
|
||||
{
|
||||
yyn = yytable[yyn];
|
||||
if (0 < yyn)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Pop the current state because it cannot handle the error token. */
|
||||
if (yyssp == yyss)
|
||||
YYABORT;
|
||||
YYABORT;
|
||||
|
||||
]b4_locations_if([[ yyerror_range[1] = *yylsp;]])[
|
||||
yydestruct ("Error: popping",
|
||||
yystos[yystate], yyvsp]b4_locations_if([, yylsp])[]b4_user_args[);
|
||||
yystos[yystate], yyvsp]b4_locations_if([, yylsp])[]b4_user_args[);
|
||||
YYPOPSTACK (1);
|
||||
yystate = *yyssp;
|
||||
YY_STACK_PRINT (yyss, yyssp);
|
||||
@@ -1977,7 +1977,7 @@ yyreturn:
|
||||
while (yyssp != yyss)
|
||||
{
|
||||
yydestruct ("Cleanup: popping",
|
||||
yystos[*yyssp], yyvsp]b4_locations_if([, yylsp])[]b4_user_args[);
|
||||
yystos[*yyssp], yyvsp]b4_locations_if([, yylsp])[]b4_user_args[);
|
||||
YYPOPSTACK (1);
|
||||
}
|
||||
#ifndef yyoverflow
|
||||
|
||||
Reference in New Issue
Block a user