|
torc-master
|
A Bison parser. More...
#include <LutParser.hpp>
Collaboration diagram for torc::LutParser: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 | |
| LutParser (class Assembler &lut_yyarg) | |
| Build a parser object. More... | |
| virtual | ~LutParser () |
| 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 Assembler & | lut |
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_ = -5 |
| 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_ = 22 |
| static const int | yynnts_ = 7 |
| static const int | yyempty_ = -2 |
| static const int | yyfinal_ = 13 |
| static const int | yyterror_ = 1 |
| static const int | yyerrcode_ = 256 |
| static const int | yyntokens_ = 13 |
| static const unsigned int | yyuser_token_number_max_ = 267 |
| static const token_number_type | yyundef_token_ = 2 |
A Bison parser.
Definition at line 144 of file LutParser.hpp.
| typedef int torc::LutParser::debug_level_type |
Type for debugging levels.
Definition at line 191 of file LutParser.hpp.
|
private |
location stack type.
Definition at line 233 of file LutParser.hpp.
Symbol locations.
Definition at line 154 of file LutParser.hpp.
|
private |
Semantic value stack type.
Definition at line 231 of file LutParser.hpp.
Symbol semantic values.
Definition at line 151 of file LutParser.hpp.
|
private |
State stack type.
Definition at line 229 of file LutParser.hpp.
|
private |
State numbers.
Definition at line 227 of file LutParser.hpp.
|
private |
Internal symbol numbers.
Definition at line 243 of file LutParser.hpp.
Token type.
Definition at line 175 of file LutParser.hpp.
| torc::LutParser::LutParser | ( | class Assembler & | lut_yyarg | ) |
|
virtual |
Definition at line 154 of file LutParser.cpp.
| LutParser::debug_level_type torc::LutParser::debug_level | ( | ) | const |
The current debugging level.
Definition at line 229 of file LutParser.cpp.
| std::ostream & torc::LutParser::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 862 of file LutParser.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
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 LutParser.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void torc::LutParser::set_debug_level | ( | debug_level_type | l | ) |
Set the current debugging level.
Definition at line 235 of file LutParser.cpp.
Here is the caller graph for this function:| void torc::LutParser::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 LutParser.cpp.
Here is the caller graph for this function:
|
inlineprivate |
Pop n symbols the three stacks.
Definition at line 208 of file LutParser.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatevirtual |
Generate an error message.
| state | the state where the error occurred. |
| tok | the look-ahead token. |
Definition at line 585 of file LutParser.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatevirtual |
Convert the symbol name n to a form suitable for a diagnostic.
Here is the caller graph for this function:
|
private |
Convert a scanner token number t to a symbol number.
Definition at line 799 of file LutParser.cpp.
Here is the caller graph for this function:
|
private |
Definition at line 337 of file LutParser.hpp.
|
private |
Definition at line 333 of file LutParser.hpp.
|
staticprivate |
Definition at line 265 of file LutParser.hpp.
|
private |
Definition at line 332 of file LutParser.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 252 of file LutParser.hpp.
|
staticprivate |
Definition at line 255 of file LutParser.hpp.
|
staticprivate |
Definition at line 323 of file LutParser.hpp.
|
staticprivate |
Definition at line 319 of file LutParser.hpp.
|
staticprivate |
Definition at line 326 of file LutParser.hpp.
|
staticprivate |
Definition at line 324 of file LutParser.hpp.
|
staticprivate |
Definition at line 321 of file LutParser.hpp.
|
private |
The location stack.
Definition at line 240 of file LutParser.hpp.
|
staticprivate |
Definition at line 322 of file LutParser.hpp.
|
staticprivate |
Definition at line 327 of file LutParser.hpp.
|
staticprivate |
For a state, the index in yytable_ of its portion.
Definition at line 246 of file LutParser.hpp.
|
staticprivate |
Definition at line 247 of file LutParser.hpp.
|
staticprivate |
Definition at line 254 of file LutParser.hpp.
|
staticprivate |
For a rule, its LHS.
Definition at line 271 of file LutParser.hpp.
|
staticprivate |
For a rule, its RHS length.
Definition at line 273 of file LutParser.hpp.
|
private |
The semantic value stack.
Definition at line 238 of file LutParser.hpp.
|
private |
The state stack.
Definition at line 236 of file LutParser.hpp.
|
staticprivate |
For a state, its accessing symbol.
Definition at line 268 of file LutParser.hpp.
|
staticprivate |
What to do in a state. yytable_[yypact_[s]]: what to do in state s.
Definition at line 262 of file LutParser.hpp.
|
staticprivate |
Definition at line 263 of file LutParser.hpp.
|
staticprivate |
Definition at line 325 of file LutParser.hpp.
|
staticprivate |
For a symbol, its name in clear.
Definition at line 277 of file LutParser.hpp.
|
staticprivate |
Definition at line 329 of file LutParser.hpp.
|
staticprivate |
Definition at line 328 of file LutParser.hpp.