summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2024-11-13 11:04:53 +0100
committerFrancis Dupont <fdupont@isc.org>2024-11-22 09:55:30 +0100
commit5ef170617fde7610e48da21576a421dea8012819 (patch)
treee1f1737ad928105ec1a407b79fda7128512e5522 /src
parent[#3609] Checkpoint: updated grammars (diff)
downloadkea-5ef170617fde7610e48da21576a421dea8012819.tar.xz
kea-5ef170617fde7610e48da21576a421dea8012819.zip
[#3609] Added missing rules
Diffstat (limited to 'src')
-rw-r--r--src/bin/agent/agent_parser.yy14
-rw-r--r--src/bin/dhcp4/dhcp4_parser.yy14
-rw-r--r--src/bin/dhcp6/dhcp6_parser.yy14
3 files changed, 27 insertions, 15 deletions
diff --git a/src/bin/agent/agent_parser.yy b/src/bin/agent/agent_parser.yy
index e239a58c4d..228f5f56dc 100644
--- a/src/bin/agent/agent_parser.yy
+++ b/src/bin/agent/agent_parser.yy
@@ -418,13 +418,17 @@ http_headers: HTTP_HEADERS {
ctx.leave();
};
-http_header_list: http_header
- | not_empty_http_header_list COMMA http_header
- | not_empty_http_header_list COMMA {
- ctx.warnAboutExtraCommas(@2);
- }
+http_header_list: %empty
+ | not_empty_http_header_list
;
+not_empty_http_header_list: http_header
+ | not_empty_http_header_list COMMA http_header
+ | not_empty_http_header_list COMMA {
+ ctx.warnAboutExtraCommas(@2);
+ }
+ ;
+
http_header: LCURLY_BRACKET {
ElementPtr m(new MapElement(ctx.loc2pos(@1)));
ctx.stack_.back()->add(m);
diff --git a/src/bin/dhcp4/dhcp4_parser.yy b/src/bin/dhcp4/dhcp4_parser.yy
index 2d11090ab6..8bc762de50 100644
--- a/src/bin/dhcp4/dhcp4_parser.yy
+++ b/src/bin/dhcp4/dhcp4_parser.yy
@@ -2663,13 +2663,17 @@ http_headers: HTTP_HEADERS {
ctx.leave();
};
-http_header_list: http_header
- | not_empty_http_header_list COMMA http_header
- | not_empty_http_header_list COMMA {
- ctx.warnAboutExtraCommas(@2);
- }
+http_header_list: %empty
+ | not_empty_http_header_list
;
+not_empty_http_header_list: http_header
+ | not_empty_http_header_list COMMA http_header
+ | not_empty_http_header_list COMMA {
+ ctx.warnAboutExtraCommas(@2);
+ }
+ ;
+
http_header: LCURLY_BRACKET {
ElementPtr m(new MapElement(ctx.loc2pos(@1)));
ctx.stack_.back()->add(m);
diff --git a/src/bin/dhcp6/dhcp6_parser.yy b/src/bin/dhcp6/dhcp6_parser.yy
index 05731dcc53..b58f10ac01 100644
--- a/src/bin/dhcp6/dhcp6_parser.yy
+++ b/src/bin/dhcp6/dhcp6_parser.yy
@@ -2805,13 +2805,17 @@ http_headers: HTTP_HEADERS {
ctx.leave();
};
-http_header_list: http_header
- | not_empty_http_header_list COMMA http_header
- | not_empty_http_header_list COMMA {
- ctx.warnAboutExtraCommas(@2);
- }
+http_header_list: %empty
+ | not_empty_http_header_list
;
+not_empty_http_header_list: http_header
+ | not_empty_http_header_list COMMA http_header
+ | not_empty_http_header_list COMMA {
+ ctx.warnAboutExtraCommas(@2);
+ }
+ ;
+
http_header: LCURLY_BRACKET {
ElementPtr m(new MapElement(ctx.loc2pos(@1)));
ctx.stack_.back()->add(m);