Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
8d5dca26
Commit
8d5dca26
authored
Nov 28, 2016
by
Francis Dupont
Committed by
Tomek Mrugalski
Nov 29, 2016
Browse files
[5014_phase2] Added Element position
parent
07f4340e
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp6/dhcp6_parser.yy
View file @
8d5dca26
This diff is collapsed.
Click to expand it.
src/bin/dhcp6/parser_context.cc
View file @
8d5dca26
...
...
@@ -85,6 +85,15 @@ Parser6Context::fatal (const std::string& what)
isc_throw
(
Dhcp6ParseError
,
what
);
}
isc
::
data
::
Element
::
Position
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
));
}
void
Parser6Context
::
enter
(
const
ParserContext
&
ctx
)
{
...
...
src/bin/dhcp6/parser_context.h
View file @
8d5dca26
...
...
@@ -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
...
...
src/bin/dhcp6/tests/kea_controller_unittest.cc
View file @
8d5dca26
...
...
@@ -389,7 +389,7 @@ TEST_F(JSONFileBackendTest, recursiveInclude) {
"}"
;
string
include
=
"
\"
eth
\"
, <?include
\"
"
+
string
(
TEST_INCLUDE
)
+
"
\"
?>"
;
string
msg
=
"configuration error using file '"
+
string
(
TEST_FILE
)
+
"': Too many nested include."
;
"': Too many nested include."
;
writeFile
(
TEST_FILE
,
config_recursive_include
);
writeFile
(
TEST_INCLUDE
,
include
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment