17 isc::eval::EvalParser::symbol_type evallex (EvalContext& driver)
95 static void error(
const isc::eval::location& loc,
const std::string& what);
101 static void error(
const std::string& what);
106 static void fatal(
const std::string& what);
116 const isc::eval::location& loc);
125 const isc::eval::location& loc);
136 const isc::eval::location& loc);
145 const isc::eval::location& loc);
156 const isc::eval::location& loc);
165 const isc::eval::location& loc);
174 const isc::eval::location& loc);
182 static int8_t
convertInt8(
const std::string& number,
183 const isc::eval::location& loc);
193 const isc::eval::location& loc);
203 static std::string
fromUint32(
const uint32_t integer);
213 static std::string
fromUint16(
const uint16_t integer);
219 return (option_universe_);
230 bool trace_scanning_;
242 CheckDefined check_defined_;
EvalContext(const Option::Universe &option_universe, CheckDefined check_defined=acceptAll)
Default constructor.
Forward declaration of the EvalContext class.
static uint32_t convertUint32(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to unsigned 32bit integer.
Option::Universe getUniverse()
Returns the universe (v4 or v6)
Evaluation error exception raised when trying to parse an exceptions.
isc::dhcp::Expression expression
Parsed expression (output tokens are stored here)
Universe
defines option universe DHCPv4 or DHCPv6
static uint16_t convertUint16(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to unsigned 16bit integer.
static void error(const isc::eval::location &loc, const std::string &what)
Error handler.
EvalParseError(const char *file, size_t line, const char *what)
void scanStringBegin(ParserType type)
Method called before scanning starts on a string.
static int16_t convertInt16(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to signed 16bit integer.
expression is expected to evaluate to bool
std::string string_
The string being parsed.
Define the isc::eval::parser class.
static int32_t convertInt32(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to signed 32bit integer.
Evaluation context, an interface to the expression evaluation.
std::string file_
The name of the file being parsed.
static std::string fromUint32(const uint32_t integer)
Converts unsigned 32bit integer to string representation.
static uint8_t convertUint8(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to unsigned 8bit integer.
uint16_t convertOptionName(const std::string &option_name, const isc::eval::location &loc)
Option name conversion.
uint16_t convertOptionCode(const std::string &option_code, const isc::eval::location &loc)
Option code conversion.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
static void fatal(const std::string &what)
Fatal error handler.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-dhcp-ddns.
std::vector< TokenPtr > Expression
This is a structure that holds an expression converted to RPN.
void scanStringEnd()
Method called after the last tokens are scanned from a string.
static std::string fromUint16(const uint16_t integer)
Converts unsigned 16bit integer to string representation.
expression is expected to evaluate to string
ParserType
Specifies what type of expression the parser is expected to see.
int8_t convertNestLevelNumber(const std::string &nest_level, const isc::eval::location &loc)
Nest level conversion.
std::string ClientClass
Defines a single class name.
static int8_t convertInt8(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to signed 8bit integer.
std::function< bool(const ClientClass &)> CheckDefined
Type of the check defined function.
virtual ~EvalContext()
destructor
bool isClientClassDefined(const ClientClass &client_class)
Check if a client class is already defined.
bool parseString(const std::string &str, ParserType type=PARSER_BOOL)
Run the parser on the string specified.
static bool acceptAll(const ClientClass &client_class)
Accept all client class names.