glr2.cc: formatting changes

* data/skeletons/glr2.cc (glr_state): here.
(glr_state::MAGIC): Make it easier to recognize in decimal.
This commit is contained in:
Akim Demaille
2020-12-20 18:46:28 +01:00
parent df34ad7c6e
commit c6a39f8409

View File

@@ -833,11 +833,10 @@ public:
yylrState = other.yylrState; yylrState = other.yylrState;
yyposn = other.yyposn; yyposn = other.yyposn;
setPred (other.pred ()); setPred (other.pred ());
if (other.yyresolved) { if (other.yyresolved)
semanticVal () = other.semanticVal (); semanticVal () = other.semanticVal ();
} else { else
setFirstVal(other.firstVal()); setFirstVal (other.firstVal ());]b4_locations_if([[
}]b4_locations_if([[
yyloc = other.yyloc;]])[ yyloc = other.yyloc;]])[
} }
@@ -899,11 +898,13 @@ public:
private: private:
template <typename T> template <typename T>
static const glr_stack_item* asItem(const T* state) { static const glr_stack_item* asItem (const T* state)
{
return reinterpret_cast<const glr_stack_item*>(state); return reinterpret_cast<const glr_stack_item*>(state);
} }
template <typename T> template <typename T>
static glr_stack_item* asItem(T* state) { static glr_stack_item* asItem (T* state)
{
return reinterpret_cast<glr_stack_item*> (state); return reinterpret_cast<glr_stack_item*> (state);
} }
static const char *as_pointer_ (const glr_state *state) static const char *as_pointer_ (const glr_state *state)
@@ -940,7 +941,7 @@ public:
} }
// A magic number to check our pointer arithmetics is sane. // A magic number to check our pointer arithmetics is sane.
enum { MAGIC = 0x713705 }; enum { MAGIC = 713705 };
unsigned int magic_;]])[ unsigned int magic_;]])[
}; };