c++: style changes

* data/lalr1.cc: Formatting changes.
And name changes.
This commit is contained in:
Akim Demaille
2013-01-29 08:15:37 +01:00
parent c32b9ec077
commit 23be254ef4

View File

@@ -255,8 +255,7 @@ b4_location_define])])[
/// \param yyo The output stream. /// \param yyo The output stream.
/// \param yysym The symbol. /// \param yysym The symbol.
template <typename Base> template <typename Base>
void yy_print_ (std::ostream& yyo, void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
const basic_symbol<Base>& yysym) const;
#endif #endif
/// \brief Reclaim the memory associated to a symbol. /// \brief Reclaim the memory associated to a symbol.
@@ -558,22 +557,24 @@ m4_if(b4_prefix, [yy], [],
inline inline
]b4_parser_class_name[::stack_symbol_type::stack_symbol_type (state_type s, symbol_type& sym) ]b4_parser_class_name[::stack_symbol_type::stack_symbol_type (state_type s, symbol_type& that)
: super_type (s]b4_locations_if([, sym.location])[) : super_type (s]b4_locations_if([, that.location])[)
{]b4_variant_if([[ {
]b4_symbol_variant([sym.type_get ()], [value], [move], [sym.value])], ]b4_variant_if([b4_symbol_variant([that.type_get ()],
[value = sym.value;])[ [value], [move], [that.value])],
// sym is emptied. [[value = that.value;]])[
sym.type = -1; // that is emptied.
that.type = -1;
} }
inline inline
]b4_parser_class_name[::stack_symbol_type& ]b4_parser_class_name[::stack_symbol_type&
]b4_parser_class_name[::stack_symbol_type::operator= (const stack_symbol_type& that) ]b4_parser_class_name[::stack_symbol_type::operator= (const stack_symbol_type& that)
{ {
state = that.state;]b4_variant_if([[ state = that.state;
]b4_symbol_variant([that.type_get ()], [value], [copy], [that.value])], ]b4_variant_if([b4_symbol_variant([that.type_get ()],
[value = that.value;])[]b4_locations_if([ [value], [copy], [that.value])],
[[value = that.value;]])[]b4_locations_if([
location = that.location;])[ location = that.location;])[
return *this; return *this;
} }