int yytype,
SemanticType *yyvaluep, LocationType *yylocationp);
+ /// Pop \a n symbols the three stacks.
+ inline void pop (unsigned int n = 1);
+
/* Constants. */
static const int eof_;
/* LAST_ -- Last index in TABLE_. */
}
}
+void
+yy::]b4_parser_class_name[::pop (unsigned int n)
+{
+ state_stack_.pop (n);
+ semantic_stack_.pop (n);
+ location_stack_.pop (n);
+}
+
int
yy::]b4_parser_class_name[::parse ()
{
YYCDEBUG << "Starting parse" << std::endl;
/* New state. */
- yynewstate:
+yynewstate:
state_stack_.push (state_);
YYCDEBUG << "Entering state " << state_ << std::endl;
goto yybackup;
/* Backup. */
- yybackup:
+yybackup:
/* Try to take a decision without look-ahead. */
n_ = pact_[state_];
/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state. |
`-----------------------------------------------------------*/
- yydefault:
+yydefault:
n_ = defact_[state_];
if (n_ == 0)
goto yyerrlab;
/*-----------------------------.
| yyreduce -- Do a reduction. |
`-----------------------------*/
- yyreduce:
+yyreduce:
len_ = r2_[n_];
/* If LEN_ is nonzero, implement the default value of the action:
`$$ = $1'. Otherwise, use the top of the stack.
]/* Line __line__ of lalr1.cc. */
b4_syncline([@oline@], [@ofile@])[
- state_stack_.pop (len_);
- semantic_stack_.pop (len_);
- location_stack_.pop (len_);
+ pop (len_);
YY_STACK_PRINT ();
for (;;)
{
error_start_ = location_stack_[0].begin;
- state_stack_.pop ();
- semantic_stack_.pop ();
- location_stack_.pop ();
+ pop ();
if (state_stack_.height () == 1)
YYABORT;
destruct_ ("Error: popping",
goto yyerrorlab;
#endif
- state_stack_.pop (len_);
- semantic_stack_.pop (len_);
error_start_ = location_stack_[len_ - 1].begin;
- location_stack_.pop (len_);
+ pop (len_);
state_ = state_stack_[0];
goto yyerrlab1;
stos_[state_], &semantic_stack_[0], &location_stack_[0]);
error_start_ = location_stack_[0].begin;
- state_stack_.pop ();
- semantic_stack_.pop ();
- location_stack_.pop ();
+ pop ();
state_ = state_stack_[0];
YY_STACK_PRINT ();
}