|
Aprepro
5.0x
|
A Bison parser. More...
#include <aprepro_parser.h>

Classes | |
| struct | basic_symbol |
| struct | by_state |
| Type access provider for state based symbols. More... | |
| struct | by_type |
| Type access provider for token (enum) based symbols. More... | |
| union | semantic_type |
| Symbol semantic values. More... | |
| class | stack |
| A stack with random access from its top. More... | |
| struct | stack_symbol_type |
| "Internal" symbol: element of the stack. More... | |
| struct | symbol_type |
| "External" symbols: returned by the scanner. More... | |
| struct | syntax_error |
| Syntax errors thrown from user actions. More... | |
| struct | token |
| Tokens. More... | |
Public Types | |
| enum | { empty_symbol = -2 } |
| The symbol type number to denote an empty symbol. More... | |
| typedef token::yytokentype | token_type |
| (External) token type, as returned by yylex. More... | |
| typedef int | symbol_number_type |
| Symbol type: an internal symbol number. More... | |
| typedef unsigned char | token_number_type |
| Internal symbol number for tokens (subsumed by symbol_number_type). More... | |
| typedef int | debug_level_type |
| Type for debugging levels. More... | |
Public Member Functions | |
| Parser (class Aprepro &aprepro_yyarg) | |
| Build a parser object. More... | |
| virtual | ~Parser () |
| int | operator() () |
| virtual int | parse () |
| std::ostream & | debug_stream () const YY_ATTRIBUTE_PURE |
| The current debugging stream. More... | |
| void | set_debug_stream (std::ostream &) |
| Set the current debugging stream. More... | |
| debug_level_type | debug_level () const YY_ATTRIBUTE_PURE |
| The current debugging level. More... | |
| void | set_debug_level (debug_level_type l) |
| Set the current debugging level. More... | |
| virtual void | error (const std::string &msg) |
| void | error (const syntax_error &err) |
| Report a syntax error. More... | |
Private Types | |
| enum | { yyeof_ = 0, yylast_ = 1315, yynnts_ = 7, yyfinal_ = 2, yyterror_ = 1, yyerrcode_ = 256, yyntokens_ = 50 } |
| Constants. More... | |
| typedef int | state_type |
| State numbers. More... | |
| typedef stack< stack_symbol_type > | stack_type |
| Stack type. More... | |
Private Member Functions | |
| Parser (const Parser &) | |
| This class is not copiable. More... | |
| Parser & | operator= (const Parser &) |
| virtual std::string | yysyntax_error_ (state_type yystate, const symbol_type &yyla) const |
| state_type | yy_lr_goto_state_ (state_type yystate, int yysym) |
| virtual void | yy_reduce_print_ (int r) |
| Report on the debug stream that the rule r is going to be reduced. More... | |
| virtual void | yystack_print_ () |
| Print the state stack on the debug stream. More... | |
| template<typename Base > | |
| void | yy_print_ (std::ostream &yyo, const basic_symbol< Base > &yysym) const |
| Display a symbol type, value and location. More... | |
| template<typename Base > | |
| void | yy_destroy_ (const char *yymsg, basic_symbol< Base > &yysym) const |
| Reclaim the memory associated to a symbol. More... | |
| void | yypush_ (const char *m, YY_MOVE_REF(stack_symbol_type) sym) |
| void | yypush_ (const char *m, state_type s, YY_MOVE_REF(symbol_type) sym) |
| void | yypop_ (int n=1) |
| Pop n symbols from the stack. More... | |
Static Private Member Functions | |
| static bool | yy_pact_value_is_default_ (int yyvalue) |
| static bool | yy_table_value_is_error_ (int yyvalue) |
| static token_number_type | yytranslate_ (int t) |
| Convert a scanner token number t to a symbol number. More... | |
| static std::string | yytnamerr_ (const char *n) |
| Convert the symbol name n to a form suitable for a diagnostic. More... | |
Private Attributes | |
| int | yydebug_ |
| Debugging level. More... | |
| std::ostream * | yycdebug_ |
| Debug stream. More... | |
| stack_type | yystack_ |
| The stack. More... | |
| class Aprepro & | aprepro |
Static Private Attributes | |
| static const signed char | yypact_ninf_ = -34 |
| static const signed char | yytable_ninf_ = -1 |
| static const short | yypact_ [] |
| static const unsigned char | yydefact_ [] |
| static const signed char | yypgoto_ [] = {-34, -34, -34, -18, 103, 85, -4} |
| static const short | yydefgoto_ [] = {-1, 1, 6, 27, 28, 68, 169} |
| static const unsigned short | yytable_ [] |
| static const short | yycheck_ [] |
| static const unsigned char | yystos_ [] |
| static const unsigned char | yyr1_ [] |
| static const unsigned char | yyr2_ [] |
| static const char *const | yytname_ [] |
| For a symbol, its name in clear. More... | |
| static const unsigned short | yyrline_ [] |
A Bison parser.
| typedef int SEAMS::Parser::debug_level_type |
Type for debugging levels.
|
private |
Stack type.
|
private |
State numbers.
| typedef int SEAMS::Parser::symbol_number_type |
Symbol type: an internal symbol number.
| typedef unsigned char SEAMS::Parser::token_number_type |
Internal symbol number for tokens (subsumed by symbol_number_type).
(External) token type, as returned by yylex.
|
private |
| SEAMS::Parser::Parser | ( | class Aprepro & | aprepro_yyarg | ) |
Build a parser object.
|
virtual |
|
private |
This class is not copiable.
| Parser::debug_level_type SEAMS::Parser::debug_level | ( | ) | const |
The current debugging level.
| std::ostream & SEAMS::Parser::debug_stream | ( | ) | const |
The current debugging stream.
|
virtual |
Report a syntax error.
| msg | a description of the syntax error. |
| void SEAMS::Parser::error | ( | const syntax_error & | err | ) |
Report a syntax error.
| int SEAMS::Parser::operator() | ( | ) |
Parse. An alias for parse ().
|
virtual |
Parse.
Length of the RHS of the rule being reduced.
The lookahead symbol.
The return value of parse ().
| void SEAMS::Parser::set_debug_level | ( | debug_level_type | l | ) |
Set the current debugging level.
| void SEAMS::Parser::set_debug_stream | ( | std::ostream & | o | ) |
Set the current debugging stream.
|
private |
Reclaim the memory associated to a symbol.
| yymsg | Why this token is reclaimed. If null, print nothing. |
| yysym | The symbol. |
|
private |
Compute post-reduction state.
| yystate | the current state |
| yysym | the nonterminal to push on the stack |
|
staticprivate |
Whether the given yypact_ value indicates a defaulted state.
| yyvalue | the value to check |
|
private |
Display a symbol type, value and location.
| yyo | The output stream. |
| yysym | The symbol. |
|
privatevirtual |
Report on the debug stream that the rule r is going to be reduced.
|
staticprivate |
Whether the given yytable_ value indicates a syntax error.
| yyvalue | the value to check |
|
private |
Pop n symbols from the stack.
|
private |
Push a new look ahead token on the state on the stack.
| m | a debug message to display if null, no trace is output. |
| s | the state |
| sym | the symbol (for its value and location). |
|
private |
Push a new state on the stack.
| m | a debug message to display if null, no trace is output. |
| sym | the symbol |
|
privatevirtual |
Print the state stack on the debug stream.
|
privatevirtual |
Generate an error message.
| yystate | the state where the error occurred. |
| yyla | the lookahead token. |
|
staticprivate |
Convert the symbol name n to a form suitable for a diagnostic.
|
staticprivate |
Convert a scanner token number t to a symbol number.
|
private |
|
private |
Debug stream.
|
staticprivate |
|
private |
Debugging level.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
The stack.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
For a symbol, its name in clear.