Kea 2.2.0
isc::netconf::NetconfParser Class Reference

A Bison parser. More...

#include <netconf_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

 NetconfParser (isc::netconf::ParserContext &ctx_yyarg)
 Build a parser object. More...
 
virtual ~NetconfParser ()
 
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_BOOLEAN (const bool &v, const location_type &l)
 
static symbol_type make_BOOT_UPDATE (const location_type &l)
 
static symbol_type make_CA_SERVER (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_SOCKET (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_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 (const location_type &l)
 
static symbol_type make_INTEGER (const int64_t &v, 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_MANAGED_SERVERS (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_MODEL (const location_type &l)
 
static symbol_type make_NAME (const location_type &l)
 
static symbol_type make_NETCONF (const location_type &l)
 
static symbol_type make_NETCONF_error (const location_type &l)
 
static symbol_type make_NETCONF_UNDEF (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_PATTERN (const location_type &l)
 
static symbol_type make_RCURLY_BRACKET (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_SOCKET_URL (const location_type &l)
 
static symbol_type make_START_JSON (const location_type &l)
 
static symbol_type make_START_NETCONF (const location_type &l)
 
static symbol_type make_START_SUB_NETCONF (const location_type &l)
 
static symbol_type make_STDOUT (const location_type &l)
 
static symbol_type make_STRING (const std::string &v, const location_type &l)
 
static symbol_type make_SUBSCRIBE_CHANGES (const location_type &l)
 
static symbol_type make_UNIX (const location_type &l)
 
static symbol_type make_USER_CONTEXT (const location_type &l)
 
static symbol_type make_VALIDATE_CHANGES (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 netconf_parser.h.

Member Typedef Documentation

◆ by_type

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

Definition at line 981 of file netconf_parser.h.

◆ debug_level_type

Type for debugging levels.

Definition at line 1082 of file netconf_parser.h.

◆ location_type

Symbol locations.

Definition at line 466 of file netconf_parser.h.

◆ semantic_type

Backward compatibility (Bison 3.8).

Definition at line 463 of file netconf_parser.h.

◆ symbol_kind_type

(Internal) symbol kind.

Definition at line 712 of file netconf_parser.h.

◆ token_kind_type

Token kind, as returned by yylex.

Definition at line 547 of file netconf_parser.h.

◆ token_type

Backward compatibility alias (Bison 3.6).

Definition at line 550 of file netconf_parser.h.

Constructor & Destructor Documentation

◆ NetconfParser()

isc::netconf::NetconfParser::NetconfParser ( isc::netconf::ParserContext ctx_yyarg)

Build a parser object.

Definition at line 147 of file netconf_parser.cc.

◆ ~NetconfParser()

isc::netconf::NetconfParser::~NetconfParser ( )
virtual

Definition at line 157 of file netconf_parser.cc.

Member Function Documentation

◆ debug_level()

NetconfParser::debug_level_type isc::netconf::NetconfParser::debug_level ( ) const

The current debugging level.

Definition at line 470 of file netconf_parser.cc.

◆ debug_stream()

std::ostream & isc::netconf::NetconfParser::debug_stream ( ) const

The current debugging stream.

Definition at line 457 of file netconf_parser.cc.

◆ error() [1/2]

void isc::netconf::NetconfParser::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 2308 of file netconf_parser.cc.

Referenced by error(), and parse().

◆ error() [2/2]

void isc::netconf::NetconfParser::error ( const syntax_error err)

Report a syntax error.

Definition at line 1790 of file netconf_parser.cc.

References error(), and isc::netconf::NetconfParser::syntax_error::location.

+ Here is the call graph for this function:

◆ make_BOOLEAN()

static symbol_type isc::netconf::NetconfParser::make_BOOLEAN ( const bool &  v,
const location_type l 
)
inlinestatic

◆ make_BOOT_UPDATE()

static symbol_type isc::netconf::NetconfParser::make_BOOT_UPDATE ( const location_type l)
inlinestatic

◆ make_CA_SERVER()

static symbol_type isc::netconf::NetconfParser::make_CA_SERVER ( const location_type l)
inlinestatic

◆ make_COLON()

static symbol_type isc::netconf::NetconfParser::make_COLON ( const location_type l)
inlinestatic

◆ make_COMMA()

static symbol_type isc::netconf::NetconfParser::make_COMMA ( const location_type l)
inlinestatic

◆ make_COMMENT()

static symbol_type isc::netconf::NetconfParser::make_COMMENT ( const location_type l)
inlinestatic

◆ make_CONTROL_SOCKET()

static symbol_type isc::netconf::NetconfParser::make_CONTROL_SOCKET ( const location_type l)
inlinestatic

◆ make_D2_SERVER()

static symbol_type isc::netconf::NetconfParser::make_D2_SERVER ( const location_type l)
inlinestatic

◆ make_DEBUGLEVEL()

static symbol_type isc::netconf::NetconfParser::make_DEBUGLEVEL ( const location_type l)
inlinestatic

◆ make_DHCP4_SERVER()

static symbol_type isc::netconf::NetconfParser::make_DHCP4_SERVER ( const location_type l)
inlinestatic

◆ make_DHCP6_SERVER()

static symbol_type isc::netconf::NetconfParser::make_DHCP6_SERVER ( const location_type l)
inlinestatic

◆ make_END()

static symbol_type isc::netconf::NetconfParser::make_END ( const location_type l)
inlinestatic

Definition at line 1112 of file netconf_parser.h.

References isc::netconf::NetconfParser::token::TOKEN_END.

◆ make_FLOAT()

static symbol_type isc::netconf::NetconfParser::make_FLOAT ( const double &  v,
const location_type l 
)
inlinestatic

◆ make_FLUSH()

static symbol_type isc::netconf::NetconfParser::make_FLUSH ( const location_type l)
inlinestatic

◆ make_HOOKS_LIBRARIES()

static symbol_type isc::netconf::NetconfParser::make_HOOKS_LIBRARIES ( const location_type l)
inlinestatic

◆ make_HTTP()

static symbol_type isc::netconf::NetconfParser::make_HTTP ( const location_type l)
inlinestatic

Definition at line 1487 of file netconf_parser.h.

References isc::netconf::NetconfParser::token::TOKEN_HTTP.

◆ make_INTEGER()

static symbol_type isc::netconf::NetconfParser::make_INTEGER ( const int64_t &  v,
const location_type l 
)
inlinestatic

◆ make_LCURLY_BRACKET()

static symbol_type isc::netconf::NetconfParser::make_LCURLY_BRACKET ( const location_type l)
inlinestatic

◆ make_LIBRARY()

static symbol_type isc::netconf::NetconfParser::make_LIBRARY ( const location_type l)
inlinestatic

◆ make_LOGGERS()

static symbol_type isc::netconf::NetconfParser::make_LOGGERS ( const location_type l)
inlinestatic

◆ make_LSQUARE_BRACKET()

static symbol_type isc::netconf::NetconfParser::make_LSQUARE_BRACKET ( const location_type l)
inlinestatic

◆ make_MANAGED_SERVERS()

static symbol_type isc::netconf::NetconfParser::make_MANAGED_SERVERS ( const location_type l)
inlinestatic

◆ make_MAXSIZE()

static symbol_type isc::netconf::NetconfParser::make_MAXSIZE ( const location_type l)
inlinestatic

◆ make_MAXVER()

static symbol_type isc::netconf::NetconfParser::make_MAXVER ( const location_type l)
inlinestatic

◆ make_MODEL()

static symbol_type isc::netconf::NetconfParser::make_MODEL ( const location_type l)
inlinestatic

◆ make_NAME()

static symbol_type isc::netconf::NetconfParser::make_NAME ( const location_type l)
inlinestatic

Definition at line 1607 of file netconf_parser.h.

References isc::netconf::NetconfParser::token::TOKEN_NAME.

◆ make_NETCONF()

static symbol_type isc::netconf::NetconfParser::make_NETCONF ( const location_type l)
inlinestatic

◆ make_NETCONF_error()

static symbol_type isc::netconf::NetconfParser::make_NETCONF_error ( const location_type l)
inlinestatic

◆ make_NETCONF_UNDEF()

static symbol_type isc::netconf::NetconfParser::make_NETCONF_UNDEF ( const location_type l)
inlinestatic

◆ make_NULL_TYPE()

static symbol_type isc::netconf::NetconfParser::make_NULL_TYPE ( const location_type l)
inlinestatic

◆ make_OUTPUT()

static symbol_type isc::netconf::NetconfParser::make_OUTPUT ( const location_type l)
inlinestatic

◆ make_OUTPUT_OPTIONS()

static symbol_type isc::netconf::NetconfParser::make_OUTPUT_OPTIONS ( const location_type l)
inlinestatic

◆ make_PARAMETERS()

static symbol_type isc::netconf::NetconfParser::make_PARAMETERS ( const location_type l)
inlinestatic

◆ make_PATTERN()

static symbol_type isc::netconf::NetconfParser::make_PATTERN ( const location_type l)
inlinestatic

◆ make_RCURLY_BRACKET()

static symbol_type isc::netconf::NetconfParser::make_RCURLY_BRACKET ( const location_type l)
inlinestatic

◆ make_RSQUARE_BRACKET()

static symbol_type isc::netconf::NetconfParser::make_RSQUARE_BRACKET ( const location_type l)
inlinestatic

◆ make_SEVERITY()

static symbol_type isc::netconf::NetconfParser::make_SEVERITY ( const location_type l)
inlinestatic

◆ make_SOCKET_NAME()

static symbol_type isc::netconf::NetconfParser::make_SOCKET_NAME ( const location_type l)
inlinestatic

◆ make_SOCKET_TYPE()

static symbol_type isc::netconf::NetconfParser::make_SOCKET_TYPE ( const location_type l)
inlinestatic

◆ make_SOCKET_URL()

static symbol_type isc::netconf::NetconfParser::make_SOCKET_URL ( const location_type l)
inlinestatic

◆ make_START_JSON()

static symbol_type isc::netconf::NetconfParser::make_START_JSON ( const location_type l)
inlinestatic

◆ make_START_NETCONF()

static symbol_type isc::netconf::NetconfParser::make_START_NETCONF ( const location_type l)
inlinestatic

◆ make_START_SUB_NETCONF()

static symbol_type isc::netconf::NetconfParser::make_START_SUB_NETCONF ( const location_type l)
inlinestatic

◆ make_STDOUT()

static symbol_type isc::netconf::NetconfParser::make_STDOUT ( const location_type l)
inlinestatic

◆ make_STRING()

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

◆ make_SUBSCRIBE_CHANGES()

static symbol_type isc::netconf::NetconfParser::make_SUBSCRIBE_CHANGES ( const location_type l)
inlinestatic

◆ make_UNIX()

static symbol_type isc::netconf::NetconfParser::make_UNIX ( const location_type l)
inlinestatic

Definition at line 1472 of file netconf_parser.h.

References isc::netconf::NetconfParser::token::TOKEN_UNIX.

◆ make_USER_CONTEXT()

static symbol_type isc::netconf::NetconfParser::make_USER_CONTEXT ( const location_type l)
inlinestatic

◆ make_VALIDATE_CHANGES()

static symbol_type isc::netconf::NetconfParser::make_VALIDATE_CHANGES ( const location_type l)
inlinestatic

◆ operator()()

int isc::netconf::NetconfParser::operator() ( )

Parse.

An alias for parse ().

Returns
0 iff parsing succeeded.

Definition at line 505 of file netconf_parser.cc.

References parse().

+ Here is the call graph for this function:

◆ parse()

int isc::netconf::NetconfParser::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 511 of file netconf_parser.cc.

References isc::netconf::NetconfParser::basic_symbol< Base >::clear(), isc::netconf::ParserContext::CONFIG, isc::netconf::ParserContext::contextName(), isc::netconf::ParserContext::CONTROL_SOCKET, isc::netconf::ParserContext::ctx_, isc::netconf::NetconfParser::basic_symbol< Base >::empty(), isc::netconf::ParserContext::enter(), error(), isc::netconf::ParserContext::HOOKS_LIBRARIES, isc::netconf::ParserContext::leave(), isc::netconf::ParserContext::loc2pos(), isc::netconf::NetconfParser::basic_symbol< Base >::location, isc::netconf::ParserContext::LOGGERS, isc::netconf::ParserContext::MANAGED_SERVERS, isc::data::merge(), isc::netconf::NetconfParser::basic_symbol< Base >::move(), isc::netconf::ParserContext::NETCONF, isc::netconf::ParserContext::NO_KEYWORDS, isc::netconf::ParserContext::OUTPUT_OPTIONS, isc::netconf::NetconfParser::symbol_kind::S_BOOLEAN, isc::netconf::NetconfParser::symbol_kind::S_FLOAT, isc::netconf::NetconfParser::symbol_kind::S_INTEGER, isc::netconf::NetconfParser::symbol_kind::S_map_value, isc::netconf::NetconfParser::symbol_kind::S_socket_type_value, isc::netconf::NetconfParser::symbol_kind::S_STRING, isc::netconf::NetconfParser::symbol_kind::S_value, isc::netconf::NetconfParser::symbol_kind::S_YYEOF, isc::netconf::NetconfParser::symbol_kind::S_YYerror, isc::netconf::NetconfParser::symbol_kind::S_YYUNDEF, isc::netconf::ParserContext::SERVER, isc::netconf::ParserContext::SOCKET_TYPE, isc::netconf::ParserContext::stack_, isc::netconf::ParserContext::unique(), isc::netconf::ParserContext::warnAboutExtraCommas(), YY_MOVE, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, YYCDEBUG, YYERROR, yylex, and YYLLOC_DEFAULT.

Referenced by operator()().

+ Here is the call graph for this function:

◆ set_debug_level()

void isc::netconf::NetconfParser::set_debug_level ( debug_level_type  l)

Set the current debugging level.

Definition at line 476 of file netconf_parser.cc.

◆ set_debug_stream()

void isc::netconf::NetconfParser::set_debug_stream ( std::ostream &  o)

Set the current debugging stream.

Definition at line 463 of file netconf_parser.cc.

◆ symbol_name()

std::string isc::netconf::NetconfParser::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 1836 of file netconf_parser.cc.

Referenced by isc::netconf::NetconfParser::basic_symbol< Base >::name().

Member Data Documentation

◆ YYNTOKENS

const symbol_kind_type isc::netconf::NetconfParser::YYNTOKENS = symbol_kind::YYNTOKENS
static

The number of tokens.

Definition at line 715 of file netconf_parser.h.

Referenced by isc::netconf::NetconfParser::context::expected_tokens().


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