Kea  1.5.0
isc::eval::EvalParser Class Reference

A Bison parser. More...

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

 EvalParser (EvalContext &ctx_yyarg)
 Build a parser object. More...
 
virtual ~EvalParser ()
 
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_ALL (YY_COPY(location_type) l)
 
static symbol_type make_AND (YY_COPY(location_type) l)
 
static symbol_type make_ANY (YY_COPY(location_type) l)
 
static symbol_type make_CHADDR (YY_COPY(location_type) l)
 
static symbol_type make_CIADDR (YY_COPY(location_type) l)
 
static symbol_type make_COMA (YY_COPY(location_type) l)
 
static symbol_type make_CONCAT (YY_COPY(location_type) l)
 
static symbol_type make_DATA (YY_COPY(location_type) l)
 
static symbol_type make_DOT (YY_COPY(location_type) l)
 
static symbol_type make_DST (YY_COPY(location_type) l)
 
static symbol_type make_END (YY_COPY(location_type) l)
 
static symbol_type make_ENTERPRISE (YY_COPY(location_type) l)
 
static symbol_type make_EQUAL (YY_COPY(location_type) l)
 
static symbol_type make_EXISTS (YY_COPY(location_type) l)
 
static symbol_type make_GIADDR (YY_COPY(location_type) l)
 
static symbol_type make_HEX (YY_COPY(location_type) l)
 
static symbol_type make_HEXSTRING (YY_COPY(std::string) v, YY_COPY(location_type) l)
 
static symbol_type make_HLEN (YY_COPY(location_type) l)
 
static symbol_type make_HTYPE (YY_COPY(location_type) l)
 
static symbol_type make_IFACE (YY_COPY(location_type) l)
 
static symbol_type make_IFELSE (YY_COPY(location_type) l)
 
static symbol_type make_INTEGER (YY_COPY(std::string) v, YY_COPY(location_type) l)
 
static symbol_type make_IP_ADDRESS (YY_COPY(std::string) v, YY_COPY(location_type) l)
 
static symbol_type make_LBRACKET (YY_COPY(location_type) l)
 
static symbol_type make_LEN (YY_COPY(location_type) l)
 
static symbol_type make_LINKADDR (YY_COPY(location_type) l)
 
static symbol_type make_LPAREN (YY_COPY(location_type) l)
 
static symbol_type make_MEMBER (YY_COPY(location_type) l)
 
static symbol_type make_MSGTYPE (YY_COPY(location_type) l)
 
static symbol_type make_NOT (YY_COPY(location_type) l)
 
static symbol_type make_OPTION (YY_COPY(location_type) l)
 
static symbol_type make_OPTION_NAME (YY_COPY(std::string) v, YY_COPY(location_type) l)
 
static symbol_type make_OR (YY_COPY(location_type) l)
 
static symbol_type make_PEERADDR (YY_COPY(location_type) l)
 
static symbol_type make_PKT (YY_COPY(location_type) l)
 
static symbol_type make_PKT4 (YY_COPY(location_type) l)
 
static symbol_type make_PKT6 (YY_COPY(location_type) l)
 
static symbol_type make_RBRACKET (YY_COPY(location_type) l)
 
static symbol_type make_RELAY4 (YY_COPY(location_type) l)
 
static symbol_type make_RELAY6 (YY_COPY(location_type) l)
 
static symbol_type make_RPAREN (YY_COPY(location_type) l)
 
static symbol_type make_SIADDR (YY_COPY(location_type) l)
 
static symbol_type make_SRC (YY_COPY(location_type) l)
 
static symbol_type make_STRING (YY_COPY(std::string) v, YY_COPY(location_type) l)
 
static symbol_type make_SUBSTRING (YY_COPY(location_type) l)
 
static symbol_type make_TEXT (YY_COPY(location_type) l)
 
static symbol_type make_TOHEXSTRING (YY_COPY(location_type) l)
 
