![]() |
Kea
1.5.0
|
A Bison parser. More...
#include <agent_parser.h>
Classes | |
| struct | basic_symbol |
| A complete symbol. More... | |
| struct | by_type |
| Type access provider for token (enum) based symbols. More... | |
| struct | syntax_error |
| Syntax errors thrown from user actions. More... | |
| struct | token |
| Tokens. More... | |
| union | union_type |
| An auxiliary type to compute the largest semantic type. More... | |
Public Types | |
| enum | { empty_symbol = -2 } |
| The symbol type number to denote an empty symbol. More... | |
| typedef int | debug_level_type |
| Type for debugging levels. More... | |
| typedef location | location_type |
| Symbol locations. More... | |
| typedef variant< sizeof(union_type)> | semantic_type |
| Symbol semantic values. More... | |
| typedef int | symbol_number_type |
| Symbol type: an internal symbol number. More... | |
| typedef basic_symbol< by_type > | symbol_type |
| "External" symbols: returned by the scanner. More... | |
| typedef unsigned char | token_number_type |
| Internal symbol number for tokens (subsumed by symbol_number_type). More... | |
| typedef token::yytokentype | token_type |
| (External) token type, as returned by yylex. 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... | |
A Bison parser.
Definition at line 494 of file agent_parser.h.
| typedef int isc::agent::AgentParser::debug_level_type |
Type for debugging levels.
Definition at line 730 of file agent_parser.h.
| typedef location isc::agent::AgentParser::location_type |
Symbol locations.
Definition at line 525 of file agent_parser.h.
| typedef variant<sizeof (union_type)> isc::agent::AgentParser::semantic_type |
Symbol semantic values.
Definition at line 520 of file agent_parser.h.
| typedef int isc::agent::AgentParser::symbol_number_type |
Symbol type: an internal symbol number.
Definition at line 589 of file agent_parser.h.
"External" symbols: returned by the scanner.
Definition at line 709 of file agent_parser.h.
| typedef unsigned char isc::agent::AgentParser::token_number_type |
Internal symbol number for tokens (subsumed by symbol_number_type).
Definition at line 595 of file agent_parser.h.
(External) token type, as returned by yylex.
Definition at line 586 of file agent_parser.h.
| anonymous enum |
The symbol type number to denote an empty symbol.
| Enumerator | |
|---|---|
| empty_symbol | |
Definition at line 592 of file agent_parser.h.
| isc::agent::AgentParser::AgentParser | ( | isc::agent::ParserContext & | ctx_yyarg | ) |
Build a parser object.
Definition at line 186 of file agent_parser.cc.
|
virtual |
Definition at line 195 of file agent_parser.cc.
| AgentParser::debug_level_type isc::agent::AgentParser::debug_level | ( | ) | const |
The current debugging level.
Definition at line 478 of file agent_parser.cc.
| std::ostream & isc::agent::AgentParser::debug_stream | ( | ) | const |
The current debugging stream.
Definition at line 465 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 2012 of file agent_parser.cc.
References isc::agent::ParserContext::error().
Referenced by error(), and parse().
Here is the call graph for this function:| void isc::agent::AgentParser::error | ( | const syntax_error & | err | ) |
Report a syntax error.
Definition at line 1591 of file agent_parser.cc.
References error(), and isc::agent::AgentParser::syntax_error::location.
Here is the call graph for this function:
|
inlinestatic |
Definition at line 1754 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_BOOLEAN, and YY_MOVE.
|
inlinestatic |
Definition at line 1474 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_COLON, and YY_MOVE.
|
inlinestatic |
Definition at line 1467 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_COMMA, and YY_MOVE.
|
inlinestatic |
Definition at line 1544 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_COMMENT, and YY_MOVE.
|
inlinestatic |
Definition at line 1516 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_CONTROL_AGENT, and YY_MOVE.
|
inlinestatic |
Definition at line 1551 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_CONTROL_SOCKETS, and YY_MOVE.
|
inlinestatic |
Definition at line 1572 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_D2_SERVER, and YY_MOVE.
|
inlinestatic |
Definition at line 1656 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_DEBUGLEVEL, and YY_MOVE.
|
inlinestatic |
Definition at line 1691 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_DHCP4, and YY_MOVE.
|
inlinestatic |
Definition at line 1558 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_DHCP4_SERVER, and YY_MOVE.
|
inlinestatic |
Definition at line 1698 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_DHCP6, and YY_MOVE.
|
inlinestatic |
Definition at line 1565 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_DHCP6_SERVER, and YY_MOVE.
|
inlinestatic |
Definition at line 1705 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_DHCPDDNS, and YY_MOVE.
|
inlinestatic |
Definition at line 1460 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_END, and YY_MOVE.
|
inlinestatic |
Definition at line 1747 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_FLOAT, and YY_MOVE.
|
inlinestatic |
Definition at line 1670 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_FLUSH, and YY_MOVE.
|
inlinestatic |
Definition at line 1600 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_HOOKS_LIBRARIES, and YY_MOVE.
|
inlinestatic |
Definition at line 1523 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_HTTP_HOST, and YY_MOVE.
|
inlinestatic |
Definition at line 1530 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_HTTP_PORT, and YY_MOVE.
|
inlinestatic |
Definition at line 1740 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_INTEGER, and YY_MOVE.
|
inlinestatic |
Definition at line 1495 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_LCURLY_BRACKET, and YY_MOVE.
|
inlinestatic |
Definition at line 1607 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_LIBRARY, and YY_MOVE.
|
inlinestatic |
Definition at line 1628 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_LOGGERS, and YY_MOVE.
|
inlinestatic |
Definition at line 1621 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_LOGGING, and YY_MOVE.
|
inlinestatic |
Definition at line 1481 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_LSQUARE_BRACKET, and YY_MOVE.
|
inlinestatic |
Definition at line 1677 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_MAXSIZE, and YY_MOVE.
|
inlinestatic |
Definition at line 1684 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_MAXVER, and YY_MOVE.
|
inlinestatic |
Definition at line 1635 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_NAME, and YY_MOVE.
|
inlinestatic |
Definition at line 1509 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_NULL_TYPE, and YY_MOVE.
|
inlinestatic |
Definition at line 1649 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_OUTPUT, and YY_MOVE.
|
inlinestatic |
Definition at line 1642 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_OUTPUT_OPTIONS, and YY_MOVE.
|
inlinestatic |
Definition at line 1614 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_PARAMETERS, and YY_MOVE.
|
inlinestatic |
Definition at line 1502 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_RCURLY_BRACKET, and YY_MOVE.
|
inlinestatic |
Definition at line 1488 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_RSQUARE_BRACKET, and YY_MOVE.
|
inlinestatic |
Definition at line 1663 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_SEVERITY, and YY_MOVE.
|
inlinestatic |
Definition at line 1579 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_SOCKET_NAME, and YY_MOVE.
|
inlinestatic |
Definition at line 1586 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_SOCKET_TYPE, and YY_MOVE.
|
inlinestatic |
Definition at line 1719 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_START_AGENT, and YY_MOVE.
Referenced by if().
|
inlinestatic |
Definition at line 1712 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_START_JSON, and YY_MOVE.
Referenced by if().
|
inlinestatic |
Definition at line 1726 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_START_SUB_AGENT, and YY_MOVE.
Referenced by if().
|
inlinestatic |
Definition at line 1733 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_STRING, and YY_MOVE.
|
inlinestatic |
Definition at line 1593 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_UNIX, and YY_MOVE.
|
inlinestatic |
Definition at line 1537 of file agent_parser.h.
References isc::agent::AgentParser::token::TOKEN_USER_CONTEXT, and YY_MOVE.
| int isc::agent::AgentParser::operator() | ( | ) |
Parse.
An alias for parse ().
Definition at line 513 of file agent_parser.cc.
References parse().
Here is the call graph for this function:
|
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 519 of file agent_parser.cc.
References isc::agent::ParserContext::AGENT, isc::agent::stack< T, S >::clear(), isc::agent::AgentParser::basic_symbol< Base >::clear(), 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::ParserContext::leave(), isc::agent::ParserContext::loc2pos(), isc::agent::AgentParser::basic_symbol< Base >::location, isc::agent::ParserContext::LOGGERS, isc::agent::ParserContext::LOGGING, isc::data::merge(), isc::agent::AgentParser::basic_symbol< Base >::move(), isc::agent::ParserContext::NO_KEYWORDS, isc::agent::ParserContext::OUTPUT_OPTIONS, isc::agent::ParserContext::SERVER, isc::agent::stack< T, S >::size(), isc::agent::ParserContext::SOCKET_TYPE, isc::agent::ParserContext::stack_, YY_MOVE, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYCDEBUG, YYERROR, yylex, and YYLLOC_DEFAULT.
Referenced by operator()().
Here is the call graph for this function:| void isc::agent::AgentParser::set_debug_level | ( | debug_level_type | l | ) |
Set the current debugging level.
Definition at line 484 of file agent_parser.cc.
| void isc::agent::AgentParser::set_debug_stream | ( | std::ostream & | o | ) |
Set the current debugging stream.
Definition at line 471 of file agent_parser.cc.