g2o
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
SlamParser::Parser::context Class Reference

#include <bison_parser.h>

Collaboration diagram for SlamParser::Parser::context:
Collaboration graph
[legend]

Public Member Functions

 context (const Parser &yyparser, const symbol_type &yyla)
 
const symbol_typelookahead () const YY_NOEXCEPT
 
symbol_kind_type token () const YY_NOEXCEPT
 
const location_typelocation () const YY_NOEXCEPT
 
int expected_tokens (symbol_kind_type yyarg[], int yyargn) const
 

Private Attributes

const Parseryyparser_
 
const symbol_typeyyla_
 

Detailed Description

Definition at line 450 of file bison_parser.h.

Constructor & Destructor Documentation

◆ context()

SlamParser::Parser::context::context ( const Parser yyparser,
const symbol_type yyla 
)

Definition at line 1013 of file bison_parser.cpp.

1014 : yyparser_(yyparser), yyla_(yyla) {}
const symbol_type & yyla_

Member Function Documentation

◆ expected_tokens()

int SlamParser::Parser::context::expected_tokens ( symbol_kind_type  yyarg[],
int  yyargn 
) const

Put in YYARG at most YYARGN of the expected tokens, and return the number of tokens stored in YYARG. If YYARG is null, return the number of expected tokens (guaranteed to be less than YYNTOKENS).

Definition at line 1016 of file bison_parser.cpp.

1017 {
1018 // Actual number of expected tokens
1019 int yycount = 0;
1020
1021 const int yyn = yypact_[+yyparser_.yystack_[0].state];
1022 if (!yy_pact_value_is_default_(yyn)) {
1023 /* Start YYX at -YYN if negative to avoid negative indexes in
1024 YYCHECK. In other words, skip the first -YYN actions for
1025 this state because they are default actions. */
1026 const int yyxbegin = yyn < 0 ? -yyn : 0;
1027 // Stay within bounds of both yycheck and yytname.
1028 const int yychecklim = yylast_ - yyn + 1;
1029 const int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1030 for (int yyx = yyxbegin; yyx < yyxend; ++yyx)
1031 if (yycheck_[yyx + yyn] == yyx && yyx != symbol_kind::S_YYerror &&
1032 !yy_table_value_is_error_(yytable_[yyx + yyn])) {
1033 if (!yyarg)
1034 ++yycount;
1035 else if (yycount == yyargn)
1036 return 0;
1037 else
1038 yyarg[yycount++] = YY_CAST(symbol_kind_type, yyx);
1039 }
1040 }
1041
1042 if (yyarg && yycount == 0 && 0 < yyargn) yyarg[0] = symbol_kind::S_YYEMPTY;
1043 return yycount;
1044}
#define YY_CAST(Type, Val)
static bool yy_table_value_is_error_(int yyvalue) YY_NOEXCEPT
static bool yy_pact_value_is_default_(int yyvalue) YY_NOEXCEPT
stack_type yystack_
The stack.
static const signed char yypact_[]
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
static const symbol_kind_type YYNTOKENS
The number of tokens.
@ yylast_
Last index in yytable_.
static const signed char yycheck_[]
static const signed char yytable_[]

References SlamParser::Parser::symbol_kind::S_YYEMPTY, SlamParser::Parser::symbol_kind::S_YYerror, YY_CAST, SlamParser::Parser::yy_pact_value_is_default_(), SlamParser::Parser::yy_table_value_is_error_(), SlamParser::Parser::yycheck_, SlamParser::Parser::yylast_, SlamParser::Parser::YYNTOKENS, SlamParser::Parser::yypact_, and SlamParser::Parser::yytable_.

Referenced by SlamParser::Parser::yy_syntax_error_arguments_().

◆ location()

const location_type & SlamParser::Parser::context::location ( ) const
inline

Definition at line 455 of file bison_parser.h.

455{ return yyla_.location; }
location_type location
The location.

References SlamParser::location::location().

◆ lookahead()

const symbol_type & SlamParser::Parser::context::lookahead ( ) const
inline

Definition at line 453 of file bison_parser.h.

453{ return yyla_; }

Referenced by SlamParser::Parser::yy_syntax_error_arguments_().

◆ token()

symbol_kind_type SlamParser::Parser::context::token ( ) const
inline

Definition at line 454 of file bison_parser.h.

454{ return yyla_.kind(); }
symbol_kind_type kind() const YY_NOEXCEPT

Referenced by SlamParser::Parser::yy_syntax_error_arguments_().

Member Data Documentation

◆ yyla_

const symbol_type& SlamParser::Parser::context::yyla_
private

Definition at line 464 of file bison_parser.h.

◆ yyparser_

const Parser& SlamParser::Parser::context::yyparser_
private

Definition at line 463 of file bison_parser.h.


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