[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/6] c++: style changes
From: |
Akim Demaille |
Subject: |
[PATCH 1/6] c++: style changes |
Date: |
Tue, 29 Jan 2013 09:04:32 +0100 |
* data/lalr1.cc: Formatting changes.
And name changes.
---
data/lalr1.cc | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/data/lalr1.cc b/data/lalr1.cc
index 7ebc314..2415603 100644
--- a/data/lalr1.cc
+++ b/data/lalr1.cc
@@ -255,8 +255,7 @@ b4_location_define])])[
/// \param yyo The output stream.
/// \param yysym The symbol.
template <typename Base>
- void yy_print_ (std::ostream& yyo,
- const basic_symbol<Base>& yysym) const;
+ void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
#endif
/// \brief Reclaim the memory associated to a symbol.
@@ -558,22 +557,24 @@ m4_if(b4_prefix, [yy], [],
inline
- ]b4_parser_class_name[::stack_symbol_type::stack_symbol_type (state_type s,
symbol_type& sym)
- : super_type (s]b4_locations_if([, sym.location])[)
- {]b4_variant_if([[
- ]b4_symbol_variant([sym.type_get ()], [value], [move], [sym.value])],
- [value = sym.value;])[
- // sym is emptied.
- sym.type = -1;
+ ]b4_parser_class_name[::stack_symbol_type::stack_symbol_type (state_type s,
symbol_type& that)
+ : super_type (s]b4_locations_if([, that.location])[)
+ {
+ ]b4_variant_if([b4_symbol_variant([that.type_get ()],
+ [value], [move], [that.value])],
+ [[value = that.value;]])[
+ // that is emptied.
+ that.type = -1;
}
inline
]b4_parser_class_name[::stack_symbol_type&
]b4_parser_class_name[::stack_symbol_type::operator= (const
stack_symbol_type& that)
{
- state = that.state;]b4_variant_if([[
- ]b4_symbol_variant([that.type_get ()], [value], [copy], [that.value])],
- [value = that.value;])[]b4_locations_if([
+ state = that.state;
+ ]b4_variant_if([b4_symbol_variant([that.type_get ()],
+ [value], [copy], [that.value])],
+ [[value = that.value;]])[]b4_locations_if([
location = that.location;])[
return *this;
}
--
1.8.1.1
- [PATCH 0/6] {master} c++: various improvements, Akim Demaille, 2013/01/29
- [PATCH 2/6] c++: improve the signature of yysyntax_error_, Akim Demaille, 2013/01/29
- [PATCH 4/6] c++: use more explicit types than int, Akim Demaille, 2013/01/29
- [PATCH 1/6] c++: style changes,
Akim Demaille <=
- [PATCH 6/6] c++: please G++ 4.8 with -O3: type puning issue, Akim Demaille, 2013/01/29
- [PATCH 3/6] c++: value_type -> kind_type, Akim Demaille, 2013/01/29
- [PATCH 5/6] c++: please G++ 4.8 with -O3: array bounds, Akim Demaille, 2013/01/29