Kea  1.9.9-git
isc::eval::EvalParser Class Reference

A Bison parser. More...

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

 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_ADDRTOTEXT (const location_type &l)
 
static symbol_type make_ALL (const location_type &l)
 
static symbol_type make_AND (const location_type &l)
 
static symbol_type make_ANY (const location_type &l)
 
static symbol_type make_CHADDR (const location_type &l)
 
static symbol_type make_CIADDR (const location_type &l)
 
static symbol_type make_COMA (const location_type &l)
 
static symbol_type make_CONCAT (const location_type &l)
 
static symbol_type make_DATA (const location_type &l)
 
static symbol_type make_DOT (const location_type &l)
 
static symbol_type make_DST (const location_type &l)
 
static symbol_type make_END (const location_type &l)
 
static symbol_type make_ENTERPRISE (const location_type &l)
 
static symbol_type make_EQUAL (const location_type &l)
 
static symbol_type make_EVALerror (const location_type &l)
 
static symbol_type make_EVALUNDEF (const location_type &l)
 
static symbol_type make_EXISTS (const location_type &l)
 
static symbol_type make_GIADDR (const location_type &l)
 
static symbol_type make_HEX (const location_type &l)
 
static symbol_type make_HEXSTRING (const std::string &v, const location_type &l)
 
static symbol_type make_HLEN (const location_type &l)
 
static symbol_type make_HTYPE (const location_type &l)
 
static symbol_type make_IFACE (const location_type &l)
 
static symbol_type make_IFELSE (const location_type &l)
 
static symbol_type make_INT16TOTEXT (const location_type &l)
 
static symbol_type make_INT32TOTEXT (const location_type &l)
 
static symbol_type make_INT8TOTEXT (const location_type &l)
 
static symbol_type make_INTEGER (const std::string &v, const location_type &l)
 
static symbol_type make_IP_ADDRESS (const std::string &v, const location_type &l)
 
static symbol_type make_LBRACKET (const location_type &l)
 
static symbol_type make_LEN (const location_type &l)
 
static symbol_type make_LINKADDR (const location_type &l)
 
static symbol_type make_LPAREN (const location_type &l)
 
static symbol_type make_MEMBER (const location_type &l)
 
static symbol_type make_MSGTYPE (const location_type &l)
 
static symbol_type make_NOT (const location_type &l)
 
static symbol_type make_OPTION (const location_type &l)
 
static symbol_type make_OPTION_NAME (const std::string &v, const location_type &l)
 
static symbol_type make_OR (const location_type &l)
 
static symbol_type make_PEERADDR (const location_type &l)
 
static symbol_type make_PKT (const location_type &l)
 
static symbol_type make_PKT4 (const location_type &l)
 
static symbol_type make_PKT6 (const location_type &l)
 
static symbol_type make_PLUS (const location_type &l)
 
static symbol_type make_RBRACKET (const location_type &l)
 
static symbol_type make_RELAY4 (const location_type &l)
 
static symbol_type make_RELAY6 (const location_type &l)
 
static symbol_type make_RPAREN (const location_type &l)
 
static symbol_type make_SIADDR (const location_type &l)
 
static symbol_type make_SRC (const location_type &l)
 
static symbol_type make_STRING (const std::string &v, const location_type &l)
 
static symbol_type make_SUBSTRING (const location_type &l)
 
static symbol_type make_TEXT (const location_type &l)
 
static symbol_type make_TOHEXSTRING (const location_type &l)
 
static symbol_type make_TOPLEVEL_BOOL (const location_type &l)
 
static symbol_type make_TOPLEVEL_STRING (const location_type &l)
 
static symbol_type make_TRANSID (const location_type &l)
 
static symbol_type make_UINT16TOTEXT (const location_type &l)
 
static symbol_type make_UINT32TOTEXT (const location_type &l)
 
static symbol_type make_UINT8TOTEXT (const location_type &l)
 
static symbol_type make_VENDOR (const location_type &l)
 
static symbol_type make_VENDOR_CLASS (const location_type &l)
 
