[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/5] lalr1.cc: formatting changes
From: |
Akim Demaille |
Subject: |
[PATCH 5/5] lalr1.cc: formatting changes |
Date: |
Fri, 15 Nov 2013 10:19:08 +0100 |
* data/lalr1.cc: Fix indentation.
---
data/lalr1.cc | 82 +++++++++++++++++++++++++++++------------------------------
1 file changed, 41 insertions(+), 41 deletions(-)
diff --git a/data/lalr1.cc b/data/lalr1.cc
index 61dc666..876de8c 100644
--- a/data/lalr1.cc
+++ b/data/lalr1.cc
@@ -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(address@hidden@}]], [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 = address@hidden - address@hidden;
- else
- yylhs.value = address@hidden@}.value;])[
+ 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(address@hidden@}]], [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 = address@hidden - address@hidden;
+ else
+ yylhs.value = address@hidden@}.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;
--
1.8.4.2
- [PATCH 0/5] {maint} fix variants when YYERROR is used, Akim Demaille, 2013/11/15
- [PATCH 3/5] tests: check $$'s destruction with variant, YYERROR, and no error recovery, Akim Demaille, 2013/11/15
- [PATCH 4/5] lalr1.cc: fix the support of YYERROR with variants, Akim Demaille, 2013/11/15
- [PATCH 1/5] skeletons: use better names when computing a "goto", Akim Demaille, 2013/11/15
- [PATCH 5/5] lalr1.cc: formatting changes,
Akim Demaille <=
- [PATCH 2/5] tests: simplify useless obfuscation, Akim Demaille, 2013/11/15