18 isc::eval::EvalParser::symbol_type evallex (EvalContext& driver)
102 static void error(
const isc::eval::location& loc,
const std::string& what);
108 static void error(
const std::string& what);
113 static void fatal(
const std::string& what);
123 const isc::eval::location& loc);
132 const isc::eval::location& loc);
143 const isc::eval::location& loc);
152 const isc::eval::location& loc);
163 const isc::eval::location& loc);
172 const isc::eval::location& loc);
181 const isc::eval::location& loc);
189 static int8_t
convertInt8(
const std::string& number,
190 const isc::eval::location& loc);
200 const isc::eval::location& loc);
210 static std::string
fromUint32(
const uint32_t integer);
220 static std::string
fromUint16(
const uint16_t integer);
226 return (option_universe_);
237 bool trace_scanning_;
This is a base class for exceptions thrown from the DNS library module.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Universe
defines option universe DHCPv4 or DHCPv6
Evaluation context, an interface to the expression evaluation.
unsigned label_
Label counter.
bool parseString(const std::string &str, ParserType type=PARSER_BOOL)
Run the parser on the string specified.
static std::string fromUint16(const uint16_t integer)
Converts unsigned 16bit integer to string representation.
void scanStringEnd()
Method called after the last tokens are scanned from a string.
ParserType
Specifies what type of expression the parser is expected to see.
@ PARSER_BOOL
expression is expected to evaluate to bool
@ PARSER_STRING
expression is expected to evaluate to string
static int16_t convertInt16(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to signed 16bit integer.
static std::string fromUint32(const uint32_t integer)
Converts unsigned 32bit integer to string representation.
virtual ~EvalContext()
destructor
std::vector< unsigned > labels_
Label stack.
int8_t convertNestLevelNumber(const std::string &nest_level, const isc::eval::location &loc)
Nest level conversion.
uint16_t convertOptionCode(const std::string &option_code, const isc::eval::location &loc)
Option code conversion.
uint16_t convertOptionName(const std::string &option_name, const isc::eval::location &loc)
Option name conversion.
static bool acceptAll(const ClientClass &client_class)
Accept all client class names.
static int32_t convertInt32(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to signed 32bit integer.
Option::Universe getUniverse()
Returns the universe (v4 or v6)
std::function< bool(const ClientClass &)> CheckDefined
Type of the check defined function.
void scanStringBegin(ParserType type)
Method called before scanning starts on a string.
static uint32_t convertUint32(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to unsigned 32bit integer.
bool isClientClassDefined(const ClientClass &client_class)
Check if a client class is already defined.
std::string file_
The name of the file being parsed.
std::string string_
The string being parsed.
static uint8_t convertUint8(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to unsigned 8bit integer.
static int8_t convertInt8(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to signed 8bit integer.
static uint16_t convertUint16(const std::string &number, const isc::eval::location &loc)
Attempts to convert string to unsigned 16bit integer.
isc::dhcp::Expression expression_
Parsed expression (output tokens are stored here)
EvalContext(const Option::Universe &option_universe, CheckDefined check_defined=acceptAll)
Default constructor.
Evaluation error exception raised when trying to parse an exceptions.
EvalParseError(const char *file, size_t line, const char *what)
Forward declaration of the EvalContext class.
std::string ClientClass
Defines a single class name.
std::vector< TokenPtr > Expression
This is a structure that holds an expression converted to RPN.
Defines the logger used by the top-level component of kea-lfc.
Define the isc::eval::parser class.