Comment changes.

* data/lalr1.cc: here.
This commit is contained in:
Akim Demaille
2008-12-31 11:22:32 +01:00
parent 507aa0e2a8
commit 9c6a89660e
2 changed files with 19 additions and 12 deletions

View File

@@ -1,3 +1,8 @@
2009-02-19 Akim Demaille <demaille@gostai.com>
Comment changes.
* data/lalr1.cc: here.
2009-02-19 Akim Demaille <demaille@gostai.com> 2009-02-19 Akim Demaille <demaille@gostai.com>
Extract variant.hh Extract variant.hh

View File

@@ -1069,16 +1069,18 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
yylhs.state = yystate; yylhs.state = yystate;
YY_SYMBOL_PRINT ("-> $$ =", yylhs); YY_SYMBOL_PRINT ("-> $$ =", yylhs);
]b4_variant_if([[ ]b4_variant_if([[
// Destroy the lhs symbols. // Destroy the rhs symbols.
for (int i = 0; i < yylen; ++i) for (int i = 0; i < yylen; ++i)
// Destroy a variant which value may have be swapped with // Destroy a variant which value may have been swapped with
// yylhs.value. The value of yylhs.value (hence maybe one of // yylhs.value (for instance if the action was "std::swap($$,
// these lhs symbols) depends on what does the default // $1)"). The value of yylhs.value (hence possibly one of these
// contruction for this type. In the case of pointers for // rhs symbols) depends on the default contruction for this
// instance, nothing is done, so the value is junk. Therefore // type. In the case of pointers for instance, no
// do not try to report the content in the debug trace, it's // initialization is done, so the value is junk. Therefore do
// junk. Hence yymsg = 0. Besides, that keeps exactly the same // not try to report the value of symbols about to be destroyed
// traces as with the other Bison skeletons. // in the debug trace, it's possibly junk. Hence yymsg = 0.
// Besides, that keeps exactly the same traces as with the other
// Bison skeletons.
yy_destroy_ (0, yystack_[i]);]])[ yy_destroy_ (0, yystack_[i]);]])[
yypop_ (yylen); yypop_ (yylen);
@@ -1089,9 +1091,9 @@ m4_ifdef([b4_lex_param], [, ]b4_lex_param)));])[
yypush_ (0, yylhs); yypush_ (0, yylhs);
goto yynewstate; goto yynewstate;
/*------------------------------------. /*--------------------------------------.
| yyerrlab -- here on detecting error | | yyerrlab -- here on detecting error. |
`------------------------------------*/ `--------------------------------------*/
yyerrlab: yyerrlab:
/* If not already recovering from an error, report this error. */ /* If not already recovering from an error, report this error. */
if (!yyerrstatus_) if (!yyerrstatus_)