static symbol_type make_TOPLEVEL_BOOL (YY_COPY(location_type) l)
 
static symbol_type make_TOPLEVEL_STRING (YY_COPY(location_type) l)
 
static symbol_type make_TRANSID (YY_COPY(location_type) l)
 
static symbol_type make_VENDOR (YY_COPY(location_type) l)
 
static symbol_type make_VENDOR_CLASS (YY_COPY(location_type) l)
 
static symbol_type make_YIADDR (YY_COPY(location_type) l)
 

Detailed Description

A Bison parser.

Definition at line 494 of file parser.h.

Member Typedef Documentation

◆ debug_level_type

Type for debugging levels.

Definition at line 775 of file parser.h.

◆ location_type

Symbol locations.

Definition at line 540 of file parser.h.

◆ semantic_type

Symbol semantic values.

Definition at line 535 of file parser.h.

◆ symbol_number_type

Symbol type: an internal symbol number.

Definition at line 614 of file parser.h.

◆ symbol_type

"External" symbols: returned by the scanner.

Definition at line 754 of file parser.h.

◆ token_number_type

Internal symbol number for tokens (subsumed by symbol_number_type).

Definition at line 620 of file parser.h.

◆ token_type

(External) token type, as returned by yylex.

Definition at line 611 of file parser.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

The symbol type number to denote an empty symbol.

Enumerator
empty_symbol 

Definition at line 617 of file parser.h.

Constructor & Destructor Documentation

◆ EvalParser()

isc::eval::EvalParser::EvalParser ( EvalContext ctx_yyarg)

Build a parser object.

Definition at line 186 of file parser.cc.

◆ ~EvalParser()

isc::eval::EvalParser::~EvalParser ( )
virtual

Definition at line 195 of file parser.cc.

Member Function Documentation

◆ debug_level()

EvalParser::debug_level_type isc::eval::EvalParser::debug_level ( ) const

The current debugging level.

Definition at line 584 of file parser.cc.

◆ debug_stream()

std::ostream & isc::eval::EvalParser::debug_stream ( ) const

The current debugging stream.

Definition at line 571 of file parser.cc.

◆ error() [1/2]

void isc::eval::EvalParser::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 1933 of file parser.cc.

References isc::eval::EvalContext::error().

Referenced by error(), and parse().

+ Here is the call graph for this function:

◆ error() [2/2]

void isc::eval::EvalParser::error ( const syntax_error err)

Report a syntax error.

Definition at line 1593 of file parser.cc.

References error(), and isc::eval::EvalParser::syntax_error::location.

+ Here is the call graph for this function:

◆ make_ALL()

EvalParser::symbol_type isc::eval::EvalParser::make_ALL ( YY_COPY(location_type l)
inlinestatic

Definition at line 1895 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_ALL, and YY_MOVE.

◆ make_AND()

EvalParser::symbol_type isc::eval::EvalParser::make_AND ( YY_COPY(location_type l)
inlinestatic

Definition at line 1692 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_AND, and YY_MOVE.

◆ make_ANY()

EvalParser::symbol_type isc::eval::EvalParser::make_ANY ( YY_COPY(location_type l)
inlinestatic

Definition at line 1965 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_ANY, and YY_MOVE.

◆ make_CHADDR()

EvalParser::symbol_type isc::eval::EvalParser::make_CHADDR ( YY_COPY(location_type l)
inlinestatic

Definition at line 1839 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_CHADDR, and YY_MOVE.

◆ make_CIADDR()

EvalParser::symbol_type isc::eval::EvalParser::make_CIADDR ( YY_COPY(location_type l)
inlinestatic

Definition at line 1860 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_CIADDR, and YY_MOVE.

◆ make_COMA()

EvalParser::symbol_type isc::eval::EvalParser::make_COMA ( YY_COPY(location_type l)
inlinestatic

Definition at line 1902 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_COMA, and YY_MOVE.

◆ make_CONCAT()

EvalParser::symbol_type isc::eval::EvalParser::make_CONCAT ( YY_COPY(location_type l)
inlinestatic

Definition at line 1909 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_CONCAT, and YY_MOVE.

◆ make_DATA()

EvalParser::symbol_type isc::eval::EvalParser::make_DATA ( YY_COPY(location_type l)
inlinestatic

Definition at line 1972 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_DATA, and YY_MOVE.

◆ make_DOT()

EvalParser::symbol_type isc::eval::EvalParser::make_DOT ( YY_COPY(location_type l)
inlinestatic

Definition at line 1769 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_DOT, and YY_MOVE.

◆ make_DST()

EvalParser::symbol_type isc::eval::EvalParser::make_DST ( YY_COPY(location_type l)
inlinestatic

Definition at line 1818 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_DST, and YY_MOVE.

◆ make_END()

EvalParser::symbol_type isc::eval::EvalParser::make_END ( YY_COPY(location_type l)
inlinestatic

Definition at line 1664 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_END, and YY_MOVE.

◆ make_ENTERPRISE()

EvalParser::symbol_type isc::eval::EvalParser::make_ENTERPRISE ( YY_COPY(location_type l)
inlinestatic

Definition at line 1979 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_ENTERPRISE, and YY_MOVE.

◆ make_EQUAL()

EvalParser::symbol_type isc::eval::EvalParser::make_EQUAL ( YY_COPY(location_type l)
inlinestatic

Definition at line 1706 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_EQUAL, and YY_MOVE.

◆ make_EXISTS()

EvalParser::symbol_type isc::eval::EvalParser::make_EXISTS ( YY_COPY(location_type l)
inlinestatic

Definition at line 1790 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_EXISTS, and YY_MOVE.

◆ make_GIADDR()

EvalParser::symbol_type isc::eval::EvalParser::make_GIADDR ( YY_COPY(location_type l)
inlinestatic

Definition at line 1867 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_GIADDR, and YY_MOVE.

◆ make_HEX()

EvalParser::symbol_type isc::eval::EvalParser::make_HEX ( YY_COPY(location_type l)
inlinestatic

Definition at line 1783 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_HEX, and YY_MOVE.

◆ make_HEXSTRING()

EvalParser::symbol_type isc::eval::EvalParser::make_HEXSTRING ( YY_COPY(std::string)  v,
YY_COPY(location_type l 
)
inlinestatic

Definition at line 2014 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_HEXSTRING, and YY_MOVE.

◆ make_HLEN()

EvalParser::symbol_type isc::eval::EvalParser::make_HLEN ( YY_COPY(location_type l)
inlinestatic

Definition at line 1846 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_HLEN, and YY_MOVE.

◆ make_HTYPE()

EvalParser::symbol_type isc::eval::EvalParser::make_HTYPE ( YY_COPY(location_type l)
inlinestatic

Definition at line 1853 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_HTYPE, and YY_MOVE.

◆ make_IFACE()

EvalParser::symbol_type isc::eval::EvalParser::make_IFACE ( YY_COPY(location_type l)
inlinestatic

Definition at line 1804 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_IFACE, and YY_MOVE.

◆ make_IFELSE()

EvalParser::symbol_type isc::eval::EvalParser::make_IFELSE ( YY_COPY(location_type l)
inlinestatic

Definition at line 1916 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_IFELSE, and YY_MOVE.

◆ make_INTEGER()

EvalParser::symbol_type isc::eval::EvalParser::make_INTEGER ( YY_COPY(std::string)  v,
YY_COPY(location_type l 
)
inlinestatic

Definition at line 2007 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_INTEGER, and YY_MOVE.

◆ make_IP_ADDRESS()

EvalParser::symbol_type isc::eval::EvalParser::make_IP_ADDRESS ( YY_COPY(std::string)  v,
YY_COPY(location_type l 
)
inlinestatic

Definition at line 2028 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_IP_ADDRESS, and YY_MOVE.

◆ make_LBRACKET()

EvalParser::symbol_type isc::eval::EvalParser::make_LBRACKET ( YY_COPY(location_type l)
inlinestatic

Definition at line 1755 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_LBRACKET, and YY_MOVE.

◆ make_LEN()

EvalParser::symbol_type isc::eval::EvalParser::make_LEN ( YY_COPY(location_type l)
inlinestatic

Definition at line 1825 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_LEN, and YY_MOVE.

◆ make_LINKADDR()

EvalParser::symbol_type isc::eval::EvalParser::make_LINKADDR ( YY_COPY(location_type l)
inlinestatic

Definition at line 1748 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_LINKADDR, and YY_MOVE.

◆ make_LPAREN()

EvalParser::symbol_type isc::eval::EvalParser::make_LPAREN ( YY_COPY(location_type l)
inlinestatic

Definition at line 1671 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_LPAREN, and YY_MOVE.

◆ make_MEMBER()

EvalParser::symbol_type isc::eval::EvalParser::make_MEMBER ( YY_COPY(location_type l)
inlinestatic

Definition at line 1734 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_MEMBER, and YY_MOVE.

◆ make_MSGTYPE()

EvalParser::symbol_type isc::eval::EvalParser::make_MSGTYPE ( YY_COPY(location_type l)
inlinestatic

Definition at line 1937 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_MSGTYPE, and YY_MOVE.

◆ make_NOT()

EvalParser::symbol_type isc::eval::EvalParser::make_NOT ( YY_COPY(location_type l)
inlinestatic

Definition at line 1685 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_NOT, and YY_MOVE.

◆ make_OPTION()

EvalParser::symbol_type isc::eval::EvalParser::make_OPTION ( YY_COPY(location_type l)
inlinestatic

Definition at line 1713 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_OPTION, and YY_MOVE.

◆ make_OPTION_NAME()

EvalParser::symbol_type isc::eval::EvalParser::make_OPTION_NAME ( YY_COPY(std::string)  v,
YY_COPY(location_type l 
)
inlinestatic

Definition at line 2021 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_OPTION_NAME, and YY_MOVE.

◆ make_OR()

EvalParser::symbol_type isc::eval::EvalParser::make_OR ( YY_COPY(location_type l)
inlinestatic

Definition at line 1699 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_OR, and YY_MOVE.

◆ make_PEERADDR()

EvalParser::symbol_type isc::eval::EvalParser::make_PEERADDR ( YY_COPY(location_type l)
inlinestatic

Definition at line 1741 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_PEERADDR, and YY_MOVE.

◆ make_PKT()

EvalParser::symbol_type isc::eval::EvalParser::make_PKT ( YY_COPY(location_type l)
inlinestatic

Definition at line 1797 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_PKT, and YY_MOVE.

◆ make_PKT4()

EvalParser::symbol_type isc::eval::EvalParser::make_PKT4 ( YY_COPY(location_type l)
inlinestatic

Definition at line 1832 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_PKT4, and YY_MOVE.

◆ make_PKT6()

EvalParser::symbol_type isc::eval::EvalParser::make_PKT6 ( YY_COPY(location_type l)
inlinestatic

Definition at line 1930 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_PKT6, and YY_MOVE.

◆ make_RBRACKET()

EvalParser::symbol_type isc::eval::EvalParser::make_RBRACKET ( YY_COPY(location_type l)
inlinestatic

Definition at line 1762 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_RBRACKET, and YY_MOVE.

◆ make_RELAY4()

EvalParser::symbol_type isc::eval::EvalParser::make_RELAY4 ( YY_COPY(location_type l)
inlinestatic

Definition at line 1720 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_RELAY4, and YY_MOVE.

◆ make_RELAY6()

EvalParser::symbol_type isc::eval::EvalParser::make_RELAY6 ( YY_COPY(location_type l)
inlinestatic

Definition at line 1727 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_RELAY6, and YY_MOVE.

◆ make_RPAREN()

EvalParser::symbol_type isc::eval::EvalParser::make_RPAREN ( YY_COPY(location_type l)
inlinestatic

Definition at line 1678 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_RPAREN, and YY_MOVE.

◆ make_SIADDR()

EvalParser::symbol_type isc::eval::EvalParser::make_SIADDR ( YY_COPY(location_type l)
inlinestatic

Definition at line 1881 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_SIADDR, and YY_MOVE.

◆ make_SRC()

EvalParser::symbol_type isc::eval::EvalParser::make_SRC ( YY_COPY(location_type l)
inlinestatic

Definition at line 1811 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_SRC, and YY_MOVE.

◆ make_STRING()

EvalParser::symbol_type isc::eval::EvalParser::make_STRING ( YY_COPY(std::string)  v,
YY_COPY(location_type l 
)
inlinestatic

Definition at line 2000 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_STRING, and YY_MOVE.

◆ make_SUBSTRING()

EvalParser::symbol_type isc::eval::EvalParser::make_SUBSTRING ( YY_COPY(location_type l)
inlinestatic

Definition at line 1888 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_SUBSTRING, and YY_MOVE.

◆ make_TEXT()

EvalParser::symbol_type isc::eval::EvalParser::make_TEXT ( YY_COPY(location_type l)
inlinestatic

Definition at line 1776 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_TEXT, and YY_MOVE.

◆ make_TOHEXSTRING()

EvalParser::symbol_type isc::eval::EvalParser::make_TOHEXSTRING ( YY_COPY(location_type l)
inlinestatic

Definition at line 1923 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_TOHEXSTRING, and YY_MOVE.

◆ make_TOPLEVEL_BOOL()

EvalParser::symbol_type isc::eval::EvalParser::make_TOPLEVEL_BOOL ( YY_COPY(location_type l)
inlinestatic

Definition at line 1986 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_TOPLEVEL_BOOL, and YY_MOVE.

◆ make_TOPLEVEL_STRING()

EvalParser::symbol_type isc::eval::EvalParser::make_TOPLEVEL_STRING ( YY_COPY(location_type l)
inlinestatic

Definition at line 1993 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_TOPLEVEL_STRING, and YY_MOVE.

◆ make_TRANSID()

EvalParser::symbol_type isc::eval::EvalParser::make_TRANSID ( YY_COPY(location_type l)
inlinestatic

Definition at line 1944 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_TRANSID, and YY_MOVE.

◆ make_VENDOR()

EvalParser::symbol_type isc::eval::EvalParser::make_VENDOR ( YY_COPY(location_type l)
inlinestatic

Definition at line 1958 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_VENDOR, and YY_MOVE.

◆ make_VENDOR_CLASS()

EvalParser::symbol_type isc::eval::EvalParser::make_VENDOR_CLASS ( YY_COPY(location_type l)
inlinestatic

Definition at line 1951 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_VENDOR_CLASS, and YY_MOVE.

◆ make_YIADDR()

EvalParser::symbol_type isc::eval::EvalParser::make_YIADDR ( YY_COPY(location_type l)
inlinestatic

Definition at line 1874 of file parser.h.

References isc::eval::EvalParser::token::TOKEN_YIADDR, and YY_MOVE.

◆ operator()()

int isc::eval::EvalParser::operator() ( )

Parse.

An alias for parse ().

Returns
0 iff parsing succeeded.

Definition at line 619 of file parser.cc.

References parse().

+ Here is the call graph for this function:

◆ parse()

◆ set_debug_level()

void isc::eval::EvalParser::set_debug_level ( debug_level_type  l)

Set the current debugging level.

Definition at line 590 of file parser.cc.

Referenced by isc::eval::EvalContext::parseString().

◆ set_debug_stream()

void isc::eval::EvalParser::set_debug_stream ( std::ostream &  o)

Set the current debugging stream.

Definition at line 577 of file parser.cc.


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