Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
416
Issues
416
List
Boards
Labels
Service Desk
Milestones
Merge Requests
66
Merge Requests
66
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
Kea
Commits
dd963287
Commit
dd963287
authored
Sep 28, 2018
by
Tomek Mrugalski
🛰
Committed by
Francis Dupont
Sep 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[#5,!49] Rename Control-Netconf => Netconf
parent
81474963
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
src/bin/netconf/netconf_lexer.ll
src/bin/netconf/netconf_lexer.ll
+2
-2
src/bin/netconf/netconf_parser.yy
src/bin/netconf/netconf_parser.yy
+8
-8
No files found.
src/bin/netconf/netconf_lexer.ll
View file @
dd963287
...
...
@@ -111,9 +111,9 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
/
*
We
currently
have
3
points
of
entries
defined:
START_JSON
-
which
expects
any
valid
JSON
START_NETCONF
-
which
expects
full
configuration
(
with
outer
map
and
Control-n
etconf
START_NETCONF
-
which
expects
full
configuration
(
with
outer
map
and
N
etconf
object
in
it
.
START_SUB_NETCONF
-
which
expects
only
content
of
the
Control-n
etconf
,
this
is
START_SUB_NETCONF
-
which
expects
only
content
of
the
N
etconf
,
this
is
primarily
useful
for
testing
.
*
/
if
(
start_token_flag
)
{
start_token_flag
=
false
;
...
...
src/bin/netconf/netconf_parser.yy
View file @
dd963287
...
...
@@ -84,7 +84,7 @@ using namespace std;
// Not real tokens, just a way to signal what the parser is expected to
// parse. This define the starting point. It either can be full grammar
// (START_NETCONF), part of the grammar related to
control-n
etconf (START_SUB_NETCONF)
// (START_NETCONF), part of the grammar related to
N
etconf (START_SUB_NETCONF)
// or can be any valid JSON (START_JSON)
START_JSON
START_NETCONF
...
...
@@ -105,7 +105,7 @@ using namespace std;
%%
// The whole grammar starts with a map, because the config file
// consists of
Control-
Netconf, DhcpX, Logger and DhcpDdns entries in one big { }.
// consists of Netconf, DhcpX, Logger and DhcpDdns entries in one big { }.
%start start;
// The starting token can be one of those listed below. Note these are
...
...
@@ -118,11 +118,11 @@ start: START_JSON { ctx.ctx_ = ctx.NO_KEYWORDS; } json
// This rule defines a "shortcut". Instead of specifying the whole structure
// expected by full grammar, we can tell the parser to start from content of
// the
Control-n
etconf. This is very useful for unit-testing, so we don't need
// to repeat the outer map and "
Control-n
etconf" map. We can simply provide
// the
N
etconf. This is very useful for unit-testing, so we don't need
// to repeat the outer map and "
N
etconf" map. We can simply provide
// the contents of that map.
sub_netconf: LCURLY_BRACKET {
// Parse the
Control-n
etconf map
// Parse the
N
etconf map
ElementPtr m(new MapElement(ctx.loc2pos(@1)));
ctx.stack_.push_back(m);
} global_params RCURLY_BRACKET {
...
...
@@ -230,7 +230,7 @@ netconf_syntax_map: LCURLY_BRACKET {
// for it.
};
// This represents top-level entries:
Control-n
etconf, Logging, possibly others
// This represents top-level entries:
N
etconf, Logging, possibly others
global_objects: global_object
| global_objects COMMA global_object
;
...
...
@@ -240,7 +240,7 @@ global_object: netconf_object
| logging_object
;
// This define the
Control-n
etconf object.
// This define the
N
etconf object.
netconf_object: NETCONF {
// Let's create a MapElement that will represent it, add it to the
...
...
@@ -252,7 +252,7 @@ netconf_object: NETCONF {
ctx.stack_.push_back(m);
ctx.enter(ctx.NETCONF);
} COLON LCURLY_BRACKET global_params RCURLY_BRACKET {
// Ok, we're done with parsing
control-n
etconf. Let's take the map
// Ok, we're done with parsing
N
etconf. Let's take the map
// off the stack.
ctx.stack_.pop_back();
ctx.leave();
...
...
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