mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
lalr1.cc: formatting changes
* data/lalr1.cc: Fix indentation.
This commit is contained in:
@@ -815,52 +815,52 @@ b4_dollar_popdef])[]dnl
|
||||
yylen = yyr2_[yyn];
|
||||
{
|
||||
stack_symbol_type yylhs;
|
||||
yylhs.state = yy_lr_goto_state_(yystack_[yylen].state, yyr1_[yyn]);]b4_variant_if([
|
||||
/* Variants are always initialized to an empty instance of the
|
||||
correct type. The default $$=$1 action is NOT applied when using
|
||||
variants. */
|
||||
b4_symbol_variant([[yyr1_@{yyn@}]], [yylhs.value], [build])],[
|
||||
/* If YYLEN is nonzero, implement the default value of the action:
|
||||
'$$ = $1'. Otherwise, use the top of the stack.
|
||||
yylhs.state = yy_lr_goto_state_(yystack_[yylen].state, yyr1_[yyn]);]b4_variant_if([
|
||||
/* Variants are always initialized to an empty instance of the
|
||||
correct type. The default '$$ = $1' action is NOT applied
|
||||
when using variants. */
|
||||
b4_symbol_variant([[yyr1_@{yyn@}]], [yylhs.value], [build])], [
|
||||
/* If YYLEN is nonzero, implement the default value of the
|
||||
action: '$$ = $1'. Otherwise, use the top of the stack.
|
||||
|
||||
Otherwise, the following line sets YYLHS.VALUE to garbage.
|
||||
This behavior is undocumented and Bison
|
||||
users should not rely upon it. */
|
||||
if (yylen)
|
||||
yylhs.value = yystack_@{yylen - 1@}.value;
|
||||
else
|
||||
yylhs.value = yystack_@{0@}.value;])[
|
||||
Otherwise, the following line sets YYLHS.VALUE to garbage.
|
||||
This behavior is undocumented and Bison users should not rely
|
||||
upon it. */
|
||||
if (yylen)
|
||||
yylhs.value = yystack_@{yylen - 1@}.value;
|
||||
else
|
||||
yylhs.value = yystack_@{0@}.value;])[
|
||||
]b4_locations_if([dnl
|
||||
[
|
||||
// Compute the default @@$.
|
||||
{
|
||||
slice<stack_symbol_type, stack_type> slice (yystack_, yylen);
|
||||
YYLLOC_DEFAULT (yylhs.location, slice, yylen);
|
||||
}]])[
|
||||
|
||||
// Perform the reduction.
|
||||
YY_REDUCE_PRINT (yyn);
|
||||
try
|
||||
// Compute the default @@$.
|
||||
{
|
||||
switch (yyn)
|
||||
{
|
||||
slice<stack_symbol_type, stack_type> slice (yystack_, yylen);
|
||||
YYLLOC_DEFAULT (yylhs.location, slice, yylen);
|
||||
}]])[
|
||||
|
||||
// Perform the reduction.
|
||||
YY_REDUCE_PRINT (yyn);
|
||||
try
|
||||
{
|
||||
switch (yyn)
|
||||
{
|
||||
]b4_user_actions[
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (const syntax_error& yyexc)
|
||||
{
|
||||
error (yyexc);
|
||||
YYERROR;
|
||||
}
|
||||
YY_SYMBOL_PRINT ("-> $$ =", yylhs);
|
||||
yypop_ (yylen);
|
||||
yylen = 0;
|
||||
YY_STACK_PRINT ();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (const syntax_error& yyexc)
|
||||
{
|
||||
error (yyexc);
|
||||
YYERROR;
|
||||
}
|
||||
YY_SYMBOL_PRINT ("-> $$ =", yylhs);
|
||||
yypop_ (yylen);
|
||||
yylen = 0;
|
||||
YY_STACK_PRINT ();
|
||||
|
||||
// Shift the result of the reduction.
|
||||
yypush_ (YY_NULLPTR, yylhs);
|
||||
// Shift the result of the reduction.
|
||||
yypush_ (YY_NULLPTR, yylhs);
|
||||
}
|
||||
goto yynewstate;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user