mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 02:33:03 +00:00
Remove the traits, failed experiment.
It never proved useful, and anyway because of the current definition, it was not possible to have several specialization of this traits, making it useless. * data/lalr1.cc (yy:traits): Remove. Inline its definitions in the parser class.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
2005-09-19 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
Remove the traits, failed experiment.
|
||||||
|
It never proved useful, and anyway because of the current
|
||||||
|
definition, it was not possible to have several specialization of
|
||||||
|
this traits, making it useless.
|
||||||
|
* data/lalr1.cc (yy:traits): Remove.
|
||||||
|
Inline its definitions in the parser class.
|
||||||
|
|
||||||
2005-09-19 Akim Demaille <akim@epita.fr>
|
2005-09-19 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
|
* tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
|
||||||
|
|||||||
@@ -118,33 +118,14 @@ do { \
|
|||||||
|
|
||||||
namespace yy
|
namespace yy
|
||||||
{
|
{
|
||||||
class ]b4_parser_class_name[;
|
|
||||||
|
|
||||||
template <typename P>
|
|
||||||
struct traits
|
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
template <>
|
|
||||||
struct traits<]b4_parser_class_name[>
|
|
||||||
{
|
|
||||||
typedef ]b4_int_type_for([b4_translate])[ token_number_type;
|
|
||||||
typedef ]b4_int_type_for([b4_rhs])[ rhs_number_type;
|
|
||||||
typedef int state_type;
|
|
||||||
typedef YYSTYPE semantic_type;
|
|
||||||
typedef ]b4_location_type[ location_type;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace yy
|
|
||||||
{
|
|
||||||
/// A Bison parser.
|
/// A Bison parser.
|
||||||
class ]b4_parser_class_name[
|
class ]b4_parser_class_name[
|
||||||
{
|
{
|
||||||
/// Symbol semantic values.
|
/// Symbol semantic values.
|
||||||
typedef traits<]b4_parser_class_name[>::semantic_type semantic_type;
|
typedef YYSTYPE semantic_type;
|
||||||
/// Symbol locations.
|
/// Symbol locations.
|
||||||
typedef traits<]b4_parser_class_name[>::location_type location_type;
|
typedef ]b4_location_type[ location_type;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// Build a parser object.
|
/// Build a parser object.
|
||||||
@@ -196,7 +177,7 @@ namespace yy
|
|||||||
|
|
||||||
|
|
||||||
/// State numbers.
|
/// State numbers.
|
||||||
typedef traits<]b4_parser_class_name[>::state_type state_type;
|
typedef int state_type;
|
||||||
/// State stack type.
|
/// State stack type.
|
||||||
typedef stack<state_type> state_stack_type;
|
typedef stack<state_type> state_stack_type;
|
||||||
/// Semantic value stack type.
|
/// Semantic value stack type.
|
||||||
@@ -212,7 +193,7 @@ namespace yy
|
|||||||
location_stack_type yylocation_stack_;
|
location_stack_type yylocation_stack_;
|
||||||
|
|
||||||
/// Internal symbol numbers.
|
/// Internal symbol numbers.
|
||||||
typedef traits<]b4_parser_class_name[>::token_number_type token_number_type;
|
typedef ]b4_int_type_for([b4_translate])[ token_number_type;
|
||||||
/* Tables. */
|
/* Tables. */
|
||||||
/// For a state, the index in \a yytable_ of its portion.
|
/// For a state, the index in \a yytable_ of its portion.
|
||||||
static const ]b4_int_type_for([b4_pact])[ yypact_[];
|
static const ]b4_int_type_for([b4_pact])[ yypact_[];
|
||||||
@@ -256,7 +237,7 @@ namespace yy
|
|||||||
|
|
||||||
#if YYDEBUG
|
#if YYDEBUG
|
||||||
/// A type to store symbol numbers and -1.
|
/// A type to store symbol numbers and -1.
|
||||||
typedef traits<]b4_parser_class_name[>::rhs_number_type rhs_number_type;
|
typedef ]b4_int_type_for([b4_rhs])[ rhs_number_type;
|
||||||
/// A `-1'-separated list of the rules' RHS.
|
/// A `-1'-separated list of the rules' RHS.
|
||||||
static const rhs_number_type yyrhs_[];
|
static const rhs_number_type yyrhs_[];
|
||||||
/// For each rule, the index of the first RHS symbol in \a yyrhs_.
|
/// For each rule, the index of the first RHS symbol in \a yyrhs_.
|
||||||
|
|||||||
Reference in New Issue
Block a user