* data/c++.m4, data/lalr1.cc (by_state, by_type): Do not use -1 to
denote the absence of value, as GCC then fears that this -1 might
be used to dereference arrays (such as yytname).
Use 0, which corresponds to $accept, which is valueless (the needed
property: the symbol destructor must not try to reclaim the memory
associated with the symbol).
/// The token.
token_type token () const;
/// The token.
token_type token () const;
/// The symbol type.
///
/// -1 when this symbol is empty.
/// The symbol type.
///
/// -1 when this symbol is empty.
// by_type.
inline
]b4_parser_class_name[::by_type::by_type ()
// by_type.
inline
]b4_parser_class_name[::by_type::by_type ()
]b4_parser_class_name[::by_type::move (by_type& that)
{
type = that.type;
]b4_parser_class_name[::by_type::move (by_type& that)
{
type = that.type;
void move (by_state& that);
/// The (internal) type number (corresponding to \a state).
void move (by_state& that);
/// The (internal) type number (corresponding to \a state).
+ /// "empty" when empty.
symbol_number_type type_get () const;
symbol_number_type type_get () const;
/// The state.
state_type state;
};
/// The state.
state_type state;
};
// by_state.
inline
]b4_parser_class_name[::by_state::by_state ()
// by_state.
inline
]b4_parser_class_name[::by_state::by_state ()
]b4_parser_class_name[::by_state::move (by_state& that)
{
state = that.state;
]b4_parser_class_name[::by_state::move (by_state& that)
{
state = that.state;
]b4_parser_class_name[::symbol_number_type
]b4_parser_class_name[::by_state::type_get () const
{
]b4_parser_class_name[::symbol_number_type
]b4_parser_class_name[::by_state::type_get () const
{
- return state == -1 ? -1 : yystos_[state];
+ return state == empty ? 0 : yystos_[state];
[value], [move], [that.value])],
[[value = that.value;]])[
// that is emptied.
[value], [move], [that.value])],
[[value = that.value;]])[
// that is emptied.