]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[65-libyang-simplify-update-models] Revert dhcp[46] syntax fixes
authorFrancis Dupont <fdupont@isc.org>
Tue, 20 Nov 2018 13:19:36 +0000 (14:19 +0100)
committerFrancis Dupont <fdupont@isc.org>
Thu, 22 Nov 2018 22:13:47 +0000 (17:13 -0500)
src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp4/parser_context.h
src/bin/dhcp6/dhcp6_lexer.ll
src/bin/dhcp6/dhcp6_parser.yy
src/bin/dhcp6/parser_context.h

index 46b3d41a051aa9655e23673bff1e4ca4e6996ead..314ca284aece6f8837fa0a8b4a8204474d5bbd71 100644 (file)
@@ -135,8 +135,6 @@ ControlCharacterFill            [^"\\]|\\{JSONEscapeSequence}
             return isc::dhcp::Dhcp4Parser::make_SUB_HOOKS_LIBRARY(driver.loc_);
         case Parser4Context::PARSER_DHCP_DDNS:
             return isc::dhcp::Dhcp4Parser::make_SUB_DHCP_DDNS(driver.loc_);
-        case Parser4Context::PARSER_CONFIG_CONTROL:
-            return isc::dhcp::Dhcp4Parser::make_SUB_CONFIG_CONTROL(driver.loc_);
         case Parser4Context::PARSER_LOGGING:
             return isc::dhcp::Dhcp4Parser::make_SUB_LOGGING(driver.loc_);
         }
index 084182e71daf7ce09343bb9b3e76d431fe88bfe1..fe1f905fb5fb5f84244a755dba3763632b0f2f41 100644 (file)
@@ -2070,6 +2070,15 @@ control_agent_json_object: CONTROL_AGENT {
     ctx.leave();
 };
 
+config_control: LCURLY_BRACKET {
+    ElementPtr m(new MapElement(ctx.loc2pos(@1)));
+    ctx.stack_.back()->add(m);
+    ctx.stack_.push_back(m);
+} config_control_params RCURLY_BRACKET {
+    ctx.stack_.pop_back();
+};
+
+
 config_control: CONFIG_CONTROL {
     ElementPtr i(new MapElement(ctx.loc2pos(@1)));
     ctx.stack_.back()->set("config-control", i);
@@ -2092,12 +2101,13 @@ sub_config_control: LCURLY_BRACKET {
 
 // This defines that subnet can have one or more parameters.
 config_control_params: config_control_param
-                     | config_control_params COMMA config_control_param
-                     ;
+              | config_control_params COMMA config_control_param
+              ;
 
 // This defines a list of allowed parameters for each subnet.
 config_control_param: config_databases
-                    ;
+            | unknown_map_entry
+            ;
 
 config_databases: CONFIG_DATABASES {
     ElementPtr l(new ListElement(ctx.loc2pos(@1)));
index ae95f02c072fc2f376a678f06a8ed02414f0ccd8..a9a35ea2c2ca8d8a9ca9beb8a611d1c4302ddbfc 100644 (file)
@@ -88,9 +88,6 @@ public:
         /// This will parse the input as dhcp-ddns.
         PARSER_DHCP_DDNS,
 
-        /// This will parse the input as config-control.
-        PARSER_CONFIG_CONTROL,
-
         /// This will parse the content of Logging.
         PARSER_LOGGING
     } ParserType;
index 4347991bde326d75f62a55cb786c55cf18c32a11..0cb1a73fdba14f50c8167e1ee40200a9101d0ccb 100644 (file)
@@ -137,8 +137,6 @@ ControlCharacterFill            [^"\\]|\\{JSONEscapeSequence}
             return isc::dhcp::Dhcp6Parser::make_SUB_HOOKS_LIBRARY(driver.loc_);
         case Parser6Context::PARSER_DHCP_DDNS:
             return isc::dhcp::Dhcp6Parser::make_SUB_DHCP_DDNS(driver.loc_);
-        case Parser6Context::PARSER_CONFIG_CONTROL:
-            return isc::dhcp::Dhcp6Parser::make_SUB_CONFIG_CONTROL(driver.loc_);
         case Parser6Context::PARSER_LOGGING:
             return isc::dhcp::Dhcp6Parser::make_SUB_LOGGING(driver.loc_);
         }
index 71253663eceeeda409653ebbef3531d323fd235e..d29a2975d4d74e8f4425746738d112e878f1ebee 100644 (file)
@@ -2162,6 +2162,15 @@ control_agent_json_object: CONTROL_AGENT {
 
 // Config control information element
 
+config_control: LCURLY_BRACKET {
+    ElementPtr m(new MapElement(ctx.loc2pos(@1)));
+    ctx.stack_.back()->add(m);
+    ctx.stack_.push_back(m);
+} config_control_params RCURLY_BRACKET {
+    ctx.stack_.pop_back();
+};
+
+
 config_control: CONFIG_CONTROL {
     ElementPtr i(new MapElement(ctx.loc2pos(@1)));
     ctx.stack_.back()->set("config-control", i);
@@ -2184,12 +2193,13 @@ sub_config_control: LCURLY_BRACKET {
 
 // This defines that subnet can have one or more parameters.
 config_control_params: config_control_param
-                     | config_control_params COMMA config_control_param
-                     ;
+              | config_control_params COMMA config_control_param
+              ;
 
 // This defines a list of allowed parameters for each subnet.
 config_control_param: config_databases
-                    ;
+            | unknown_map_entry
+            ;
 
 config_databases: CONFIG_DATABASES {
     ElementPtr l(new ListElement(ctx.loc2pos(@1)));
index aea40cc28b7fc56e6aee3b616ad5c7d6099e58ba..9cec79b29ab0dd38f4c7ab2bf885b0046722c7f9 100644 (file)
@@ -91,9 +91,6 @@ public:
         /// This will parse the input as dhcp-ddns. (D2 client config)
         PARSER_DHCP_DDNS,
 
-        /// This will parse the input as config-control.
-        PARSER_CONFIG_CONTROL,
-
         /// This will parse the content of Logging.
         PARSER_LOGGING