Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
bfc64c5c
Commit
bfc64c5c
authored
Nov 13, 2016
by
Tomek Mrugalski
🛰
Browse files
advanced.json is now parsed properly again
parent
878c2b1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp6/Makefile.am
View file @
bfc64c5c
...
...
@@ -122,7 +122,7 @@ parser: dhcp6_lexer.cc location.hh position.hh stack.hh dhcp6_parser.cc dhcp6_pa
# This is especially useful if yydebug_ is set to 1 as that variable
# will cause parser to print out its internal state.
location.hh position.hh stack.hh dhcp6_parser.cc dhcp6_parser.h
:
dhcp6_parser.yy
$(YACC)
--defines
=
dhcp6_parser.h
-o
dhcp6_parser.cc dhcp6_parser.yy
$(YACC)
--defines
=
dhcp6_parser.h
--report
=
all
--report-file
=
dhcp6_parser.report
-o
dhcp6_parser.cc dhcp6_parser.yy
dhcp6_lexer.cc
:
dhcp6_lexer.ll
$(LEX)
--prefix
parser6_
-o
dhcp6_lexer.cc dhcp6_lexer.ll
...
...
src/bin/dhcp6/dhcp6_parser.yy
View file @
bfc64c5c
...
...
@@ -284,10 +284,19 @@ mac_sources: MAC_SOURCES {
ElementPtr l(new ListElement());
ctx.stack_.back()->set("mac-sources", l);
ctx.stack_.push_back(l);
} COLON
list
{
} COLON
LSQUARE_BRACKET mac_sources_list RSQUARE_BRACKET
{
ctx.stack_.pop_back();
};
mac_sources_list: mac_sources_value
| mac_sources_list COMMA mac_sources_value;
mac_sources_value: DUID {
ElementPtr duid(new StringElement("duid")); ctx.stack_.back()->add(duid);
}| STRING {
ElementPtr duid(new StringElement($1)); ctx.stack_.back()->add(duid);
};
host_reservation_identifiers: HOST_RESERVATION_IDENTIFIERS COLON LSQUARE_BRACKET {
ElementPtr l(new ListElement());
ctx.stack_.back()->set("host-reservation-identifiers", l);
...
...
@@ -401,8 +410,7 @@ option_data_entry: LCURLY_BRACKET {
// This defines parameters specified inside the map that itself
// is an entry in option-data list.
option_data_params: {}
| option_data_param
option_data_params: option_data_param
| option_data_params COMMA option_data_param;
option_data_param:
...
...
@@ -550,7 +558,7 @@ ip_addresses: IP_ADDRESSES COLON {
ElementPtr l(new ListElement());
ctx.stack_.back()->set("ip-addresses", l);
ctx.stack_.push_back(l);
} list {
} list {
ctx.stack_.pop_back();
};
...
...
@@ -558,7 +566,7 @@ prefixes: PREFIXES COLON {
ElementPtr l(new ListElement());
ctx.stack_.back()->set("prefixes", l);
ctx.stack_.push_back(l);
} list {
} list {
ctx.stack_.pop_back();
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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