mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 09:13:04 +00:00
C++: style: add missing space before parens
* data/c++.m4, data/lalr1.cc, data/stack.hh, data/variant.hh, * examples/variant-11.yy: here.
This commit is contained in:
@@ -226,7 +226,7 @@ m4_define([b4_symbol_type_declare],
|
|||||||
[[ /// A complete symbol.
|
[[ /// A complete symbol.
|
||||||
///
|
///
|
||||||
/// Expects its Base type to provide access to the symbol type
|
/// Expects its Base type to provide access to the symbol type
|
||||||
/// via type_get().
|
/// via type_get ().
|
||||||
///
|
///
|
||||||
/// Provide access to semantic value]b4_locations_if([ and location])[.
|
/// Provide access to semantic value]b4_locations_if([ and location])[.
|
||||||
template <typename Base>
|
template <typename Base>
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ m4_define([_b4_rhs_value],
|
|||||||
|
|
||||||
m4_define([b4_rhs_value],
|
m4_define([b4_rhs_value],
|
||||||
[b4_percent_define_ifdef([api.value.automove],
|
[b4_percent_define_ifdef([api.value.automove],
|
||||||
[YY_MOVE(_b4_rhs_value($@))],
|
[YY_MOVE (_b4_rhs_value($@))],
|
||||||
[_b4_rhs_value($@)])])
|
[_b4_rhs_value($@)])])
|
||||||
|
|
||||||
|
|
||||||
@@ -672,7 +672,7 @@ m4_if(b4_prefix, [yy], [],
|
|||||||
#if defined __cplusplus && 201103L <= __cplusplus
|
#if defined __cplusplus && 201103L <= __cplusplus
|
||||||
yypush_ (m, stack_symbol_type (s, YY_MOVE (sym)));
|
yypush_ (m, stack_symbol_type (s, YY_MOVE (sym)));
|
||||||
#else
|
#else
|
||||||
stack_symbol_type ss(s, sym);
|
stack_symbol_type ss (s, sym);
|
||||||
yypush_ (m, ss);
|
yypush_ (m, ss);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,10 +114,11 @@ m4_define([b4_location_define],
|
|||||||
unsigned column;
|
unsigned column;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Compute max(min, lhs+rhs).
|
/// Compute max (min, lhs+rhs).
|
||||||
static unsigned add_ (unsigned lhs, int rhs, int min)
|
static unsigned add_ (unsigned lhs, int rhs, int min)
|
||||||
{
|
{
|
||||||
return static_cast<unsigned>(std::max(min, static_cast<int>(lhs) + rhs));
|
return static_cast<unsigned> (std::max (min,
|
||||||
|
static_cast<int> (lhs) + rhs));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ m4_define([b4_stack_define],
|
|||||||
void
|
void
|
||||||
push (YY_MOVE_REF (T) t)
|
push (YY_MOVE_REF (T) t)
|
||||||
{
|
{
|
||||||
seq_.push_back (T());
|
seq_.push_back (T ());
|
||||||
operator[](0).move (t);
|
operator[](0).move (t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,15 +55,15 @@ dummy[]_b4_char_sizeof_counter])
|
|||||||
# ---------------------------
|
# ---------------------------
|
||||||
# To be mapped on the list of type names to produce:
|
# To be mapped on the list of type names to produce:
|
||||||
#
|
#
|
||||||
# char dummy1[sizeof(type_name_1)];
|
# char dummy1[sizeof (type_name_1)];
|
||||||
# char dummy2[sizeof(type_name_2)];
|
# char dummy2[sizeof (type_name_2)];
|
||||||
#
|
#
|
||||||
# for defined type names.
|
# for defined type names.
|
||||||
m4_define([b4_char_sizeof],
|
m4_define([b4_char_sizeof],
|
||||||
[b4_symbol_if([$1], [has_type],
|
[b4_symbol_if([$1], [has_type],
|
||||||
[
|
[
|
||||||
m4_map([ b4_symbol_tag_comment], [$@])dnl
|
m4_map([ b4_symbol_tag_comment], [$@])dnl
|
||||||
char _b4_char_sizeof_dummy@{sizeof(b4_symbol([$1], [type]))@};
|
char _b4_char_sizeof_dummy@{sizeof (b4_symbol([$1], [type]))@};
|
||||||
])])
|
])])
|
||||||
|
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ m4_define([b4_variant_define],
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
/// Prohibit blind copies.
|
/// Prohibit blind copies.
|
||||||
self_type& operator=(const self_type&);
|
self_type& operator= (const self_type&);
|
||||||
variant (const self_type&);
|
variant (const self_type&);
|
||||||
|
|
||||||
/// Accessor to raw memory as \a T.
|
/// Accessor to raw memory as \a T.
|
||||||
@@ -271,7 +271,7 @@ m4_define([b4_value_type_declare],
|
|||||||
{]b4_type_foreach([b4_char_sizeof])[};
|
{]b4_type_foreach([b4_char_sizeof])[};
|
||||||
|
|
||||||
/// Symbol semantic values.
|
/// Symbol semantic values.
|
||||||
typedef variant<sizeof(union_type)> semantic_type;][]dnl
|
typedef variant<sizeof (union_type)> semantic_type;][]dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
make_string_uptr (Args&&... args)
|
make_string_uptr (Args&&... args)
|
||||||
{
|
{
|
||||||
// std::make_unique is C++14.
|
// std::make_unique is C++14.
|
||||||
return std::unique_ptr<std::string>(new std::string{std::forward<Args>(args)...});
|
return string_uptr (new std::string{std::forward<Args> (args)...});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert to string.
|
// Convert to string.
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ typedef std::vector<std::string> strings_type;
|
|||||||
{
|
{
|
||||||
o << '{';
|
o << '{';
|
||||||
const char *sep = "";
|
const char *sep = "";
|
||||||
for (strings_type::const_iterator i = ss.begin(), end = ss.end();
|
for (strings_type::const_iterator i = ss.begin (), end = ss.end ();
|
||||||
i != end; ++i)
|
i != end; ++i)
|
||||||
{
|
{
|
||||||
o << sep << *i;
|
o << sep << *i;
|
||||||
@@ -110,7 +110,7 @@ namespace yy
|
|||||||
{
|
{
|
||||||
static int stage = -1;
|
static int stage = -1;
|
||||||
++stage;
|
++stage;
|
||||||
parser::location_type loc(YY_NULLPTR, stage + 1, stage + 1);
|
parser::location_type loc (YY_NULLPTR, stage + 1, stage + 1);
|
||||||
switch (stage)
|
switch (stage)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user