Kea  2.3.4-git
isc::agent::AgentParser Class Reference

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 Member Functions

static symbol_type make_AGENT_error (const location_type &l)
 
static symbol_type make_AGENT_UNDEF (const location_type &l)
 
static symbol_type make_AUTHENTICATION (const location_type &l)
 
static symbol_type make_BASIC (const location_type &l)
 
static symbol_type make_BOOLEAN (const bool &v, const location_type &l)
 
static symbol_type make_CERT_FILE (const location_type &l)
 
static symbol_type make_CERT_REQUIRED (const location_type &l)
 
static symbol_type make_CLIENTS (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_COMMENT (const location_type &l)
 
static symbol_type make_CONTROL_AGENT (const location_type &l)
 
static symbol_type make_CONTROL_SOCKETS (const location_type &l)
 
static symbol_type make_D2_SERVER (const location_type &l)
 
static symbol_type make_DEBUGLEVEL (const location_type &l)
 
static symbol_type make_DHCP4_SERVER (const location_type &l)
 
static symbol_type make_DHCP6_SERVER (const location_type &l)
 
static symbol_type make_DIRECTORY (const location_type &l)
 
static symbol_type make_END (const location_type &l)
 
static symbol_type make_FLOAT (const double &v, const location_type &l)
 
static symbol_type make_FLUSH (const location_type &l)
 
static symbol_type make_HOOKS_LIBRARIES (const location_type &l)
 
static symbol_type make_HTTP_HOST (const location_type &l)
 
static symbol_type make_HTTP_PORT (const location_type &l)
 
static symbol_type make_INTEGER (const int64_t &v, const location_type &l)
 
static symbol_type make_KEY_FILE (const location_type &l)
 
static symbol_type make_LCURLY_BRACKET (const location_type &l)
 
static symbol_type make_LIBRARY (const location_type &l)
 
static symbol_type make_LOGGERS (const location_type &l)
 
static symbol_type make_LSQUARE_BRACKET (const location_type &l)
 
static symbol_type make_MAXSIZE (const location_type &l)
 
static symbol_type make_MAXVER (const location_type &l)
 
static symbol_type make_NAME (const location_type &l)
 
static symbol_type make_NULL_TYPE (const location_type &l)
 
static symbol_type make_OUTPUT (const location_type &l)
 
static symbol_type make_OUTPUT_OPTIONS (const location_type &l)
 
static symbol_type make_PARAMETERS (const location_type &l)
 
static symbol_type make_PASSWORD (const location_type &l)
 
static symbol_type make_PASSWORD_FILE (const location_type &l)
 
static symbol_type make_PATTERN (const location_type &l)
 
static symbol_type make_RCURLY_BRACKET (const location_type &l)
 
static symbol_type make_REALM (const location_type &l)
 
static symbol_type make_RSQUARE_BRACKET (const location_type &l)
 
static symbol_type make_SEVERITY (const location_type &l)
 
static symbol_type make_SOCKET_NAME (const location_type &l)
 
static symbol_type make_SOCKET_TYPE (const location_type &l)
 
static symbol_type make_START_AGENT (const location_type &l)
 
static symbol_type make_START_JSON (const location_type &l)
 
static symbol_type make_START_SUB_AGENT (const location_type &l)
 
static symbol_type make_STRING (const std::string &v, const location_type &l)
 
static symbol_type make_TRUST_ANCHOR (const location_type &l)
 
static symbol_type make_TYPE (const location_type &l)
 
static symbol_type make_UNIX (const location_type &l)
 
static symbol_type make_USER (const location_type &l)
 
static symbol_type make_USER_CONTEXT (const location_type &l)
 
static symbol_type make_USER_FILE (const location_type &l)
 
static std::string symbol_name (symbol_kind_type yysymbol)
 The user-facing name of the symbol whose (internal) number is YYSYMBOL. More...
 

Static Public Attributes

static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS
 The number of tokens. More...
 

Detailed Description

A Bison parser.

Definition at line 214 of file agent_parser.h.

Member Typedef Documentation

◆ by_type

Backward compatibility for a private implementation detail (Bison 3.6).

Definition at line 1020 of file agent_parser.h.

◆ debug_level_type

Type for debugging levels.

Definition at line 1121 of file agent_parser.h.

◆ location_type

Symbol locations.

Definition at line 467 of file agent_parser.h.

◆ semantic_type

Backward compatibility (Bison 3.8).

Definition at line 464 of file agent_parser.h.

◆ symbol_kind_type

(Internal) symbol kind.

Definition at line 749 of file agent_parser.h.

◆ token_kind_type

Token kind, as returned by yylex.

Definition at line 555 of file agent_parser.h.

◆ token_type

Backward compatibility alias (Bison 3.6).

Definition at line 558 of file agent_parser.h.

Constructor & Destructor Documentation

◆ AgentParser()

isc::agent::AgentParser::AgentParser ( isc::agent::ParserContext ctx_yyarg)

Build a parser object.

Definition at line 147 of file agent_parser.cc.

◆ ~AgentParser()

isc::agent::AgentParser::~AgentParser ( )
virtual

Definition at line 157 of file agent_parser.cc.

Member Function Documentation

◆ debug_level()

AgentParser::debug_level_type isc::agent::AgentParser::debug_level ( ) const

The current debugging level.

Definition at line 480 of file agent_parser.cc.

◆ debug_stream()

std::ostream & isc::agent::AgentParser::debug_stream ( ) const

The current debugging stream.

Definition at line 467 of file agent_parser.cc.

◆ error() [1/2]

void isc::agent::AgentParser::error ( const location_type loc,
const std::string &  msg 
)
virtual

Report a syntax error.

Parameters
locwhere the syntax error is found.
msga description of the syntax error.

Definition at line 2548 of file agent_parser.cc.

Referenced by error(), and parse().

◆ error() [2/2]

void isc::agent::AgentParser::error ( const syntax_error err)

Report a syntax error.

Definition at line 1989 of file agent_parser.cc.

References error(), and isc::agent::AgentParser::syntax_error::location.

+ Here is the call graph for this function:

◆ make_AGENT_error()

static symbol_type isc::agent::AgentParser::make_AGENT_error ( const location_type l)
inlinestatic

Definition at line 1166 of file agent_parser.h.

◆ make_AGENT_UNDEF()

static symbol_type isc::agent::AgentParser::make_AGENT_UNDEF ( const location_type l)
inlinestatic

Definition at line 1181 of file agent_parser.h.

◆ make_AUTHENTICATION()

static symbol_type isc::agent::AgentParser::make_AUTHENTICATION ( const location_type l)
inlinestatic

Definition at line 1376 of file agent_parser.h.

◆ make_BASIC()

static symbol_type isc::agent::AgentParser::make_BASIC ( const location_type l)
inlinestatic

Definition at line 1406 of file agent_parser.h.

◆ make_BOOLEAN()

static symbol_type isc::agent::AgentParser::make_BOOLEAN ( const bool &  v,
const location_type l 
)
inlinestatic

Definition at line 1976 of file agent_parser.h.

◆ make_CERT_FILE()

static symbol_type isc::agent::AgentParser::make_CERT_FILE ( const location_type l)
inlinestatic

Definition at line 1541 of file agent_parser.h.

◆ make_CERT_REQUIRED()

static symbol_type isc::agent::AgentParser::make_CERT_REQUIRED ( const location_type l)
inlinestatic

Definition at line 1571 of file agent_parser.h.

◆ make_CLIENTS()

static symbol_type isc::agent::AgentParser::make_CLIENTS ( const location_type l)
inlinestatic

Definition at line 1451 of file agent_parser.h.

◆ make_COLON()

static symbol_type isc::agent::AgentParser::make_COLON ( const location_type l)
inlinestatic

Definition at line 1211 of file agent_parser.h.

◆ make_COMMA()

static symbol_type isc::agent::AgentParser::make_COMMA ( const location_type l)
inlinestatic

Definition at line 1196 of file agent_parser.h.

◆ make_COMMENT()

static symbol_type isc::agent::AgentParser::make_COMMENT ( const location_type l)
inlinestatic

Definition at line 1361 of file agent_parser.h.

◆ make_CONTROL_AGENT()

static symbol_type isc::agent::AgentParser::make_CONTROL_AGENT ( const location_type l)
inlinestatic

Definition at line 1301 of file agent_parser.h.

◆ make_CONTROL_SOCKETS()

static symbol_type isc::agent::AgentParser::make_CONTROL_SOCKETS ( const location_type l)
inlinestatic

Definition at line 1586 of file agent_parser.h.

◆ make_D2_SERVER()

static symbol_type isc::agent::AgentParser::make_D2_SERVER ( const location_type l)
inlinestatic

Definition at line 1631 of file agent_parser.h.

◆ make_DEBUGLEVEL()

static symbol_type isc::agent::AgentParser::make_DEBUGLEVEL ( const location_type l)
inlinestatic

Definition at line 1796 of file agent_parser.h.

◆ make_DHCP4_SERVER()

static symbol_type isc::agent::AgentParser::make_DHCP4_SERVER ( const location_type l)
inlinestatic

Definition at line 1601 of file agent_parser.h.

◆ make_DHCP6_SERVER()

static symbol_type isc::agent::AgentParser::make_DHCP6_SERVER ( const location_type l)
inlinestatic

Definition at line 1616 of file agent_parser.h.

◆ make_DIRECTORY()

static symbol_type isc::agent::AgentParser::make_DIRECTORY ( const location_type l)
inlinestatic

Definition at line 1436 of file agent_parser.h.

◆ make_END()

static symbol_type isc::agent::AgentParser::make_END ( const location_type l)
inlinestatic

Definition at line 1151 of file agent_parser.h.

◆ make_FLOAT()

static symbol_type isc::agent::AgentParser::make_FLOAT ( const double &  v,
const location_type l 
)
inlinestatic

Definition at line 1961 of file agent_parser.h.

◆ make_FLUSH()

static symbol_type isc::agent::AgentParser::make_FLUSH ( const location_type l)
inlinestatic

Definition at line 1826 of file agent_parser.h.

◆ make_HOOKS_LIBRARIES()

static symbol_type isc::agent::AgentParser::make_HOOKS_LIBRARIES ( const location_type l)
inlinestatic

Definition at line 1691 of file agent_parser.h.

◆ make_HTTP_HOST()

static symbol_type isc::agent::AgentParser::make_HTTP_HOST ( const location_type l)
inlinestatic

Definition at line 1316 of file agent_parser.h.

◆ make_HTTP_PORT()

static symbol_type isc::agent::AgentParser::make_HTTP_PORT ( const location_type l)
inlinestatic

Definition at line 1331 of file agent_parser.h.

◆ make_INTEGER()

static symbol_type isc::agent::AgentParser::make_INTEGER ( const int64_t &  v,
const location_type l 
)
inlinestatic

Definition at line 1946 of file agent_parser.h.

◆ make_KEY_FILE()

static symbol_type isc::agent::AgentParser::make_KEY_FILE ( const location_type l)
inlinestatic

Definition at line 1556 of file agent_parser.h.

◆ make_LCURLY_BRACKET()

static symbol_type isc::agent::AgentParser::make_LCURLY_BRACKET ( const location_type l)
inlinestatic

Definition at line 1256 of file agent_parser.h.

◆ make_LIBRARY()

static symbol_type isc::agent::AgentParser::make_LIBRARY ( const location_type l)
inlinestatic

Definition at line 1706 of file agent_parser.h.

◆ make_LOGGERS()

static symbol_type isc::agent::AgentParser::make_LOGGERS ( const location_type l)
inlinestatic

Definition at line 1736 of file agent_parser.h.

◆ make_LSQUARE_BRACKET()

static symbol_type isc::agent::AgentParser::make_LSQUARE_BRACKET ( const location_type l)
inlinestatic

Definition at line 1226 of file agent_parser.h.

◆ make_MAXSIZE()

static symbol_type isc::agent::AgentParser::make_MAXSIZE ( const location_type l)
inlinestatic

Definition at line 1841 of file agent_parser.h.

◆ make_MAXVER()

static symbol_type isc::agent::AgentParser::make_MAXVER ( const location_type l)
inlinestatic

Definition at line 1856 of file agent_parser.h.

◆ make_NAME()

static symbol_type isc::agent::AgentParser::make_NAME ( const location_type l)
inlinestatic

Definition at line 1751 of file agent_parser.h.

◆ make_NULL_TYPE()

static symbol_type isc::agent::AgentParser::make_NULL_TYPE ( const location_type l)
inlinestatic

Definition at line 1286 of file agent_parser.h.

◆ make_OUTPUT()

static symbol_type isc::agent::AgentParser::make_OUTPUT ( const location_type l)
inlinestatic

Definition at line 1781 of file agent_parser.h.

◆ make_OUTPUT_OPTIONS()

static symbol_type isc::agent::AgentParser::make_OUTPUT_OPTIONS ( const location_type l)
inlinestatic

Definition at line 1766 of file agent_parser.h.

◆ make_PARAMETERS()

static symbol_type isc::agent::AgentParser::make_PARAMETERS ( const location_type l)
inlinestatic

Definition at line 1721 of file agent_parser.h.

◆ make_PASSWORD()

static symbol_type isc::agent::AgentParser::make_PASSWORD ( const location_type l)
inlinestatic

Definition at line 1496 of file agent_parser.h.

◆ make_PASSWORD_FILE()

static symbol_type isc::agent::AgentParser::make_PASSWORD_FILE ( const location_type l)
inlinestatic

Definition at line 1511 of file agent_parser.h.

◆ make_PATTERN()

static symbol_type isc::agent::AgentParser::make_PATTERN ( const location_type l)
inlinestatic

Definition at line 1871 of file agent_parser.h.

◆ make_RCURLY_BRACKET()

static symbol_type isc::agent::AgentParser::make_RCURLY_BRACKET ( const location_type l)
inlinestatic

Definition at line 1271 of file agent_parser.h.

◆ make_REALM()

static symbol_type isc::agent::AgentParser::make_REALM ( const location_type l)
inlinestatic

Definition at line 1421 of file agent_parser.h.

◆ make_RSQUARE_BRACKET()

static symbol_type isc::agent::AgentParser::make_RSQUARE_BRACKET ( const location_type l)
inlinestatic

Definition at line 1241 of file agent_parser.h.

◆ make_SEVERITY()

static symbol_type isc::agent::AgentParser::make_SEVERITY ( const location_type l)
inlinestatic

Definition at line 1811 of file agent_parser.h.

◆ make_SOCKET_NAME()

static symbol_type isc::agent::AgentParser::make_SOCKET_NAME ( const location_type l)
inlinestatic

Definition at line 1646 of file agent_parser.h.

◆ make_SOCKET_TYPE()

static symbol_type isc::agent::AgentParser::make_SOCKET_TYPE ( const location_type l)
inlinestatic

Definition at line 1661 of file agent_parser.h.

◆ make_START_AGENT()

static symbol_type isc::agent::AgentParser::make_START_AGENT ( const location_type l)
inlinestatic

Definition at line 1901 of file agent_parser.h.

Referenced by if().

◆ make_START_JSON()

static symbol_type isc::agent::AgentParser::make_START_JSON ( const location_type l)
inlinestatic

Definition at line 1886 of file agent_parser.h.

Referenced by if().

◆ make_START_SUB_AGENT()

static symbol_type isc::agent::AgentParser::make_START_SUB_AGENT ( const location_type l)
inlinestatic

Definition at line 1916 of file agent_parser.h.

Referenced by if().

◆ make_STRING()

static symbol_type isc::agent::AgentParser::make_STRING ( const std::string &  v,
const location_type l 
)
inlinestatic

Definition at line 1931 of file agent_parser.h.

◆ make_TRUST_ANCHOR()

static symbol_type isc::agent::AgentParser::make_TRUST_ANCHOR ( const location_type l)
inlinestatic

Definition at line 1526 of file agent_parser.h.

◆ make_TYPE()

static symbol_type isc::agent::AgentParser::make_TYPE ( const location_type l)
inlinestatic

Definition at line 1391 of file agent_parser.h.

◆ make_UNIX()

static symbol_type isc::agent::AgentParser::make_UNIX ( const location_type l)
inlinestatic

Definition at line 1676 of file agent_parser.h.

◆ make_USER()

static symbol_type isc::agent::AgentParser::make_USER ( const location_type l)
inlinestatic

Definition at line 1466 of file agent_parser.h.

◆ make_USER_CONTEXT()

static symbol_type isc::agent::AgentParser::make_USER_CONTEXT ( const location_type l)
inlinestatic

Definition at line 1346 of file agent_parser.h.

◆ make_USER_FILE()

static symbol_type isc::agent::AgentParser::make_USER_FILE ( const location_type l)
inlinestatic

Definition at line 1481 of file agent_parser.h.

◆ operator()()

int isc::agent::AgentParser::operator() ( )

Parse.

An alias for parse ().

Returns
0 iff parsing succeeded.

Definition at line 515 of file agent_parser.cc.

References parse().

+ Here is the call graph for this function:

◆ parse()

int isc::agent::AgentParser::parse ( )
virtual

Parse.

Returns
0 iff parsing succeeded.

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(), isc::agent::ParserContext::warnAboutExtraCommas(), YY_MOVE, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, YYCDEBUG, YYERROR, yylex, and YYLLOC_DEFAULT.

Referenced by operator()(), and isc::agent::ParserContext::parseFile().

+ Here is the call graph for this function:

◆ set_debug_level()

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.

References YY_NOEXCEPT, and YYNTOKENS.

Referenced by isc::agent::ParserContext::parseFile().

◆ set_debug_stream()

void isc::agent::AgentParser::set_debug_stream ( std::ostream &  o)

Set the current debugging stream.

Definition at line 473 of file agent_parser.cc.

◆ symbol_name()

std::string isc::agent::AgentParser::symbol_name ( symbol_kind_type  yysymbol)
static

The user-facing name of the symbol whose (internal) number is YYSYMBOL.

No bounds checking.

Definition at line 2035 of file agent_parser.cc.

Referenced by isc::agent::AgentParser::context::expected_tokens(), and isc::agent::AgentParser::basic_symbol< by_state >::name().

Member Data Documentation

◆ YYNTOKENS

const symbol_kind_type isc::agent::AgentParser::YYNTOKENS = symbol_kind::YYNTOKENS
static

The documentation for this class was generated from the following files: