Commit 8d5dca26 authored by Francis Dupont's avatar Francis Dupont Committed by Tomek Mrugalski
Browse files

[5014_phase2] Added Element position

parent 07f4340e
This diff is collapsed.
......@@ -85,6 +85,15 @@ Parser6Context::fatal (const std::string& what)
isc_throw(Dhcp6ParseError, what);
Parser6Context::loc2pos(isc::dhcp::location& loc)
const std::string& file = *loc.begin.filename;
const uint32_t line = loc.begin.line;
const uint32_t pos = loc.begin.column;
return (isc::data::Element::Position(file, line, pos));
Parser6Context::enter(const ParserContext& ctx)
......@@ -92,6 +92,12 @@ public:
/// Used by YY_FATAL_ERROR macro so required to be static.
static void fatal(const std::string& what);
/// @brief Convert position
/// Convert a bison location into an element position
/// (take the begin, the end is lost)
isc::data::Element::Position loc2pos(isc::dhcp::location& loc);
/// @brief Defines syntactic contexts for lexical tie-ins
typedef enum {
/// at toplevel
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment