mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
glr2.cc: style fixes
* data/skeletons/glr2.cc: Formatting changes.
This commit is contained in:
@@ -1327,29 +1327,35 @@ std::ptrdiff_t glr_state::indexIn(glr_stack_item* array)
|
||||
return asItem(this) - array;
|
||||
}
|
||||
|
||||
std::ptrdiff_t semantic_option::indexIn(glr_stack_item* array) {
|
||||
std::ptrdiff_t semantic_option::indexIn (glr_stack_item* array)
|
||||
{
|
||||
return asItem(this) - array;
|
||||
}
|
||||
|
||||
glr_state* semantic_option::state() {
|
||||
glr_state* semantic_option::state ()
|
||||
{
|
||||
YY_IGNORE_NULL_DEREFERENCE_BEGIN
|
||||
return yystate ? &(asItem(this) - yystate)->getState() : YY_NULLPTR;
|
||||
YY_IGNORE_NULL_DEREFERENCE_END
|
||||
}
|
||||
|
||||
const glr_state* semantic_option::state() const {
|
||||
const glr_state* semantic_option::state () const
|
||||
{
|
||||
return yystate ? &(asItem(this) - yystate)->getState() : YY_NULLPTR;
|
||||
}
|
||||
|
||||
void semantic_option::setState(const glr_state* s) {
|
||||
void semantic_option::setState (const glr_state* s)
|
||||
{
|
||||
yystate = s ? asItem(this) - asItem(s) : 0;
|
||||
}
|
||||
|
||||
semantic_option* semantic_option::next() {
|
||||
semantic_option* semantic_option::next ()
|
||||
{
|
||||
return yynext ? &(asItem(this) - yynext)->getOption() : YY_NULLPTR;
|
||||
}
|
||||
|
||||
void semantic_option::setNext(const semantic_option* s) {
|
||||
void semantic_option::setNext (const semantic_option* s)
|
||||
{
|
||||
yynext = s ? asItem(this) - asItem(s) : 0;
|
||||
}
|
||||
|
||||
@@ -1843,7 +1849,7 @@ public:
|
||||
if (yychar != ]b4_namespace_ref::b4_parser_class::token::b4_symbol(empty, id)[)
|
||||
yyparser.yy_destroy_ ("Cleanup: discarding lookahead",
|
||||
YYTRANSLATE (yychar), &yylval]b4_locations_if([, &yylloc])[);
|
||||
popall();
|
||||
popall_ ();
|
||||
}
|
||||
|
||||
int yyerrState;
|
||||
@@ -2442,7 +2448,8 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
void popall() {
|
||||
void popall_ ()
|
||||
{
|
||||
/* If the stack is well-formed, pop the stack until it is empty,
|
||||
destroying its entries as we go. But free the stack regardless
|
||||
of whether it is well-formed. */
|
||||
@@ -2586,8 +2593,7 @@ public:
|
||||
glr_state* yyoptState = yyopt.state();
|
||||
YYASSERT(yyoptState != YY_NULLPTR);
|
||||
int yynrhs = yyrhsLength (yyopt.yyrule);
|
||||
YYRESULTTAG yyflag =
|
||||
yyresolveStates (*yyoptState, yynrhs);
|
||||
YYRESULTTAG yyflag = yyresolveStates (*yyoptState, yynrhs);
|
||||
if (yyflag != yyok)
|
||||
{
|
||||
for (glr_state *yys = yyoptState; yynrhs > 0; yys = yys->pred(), yynrhs -= 1)
|
||||
|
||||
Reference in New Issue
Block a user