g2o
|
A Bison parser. More...
#include <bison_parser.h>
Classes | |
union | semantic_type |
Symbol semantic values. More... | |
struct | token |
Tokens. More... | |
Public Types | |
typedef location | location_type |
Symbol locations. More... | |
typedef token::yytokentype | token_type |
Token type. More... | |
Public Member Functions | |
Parser (class Driver &driver_yyarg) | |
Build a parser object. More... | |
virtual | ~Parser () |
virtual int | parse () |
Private Types | |
typedef int | state_type |
State numbers. More... | |
typedef stack< state_type > | state_stack_type |
State stack type. More... | |
typedef stack< semantic_type > | semantic_stack_type |
Semantic value stack type. More... | |
typedef stack< location_type > | location_stack_type |
location stack type. More... | |
typedef unsigned char | token_number_type |
Internal symbol numbers. More... | |
Private Member Functions | |
virtual void | error (const location_type &loc, const std::string &msg) |
virtual std::string | yysyntax_error_ (int yystate, int tok) |
virtual std::string | yytnamerr_ (const char *n) |
Convert the symbol name n to a form suitable for a diagnostic. More... | |
token_number_type | yytranslate_ (int t) |
Convert a scanner token number t to a symbol number. More... | |
void | yydestruct_ (const char *yymsg, int yytype, semantic_type *yyvaluep, location_type *yylocationp) |
Reclaim the memory associated to a symbol. More... | |
void | yypop_ (unsigned int n=1) |
Pop n symbols the three stacks. More... | |
Private Attributes | |
state_stack_type | yystate_stack_ |
The state stack. More... | |
semantic_stack_type | yysemantic_stack_ |
The semantic value stack. More... | |
location_stack_type | yylocation_stack_ |
The location stack. More... | |
class Driver & | driver |
Static Private Attributes | |
static const signed char | yypact_ [] |
For a state, the index in yytable_ of its portion. More... | |
static const signed char | yypact_ninf_ = -24 |
static const unsigned char | yydefact_ [] |
static const signed char | yypgoto_ [] |
static const signed char | yydefgoto_ [] |
static const unsigned char | yytable_ [] |
static const signed char | yytable_ninf_ = -1 |
static const signed char | yycheck_ [] |
static const unsigned char | yystos_ [] |
For a state, its accessing symbol. More... | |
static const unsigned char | yyr1_ [] |
For a rule, its LHS. More... | |
static const unsigned char | yyr2_ [] |
For a rule, its RHS length. More... | |
static const char *const | yytname_ [] |
For a symbol, its name in clear. More... | |
static const int | yyeof_ = 0 |
static const int | yylast_ = 68 |
static const int | yynnts_ = 10 |
static const int | yyempty_ = -2 |
static const int | yyfinal_ = 2 |
static const int | yyterror_ = 1 |
static const int | yyerrcode_ = 256 |
static const int | yyntokens_ = 16 |
static const unsigned int | yyuser_token_number_max_ = 269 |
static const token_number_type | yyundef_token_ = 2 |
A Bison parser.
Definition at line 114 of file bison_parser.h.
|
private |
location stack type.
Definition at line 223 of file bison_parser.h.
Symbol locations.
Definition at line 140 of file bison_parser.h.
|
private |
Semantic value stack type.
Definition at line 221 of file bison_parser.h.
|
private |
State stack type.
Definition at line 219 of file bison_parser.h.
|
private |
State numbers.
Definition at line 217 of file bison_parser.h.
|
private |
Internal symbol numbers.
Definition at line 233 of file bison_parser.h.
Token type.
Definition at line 163 of file bison_parser.h.
SlamParser::Parser::Parser | ( | class Driver & | driver_yyarg | ) |
|
virtual |
Definition at line 199 of file bison_parser.cpp.
References yyntokens_, yytname_, and YYUSE.
|
privatevirtual |
Report a syntax error.
loc | where the syntax error is found. |
msg | a description of the syntax error. |
Definition at line 1220 of file bison_parser.cpp.
References driver, and SlamParser::Driver::error().
Referenced by parse().
|
virtual |
Parse.
Lookahead and lookahead in internal form.
Semantic value of the lookahead.
Location of the lookahead.
The locations where the error started and ended.
$$.
$.
Definition at line 351 of file bison_parser.cpp.
References SlamParser::location::begin, SlamParser::Parser::semantic_type::commandNode, SlamParser::Parser::semantic_type::doubleVal, driver, SlamParser::location::end, error(), SlamParser::position::filename, SlamParser::Parser::semantic_type::intList, SlamParser::SlamContext::process(), SlamParser::stack< T, S >::push(), SlamParser::Driver::slamContext, SlamParser::Driver::streamname, values, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYCDEBUG, yycheck_, yydefact_, yydefgoto_, yydestruct_(), yyempty_, yyeof_, yyfinal_, yylast_, yylex, YYLLOC_DEFAULT, yylocation_stack_, yyntokens_, yypact_, yypact_ninf_, yypgoto_, yypop_(), yyr1_, yyr2_, yysemantic_stack_, yystate_stack_, yystos_, yysyntax_error_(), yytable_, yytable_ninf_, yyterror_, and yytranslate_().
Referenced by SlamParser::Driver::parse_stream().
|
inlineprivate |
Reclaim the memory associated to a symbol.
yymsg | Why this token is reclaimed. |
yytype | The symbol type. |
yyvaluep | Its semantic value. |
yylocationp | Its location. |
Definition at line 235 of file bison_parser.cpp.
References SlamParser::Parser::semantic_type::commandNode, SlamParser::Parser::semantic_type::stringVal, YY_SYMBOL_PRINT, and YYUSE.
Referenced by parse().
|
inlineprivate |
Pop n symbols the three stacks.
Definition at line 316 of file bison_parser.cpp.
References SlamParser::stack< T, S >::pop(), yylocation_stack_, yysemantic_stack_, and yystate_stack_.
Referenced by parse().
|
privatevirtual |
Generate an error message.
state | the state where the error occurred. |
tok | the lookahead token. |
Definition at line 903 of file bison_parser.cpp.
References SlamParser::stack< T, S >::begin(), SlamParser::stack< T, S >::end(), YY_, YY_SYMBOL_PRINT, yycheck_, yydefact_, yydefgoto_, yylast_, yylocation_stack_, yyntokens_, yypact_, yypact_ninf_, yypgoto_, yyr1_, yyr2_, yysemantic_stack_, yystate_stack_, yystos_, yytable_, yytable_ninf_, yyterror_, yytname_, yytnamerr_(), and YYUSE.
Referenced by parse().
|
privatevirtual |
Convert the symbol name n to a form suitable for a diagnostic.
Definition at line 155 of file bison_parser.cpp.
Referenced by yysyntax_error_().
|
private |
Convert a scanner token number t to a symbol number.
Definition at line 1154 of file bison_parser.cpp.
References yyempty_, yyeof_, yyerrcode_, yyfinal_, yylast_, yynnts_, yyntokens_, yyterror_, yyundef_token_, and yyuser_token_number_max_.
Referenced by parse().
|
private |
Definition at line 326 of file bison_parser.h.
|
staticprivate |
Definition at line 255 of file bison_parser.h.
Referenced by parse(), and yysyntax_error_().
|
staticprivate |
For a state, default rule to reduce. Unlessyytable_ specifies something else to do. Zero means the default is an error.
Definition at line 242 of file bison_parser.h.
Referenced by parse(), and yysyntax_error_().
|
staticprivate |
Definition at line 245 of file bison_parser.h.
Referenced by parse(), and yysyntax_error_().
|
staticprivate |
Definition at line 317 of file bison_parser.h.
Referenced by parse(), and yytranslate_().
|
staticprivate |
Definition at line 313 of file bison_parser.h.
Referenced by parse(), and yytranslate_().
|
staticprivate |
Definition at line 320 of file bison_parser.h.
Referenced by yytranslate_().
|
staticprivate |
Definition at line 318 of file bison_parser.h.
Referenced by parse(), and yytranslate_().
|
staticprivate |
Definition at line 315 of file bison_parser.h.
Referenced by parse(), yysyntax_error_(), and yytranslate_().
|
private |
The location stack.
Definition at line 230 of file bison_parser.h.
Referenced by parse(), yypop_(), and yysyntax_error_().
|
staticprivate |
Definition at line 316 of file bison_parser.h.
Referenced by yytranslate_().
|
staticprivate |
Definition at line 321 of file bison_parser.h.
Referenced by parse(), yysyntax_error_(), yytranslate_(), and ~Parser().
|
staticprivate |
For a state, the index in yytable_ of its portion.
Definition at line 236 of file bison_parser.h.
Referenced by parse(), and yysyntax_error_().
|
staticprivate |
Definition at line 237 of file bison_parser.h.
Referenced by parse(), and yysyntax_error_().
|
staticprivate |
Definition at line 244 of file bison_parser.h.
Referenced by parse(), and yysyntax_error_().
|
staticprivate |
For a rule, its LHS.
Definition at line 261 of file bison_parser.h.
Referenced by parse(), and yysyntax_error_().
|
staticprivate |
For a rule, its RHS length.
Definition at line 263 of file bison_parser.h.
Referenced by parse(), and yysyntax_error_().
|
private |
The semantic value stack.
Definition at line 228 of file bison_parser.h.
Referenced by parse(), yypop_(), and yysyntax_error_().
|
private |
The state stack.
Definition at line 226 of file bison_parser.h.
Referenced by parse(), yypop_(), and yysyntax_error_().
|
staticprivate |
For a state, its accessing symbol.
Definition at line 258 of file bison_parser.h.
Referenced by parse(), and yysyntax_error_().
|
staticprivate |
What to do in a state. yytable_[yypact_[s]]: what to do in state s.
Definition at line 252 of file bison_parser.h.
Referenced by parse(), and yysyntax_error_().
|
staticprivate |
Definition at line 253 of file bison_parser.h.
Referenced by parse(), and yysyntax_error_().
|
staticprivate |
Definition at line 319 of file bison_parser.h.
Referenced by parse(), yysyntax_error_(), and yytranslate_().
|
staticprivate |
For a symbol, its name in clear.
Definition at line 267 of file bison_parser.h.
Referenced by yysyntax_error_(), and ~Parser().
|
staticprivate |
Definition at line 323 of file bison_parser.h.
Referenced by yytranslate_().
|
staticprivate |
Definition at line 322 of file bison_parser.h.
Referenced by yytranslate_().