mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
glr2.cc: move StrongIndexAlias into the namespace
* data/skeletons/glr2.cc: here.
This commit is contained in:
committed by
Akim Demaille
parent
8bfc319f8e
commit
cf8723de0d
4
TODO
4
TODO
@@ -162,10 +162,6 @@ Line -1 and -3 should mention CATEGORIE, not CATEGORY.
|
|||||||
*** glr.c
|
*** glr.c
|
||||||
Get rid of scaffolding in glr.c.
|
Get rid of scaffolding in glr.c.
|
||||||
|
|
||||||
*** namespaces in glr2.cc
|
|
||||||
StrongIndexAlias should be in the parser's namespace. Possibly even an
|
|
||||||
inner class.
|
|
||||||
|
|
||||||
*** Coding style
|
*** Coding style
|
||||||
Move to our coding conventions. In particular names such as yy_glr_stack,
|
Move to our coding conventions. In particular names such as yy_glr_stack,
|
||||||
not yyGLRStack.
|
not yyGLRStack.
|
||||||
|
|||||||
@@ -145,6 +145,19 @@ b4_percent_code_get([[requires]])[
|
|||||||
]b4_cast_define[
|
]b4_cast_define[
|
||||||
]b4_null_define[
|
]b4_null_define[
|
||||||
|
|
||||||
|
// Whether we are compiled with exception support.
|
||||||
|
#ifndef YY_EXCEPTIONS
|
||||||
|
# if defined __GNUC__ && !defined __EXCEPTIONS
|
||||||
|
# define YY_EXCEPTIONS 0
|
||||||
|
# else
|
||||||
|
# define YY_EXCEPTIONS 1
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
]b4_YYDEBUG_define[
|
||||||
|
|
||||||
|
]b4_namespace_open[
|
||||||
|
|
||||||
template <typename Parameter>
|
template <typename Parameter>
|
||||||
class StrongIndexAlias
|
class StrongIndexAlias
|
||||||
{
|
{
|
||||||
@@ -215,19 +228,6 @@ template<typename T>
|
|||||||
const std::ptrdiff_t StrongIndexAlias<T>::INVALID_INDEX =
|
const std::ptrdiff_t StrongIndexAlias<T>::INVALID_INDEX =
|
||||||
std::numeric_limits<std::ptrdiff_t>::max();
|
std::numeric_limits<std::ptrdiff_t>::max();
|
||||||
|
|
||||||
// Whether we are compiled with exception support.
|
|
||||||
#ifndef YY_EXCEPTIONS
|
|
||||||
# if defined __GNUC__ && !defined __EXCEPTIONS
|
|
||||||
# define YY_EXCEPTIONS 0
|
|
||||||
# else
|
|
||||||
# define YY_EXCEPTIONS 1
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
]b4_YYDEBUG_define[
|
|
||||||
|
|
||||||
]b4_namespace_open[
|
|
||||||
|
|
||||||
]b4_bison_locations_if([m4_ifndef([b4_location_file],
|
]b4_bison_locations_if([m4_ifndef([b4_location_file],
|
||||||
[b4_location_define])])[
|
[b4_location_define])])[
|
||||||
|
|
||||||
@@ -791,7 +791,7 @@ struct yySemanticOption;
|
|||||||
struct yyGLRStackItem;
|
struct yyGLRStackItem;
|
||||||
struct yyGLRStack;
|
struct yyGLRStack;
|
||||||
|
|
||||||
typedef StrongIndexAlias<struct yyGLRStateSetTag> yyStateSetIndex;
|
typedef ]b4_namespace_ref[::StrongIndexAlias<struct yyGLRStateSetTag> yyStateSetIndex;
|
||||||
|
|
||||||
yyStateSetIndex yycreateStateSetIndex(std::ptrdiff_t value) {
|
yyStateSetIndex yycreateStateSetIndex(std::ptrdiff_t value) {
|
||||||
return yyStateSetIndex::create(value);
|
return yyStateSetIndex::create(value);
|
||||||
|
|||||||
Reference in New Issue
Block a user