![]() |
Kea 2.0.2
|
A Bison parser. More...
#include <parser.h>
Classes | |
struct | basic_symbol |
A complete symbol. More... | |
struct | by_kind |
Type access provider for token (enum) based symbols. More... | |
class | context |
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... | |
class | value_type |
A buffer to store and retrieve objects. More... | |
Public Types | |
typedef by_kind | by_type |
Backward compatibility for a private implementation detail (Bison 3.6). More... | |
typedef int | debug_level_type |
Type for debugging levels. More... | |
typedef location | location_type |
Symbol locations. More... | |
typedef value_type | semantic_type |
Backward compatibility (Bison 3.8). More... | |
typedef symbol_kind::symbol_kind_type | symbol_kind_type |
(Internal) symbol kind. More... | |
typedef token::token_kind_type | token_kind_type |
Token kind, as returned by yylex. More... | |
typedef token_kind_type | token_type |
Backward compatibility alias (Bison 3.6). More... | |
Public Member Functions | |
EvalParser (EvalContext &ctx_yyarg) | |
Build a parser object. More... | |
virtual | ~EvalParser () |
debug_level_type | debug_level () const YY_ATTRIBUTE_PURE |
The current debugging level. More... | |
std::ostream & | debug_stream () const YY_ATTRIBUTE_PURE |
The current debugging stream. More... | |
virtual void | error (const location_type &loc, const std::string &msg) |
Report a syntax error. More... | |
void | error (const syntax_error &err) |
Report a syntax error. More... | |
int | operator() () |
Parse. More... | |
virtual int | parse () |
Parse. More... | |
void | set_debug_level (debug_level_type l) |
Set the current debugging level. More... | |
void | set_debug_stream (std::ostream &) |
Set the current debugging stream. More... | |
Static Public Attributes | |
static const symbol_kind_type | YYNTOKENS = symbol_kind::YYNTOKENS |
The number of tokens. More... | |
typedef int isc::eval::EvalParser::debug_level_type |
typedef location isc::eval::EvalParser::location_type |
isc::eval::EvalParser::EvalParser | ( | EvalContext & | ctx_yyarg | ) |
EvalParser::debug_level_type isc::eval::EvalParser::debug_level | ( | ) | const |
std::ostream & isc::eval::EvalParser::debug_stream | ( | ) | const |
|
virtual |
void isc::eval::EvalParser::error | ( | const syntax_error & | err | ) |
Report a syntax error.
Definition at line 1744 of file parser.cc.
References error(), and isc::eval::EvalParser::syntax_error::location.
|
inlinestatic |
Definition at line 1748 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_ADDRTOTEXT.
|
inlinestatic |
Definition at line 1658 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_ALL.
|
inlinestatic |
Definition at line 1223 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_AND.
|
inlinestatic |
Definition at line 1928 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_ANY.
|
inlinestatic |
Definition at line 1538 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_CHADDR.
|
inlinestatic |
Definition at line 1583 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_CIADDR.
|
inlinestatic |
Definition at line 1673 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_COMA.
|
inlinestatic |
Definition at line 1688 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_CONCAT.
|
inlinestatic |
Definition at line 1943 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_DATA.
|
inlinestatic |
Definition at line 1388 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_DOT.
|
inlinestatic |
Definition at line 1493 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_DST.
|
inlinestatic |
Definition at line 1133 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_END.
|
inlinestatic |
Definition at line 1958 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_ENTERPRISE.
|
inlinestatic |
Definition at line 1253 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_EQUAL.
|
inlinestatic |
Definition at line 1148 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_EVALerror.
|
inlinestatic |
Definition at line 1163 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_EVALUNDEF.
|
inlinestatic |
Definition at line 1433 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_EXISTS.
|
inlinestatic |
Definition at line 1598 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_GIADDR.
|
inlinestatic |
Definition at line 1418 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_HEX.
|
inlinestatic |
Definition at line 2033 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_HEXSTRING.
|
inlinestatic |
Definition at line 1553 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_HLEN.
|
inlinestatic |
Definition at line 1568 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_HTYPE.
|
inlinestatic |
Definition at line 1463 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_IFACE.
|
inlinestatic |
Definition at line 1718 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_IFELSE.
|
inlinestatic |
Definition at line 1778 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_INT16TOTEXT.
|
inlinestatic |
Definition at line 1793 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_INT32TOTEXT.
|
inlinestatic |
Definition at line 1763 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_INT8TOTEXT.
|
inlinestatic |
Definition at line 2018 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_INTEGER.
|
inlinestatic |
Definition at line 2063 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_IP_ADDRESS.
|
inlinestatic |
Definition at line 1358 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_LBRACKET.
|
inlinestatic |
Definition at line 1508 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_LEN.
|
inlinestatic |
Definition at line 1343 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_LINKADDR.
|
inlinestatic |
Definition at line 1178 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_LPAREN.
|
inlinestatic |
Definition at line 1313 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_MEMBER.
|
inlinestatic |
Definition at line 1868 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_MSGTYPE.
|
inlinestatic |
Definition at line 1208 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_NOT.
|
inlinestatic |
Definition at line 1268 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_OPTION.
|
inlinestatic |
Definition at line 2048 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_OPTION_NAME.
|
inlinestatic |
Definition at line 1238 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_OR.
|
inlinestatic |
Definition at line 1328 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_PEERADDR.
|
inlinestatic |
Definition at line 1448 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_PKT.
|
inlinestatic |
Definition at line 1523 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_PKT4.
|
inlinestatic |
Definition at line 1853 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_PKT6.
|
inlinestatic |
Definition at line 1703 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_PLUS.
|
inlinestatic |
Definition at line 1373 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_RBRACKET.
|
inlinestatic |
Definition at line 1283 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_RELAY4.
|
inlinestatic |
Definition at line 1298 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_RELAY6.
|
inlinestatic |
Definition at line 1193 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_RPAREN.
|
inlinestatic |
Definition at line 1628 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_SIADDR.
|
inlinestatic |
Definition at line 1478 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_SRC.
|
inlinestatic |
Definition at line 2003 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_STRING.
|
inlinestatic |
Definition at line 1643 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_SUBSTRING.
|
inlinestatic |
Definition at line 1403 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_TEXT.
|
inlinestatic |
Definition at line 1733 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_TOHEXSTRING.
|
inlinestatic |
Definition at line 1973 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_TOPLEVEL_BOOL.
|
inlinestatic |
Definition at line 1988 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_TOPLEVEL_STRING.
|
inlinestatic |
Definition at line 1883 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_TRANSID.
|
inlinestatic |
Definition at line 1823 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_UINT16TOTEXT.
|
inlinestatic |
Definition at line 1838 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_UINT32TOTEXT.
|
inlinestatic |
Definition at line 1808 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_UINT8TOTEXT.
|
inlinestatic |
Definition at line 1913 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_VENDOR.
|
inlinestatic |
Definition at line 1898 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_VENDOR_CLASS.
|
inlinestatic |
Definition at line 1613 of file parser.h.
References isc::eval::EvalParser::token::TOKEN_YIADDR.
int isc::eval::EvalParser::operator() | ( | ) |
|
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 ().
Definition at line 639 of file parser.cc.
References isc::eval::EvalParser::basic_symbol< Base >::clear(), isc::eval::EvalContext::convertNestLevelNumber(), isc::eval::EvalContext::convertOptionCode(), isc::eval::EvalContext::convertOptionName(), isc::eval::EvalContext::convertUint32(), isc::eval::EvalContext::convertUint8(), isc::eval::EvalParser::basic_symbol< Base >::empty(), error(), isc::eval::EvalContext::expression, isc::eval::EvalContext::getUniverse(), isc::eval::EvalContext::isClientClassDefined(), isc::eval::EvalParser::basic_symbol< Base >::location, isc::eval::EvalParser::basic_symbol< Base >::move(), isc::eval::EvalParser::symbol_kind::S_enterprise_id, isc::eval::EvalParser::symbol_kind::S_HEXSTRING, isc::eval::EvalParser::symbol_kind::S_INTEGER, isc::eval::EvalParser::symbol_kind::S_integer_expr, isc::eval::EvalParser::symbol_kind::S_IP_ADDRESS, isc::eval::EvalParser::symbol_kind::S_nest_level, isc::eval::EvalParser::symbol_kind::S_option_code, isc::eval::EvalParser::symbol_kind::S_OPTION_NAME, isc::eval::EvalParser::symbol_kind::S_option_repr_type, isc::eval::EvalParser::symbol_kind::S_pkt4_field, isc::eval::EvalParser::symbol_kind::S_pkt6_field, isc::eval::EvalParser::symbol_kind::S_pkt_metadata, isc::eval::EvalParser::symbol_kind::S_relay6_field, isc::eval::EvalParser::symbol_kind::S_STRING, isc::eval::EvalParser::symbol_kind::S_sub_option_code, isc::eval::EvalParser::symbol_kind::S_YYEOF, isc::eval::EvalParser::symbol_kind::S_YYerror, isc::eval::EvalParser::symbol_kind::S_YYUNDEF, YY_MOVE, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, YYCDEBUG, YYERROR, yylex, and YYLLOC_DEFAULT.
Referenced by operator()(), and isc::eval::EvalContext::parseString().
void isc::eval::EvalParser::set_debug_level | ( | debug_level_type | l | ) |
Set the current debugging level.
Definition at line 604 of file parser.cc.
Referenced by isc::eval::EvalContext::parseString().
void isc::eval::EvalParser::set_debug_stream | ( | std::ostream & | o | ) |
|
static |
The user-facing name of the symbol whose (internal) number is YYSYMBOL.
No bounds checking.
Definition at line 1790 of file parser.cc.
Referenced by isc::eval::EvalParser::basic_symbol< Base >::name().
|
static |
The number of tokens.
Definition at line 676 of file parser.h.
Referenced by isc::eval::EvalParser::context::expected_tokens().