mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 08:13:02 +00:00
* data/lalr1.cc: Move towards a more standard C++ coding style
for templates: Class < T > -> Class<T>.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2004-09-29 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* data/lalr1.cc: Move towards a more standard C++ coding style
|
||||||
|
for templates: Class < T > -> Class<T>.
|
||||||
|
|
||||||
2004-09-29 Akim Demaille <akim@epita.fr>
|
2004-09-29 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* data/lalr1.cc: Reinstall the former ctor, for sake of
|
* data/lalr1.cc: Reinstall the former ctor, for sake of
|
||||||
|
|||||||
@@ -195,13 +195,13 @@ namespace yy
|
|||||||
{
|
{
|
||||||
class ]b4_parser_class_name[;
|
class ]b4_parser_class_name[;
|
||||||
|
|
||||||
template < typename P >
|
template <typename P>
|
||||||
struct Traits
|
struct Traits
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
template < >
|
template <>
|
||||||
struct Traits< ]b4_parser_class_name[ >
|
struct Traits<]b4_parser_class_name[>
|
||||||
{
|
{
|
||||||
typedef ]b4_int_type_for([b4_translate])[ TokenNumberType;
|
typedef ]b4_int_type_for([b4_translate])[ TokenNumberType;
|
||||||
typedef ]b4_int_type_for([b4_rhs])[ RhsNumberType;
|
typedef ]b4_int_type_for([b4_rhs])[ RhsNumberType;
|
||||||
@@ -217,15 +217,15 @@ namespace yy
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
typedef Traits< ]b4_parser_class_name[ >::TokenNumberType TokenNumberType;
|
typedef Traits<]b4_parser_class_name[>::TokenNumberType TokenNumberType;
|
||||||
typedef Traits< ]b4_parser_class_name[ >::RhsNumberType RhsNumberType;
|
typedef Traits<]b4_parser_class_name[>::RhsNumberType RhsNumberType;
|
||||||
typedef Traits< ]b4_parser_class_name[ >::StateType StateType;
|
typedef Traits<]b4_parser_class_name[>::StateType StateType;
|
||||||
typedef Traits< ]b4_parser_class_name[ >::SemanticType SemanticType;
|
typedef Traits<]b4_parser_class_name[>::SemanticType SemanticType;
|
||||||
typedef Traits< ]b4_parser_class_name[ >::LocationType LocationType;
|
typedef Traits<]b4_parser_class_name[>::LocationType LocationType;
|
||||||
|
|
||||||
typedef Stack< StateType > StateStack;
|
typedef Stack<StateType> StateStack;
|
||||||
typedef Stack< SemanticType > SemanticStack;
|
typedef Stack<SemanticType> SemanticStack;
|
||||||
typedef Stack< LocationType > LocationStack;
|
typedef Stack<LocationType> LocationStack;
|
||||||
|
|
||||||
]b4_parser_class_name[ (bool debug][]b4_param[]b4_parse_param_decl[) :
|
]b4_parser_class_name[ (bool debug][]b4_param[]b4_parse_param_decl[) :
|
||||||
]b4_constructor[][debug_ (debug),
|
]b4_constructor[][debug_ (debug),
|
||||||
@@ -595,7 +595,7 @@ yyreduce:
|
|||||||
|
|
||||||
if (len_)
|
if (len_)
|
||||||
{
|
{
|
||||||
Slice< LocationType, LocationStack > slice (location_stack_, len_);
|
Slice<LocationType, LocationStack> slice (location_stack_, len_);
|
||||||
YYLLOC_DEFAULT (yyloc, slice, len_);
|
YYLLOC_DEFAULT (yyloc, slice, len_);
|
||||||
}
|
}
|
||||||
YY_REDUCE_PRINT (n_);
|
YY_REDUCE_PRINT (n_);
|
||||||
@@ -927,7 +927,8 @@ yy::]b4_parser_class_name[::reduce_print_ (int yyrule)
|
|||||||
{
|
{
|
||||||
unsigned int yylno = rline_[yyrule];
|
unsigned int yylno = rline_[yyrule];
|
||||||
/* Print the symbols being reduced, and their result. */
|
/* Print the symbols being reduced, and their result. */
|
||||||
cdebug_ << "Reducing stack by rule " << n_ - 1 << " (line " << yylno << "), ";
|
cdebug_ << "Reducing stack by rule " << n_ - 1
|
||||||
|
<< " (line " << yylno << "), ";
|
||||||
for (]b4_int_type_for([b4_prhs])[ i = prhs_[n_];
|
for (]b4_int_type_for([b4_prhs])[ i = prhs_[n_];
|
||||||
0 <= rhs_[i]; ++i)
|
0 <= rhs_[i]; ++i)
|
||||||
cdebug_ << name_[rhs_[i]] << ' ';
|
cdebug_ << name_[rhs_[i]] << ' ';
|
||||||
@@ -975,7 +976,7 @@ b4_copyright([Stack handling for Bison C++ parsers], [2002, 2003, 2004])[
|
|||||||
|
|
||||||
namespace yy
|
namespace yy
|
||||||
{
|
{
|
||||||
template < class T, class S = std::deque< T > >
|
template <class T, class S = std::deque<T> >
|
||||||
class Stack
|
class Stack
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -1036,7 +1037,7 @@ namespace yy
|
|||||||
S seq_;
|
S seq_;
|
||||||
};
|
};
|
||||||
|
|
||||||
template < class T, class S = Stack< T > >
|
template <class T, class S = Stack<T> >
|
||||||
class Slice
|
class Slice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user