g2o
Loading...
Searching...
No Matches
SlamParser::Parser::stack_symbol_type Struct Reference

"Internal" symbol: element of the stack. More...

Inheritance diagram for SlamParser::Parser::stack_symbol_type:
Collaboration diagram for SlamParser::Parser::stack_symbol_type:

Public Types

typedef basic_symbol< by_state > super_type
 Superclass.
Public Types inherited from SlamParser::Parser::basic_symbol< by_state >
typedef by_state super_type
 Alias to Base.
Public Types inherited from SlamParser::Parser::by_state
enum  { empty_state = 0 }
typedef state_type kind_type
 The symbol kind as needed by the constructor.

Public Member Functions

 stack_symbol_type ()
 Construct an empty symbol.
 stack_symbol_type (YY_RVREF(stack_symbol_type) that)
 Move or copy construction.
 stack_symbol_type (state_type s, YY_MOVE_REF(symbol_type) sym)
 Steal the contents from sym to build this.
stack_symbol_type & operator= (stack_symbol_type &that)
stack_symbol_type & operator= (const stack_symbol_type &that)
Public Member Functions inherited from SlamParser::Parser::basic_symbol< by_state >
 basic_symbol () YY_NOEXCEPT
 Default constructor.
 basic_symbol (const basic_symbol &that)
 Copy constructor.
 basic_symbol (typename by_state::kind_type t, YY_MOVE_REF(location_type) l)
 Constructor for valueless symbols.
 basic_symbol (typename by_state::kind_type t, YY_RVREF(value_type) v, YY_RVREF(location_type) l)
 Constructor for symbols with semantic value.
 ~basic_symbol ()
 Destroy the symbol.
void clear () YY_NOEXCEPT
 Destroy contents, and record that is empty.
std::string name () const YY_NOEXCEPT
 The user-facing name of this symbol.
symbol_kind_type type_get () const YY_NOEXCEPT
 Backward compatibility (Bison 3.6).
bool empty () const YY_NOEXCEPT
 Whether empty.
void move (basic_symbol &s)
 Destructive move, s is emptied into this.
Public Member Functions inherited from SlamParser::Parser::by_state
 by_state () YY_NOEXCEPT
 Default constructor.
 by_state (kind_type s) YY_NOEXCEPT
 Constructor.
 by_state (const by_state &that) YY_NOEXCEPT
 Copy constructor.
void clear () YY_NOEXCEPT
 Record that this symbol is empty.
void move (by_state &that)
 Steal the symbol kind from that.
symbol_kind_type kind () const YY_NOEXCEPT

Additional Inherited Members

Public Attributes inherited from SlamParser::Parser::basic_symbol< by_state >
value_type value
 The semantic value.
location_type location
 The location.
Public Attributes inherited from SlamParser::Parser::by_state
state_type state

Detailed Description

"Internal" symbol: element of the stack.

Definition at line 608 of file bison_parser.h.

Member Typedef Documentation

◆ super_type

Constructor & Destructor Documentation

◆ stack_symbol_type() [1/3]

SlamParser::Parser::stack_symbol_type::stack_symbol_type ( )

Construct an empty symbol.

Definition at line 260 of file bison_parser.cpp.

260{}

Referenced by operator=(), operator=(), and stack_symbol_type().

◆ stack_symbol_type() [2/3]

SlamParser::Parser::stack_symbol_type::stack_symbol_type ( YY_RVREF(stack_symbol_type) that)

Move or copy construction.

Definition at line 262 of file bison_parser.cpp.

263 : super_type(YY_MOVE(that.state), YY_MOVE(that.value),
264 YY_MOVE(that.location)) {
265#if 201103L <= YY_CPLUSPLUS
266 // that is emptied.
267 that.state = empty_state;
268#endif
269}
#define YY_MOVE
basic_symbol< by_state > super_type
Superclass.

References SlamParser::Parser::by_state::empty_state, SlamParser::Parser::basic_symbol< by_state >::location, stack_symbol_type(), SlamParser::Parser::by_state::state, SlamParser::Parser::basic_symbol< by_state >::value, and YY_MOVE.

◆ stack_symbol_type() [3/3]

SlamParser::Parser::stack_symbol_type::stack_symbol_type ( state_type s,
YY_MOVE_REF(symbol_type) sym )

Steal the contents from sym to build this.

Definition at line 271 of file bison_parser.cpp.

273 : super_type(s, YY_MOVE(that.value), YY_MOVE(that.location)) {
274 // that is emptied.
275 that.kind_ = symbol_kind::S_YYEMPTY;
276}

References SlamParser::Parser::by_kind::kind_, SlamParser::Parser::basic_symbol< by_state >::location, SlamParser::Parser::symbol_kind::S_YYEMPTY, SlamParser::Parser::basic_symbol< by_state >::value, and YY_MOVE.

Member Function Documentation

◆ operator=() [1/2]

Parser::stack_symbol_type & SlamParser::Parser::stack_symbol_type::operator= ( const stack_symbol_type & that)

Assignment, needed by push_back by other implementations. Needed by some other old implementations.

Definition at line 279 of file bison_parser.cpp.

280 {
281 state = that.state;
282 value = that.value;
283 location = that.location;
284 return *this;
285}

References SlamParser::Parser::basic_symbol< Base >::location, SlamParser::Parser::basic_symbol< by_state >::location, stack_symbol_type(), SlamParser::Parser::by_state::state, SlamParser::Parser::basic_symbol< Base >::value, and SlamParser::Parser::basic_symbol< by_state >::value.

◆ operator=() [2/2]

Parser::stack_symbol_type & SlamParser::Parser::stack_symbol_type::operator= ( stack_symbol_type & that)

Assignment, needed by push_back by some old implementations. Moves the contents of that.

Definition at line 287 of file bison_parser.cpp.

288 {
289 state = that.state;
290 value = that.value;
291 location = that.location;
292 // that is emptied.
293 that.state = empty_state;
294 return *this;
295}

References SlamParser::Parser::by_state::empty_state, SlamParser::Parser::basic_symbol< Base >::location, SlamParser::Parser::basic_symbol< by_state >::location, stack_symbol_type(), SlamParser::Parser::by_state::state, SlamParser::Parser::basic_symbol< Base >::value, and SlamParser::Parser::basic_symbol< by_state >::value.


The documentation for this struct was generated from the following files: