Kea  1.9.9-git
isc::d2::D2Parser Class Reference

A Bison parser. More...

#include <d2_parser.h>

Classes

struct  basic_symbol
 A complete symbol. More...
 
struct  by_kind
 Type access provider for token (enum) based symbols. More...
 
class  context
 
class  semantic_type
 A buffer to store and retrieve objects. More...
 
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...
 

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 symbol_kind::symbol_kind_type symbol_kind_type
 (Internal) symbol kind. More...
 
typedef token::yytokentype 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

 D2Parser (isc::d2::D2ParserContext &ctx_yyarg)
 Build a parser object. More...
 
virtual ~D2Parser ()
 
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_ALGORITHM (const location_type &l)
 
static symbol_type make_BOOLEAN (const bool &v, 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_PARSER_error (const location_type &l)
 
static symbol_type make_D2_PARSER_UNDEF (const location_type &l)
 
static symbol_type make_DDNS_DOMAINS (const location_type &l)
 
static symbol_type make_DEBUGLEVEL (const location_type &l)
 
static symbol_type make_DHCPDDNS (const location_type &l)
 
static symbol_type make_DIGEST_BITS (const location_type &l)
 
static symbol_type make_DNS_SERVER_TIMEOUT (const location_type &l)
 
static symbol_type make_DNS_SERVERS (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_FORWARD_DDNS (const location_type &l)
 
static symbol_type make_HOOKS_LIBRARIES (const location_type &l)
 
static symbol_type make_HOSTNAME (const location_type &l)
 
static symbol_type make_INTEGER (const int64_t &v, const location_type &l)
 
static symbol_type make_IP_ADDRESS (const location_type &l)
 
static symbol_type make_JSON (const location_type &l)
 
static symbol_type make_KEY_NAME (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_NCR_FORMAT (const location_type &l)
 
static symbol_type make_NCR_PROTOCOL (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_PORT (const location_type &l)
 
static symbol_type make_RCURLY_BRACKET (const location_type &l)
 
static symbol_type make_REVERSE_DDNS (const location_type &l)
 
static symbol_type make_RSQUARE_BRACKET (const location_type &l)
 
static symbol_type make_SECRET (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_STRING (const std::string &v, const location_type &l)
 
static symbol_type make_SUB_DDNS_DOMAIN (const location_type &l)
 
static symbol_type make_SUB_DDNS_DOMAINS (const location_type &l)
 
static symbol_type make_SUB_DHCPDDNS (const location_type &l)
 
static symbol_type make_SUB_DNS_SERVER (const location_type &l)
 
static symbol_type make_SUB_DNS_SERVERS (const location_type &l)
 
static symbol_type make_SUB_HOOKS_LIBRARY (const location_type &l)
 
static symbol_type make_SUB_TSIG_KEY (const location_type &l)
 
static symbol_type make_SUB_TSIG_KEYS (const location_type &l)
 
static symbol_type make_TCP (const location_type &l)
 
static symbol_type make_TOPLEVEL_DHCPDDNS (const location_type &l)
 
static symbol_type make_TOPLEVEL_JSON (const location_type &l)
 
static symbol_type make_TSIG_KEYS (const location_type &l)
 
static symbol_type make_UDP (const location_type &l)
 
static symbol_type make_USER_CONTEXT (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 209 of file d2_parser.h.

Member Typedef Documentation

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

Definition at line 1041 of file d2_parser.h.

Type for debugging levels.

Definition at line 1132 of file d2_parser.h.

Symbol locations.

Definition at line 455 of file d2_parser.h.

(Internal) symbol kind.

Definition at line 776 of file d2_parser.h.

Token kind, as returned by yylex.

Definition at line 548 of file d2_parser.h.

Backward compatibility alias (Bison 3.6).

Definition at line 551 of file d2_parser.h.

Constructor & Destructor Documentation

isc::d2::D2Parser::D2Parser ( isc::d2::D2ParserContext ctx_yyarg)

Build a parser object.

Definition at line 147 of file d2_parser.cc.

isc::d2::D2Parser::~D2Parser ( )
virtual

Definition at line 157 of file d2_parser.cc.

Member Function Documentation

D2Parser::debug_level_type isc::d2::D2Parser::debug_level ( ) const

The current debugging level.

Definition at line 470 of file d2_parser.cc.

std::ostream & isc::d2::D2Parser::debug_stream ( ) const

The current debugging stream.

Definition at line 457 of file d2_parser.cc.

void isc::d2::D2Parser::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 2700 of file d2_parser.cc.

Referenced by error(), and parse().

void isc::d2::D2Parser::error ( const syntax_error err)

Report a syntax error.

Definition at line 2088 of file d2_parser.cc.

References error(), and isc::d2::D2Parser::syntax_error::location.

+ Here is the call graph for this function:

static symbol_type isc::d2::D2Parser::make_ALGORITHM ( const location_type l)
inlinestatic

Definition at line 1582 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_BOOLEAN ( const bool &  v,
const location_type l 
)
inlinestatic

Definition at line 2062 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_COLON ( const location_type l)
inlinestatic

Definition at line 1222 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_COMMA ( const location_type l)
inlinestatic

Definition at line 1207 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_COMMENT ( const location_type l)
inlinestatic

Definition at line 1462 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_CONTROL_SOCKET ( const location_type l)
inlinestatic

Definition at line 1627 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_D2_PARSER_error ( const location_type l)
inlinestatic

Definition at line 1177 of file d2_parser.h.

static symbol_type isc::d2::D2Parser::make_D2_PARSER_UNDEF ( const location_type l)
inlinestatic

Definition at line 1192 of file d2_parser.h.

static symbol_type isc::d2::D2Parser::make_DDNS_DOMAINS ( const location_type l)
inlinestatic

Definition at line 1507 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_DEBUGLEVEL ( const location_type l)
inlinestatic

Definition at line 1777 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_DHCPDDNS ( const location_type l)
inlinestatic

Definition at line 1312 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_DIGEST_BITS ( const location_type l)
inlinestatic

Definition at line 1597 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_DNS_SERVER_TIMEOUT ( const location_type l)
inlinestatic

Definition at line 1357 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_DNS_SERVERS ( const location_type l)
inlinestatic

Definition at line 1537 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_END ( const location_type l)
inlinestatic

Definition at line 1162 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_FLOAT ( const double &  v,
const location_type l 
)
inlinestatic

Definition at line 2047 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_FLUSH ( const location_type l)
inlinestatic

Definition at line 1807 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_FORWARD_DDNS ( const location_type l)
inlinestatic

Definition at line 1477 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_HOOKS_LIBRARIES ( const location_type l)
inlinestatic

Definition at line 1672 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_HOSTNAME ( const location_type l)
inlinestatic

Definition at line 1552 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_INTEGER ( const int64_t &  v,
const location_type l 
)
inlinestatic

Definition at line 2032 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_IP_ADDRESS ( const location_type l)
inlinestatic

Definition at line 1327 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_JSON ( const location_type l)
inlinestatic

Definition at line 1432 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_KEY_NAME ( const location_type l)
inlinestatic

Definition at line 1522 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_LCURLY_BRACKET ( const location_type l)
inlinestatic

Definition at line 1267 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_LIBRARY ( const location_type l)
inlinestatic

Definition at line 1687 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_LOGGERS ( const location_type l)
inlinestatic

Definition at line 1717 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_LSQUARE_BRACKET ( const location_type l)
inlinestatic

Definition at line 1237 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_MAXSIZE ( const location_type l)
inlinestatic

Definition at line 1822 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_MAXVER ( const location_type l)
inlinestatic

Definition at line 1837 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_NAME ( const location_type l)
inlinestatic

Definition at line 1732 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_NCR_FORMAT ( const location_type l)
inlinestatic

Definition at line 1417 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_NCR_PROTOCOL ( const location_type l)
inlinestatic

Definition at line 1372 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_NULL_TYPE ( const location_type l)
inlinestatic

Definition at line 1297 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_OUTPUT ( const location_type l)
inlinestatic

Definition at line 1762 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_OUTPUT_OPTIONS ( const location_type l)
inlinestatic

Definition at line 1747 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_PARAMETERS ( const location_type l)
inlinestatic

Definition at line 1702 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_PATTERN ( const location_type l)
inlinestatic

Definition at line 1852 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_PORT ( const location_type l)
inlinestatic

Definition at line 1342 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_RCURLY_BRACKET ( const location_type l)
inlinestatic

Definition at line 1282 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_REVERSE_DDNS ( const location_type l)
inlinestatic

Definition at line 1492 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_RSQUARE_BRACKET ( const location_type l)
inlinestatic

Definition at line 1252 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_SECRET ( const location_type l)
inlinestatic

Definition at line 1612 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_SEVERITY ( const location_type l)
inlinestatic

Definition at line 1792 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_SOCKET_NAME ( const location_type l)
inlinestatic

Definition at line 1657 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_SOCKET_TYPE ( const location_type l)
inlinestatic

Definition at line 1642 of file d2_parser.h.

Referenced by while().

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

Definition at line 2017 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_SUB_DDNS_DOMAIN ( const location_type l)
inlinestatic

Definition at line 1942 of file d2_parser.h.

Referenced by if().

static symbol_type isc::d2::D2Parser::make_SUB_DDNS_DOMAINS ( const location_type l)
inlinestatic

Definition at line 1957 of file d2_parser.h.

Referenced by if().

static symbol_type isc::d2::D2Parser::make_SUB_DHCPDDNS ( const location_type l)
inlinestatic

Definition at line 1897 of file d2_parser.h.

Referenced by if().

static symbol_type isc::d2::D2Parser::make_SUB_DNS_SERVER ( const location_type l)
inlinestatic

Definition at line 1972 of file d2_parser.h.

Referenced by if().

static symbol_type isc::d2::D2Parser::make_SUB_DNS_SERVERS ( const location_type l)
inlinestatic

Definition at line 1987 of file d2_parser.h.

static symbol_type isc::d2::D2Parser::make_SUB_HOOKS_LIBRARY ( const location_type l)
inlinestatic

Definition at line 2002 of file d2_parser.h.

Referenced by if().

static symbol_type isc::d2::D2Parser::make_SUB_TSIG_KEY ( const location_type l)
inlinestatic

Definition at line 1912 of file d2_parser.h.

Referenced by if().

static symbol_type isc::d2::D2Parser::make_SUB_TSIG_KEYS ( const location_type l)
inlinestatic

Definition at line 1927 of file d2_parser.h.

Referenced by if().

static symbol_type isc::d2::D2Parser::make_TCP ( const location_type l)
inlinestatic

Definition at line 1402 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_TOPLEVEL_DHCPDDNS ( const location_type l)
inlinestatic

Definition at line 1882 of file d2_parser.h.

Referenced by if().

static symbol_type isc::d2::D2Parser::make_TOPLEVEL_JSON ( const location_type l)
inlinestatic

Definition at line 1867 of file d2_parser.h.

Referenced by if().

static symbol_type isc::d2::D2Parser::make_TSIG_KEYS ( const location_type l)
inlinestatic

Definition at line 1567 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_UDP ( const location_type l)
inlinestatic

Definition at line 1387 of file d2_parser.h.

Referenced by while().

static symbol_type isc::d2::D2Parser::make_USER_CONTEXT ( const location_type l)
inlinestatic

Definition at line 1447 of file d2_parser.h.

Referenced by while().

int isc::d2::D2Parser::operator() ( )

Parse.

An alias for parse ().

Returns
0 iff parsing succeeded.

Definition at line 505 of file d2_parser.cc.

References parse().

+ Here is the call graph for this function:

int isc::d2::D2Parser::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 d2_parser.cc.

References isc::d2::D2Parser::basic_symbol< Base >::clear(), isc::d2::D2ParserContext::CONFIG, isc::d2::D2ParserContext::contextName(), isc::d2::D2ParserContext::CONTROL_SOCKET, isc::d2::D2ParserContext::ctx_, isc::d2::D2ParserContext::DDNS_DOMAIN, isc::d2::D2ParserContext::DDNS_DOMAINS, isc::d2::D2ParserContext::DHCPDDNS, isc::d2::D2ParserContext::DNS_SERVERS, isc::d2::D2Parser::basic_symbol< Base >::empty(), isc::d2::D2ParserContext::enter(), error(), isc::d2::D2ParserContext::FORWARD_DDNS, isc::d2::D2ParserContext::HOOKS_LIBRARIES, isc::d2::D2Parser::by_kind::kind(), isc::d2::D2Parser::by_kind::kind_, isc::d2::D2ParserContext::leave(), isc::d2::D2ParserContext::loc2pos(), isc::d2::D2Parser::basic_symbol< Base >::location, isc::d2::D2ParserContext::LOGGERS, isc::data::merge(), isc::d2::D2Parser::basic_symbol< Base >::move(), isc::d2::D2ParserContext::NCR_FORMAT, isc::d2::D2ParserContext::NCR_PROTOCOL, isc::d2::D2ParserContext::NO_KEYWORD, isc::d2::D2ParserContext::OUTPUT_OPTIONS, isc::d2::D2ParserContext::require(), isc::d2::D2ParserContext::REVERSE_DDNS, isc::d2::D2Parser::symbol_kind::S_BOOLEAN, isc::d2::D2Parser::symbol_kind::S_FLOAT, isc::d2::D2Parser::symbol_kind::S_INTEGER, isc::d2::D2Parser::symbol_kind::S_map_value, isc::d2::D2Parser::symbol_kind::S_ncr_protocol_value, isc::d2::D2Parser::symbol_kind::S_STRING, isc::d2::D2Parser::symbol_kind::S_value, isc::d2::D2Parser::symbol_kind::S_YYEOF, isc::d2::D2Parser::symbol_kind::S_YYerror, isc::d2::D2Parser::symbol_kind::S_YYUNDEF, isc::d2::D2ParserContext::stack_, isc::d2::D2ParserContext::TSIG_KEY, isc::d2::D2ParserContext::TSIG_KEYS, isc::d2::D2ParserContext::unique(), 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:

void isc::d2::D2Parser::set_debug_level ( debug_level_type  l)

Set the current debugging level.

Definition at line 476 of file d2_parser.cc.

void isc::d2::D2Parser::set_debug_stream ( std::ostream &  o)

Set the current debugging stream.

Definition at line 463 of file d2_parser.cc.

std::string isc::d2::D2Parser::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 2134 of file d2_parser.cc.

Referenced by isc::d2::D2Parser::basic_symbol< by_state >::name().

Member Data Documentation

const symbol_kind_type isc::d2::D2Parser::YYNTOKENS = symbol_kind::YYNTOKENS
static

The number of tokens.

Definition at line 779 of file d2_parser.h.

Referenced by isc::d2::D2Parser::context::expected_tokens().


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