Kea  1.5.0
isc::agent::AgentParser Class Reference

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_typesymbol_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...
 

Static Public Member Functions

static symbol_type make_BOOLEAN (YY_COPY(bool) v, YY_COPY(location_type) l)
 
static symbol_type make_COLON (YY_COPY(location_type) l)
 
static symbol_type make_COMMA (YY_COPY(location_type) l)
 
static symbol_type make_COMMENT (YY_COPY(location_type) l)
 
static symbol_type make_CONTROL_AGENT (YY_COPY(location_type) l)
 
static symbol_type make_CONTROL_SOCKETS (YY_COPY(location_type) l)
 
static symbol_type make_D2_SERVER (YY_COPY(location_type) l)
 
static symbol_type make_DEBUGLEVEL (YY_COPY(location_type) l)
 
static symbol_type make_DHCP4 (YY_COPY(location_type) l)
 
static symbol_type make_DHCP4_SERVER (YY_COPY(location_type) l)
 
static symbol_type make_DHCP6 (YY_COPY(location_type) l)
 
static symbol_type make_DHCP6_SERVER (YY_COPY(location_type) l)
 
static symbol_type make_DHCPDDNS (YY_COPY(location_type) l)
 
static symbol_type make_END (YY_COPY(location_type) l)
 
static symbol_type make_FLOAT (YY_COPY(double) v, YY_COPY(location_type) l)
 
static symbol_type make_FLUSH (YY_COPY(location_type) l)
 
static symbol_type make_HOOKS_LIBRARIES (YY_COPY(location_type) l)
 
static symbol_type make_HTTP_HOST (YY_COPY(location_type) l)
 
static symbol_type make_HTTP_PORT (YY_COPY(location_type) l)
 
static symbol_type make_INTEGER (YY_COPY(int64_t) v, YY_COPY(location_type) l)
 
static symbol_type make_LCURLY_BRACKET (YY_COPY(location_type) l)
 
static symbol_type make_LIBRARY (YY_COPY(location_type) l)
 
static symbol_type make_LOGGERS (YY_COPY(location_type) l)
 
static symbol_type make_LOGGING (YY_COPY(location_type) l)
 
static symbol_type make_LSQUARE_BRACKET (YY_COPY(location_type) l)
 
static symbol_type make_MAXSIZE (YY_COPY(location_type) l)
 
static symbol_type make_MAXVER (YY_COPY(location_type) l)
 
static symbol_type make_NAME (YY_COPY(location_type) l)
 
static symbol_type make_NULL_TYPE (YY_COPY(location_type) l)
 
static symbol_type make_OUTPUT (YY_COPY(location_type) l)
 
static symbol_type make_OUTPUT_OPTIONS (YY_COPY(location_type) l)
 
static symbol_type make_PARAMETERS (YY_COPY(location_type) l)
 
static symbol_type make_RCURLY_BRACKET (YY_COPY(location_type) l)
 
static symbol_type make_RSQUARE_BRACKET (YY_COPY(location_type) l)
 
static symbol_type make_SEVERITY (YY_COPY(location_type) l)
 
static symbol_type make_SOCKET_NAME (YY_COPY(location_type) l)
 
static symbol_type make_SOCKET_TYPE (YY_COPY(location_type) l)
 
static symbol_type make_START_AGENT (YY_COPY(location_type) l)
 
static symbol_type make_START_JSON (YY_COPY(location_type) l)
 
static symbol_type make_START_SUB_AGENT (YY_COPY(location_type) l)
 
static symbol_type make_STRING (YY_COPY(std::string) v, YY_COPY(location_type) l)
 
static symbol_type make_UNIX (YY_COPY(location_type) l)
 
static symbol_type make_USER_CONTEXT (YY_COPY(location_type) l)
 

Detailed Description

A Bison parser.

Definition at line 494 of file agent_parser.h.

Member Typedef Documentation

◆ debug_level_type

