ztsdb
|
A Bison parser. More...
#include <cfgparser.hpp>
Classes | |
struct | basic_symbol |
struct | by_type |
Type access provider for token (enum) based symbols. More... | |
class | semantic_type |
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. | |
typedef location | location_type |
Symbol locations. | |
typedef token::yytokentype | token_type |
(External) token type, as returned by yylex. | |
typedef int | symbol_number_type |
Symbol type: an internal symbol number. | |
typedef signed char | token_number_type |
Internal symbol number for tokens (subsumed by symbol_number_type). | |
typedef int | debug_level_type |
Type for debugging levels. | |
Public Member Functions | |
parser (cfg::CfgCtx &ctx_yyarg, yyscan_t scanner_yyarg) | |
Build a parser object. | |
int | operator() () |
virtual int | parse () |
std::ostream & | debug_stream () const YY_ATTRIBUTE_PURE |
The current debugging stream. | |
void | set_debug_stream (std::ostream &) |
Set the current debugging stream. | |
debug_level_type | debug_level () const YY_ATTRIBUTE_PURE |
The current debugging level. | |
void | set_debug_level (debug_level_type l) |
Set the current debugging level. | |
virtual void | error (const location_type &loc, const std::string &msg) |
void | error (const syntax_error &err) |
Report a syntax error. | |
Static Public Member Functions | |
static symbol_type | make_END (const location_type &l) |
static symbol_type | make_STRING_LITERAL (const std::string &v, const location_type &l) |
static symbol_type | make_SYMBOL (const std::string &v, const location_type &l) |
static symbol_type | make_INTEGER (const int64_t &v, const location_type &l) |
static symbol_type | make_DOUBLE (const double &v, const location_type &l) |
static symbol_type | make_EQ (const location_type &l) |
static symbol_type | make_NL (const location_type &l) |
A Bison parser.
|
virtual |
Report a syntax error.
loc | where the syntax error is found. |
msg | a description of the syntax error. |
int cfgyy::parser::operator() | ( | ) |
Parse. An alias for parse ().
|
virtual |
Parse.
Length of the RHS of the rule being reduced.
The lookahead symbol.
The locations where the error started and ended.
The return value of parse ().