+m4_divert(-1)
+
+# m4_define_default(MACRO, VALUE)
+# -------------------------------
+# Define MACRO to VALUE, unless already defined.
+m4_define([m4_define_default],
+[m4_ifdef([$1], [], [m4_define($@)])])
+
+m4_define_default([b4_input_suffix], [.y])
+
+m4_define_default([b4_output_parser_suffix],
+[m4_translit(b4_input_suffix, [yY], [cC])])
+
+m4_define_default([b4_output_parser_name],
+[b4_output_prefix[]b4_output_infix[]b4_output_parser_suffix[]])
+
+
+m4_define_default([b4_output_header_suffix],
+[m4_translit(b4_input_suffix, [yY], [hH])])
+
+m4_define_default([b4_output_header_name],
+[b4_output_prefix[]b4_output_infix[]b4_output_header_suffix[]])
+
+m4_define_default([b4_header_guard],
+ [m4_bpatsubst(m4_toupper([BISON_]b4_output_header_name),
+ [[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]], [_])])
+
+m4_divert(0)dnl
#output "b4_output_prefix[]b4_output_infix[]-class.hh"
/* -*- C++ -*- */
}
else if (n_ == 0)
goto yyerrlab;
-
+
/* Accept? */
if (n_ == final_)
goto yyacceptlab;
YYFPRINTF (stderr, "-> %s\n", name_[[r1_[n_]]]);
}
#endif
-
+
{
SemanticType& yyval (value);
LocationType& yyloc (location);
b4_actions
}
}
-
+
state_stack_.pop (len_);
semantic_stack_.pop (len_);
location_stack_.pop (len_);
if (debug_)
{
YYFPRINTF (stderr, "state stack now");
- for (StateStack::ConstIterator i = state_stack_.begin ();
+ for (StateStack::ConstIterator i = state_stack_.begin ();
i != state_stack_.end (); ++i)
YYFPRINTF (stderr, " %d", *i);
YYFPRINTF (stderr, "\n");
}
#endif
-
+
semantic_stack_.push (value);
location_stack_.push (location);
if (!errstatus)
{
++nerrs;
-
+
#if YYERROR_VERBOSE
n_ = pact_[[state_]];
if (n_ > flag_ && n_ < last_)
for (int x = (n_ < 0 ? -n_ : 0); x < ntokens_ + nnts_; ++x)
if (check_[[x + n_]] == x)
{
- message += (!count++) ? ", expecting " : " or ";
+ message += (!count++) ? ", expecting " : " or ";
message += name_[[x]];
}
}
error_ ();
}
goto yyerrlab1;
-
+
/* Error raised explicitly by an action. */
yyerrlab1:
if (errstatus == 3)
if (debug_)
{
YYFPRINTF (stderr, "Error: state stack now");
- for (StateStack::ConstIterator i = state_stack_.begin ();
+ for (StateStack::ConstIterator i = state_stack_.begin ();
i != state_stack_.end (); ++i)
YYFPRINTF (stderr, " %d", *i);
- YYFPRINTF (stderr, "\n");
+ YYFPRINTF (stderr, "\n");
}
#endif
};
/* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives. */
-const short
+const short
yy::b4_name::r1_[[]] =
{
b4_r1
};
/* YYR2[[YYN]] -- Number of symbols composing right hand side of rule YYN. */
-const short
+const short
yy::b4_name::r2_[[]] =
{
b4_r2
#if YYDEBUG
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-const short
+const short
yy::b4_name::rhs_[[]] =
{
b4_rhs
char
yy::b4_name::translate_ (int token)
{
- static
- const char
+ static
+ const char
translate_[[]] =
{
b4_translate
for (; n; --n)
seq_.pop_back ();
}
-
+
inline
void
reserve (unsigned n)