![]() |
Kea 2.0.3
|
A Bison parser. More...
#include <agent_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 | |
AgentParser (isc::agent::ParserContext &ctx_yyarg) | |
Build a parser object. More... | |
virtual | ~AgentParser () |
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... | |
A Bison parser.
Definition at line 214 of file agent_parser.h.
Backward compatibility for a private implementation detail (Bison 3.6).
Definition at line 1007 of file agent_parser.h.
typedef int isc::agent::AgentParser::debug_level_type |
Type for debugging levels.
Definition at line 1108 of file agent_parser.h.
typedef location isc::agent::AgentParser::location_type |
Symbol locations.
Definition at line 467 of file agent_parser.h.
Backward compatibility (Bison 3.8).
Definition at line 464 of file agent_parser.h.
(Internal) symbol kind.
Definition at line 736 of file agent_parser.h.
Token kind, as returned by yylex.
Definition at line 552 of file agent_parser.h.
Backward compatibility alias (Bison 3.6).
Definition at line 555 of file agent_parser.h.
isc::agent::AgentParser::AgentParser | ( | isc::agent::ParserContext & | ctx_yyarg | ) |
Build a parser object.
Definition at line 147 of file agent_parser.cc.
|
virtual |
Definition at line 157 of file agent_parser.cc.
AgentParser::debug_level_type isc::agent::AgentParser::debug_level | ( | ) | const |
The current debugging level.
Definition at line 480 of file agent_parser.cc.
std::ostream & isc::agent::AgentParser::debug_stream | ( | ) | const |
The current debugging stream.
Definition at line 467 of file agent_parser.cc.
|
virtual |
Report a syntax error.
loc | where the syntax error is found. |
msg | a description of the syntax error. |
Definition at line 2352 of file agent_parser.cc.
void isc::agent::AgentParser::error | ( | const syntax_error & | err | ) |
Report a syntax error.
Definition at line 1813 of file agent_parser.cc.
References error(), and isc::agent::AgentParser::syntax_error::location.
|
inlinestatic |
Definition at line 1153 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_AGENT_error.
|
inlinestatic |
Definition at line 1168 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_AGENT_UNDEF.
|
inlinestatic |
Definition at line 1363 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_AUTHENTICATION.
|
inlinestatic |
Definition at line 1393 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_BASIC.
|
inlinestatic |
Definition at line 1918 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_BOOLEAN.
|
inlinestatic |
Definition at line 1483 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_CERT_FILE.
|
inlinestatic |
Definition at line 1513 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_CERT_REQUIRED.
|
inlinestatic |
Definition at line 1423 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_CLIENTS.
|
inlinestatic |
Definition at line 1198 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_COLON.
|
inlinestatic |
Definition at line 1183 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_COMMA.
|
inlinestatic |
Definition at line 1348 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_COMMENT.
|
inlinestatic |
Definition at line 1288 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_CONTROL_AGENT.
|
inlinestatic |
Definition at line 1528 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_CONTROL_SOCKETS.
|
inlinestatic |
Definition at line 1573 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_D2_SERVER.
|
inlinestatic |
Definition at line 1738 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_DEBUGLEVEL.
|
inlinestatic |
Definition at line 1543 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_DHCP4_SERVER.
|
inlinestatic |
Definition at line 1558 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_DHCP6_SERVER.
|
inlinestatic |
Definition at line 1138 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_END.
|
inlinestatic |
Definition at line 1903 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_FLOAT.
|
inlinestatic |
Definition at line 1768 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_FLUSH.
|
inlinestatic |
Definition at line 1633 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_HOOKS_LIBRARIES.
|
inlinestatic |
Definition at line 1303 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_HTTP_HOST.
|
inlinestatic |
Definition at line 1318 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_HTTP_PORT.
|
inlinestatic |
Definition at line 1888 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_INTEGER.
|
inlinestatic |
Definition at line 1498 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_KEY_FILE.
|
inlinestatic |
Definition at line 1243 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_LCURLY_BRACKET.
|
inlinestatic |
Definition at line 1648 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_LIBRARY.
|
inlinestatic |
Definition at line 1678 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_LOGGERS.
|
inlinestatic |
Definition at line 1213 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_LSQUARE_BRACKET.
|
inlinestatic |
Definition at line 1783 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_MAXSIZE.
|
inlinestatic |
Definition at line 1798 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_MAXVER.
|
inlinestatic |
Definition at line 1693 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_NAME.
|
inlinestatic |
Definition at line 1273 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_NULL_TYPE.
|
inlinestatic |
Definition at line 1723 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_OUTPUT.
|
inlinestatic |
Definition at line 1708 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_OUTPUT_OPTIONS.
|
inlinestatic |
Definition at line 1663 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_PARAMETERS.
|
inlinestatic |
Definition at line 1453 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_PASSWORD.
|
inlinestatic |
Definition at line 1813 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_PATTERN.
|
inlinestatic |
Definition at line 1258 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_RCURLY_BRACKET.
|
inlinestatic |
Definition at line 1408 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_REALM.
|
inlinestatic |
Definition at line 1228 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_RSQUARE_BRACKET.
|
inlinestatic |
Definition at line 1753 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_SEVERITY.
|
inlinestatic |
Definition at line 1588 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_SOCKET_NAME.
|
inlinestatic |
Definition at line 1603 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_SOCKET_TYPE.
|
inlinestatic |
Definition at line 1843 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_START_AGENT.
Referenced by if().
|
inlinestatic |
Definition at line 1828 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_START_JSON.
Referenced by if().
|
inlinestatic |
Definition at line 1858 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_START_SUB_AGENT.
Referenced by if().
|
inlinestatic |
Definition at line 1873 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_STRING.
|
inlinestatic |
Definition at line 1468 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_TRUST_ANCHOR.
|
inlinestatic |
Definition at line 1378 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_TYPE.
|
inlinestatic |
Definition at line 1618 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_UNIX.
|
inlinestatic |
Definition at line 1438 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_USER.
|
inlinestatic |
Definition at line 1333 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_USER_CONTEXT.
int isc::agent::AgentParser::operator() | ( | ) |
Parse.
An alias for parse ().
Definition at line 515 of file agent_parser.cc.
References 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 ().
Definition at line 521 of file agent_parser.cc.
References isc::agent::ParserContext::AGENT, isc::agent::ParserContext::AUTH_TYPE, isc::agent::ParserContext::AUTHENTICATION, isc::agent::AgentParser::basic_symbol< Base >::clear(), isc::agent::ParserContext::CLIENTS, isc::agent::ParserContext::CONFIG, isc::agent::ParserContext::contextName(), isc::agent::ParserContext::CONTROL_SOCKETS, isc::agent::ParserContext::ctx_, isc::agent::AgentParser::basic_symbol< Base >::empty(), isc::agent::ParserContext::enter(), error(), isc::agent::ParserContext::HOOKS_LIBRARIES, isc::agent::AgentParser::by_kind::kind(), isc::agent::AgentParser::by_kind::kind_, isc::agent::ParserContext::leave(), isc::agent::ParserContext::loc2pos(), isc::agent::AgentParser::basic_symbol< Base >::location, isc::agent::ParserContext::LOGGERS, isc::data::merge(), isc::agent::AgentParser::basic_symbol< Base >::move(), isc::agent::ParserContext::NO_KEYWORDS, isc::agent::ParserContext::OUTPUT_OPTIONS, isc::agent::ParserContext::require(), isc::agent::AgentParser::symbol_kind::S_auth_type_value, isc::agent::AgentParser::symbol_kind::S_BOOLEAN, isc::agent::AgentParser::symbol_kind::S_FLOAT, isc::agent::AgentParser::symbol_kind::S_INTEGER, isc::agent::AgentParser::symbol_kind::S_map_value, isc::agent::AgentParser::symbol_kind::S_socket_type_value, isc::agent::AgentParser::symbol_kind::S_STRING, isc::agent::AgentParser::symbol_kind::S_value, isc::agent::AgentParser::symbol_kind::S_YYEOF, isc::agent::AgentParser::symbol_kind::S_YYerror, isc::agent::AgentParser::symbol_kind::S_YYUNDEF, isc::agent::ParserContext::SERVER, isc::agent::ParserContext::SOCKET_TYPE, isc::agent::ParserContext::stack_, isc::agent::ParserContext::unique(), YY_MOVE, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, YYCDEBUG, YYERROR, yylex, and YYLLOC_DEFAULT.
Referenced by operator()().
void isc::agent::AgentParser::set_debug_level | ( | debug_level_type | l | ) |
Set the current debugging level.
Definition at line 486 of file agent_parser.cc.
void isc::agent::AgentParser::set_debug_stream | ( | std::ostream & | o | ) |
Set the current debugging stream.
Definition at line 473 of file agent_parser.cc.
|
static |
The user-facing name of the symbol whose (internal) number is YYSYMBOL.
No bounds checking.
Definition at line 1859 of file agent_parser.cc.
Referenced by isc::agent::AgentParser::basic_symbol< Base >::name().
|
static |
The number of tokens.
Definition at line 739 of file agent_parser.h.
Referenced by isc::agent::AgentParser::context::expected_tokens().