torc-master
|
A Bison parser. More...
#include <XdlParser.hpp>
Data Structures | |
struct | token |
Tokens. More... | |
Public Types | |
typedef YYSTYPE | semantic_type |
Symbol semantic values. More... | |
typedef location | location_type |
Symbol locations. More... | |
typedef token::yytokentype | token_type |
Token type. More... | |
typedef int | debug_level_type |
Type for debugging levels. More... | |
Public Member Functions | |
XdlParser (class XdlImporter &xdl_yyarg) | |
Build a parser object. More... | |
virtual | ~XdlParser () |
virtual int | parse () |
std::ostream & | debug_stream () const |
The current debugging stream. More... | |
void | set_debug_stream (std::ostream &) |
Set the current debugging stream. More... | |
debug_level_type | debug_level () const |
The current debugging level. More... | |
void | set_debug_level (debug_level_type l) |
Set the current debugging level. More... | |
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... | |
int | yydebug_ |
std::ostream * | yycdebug_ |
class XdlImporter & | xdl |
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_ = -81 |
static const unsigned char | yydefact_ [] |
static const signed char | yypgoto_ [] |
static const short int | yydefgoto_ [] |
static const short int | yytable_ [] |
static const signed char | yytable_ninf_ = -4 |
static const short int | 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_ = 124 |
static const int | yynnts_ = 68 |
static const int | yyempty_ = -2 |
static const int | yyfinal_ = 6 |
static const int | yyterror_ = 1 |
static const int | yyerrcode_ = 256 |
static const int | yyntokens_ = 41 |
static const unsigned int | yyuser_token_number_max_ = 291 |
static const token_number_type | yyundef_token_ = 2 |
A Bison parser.
Definition at line 149 of file XdlParser.hpp.
typedef int torc::XdlParser::debug_level_type |
Type for debugging levels.
Definition at line 220 of file XdlParser.hpp.
|
private |
location stack type.
Definition at line 262 of file XdlParser.hpp.
Symbol locations.
Definition at line 159 of file XdlParser.hpp.
|
private |
Semantic value stack type.
Definition at line 260 of file XdlParser.hpp.
Symbol semantic values.
Definition at line 156 of file XdlParser.hpp.
|
private |
State stack type.
Definition at line 258 of file XdlParser.hpp.
|
private |
State numbers.
Definition at line 256 of file XdlParser.hpp.
|
private |
Internal symbol numbers.
Definition at line 272 of file XdlParser.hpp.
Token type.
Definition at line 204 of file XdlParser.hpp.
torc::XdlParser::XdlParser | ( | class XdlImporter & | xdl_yyarg | ) |
|
virtual |
Definition at line 154 of file XdlParser.cpp.
XdlParser::debug_level_type torc::XdlParser::debug_level | ( | ) | const |
The current debugging level.
Definition at line 229 of file XdlParser.cpp.
std::ostream & torc::XdlParser::debug_stream | ( | ) | const |
|
privatevirtual |
Report a syntax error.
loc | where the syntax error is found. |
msg | a description of the syntax error. |
Definition at line 1525 of file XdlParser.cpp.
|
virtual |
Parse.
Look-ahead and look-ahead in internal form.
Semantic value of the look-ahead.
Location of the look-ahead.
The locations where the error started and ended.
$$.
$.
Definition at line 242 of file XdlParser.cpp.
void torc::XdlParser::set_debug_level | ( | debug_level_type | l | ) |
Set the current debugging level.
Definition at line 235 of file XdlParser.cpp.
void torc::XdlParser::set_debug_stream | ( | std::ostream & | o | ) |
|
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 190 of file XdlParser.cpp.
|
inlineprivate |
Pop n symbols the three stacks.
Definition at line 208 of file XdlParser.cpp.
|
privatevirtual |
Generate an error message.
state | the state where the error occurred. |
tok | the look-ahead token. |
Definition at line 1097 of file XdlParser.cpp.
|
privatevirtual |
Convert the symbol name n to a form suitable for a diagnostic.
|
private |
Convert a scanner token number t to a symbol number.
Definition at line 1459 of file XdlParser.cpp.
|
private |
Definition at line 366 of file XdlParser.hpp.
|
private |
Definition at line 362 of file XdlParser.hpp.
|
staticprivate |
Definition at line 294 of file XdlParser.hpp.
|
private |
Definition at line 361 of file XdlParser.hpp.
|
staticprivate |
For a state, default rule to reduce. Unlessyytable_ specifies something else to do. Zero means the default is an error.
Definition at line 281 of file XdlParser.hpp.
|
staticprivate |
Definition at line 284 of file XdlParser.hpp.
|
staticprivate |
Definition at line 352 of file XdlParser.hpp.
|
staticprivate |
Definition at line 348 of file XdlParser.hpp.
|
staticprivate |
Definition at line 355 of file XdlParser.hpp.
|
staticprivate |
Definition at line 353 of file XdlParser.hpp.
|
staticprivate |
Definition at line 350 of file XdlParser.hpp.
|
private |
The location stack.
Definition at line 269 of file XdlParser.hpp.
|
staticprivate |
Definition at line 351 of file XdlParser.hpp.
|
staticprivate |
Definition at line 356 of file XdlParser.hpp.
|
staticprivate |
For a state, the index in yytable_ of its portion.
Definition at line 275 of file XdlParser.hpp.
|
staticprivate |
Definition at line 276 of file XdlParser.hpp.
|
staticprivate |
Definition at line 283 of file XdlParser.hpp.
|
staticprivate |
For a rule, its LHS.
Definition at line 300 of file XdlParser.hpp.
|
staticprivate |
For a rule, its RHS length.
Definition at line 302 of file XdlParser.hpp.
|
private |
The semantic value stack.
Definition at line 267 of file XdlParser.hpp.
|
private |
The state stack.
Definition at line 265 of file XdlParser.hpp.
|
staticprivate |
For a state, its accessing symbol.
Definition at line 297 of file XdlParser.hpp.
|
staticprivate |
What to do in a state. yytable_[yypact_[s]]: what to do in state s.
Definition at line 291 of file XdlParser.hpp.
|
staticprivate |
Definition at line 292 of file XdlParser.hpp.
|
staticprivate |
Definition at line 354 of file XdlParser.hpp.
|
staticprivate |
For a symbol, its name in clear.
Definition at line 306 of file XdlParser.hpp.
|
staticprivate |
Definition at line 358 of file XdlParser.hpp.
|
staticprivate |
Definition at line 357 of file XdlParser.hpp.