Type for debugging levels.

Definition at line 730 of file agent_parser.h.

◆ location_type

Symbol locations.

Definition at line 525 of file agent_parser.h.

◆ semantic_type

Symbol semantic values.

Definition at line 520 of file agent_parser.h.

◆ symbol_number_type

Symbol type: an internal symbol number.

Definition at line 589 of file agent_parser.h.

◆ symbol_type

"External" symbols: returned by the scanner.

Definition at line 709 of file agent_parser.h.

◆ token_number_type

Internal symbol number for tokens (subsumed by symbol_number_type).

Definition at line 595 of file agent_parser.h.

◆ token_type

(External) token type, as returned by yylex.

Definition at line 586 of file agent_parser.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

The symbol type number to denote an empty symbol.

Enumerator
empty_symbol 

Definition at line 592 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 186 of file agent_parser.cc.

◆ ~AgentParser()

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

Definition at line 195 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 478 of file agent_parser.cc.

◆ debug_stream()

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

The current debugging stream.

Definition at line 465 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 2012 of file agent_parser.cc.

References isc::agent::ParserContext::error().

Referenced by error(), and parse().

+ Here is the call graph for this function:

◆ error() [2/2]

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:

◆ make_BOOLEAN()

AgentParser::symbol_type isc::agent::AgentParser::make_BOOLEAN ( YY_COPY(bool)  v,
YY_COPY(location_type l 
)
inlinestatic

Definition at line 1754 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_BOOLEAN, and YY_MOVE.

◆ make_COLON()

AgentParser::symbol_type isc::agent::AgentParser::make_COLON ( YY_COPY(location_type l)
inlinestatic

Definition at line 1474 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_COLON, and YY_MOVE.

◆ make_COMMA()

AgentParser::symbol_type isc::agent::AgentParser::make_COMMA ( YY_COPY(location_type l)
inlinestatic

Definition at line 1467 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_COMMA, and YY_MOVE.

◆ make_COMMENT()

AgentParser::symbol_type isc::agent::AgentParser::make_COMMENT ( YY_COPY(location_type l)
inlinestatic

Definition at line 1544 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_COMMENT, and YY_MOVE.

◆ make_CONTROL_AGENT()

AgentParser::symbol_type isc::agent::AgentParser::make_CONTROL_AGENT ( YY_COPY(location_type l)
inlinestatic

◆ make_CONTROL_SOCKETS()

AgentParser::symbol_type isc::agent::AgentParser::make_CONTROL_SOCKETS ( YY_COPY(location_type l)
inlinestatic

◆ make_D2_SERVER()

AgentParser::symbol_type isc::agent::AgentParser::make_D2_SERVER ( YY_COPY(location_type l)
inlinestatic

Definition at line 1572 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_D2_SERVER, and YY_MOVE.

◆ make_DEBUGLEVEL()

AgentParser::symbol_type isc::agent::AgentParser::make_DEBUGLEVEL ( YY_COPY(location_type l)
inlinestatic

Definition at line 1656 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_DEBUGLEVEL, and YY_MOVE.

◆ make_DHCP4()

AgentParser::symbol_type isc::agent::AgentParser::make_DHCP4 ( YY_COPY(location_type l)
inlinestatic

Definition at line 1691 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_DHCP4, and YY_MOVE.

◆ make_DHCP4_SERVER()

AgentParser::symbol_type isc::agent::AgentParser::make_DHCP4_SERVER ( YY_COPY(location_type l)
inlinestatic

Definition at line 1558 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_DHCP4_SERVER, and YY_MOVE.

◆ make_DHCP6()

AgentParser::symbol_type isc::agent::AgentParser::make_DHCP6 ( YY_COPY(location_type l)
inlinestatic

Definition at line 1698 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_DHCP6, and YY_MOVE.

◆ make_DHCP6_SERVER()

AgentParser::symbol_type isc::agent::AgentParser::make_DHCP6_SERVER ( YY_COPY(location_type l)
inlinestatic

Definition at line 1565 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_DHCP6_SERVER, and YY_MOVE.

◆ make_DHCPDDNS()

AgentParser::symbol_type isc::agent::AgentParser::make_DHCPDDNS ( YY_COPY(location_type l)
inlinestatic

Definition at line 1705 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_DHCPDDNS, and YY_MOVE.

◆ make_END()

AgentParser::symbol_type isc::agent::AgentParser::make_END ( YY_COPY(location_type l)
inlinestatic

Definition at line 1460 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_END, and YY_MOVE.

◆ make_FLOAT()

AgentParser::symbol_type isc::agent::AgentParser::make_FLOAT ( YY_COPY(double)  v,
YY_COPY(location_type l 
)
inlinestatic

Definition at line 1747 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_FLOAT, and YY_MOVE.

◆ make_FLUSH()

AgentParser::symbol_type isc::agent::AgentParser::make_FLUSH ( YY_COPY(location_type l)
inlinestatic

Definition at line 1670 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_FLUSH, and YY_MOVE.

◆ make_HOOKS_LIBRARIES()

AgentParser::symbol_type isc::agent::AgentParser::make_HOOKS_LIBRARIES ( YY_COPY(location_type l)
inlinestatic

◆ make_HTTP_HOST()

AgentParser::symbol_type isc::agent::AgentParser::make_HTTP_HOST ( YY_COPY(location_type l)
inlinestatic

Definition at line 1523 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_HTTP_HOST, and YY_MOVE.

◆ make_HTTP_PORT()

AgentParser::symbol_type isc::agent::AgentParser::make_HTTP_PORT ( YY_COPY(location_type l)
inlinestatic

Definition at line 1530 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_HTTP_PORT, and YY_MOVE.

◆ make_INTEGER()

AgentParser::symbol_type isc::agent::AgentParser::make_INTEGER ( YY_COPY(int64_t)  v,
YY_COPY(location_type l 
)
inlinestatic

Definition at line 1740 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_INTEGER, and YY_MOVE.

◆ make_LCURLY_BRACKET()

AgentParser::symbol_type isc::agent::AgentParser::make_LCURLY_BRACKET ( YY_COPY(location_type l)
inlinestatic

◆ make_LIBRARY()

AgentParser::symbol_type isc::agent::AgentParser::make_LIBRARY ( YY_COPY(location_type l)
inlinestatic

Definition at line 1607 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_LIBRARY, and YY_MOVE.

◆ make_LOGGERS()

AgentParser::symbol_type isc::agent::AgentParser::make_LOGGERS ( YY_COPY(location_type l)
inlinestatic

Definition at line 1628 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_LOGGERS, and YY_MOVE.

◆ make_LOGGING()

AgentParser::symbol_type isc::agent::AgentParser::make_LOGGING ( YY_COPY(location_type l)
inlinestatic

Definition at line 1621 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_LOGGING, and YY_MOVE.

◆ make_LSQUARE_BRACKET()

AgentParser::symbol_type isc::agent::AgentParser::make_LSQUARE_BRACKET ( YY_COPY(location_type l)
inlinestatic

◆ make_MAXSIZE()

AgentParser::symbol_type isc::agent::AgentParser::make_MAXSIZE ( YY_COPY(location_type l)
inlinestatic

Definition at line 1677 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_MAXSIZE, and YY_MOVE.

◆ make_MAXVER()

AgentParser::symbol_type isc::agent::AgentParser::make_MAXVER ( YY_COPY(location_type l)
inlinestatic

Definition at line 1684 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_MAXVER, and YY_MOVE.

◆ make_NAME()

AgentParser::symbol_type isc::agent::AgentParser::make_NAME ( YY_COPY(location_type l)
inlinestatic

Definition at line 1635 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_NAME, and YY_MOVE.

◆ make_NULL_TYPE()

AgentParser::symbol_type isc::agent::AgentParser::make_NULL_TYPE ( YY_COPY(location_type l)
inlinestatic

Definition at line 1509 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_NULL_TYPE, and YY_MOVE.

◆ make_OUTPUT()

AgentParser::symbol_type isc::agent::AgentParser::make_OUTPUT ( YY_COPY(location_type l)
inlinestatic

Definition at line 1649 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_OUTPUT, and YY_MOVE.

◆ make_OUTPUT_OPTIONS()

AgentParser::symbol_type isc::agent::AgentParser::make_OUTPUT_OPTIONS ( YY_COPY(location_type l)
inlinestatic

◆ make_PARAMETERS()

AgentParser::symbol_type isc::agent::AgentParser::make_PARAMETERS ( YY_COPY(location_type l)
inlinestatic

Definition at line 1614 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_PARAMETERS, and YY_MOVE.

◆ make_RCURLY_BRACKET()

AgentParser::symbol_type isc::agent::AgentParser::make_RCURLY_BRACKET ( YY_COPY(location_type l)
inlinestatic

◆ make_RSQUARE_BRACKET()

AgentParser::symbol_type isc::agent::AgentParser::make_RSQUARE_BRACKET ( YY_COPY(location_type l)
inlinestatic

◆ make_SEVERITY()

AgentParser::symbol_type isc::agent::AgentParser::make_SEVERITY ( YY_COPY(location_type l)
inlinestatic

Definition at line 1663 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_SEVERITY, and YY_MOVE.

◆ make_SOCKET_NAME()

AgentParser::symbol_type isc::agent::AgentParser::make_SOCKET_NAME ( YY_COPY(location_type l)
inlinestatic

Definition at line 1579 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_SOCKET_NAME, and YY_MOVE.

◆ make_SOCKET_TYPE()

AgentParser::symbol_type isc::agent::AgentParser::make_SOCKET_TYPE ( YY_COPY(location_type l)
inlinestatic

Definition at line 1586 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_SOCKET_TYPE, and YY_MOVE.

◆ make_START_AGENT()

AgentParser::symbol_type isc::agent::AgentParser::make_START_AGENT ( YY_COPY(location_type l)
inlinestatic

Definition at line 1719 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_START_AGENT, and YY_MOVE.

Referenced by if().

◆ make_START_JSON()

AgentParser::symbol_type isc::agent::AgentParser::make_START_JSON ( YY_COPY(location_type l)
inlinestatic

Definition at line 1712 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_START_JSON, and YY_MOVE.

Referenced by if().

◆ make_START_SUB_AGENT()

AgentParser::symbol_type isc::agent::AgentParser::make_START_SUB_AGENT ( YY_COPY(location_type l)
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().

◆ make_STRING()

AgentParser::symbol_type isc::agent::AgentParser::make_STRING ( YY_COPY(std::string)  v,
YY_COPY(location_type l 
)
inlinestatic

Definition at line 1733 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_STRING, and YY_MOVE.

◆ make_UNIX()

AgentParser::symbol_type isc::agent::AgentParser::make_UNIX ( YY_COPY(location_type l)
inlinestatic

Definition at line 1593 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_UNIX, and YY_MOVE.

◆ make_USER_CONTEXT()

AgentParser::symbol_type isc::agent::AgentParser::make_USER_CONTEXT ( YY_COPY(location_type l)
inlinestatic

Definition at line 1537 of file agent_parser.h.

References isc::agent::AgentParser::token::TOKEN_USER_CONTEXT, and YY_MOVE.

◆ operator()()

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

Parse.

An alias for parse ().

Returns
0 iff parsing succeeded.

Definition at line 513 of file agent_parser.cc.

References parse().

+ Here is the call graph for this function:

◆ parse()

◆ set_debug_level()

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.

◆ set_debug_stream()

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

Set the current debugging stream.

Definition at line 471 of file agent_parser.cc.


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