mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 23:33: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];
|
yylen = yyr2_[yyn];
|
||||||
{
|
{
|
||||||
stack_symbol_type yylhs;
|
stack_symbol_type yylhs;
|
||||||
yylhs.state = yy_lr_goto_state_(yystack_[yylen].state, yyr1_[yyn]);]b4_variant_if([
|
yylhs.state = yy_lr_goto_state_(yystack_[yylen].state, yyr1_[yyn]);]b4_variant_if([
|
||||||
/* Variants are always initialized to an empty instance of the
|
/* Variants are always initialized to an empty instance of the
|
||||||
correct type. The default $$=$1 action is NOT applied when using
|
correct type. The default '$$ = $1' action is NOT applied
|
||||||
variants. */
|
when using variants. */
|
||||||
b4_symbol_variant([[yyr1_@{yyn@}]], [yylhs.value], [build])],[
|
b4_symbol_variant([[yyr1_@{yyn@}]], [yylhs.value], [build])], [
|
||||||
/* If YYLEN is nonzero, implement the default value of the action:
|
/* If YYLEN is nonzero, implement the default value of the
|
||||||
'$$ = $1'. Otherwise, use the top of the stack.
|
action: '$$ = $1'. Otherwise, use the top of the stack.
|
||||||
|
|
||||||
Otherwise, the following line sets YYLHS.VALUE to garbage.
|
Otherwise, the following line sets YYLHS.VALUE to garbage.
|
||||||
This behavior is undocumented and Bison
|
This behavior is undocumented and Bison users should not rely
|
||||||
users should not rely upon it. */
|
upon it. */
|
||||||
if (yylen)
|
if (yylen)
|
||||||
yylhs.value = yystack_@{yylen - 1@}.value;
|
yylhs.value = yystack_@{yylen - 1@}.value;
|
||||||
else
|
else
|
||||||
yylhs.value = yystack_@{0@}.value;])[
|
yylhs.value = yystack_@{0@}.value;])[
|
||||||
]b4_locations_if([dnl
|
]b4_locations_if([dnl
|
||||||
[
|
[
|
||||||
// Compute the default @@$.
|
// 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
|
|
||||||
{
|
{
|
||||||
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[
|
]b4_user_actions[
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (const syntax_error& yyexc)
|
catch (const syntax_error& yyexc)
|
||||||
{
|
{
|
||||||
error (yyexc);
|
error (yyexc);
|
||||||
YYERROR;
|
YYERROR;
|
||||||
}
|
}
|
||||||
YY_SYMBOL_PRINT ("-> $$ =", yylhs);
|
YY_SYMBOL_PRINT ("-> $$ =", yylhs);
|
||||||
yypop_ (yylen);
|
yypop_ (yylen);
|
||||||
yylen = 0;
|
yylen = 0;
|
||||||
YY_STACK_PRINT ();
|
YY_STACK_PRINT ();
|
||||||
|
|
||||||
// Shift the result of the reduction.
|
// Shift the result of the reduction.
|
||||||
yypush_ (YY_NULLPTR, yylhs);
|
yypush_ (YY_NULLPTR, yylhs);
|
||||||
}
|
}
|
||||||
goto yynewstate;
|
goto yynewstate;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user