ztsdb
|
A Bison parser. More...
#include <parser.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 yy::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 (ParserCtx &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_DTIME (const Global::dtime &v, const location_type &l) |
static symbol_type | make_INTERVAL (const tz::interval &v, const location_type &l) |
static symbol_type | make_DOUBLE (const double &v, const location_type &l) |
static symbol_type | make_STRING (const string &v, const location_type &l) |
static symbol_type | make_ERROR (const string &v, const location_type &l) |
static symbol_type | make_NULL_ (const location_type &l) |
static symbol_type | make_ELLIPSIS (const location_type &l) |
static symbol_type | make_FUNCTION (const location_type &l) |
static symbol_type | make_SYMBOL (const string &v, const location_type &l) |
static symbol_type | make_OP (const unsigned &v, const location_type &l) |
static symbol_type | make_TRUE (const location_type &l) |
static symbol_type | make_FALSE (const location_type &l) |
static symbol_type | make_LEFT_ASSIGN (const location_type &l) |
static symbol_type | make_DBL_ASSIGN (const location_type &l) |
static symbol_type | make_EQ_ASSIGN (const location_type &l) |
static symbol_type | make_IF (const location_type &l) |
static symbol_type | make_ELSE (const location_type &l) |
static symbol_type | make_FOR (const location_type &l) |
static symbol_type | make_IN (const location_type &l) |
static symbol_type | make_WHILE (const location_type &l) |
static symbol_type | make_NEXT (const location_type &l) |
static symbol_type | make_BREAK (const location_type &l) |
static symbol_type | make_EQ (const location_type &l) |
static symbol_type | make_NE (const location_type &l) |
static symbol_type | make_LT (const location_type &l) |
static symbol_type | make_LE (const location_type &l) |
static symbol_type | make_GT (const location_type &l) |
static symbol_type | make_GE (const location_type &l) |
static symbol_type | make_AND (const location_type &l) |
static symbol_type | make_OR (const location_type &l) |
static symbol_type | make_AND2 (const location_type &l) |
static symbol_type | make_OR2 (const location_type &l) |
static symbol_type | make_DOLLAR (const location_type &l) |
static symbol_type | make_PLUS (const location_type &l) |
static symbol_type | make_MINUS (const location_type &l) |
static symbol_type | make_MUL (const location_type &l) |
static symbol_type | make_DIV (const location_type &l) |
static symbol_type | make_MOD (const location_type &l) |
static symbol_type | make_POWER (const location_type &l) |
static symbol_type | make_NOT (const location_type &l) |
static symbol_type | make_LCURLY (const location_type &l) |
static symbol_type | make_RCURLY (const location_type &l) |
static symbol_type | make_LPAR (const location_type &l) |
static symbol_type | make_RPAR (const location_type &l) |
static symbol_type | make_LSQUARE (const location_type &l) |
static symbol_type | make_RSQUARE (const location_type &l) |
static symbol_type | make_LLSQUARE (const location_type &l) |
static symbol_type | make_COLON (const location_type &l) |
static symbol_type | make_COMMA (const location_type &l) |
static symbol_type | make_QUERY (const location_type &l) |
static symbol_type | make_STT (const location_type &l) |
static symbol_type | make_REF (const location_type &l) |
static symbol_type | make_ESC (const location_type &l) |
static symbol_type | make_EOA (const location_type &l) |
static symbol_type | make_EXPR (const location_type &l) |
static symbol_type | make_EMPTY_ARG (const location_type &l) |
static symbol_type | make_EMPTY_FUNCALL (const location_type &l) |
static symbol_type | make_SUBSET (const location_type &l) |
static symbol_type | make_DBLSUBSET (const location_type &l) |
static symbol_type | make_FUNCALL (const location_type &l) |
static symbol_type | make_UNOT (const location_type &l) |
static symbol_type | make_UMINUS (const location_type &l) |
static symbol_type | make_UPLUS (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 yy::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 ().