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

Classes | |
| struct | basic_symbol |
| struct | by_kind |
| Type access provider for token (enum) based symbols. More... | |
| struct | by_state |
| Type access provider for state based symbols. More... | |
| class | context |
| class | stack |
| A stack with random access from its top. More... | |
| struct | stack_symbol_type |
| "Internal" symbol: element of the stack. More... | |
| struct | symbol_kind |
| Symbol kinds. More... | |
| struct | symbol_type |
| "External" symbols: returned by the scanner. More... | |
| struct | syntax_error |
| Syntax errors thrown from user actions. More... | |
| struct | token |
| Token kinds. More... | |
| union | value_type |
| Symbol semantic values. More... | |
Public Types | |
| typedef value_type | semantic_type |
| Backward compatibility (Bison 3.8). | |
| typedef token::token_kind_type | token_kind_type |
| Token kind, as returned by yylex. | |
| typedef token_kind_type | token_type |
| Backward compatibility alias (Bison 3.6). | |
| typedef symbol_kind::symbol_kind_type | symbol_kind_type |
| (Internal) symbol kind. | |
| typedef by_kind | by_type |
| Backward compatibility for a private implementation detail (Bison 3.6). | |
Public Member Functions | |
| Parser (class Aprepro &aprepro_yyarg) | |
| Build a parser object. | |
| virtual | ~Parser () |
| int | operator() () |
| virtual int | parse () |
| virtual void | error (const std::string &msg) |
| void | error (const syntax_error &err) |
| Report a syntax error. | |
Static Public Member Functions | |
| static std::string | symbol_name (symbol_kind_type yysymbol) |
Static Public Attributes | |
| static const symbol_kind_type | YYNTOKENS = symbol_kind::YYNTOKENS |
| The number of tokens. | |
Private Types | |
| enum | { yylast_ = 2086 , yynnts_ = 7 , yyfinal_ = 2 } |
| Constants. More... | |
| typedef short | state_type |
| Stored state numbers (used for stacks). | |
| typedef stack< stack_symbol_type > | stack_type |
| Stack type. | |
Private Member Functions | |
| Parser (const Parser &) | |
| Non copyable. | |
| Parser & | operator= (const Parser &) |
| Non copyable. | |
| int | yy_syntax_error_arguments_ (const context &yyctx, symbol_kind_type yyarg[], int yyargn) const |
| The arguments of the error message. | |
| virtual std::string | yysyntax_error_ (const context &yyctx) const |
| template<typename Base> | |
| void | yy_destroy_ (const char *yymsg, basic_symbol< Base > &yysym) const |
| Reclaim the memory associated to a symbol. | |
| 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) YY_NOEXCEPT |
| Pop n symbols from the stack. | |
Static Private Member Functions | |
| static state_type | yy_lr_goto_state_ (state_type yystate, int yysym) |
| static bool | yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT |
| static bool | yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT |
| static symbol_kind_type | yytranslate_ (int t) YY_NOEXCEPT |
| static std::string | yytnamerr_ (const char *yystr) |
| Convert the symbol name n to a form suitable for a diagnostic. | |
Private Attributes | |
| stack_type | yystack_ |
| The stack. | |
| class Aprepro & | aprepro |
Static Private Attributes | |
| static const signed char | yypact_ninf_ = -32 |
| static const signed char | yytable_ninf_ = -1 |
| static const char *const | yytname_ [] |
| For a symbol, its name in clear. | |
| static const short | yypact_ [] |
| static const unsigned char | yydefact_ [] |
| static const short | yypgoto_ [] = {-32, -32, -32, 30, 232, 130, -4} |
| static const unsigned char | yydefgoto_ [] = {0, 1, 6, 27, 28, 76, 235} |
| static const short | yytable_ [] |
| static const short | yycheck_ [] |
| static const signed char | yystos_ [] |
| static const signed char | yyr1_ [] |
| static const signed char | yyr2_ [] |
A Bison parser.
| typedef by_kind SEAMS::Parser::by_type |
Backward compatibility for a private implementation detail (Bison 3.6).
Backward compatibility (Bison 3.8).
|
private |
Stack type.
|
private |
Stored state numbers (used for stacks).
(Internal) symbol kind.
Token kind, as returned by yylex.
Backward compatibility alias (Bison 3.6).
|
private |
| SEAMS::Parser::Parser | ( | class Aprepro & | aprepro_yyarg | ) |
Build a parser object.
|
virtual |
|
private |
Non copyable.
|
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 ().
|
static |
The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking.
|
private |
Reclaim the memory associated to a symbol.
| yymsg | Why this token is reclaimed. If null, print nothing. |
| yysym | The symbol. |
|
staticprivate |
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 |
The arguments of the error message.
|
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 |
Generate an error message.
| yyctx | the context in which the error occurred. |
|
staticprivate |
Convert the symbol name n to a form suitable for a diagnostic.
|
staticprivate |
Convert a scanner token kind t to a symbol kind. In theory t should be a token_kind_type, but character literals are valid, yet not members of the token_kind_type enum.
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
The number of tokens.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
The stack.
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
For a symbol, its name in clear.