mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-23 19:23:02 +00:00
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:
@@ -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_;]])[
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user