static symbol_type make_YIADDR (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 208 of file parser.h.

Member Typedef Documentation

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

Definition at line 1022 of file parser.h.

Type for debugging levels.

Definition at line 1083 of file parser.h.

Symbol locations.

Definition at line 470 of file parser.h.

(Internal) symbol kind.

Definition at line 661 of file parser.h.

Token kind, as returned by yylex.

Definition at line 565 of file parser.h.

Backward compatibility alias (Bison 3.6).

Definition at line 568 of file parser.h.

Constructor & Destructor Documentation

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

Build a parser object.

Definition at line 147 of file parser.cc.

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

Definition at line 157 of file parser.cc.

Member Function Documentation

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

The current debugging level.

Definition at line 598 of file parser.cc.

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

The current debugging stream.

Definition at line 585 of file parser.cc.

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 2192 of file parser.cc.

Referenced by error(), and parse().

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

Report a syntax error.

Definition at line 1744 of file parser.cc.

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

+ Here is the call graph for this function:

static symbol_type isc::eval::EvalParser::make_ADDRTOTEXT ( const location_type l)
inlinestatic

Definition at line 1728 of file parser.h.

static symbol_type isc::eval::EvalParser::make_ALL ( const location_type l)
inlinestatic

Definition at line 1638 of file parser.h.

static symbol_type isc::eval::EvalParser::make_AND ( const location_type l)
inlinestatic

Definition at line 1203 of file parser.h.

static symbol_type isc::eval::EvalParser::make_ANY ( const location_type l)
inlinestatic

Definition at line 1908 of file parser.h.

static symbol_type isc::eval::EvalParser::make_CHADDR ( const location_type l)
inlinestatic

Definition at line 1518 of file parser.h.

static symbol_type isc::eval::EvalParser::make_CIADDR ( const location_type l)
inlinestatic

Definition at line 1563 of file parser.h.

static symbol_type isc::eval::EvalParser::make_COMA ( const location_type l)
inlinestatic

Definition at line 1653 of file parser.h.

static symbol_type isc::eval::EvalParser::make_CONCAT ( const location_type l)
inlinestatic

Definition at line 1668 of file parser.h.

static symbol_type isc::eval::EvalParser::make_DATA ( const location_type l)
inlinestatic

Definition at line 1923 of file parser.h.

static symbol_type isc::eval::EvalParser::make_DOT ( const location_type l)
inlinestatic

Definition at line 1368 of file parser.h.

static symbol_type isc::eval::EvalParser::make_DST ( const location_type l)
inlinestatic

Definition at line 1473 of file parser.h.

static symbol_type isc::eval::EvalParser::make_END ( const location_type l)
inlinestatic

Definition at line 1113 of file parser.h.

static symbol_type isc::eval::EvalParser::make_ENTERPRISE ( const location_type l)
inlinestatic

Definition at line 1938 of file parser.h.

static symbol_type isc::eval::EvalParser::make_EQUAL ( const location_type l)
inlinestatic

Definition at line 1233 of file parser.h.

static symbol_type isc::eval::EvalParser::make_EVALerror ( const location_type l)
inlinestatic

Definition at line 1128 of file parser.h.

static symbol_type isc::eval::EvalParser::make_EVALUNDEF ( const location_type l)
inlinestatic

Definition at line 1143 of file parser.h.

static symbol_type isc::eval::EvalParser::make_EXISTS ( const location_type l)
inlinestatic

Definition at line 1413 of file parser.h.

static symbol_type isc::eval::EvalParser::make_GIADDR ( const location_type l)
inlinestatic

Definition at line 1578 of file parser.h.

static symbol_type isc::eval::EvalParser::make_HEX ( const location_type l)
inlinestatic

Definition at line 1398 of file parser.h.

static symbol_type isc::eval::EvalParser::make_HEXSTRING ( const std::string &  v,
const location_type l 
)
inlinestatic

Definition at line 2013 of file parser.h.

static symbol_type isc::eval::EvalParser::make_HLEN ( const location_type l)
inlinestatic

Definition at line 1533 of file parser.h.

static symbol_type isc::eval::EvalParser::make_HTYPE ( const location_type l)
inlinestatic

Definition at line 1548 of file parser.h.

static symbol_type isc::eval::EvalParser::make_IFACE ( const location_type l)
inlinestatic

Definition at line 1443 of file parser.h.

static symbol_type isc::eval::EvalParser::make_IFELSE ( const location_type l)
inlinestatic

Definition at line 1698 of file parser.h.

static symbol_type isc::eval::EvalParser::make_INT16TOTEXT ( const location_type l)
inlinestatic

Definition at line 1758 of file parser.h.

static symbol_type isc::eval::EvalParser::make_INT32TOTEXT ( const location_type l)
inlinestatic

Definition at line 1773 of file parser.h.

static symbol_type isc::eval::EvalParser::make_INT8TOTEXT ( const location_type l)
inlinestatic

Definition at line 1743 of file parser.h.

static symbol_type isc::eval::EvalParser::make_INTEGER ( const std::string &  v,
const location_type l 
)
inlinestatic

Definition at line 1998 of file parser.h.

static symbol_type isc::eval::EvalParser::make_IP_ADDRESS ( const std::string &  v,
const location_type l 
)
inlinestatic

Definition at line 2043 of file parser.h.

static symbol_type isc::eval::EvalParser::make_LBRACKET ( const location_type l)
inlinestatic

Definition at line 1338 of file parser.h.

static symbol_type isc::eval::EvalParser::make_LEN ( const location_type l)
inlinestatic

Definition at line 1488 of file parser.h.

static symbol_type isc::eval::EvalParser::make_LINKADDR ( const location_type l)
inlinestatic

Definition at line 1323 of file parser.h.

static symbol_type isc::eval::EvalParser::make_LPAREN ( const location_type l)
inlinestatic

Definition at line 1158 of file parser.h.

static symbol_type isc::eval::EvalParser::make_MEMBER ( const location_type l)
inlinestatic

Definition at line 1293 of file parser.h.

static symbol_type isc::eval::EvalParser::make_MSGTYPE ( const location_type l)
inlinestatic

Definition at line 1848 of file parser.h.

static symbol_type isc::eval::EvalParser::make_NOT ( const location_type l)
inlinestatic

Definition at line 1188 of file parser.h.

static symbol_type isc::eval::EvalParser::make_OPTION ( const location_type l)
inlinestatic

Definition at line 1248 of file parser.h.

static symbol_type isc::eval::EvalParser::make_OPTION_NAME ( const std::string &  v,
const location_type l 
)
inlinestatic

Definition at line 2028 of file parser.h.

static symbol_type isc::eval::EvalParser::make_OR ( const location_type l)
inlinestatic

Definition at line 1218 of file parser.h.

static symbol_type isc::eval::EvalParser::make_PEERADDR ( const location_type l)
inlinestatic

Definition at line 1308 of file parser.h.

static symbol_type isc::eval::EvalParser::make_PKT ( const location_type l)
inlinestatic

Definition at line 1428 of file parser.h.

static symbol_type isc::eval::EvalParser::make_PKT4 ( const location_type l)
inlinestatic

Definition at line 1503 of file parser.h.

static symbol_type isc::eval::EvalParser::make_PKT6 ( const location_type l)
inlinestatic

Definition at line 1833 of file parser.h.

static symbol_type isc::eval::EvalParser::make_PLUS ( const location_type l)
inlinestatic

Definition at line 1683 of file parser.h.

static symbol_type isc::eval::EvalParser::make_RBRACKET ( const location_type l)
inlinestatic

Definition at line 1353 of file parser.h.

static symbol_type isc::eval::EvalParser::make_RELAY4 ( const location_type l)
inlinestatic

Definition at line 1263 of file parser.h.

static symbol_type isc::eval::EvalParser::make_RELAY6 ( const location_type l)
inlinestatic

Definition at line 1278 of file parser.h.

static symbol_type isc::eval::EvalParser::make_RPAREN ( const location_type l)
inlinestatic

Definition at line 1173 of file parser.h.

static symbol_type isc::eval::EvalParser::make_SIADDR ( const location_type l)
inlinestatic

Definition at line 1608 of file parser.h.

static symbol_type isc::eval::EvalParser::make_SRC ( const location_type l)
inlinestatic

Definition at line 1458 of file parser.h.

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

Definition at line 1983 of file parser.h.

static symbol_type isc::eval::EvalParser::make_SUBSTRING ( const location_type l)
inlinestatic

Definition at line 1623 of file parser.h.

static symbol_type isc::eval::EvalParser::make_TEXT ( const location_type l)
inlinestatic

Definition at line 1383 of file parser.h.

static symbol_type isc::eval::EvalParser::make_TOHEXSTRING ( const location_type l)
inlinestatic

Definition at line 1713 of file parser.h.

static symbol_type isc::eval::EvalParser::make_TOPLEVEL_BOOL ( const location_type l)
inlinestatic

Definition at line 1953 of file parser.h.

static symbol_type isc::eval::EvalParser::make_TOPLEVEL_STRING ( const location_type l)
inlinestatic

Definition at line 1968 of file parser.h.

static symbol_type isc::eval::EvalParser::make_TRANSID ( const location_type l)
inlinestatic

Definition at line 1863 of file parser.h.

static symbol_type isc::eval::EvalParser::make_UINT16TOTEXT ( const location_type l)
inlinestatic

Definition at line 1803 of file parser.h.

static symbol_type isc::eval::EvalParser::make_UINT32TOTEXT ( const location_type l)
inlinestatic

Definition at line 1818 of file parser.h.

static symbol_type isc::eval::EvalParser::make_UINT8TOTEXT ( const location_type l)
inlinestatic

Definition at line 1788 of file parser.h.

static symbol_type isc::eval::EvalParser::make_VENDOR ( const location_type l)
inlinestatic

Definition at line 1893 of file parser.h.

static symbol_type isc::eval::EvalParser::make_VENDOR_CLASS ( const location_type l)
inlinestatic

Definition at line 1878 of file parser.h.

static symbol_type isc::eval::EvalParser::make_YIADDR ( const location_type l)
inlinestatic

Definition at line 1593 of file parser.h.

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

Parse.

An alias for parse ().

Returns
0 iff parsing succeeded.

Definition at line 633 of file parser.cc.

References parse().

+ Here is the call graph for this function:

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

References isc::eval::EvalParser::basic_symbol< Base >::clear(), isc::eval::EvalContext::convertNestLevelNumber(), isc::eval::EvalContext::convertOptionCode(), isc::eval::EvalContext::convertOptionName(), isc::eval::EvalContext::convertUint32(), isc::eval::EvalContext::convertUint8(), isc::eval::EvalParser::basic_symbol< Base >::empty(), error(), isc::eval::EvalContext::expression, isc::eval::EvalContext::getUniverse(), isc::eval::EvalContext::isClientClassDefined(), isc::eval::EvalParser::by_kind::kind(), isc::eval::EvalParser::by_kind::kind_, isc::eval::EvalParser::basic_symbol< Base >::location, isc::eval::EvalParser::basic_symbol< Base >::move(), isc::eval::EvalParser::symbol_kind::S_enterprise_id, isc::eval::EvalParser::symbol_kind::S_HEXSTRING, isc::eval::EvalParser::symbol_kind::S_INTEGER, isc::eval::EvalParser::symbol_kind::S_integer_expr, isc::eval::EvalParser::symbol_kind::S_IP_ADDRESS, isc::eval::EvalParser::symbol_kind::S_nest_level, isc::eval::EvalParser::symbol_kind::S_option_code, isc::eval::EvalParser::symbol_kind::S_OPTION_NAME, isc::eval::EvalParser::symbol_kind::S_option_repr_type, isc::eval::EvalParser::symbol_kind::S_pkt4_field, isc::eval::EvalParser::symbol_kind::S_pkt6_field, isc::eval::EvalParser::symbol_kind::S_pkt_metadata, isc::eval::EvalParser::symbol_kind::S_relay6_field, isc::eval::EvalParser::symbol_kind::S_STRING, isc::eval::EvalParser::symbol_kind::S_sub_option_code, isc::eval::EvalParser::symbol_kind::S_YYEOF, isc::eval::EvalParser::symbol_kind::S_YYerror, isc::eval::EvalParser::symbol_kind::S_YYUNDEF, YY_MOVE, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, YYCDEBUG, YYERROR, yylex, and YYLLOC_DEFAULT.

Referenced by operator()(), and isc::eval::EvalContext::parseString().

+ Here is the call graph for this function:

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

Set the current debugging level.

Definition at line 604 of file parser.cc.

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

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

Set the current debugging stream.

Definition at line 591 of file parser.cc.

std::string isc::eval::EvalParser::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 1790 of file parser.cc.

Member Data Documentation

const symbol_kind_type isc::eval::EvalParser::YYNTOKENS = symbol_kind::YYNTOKENS
static

The number of tokens.

Definition at line 664 of file parser.h.

Referenced by isc::eval::EvalParser::context::expected_tokens().


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