]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1102] Simplified global
authorFrancis Dupont <fdupont@isc.org>
Sat, 5 Sep 2020 12:16:57 +0000 (14:16 +0200)
committerFrancis Dupont <fdupont@isc.org>
Mon, 21 Sep 2020 10:36:02 +0000 (12:36 +0200)
src/bin/agent/agent_parser.yy
src/bin/d2/d2_parser.yy
src/bin/dhcp4/dhcp4_parser.yy
src/bin/dhcp6/dhcp6_parser.yy
src/bin/netconf/netconf_parser.yy

index c6294e269120059ea34aab0105daff30f62a8af2..a17bd55611c359d4a7756eac18ef266f91e7d3ea 100644 (file)
@@ -229,22 +229,14 @@ agent_syntax_map: LCURLY_BRACKET {
     // the content of the map
     ElementPtr m(new MapElement(ctx.loc2pos(@1)));
     ctx.stack_.push_back(m);
-} global_objects RCURLY_BRACKET {
+} global_object RCURLY_BRACKET {
     // map parsing completed. If we ever want to do any wrap up
     // (maybe some sanity checking), this would be the best place
     // for it.
 };
 
-// This represents top-level entries: Control-agent.
-global_objects: global_object
-              ;
-
-// This represents a single top level entry, e.g. Control-agent.
-global_object: agent_object
-             ;
-
-// This define the Control-agent object.
-agent_object: CONTROL_AGENT {
+// This represents the single top level entry, e.g. Control-agent.
+global_object: CONTROL_AGENT {
 
     // Let's create a MapElement that will represent it, add it to the
     // top level map (that's already on the stack) and put the new map
index c53ee40c789337d71914e9f1b89f650c9d97df7e..6f25eedd6f06c19fd4f1558c98490f3645fb74c1 100644 (file)
@@ -216,23 +216,15 @@ syntax_map: LCURLY_BRACKET {
     // the content of the map
     ElementPtr m(new MapElement(ctx.loc2pos(@1)));
     ctx.stack_.push_back(m);
-} global_objects RCURLY_BRACKET {
+} global_object RCURLY_BRACKET {
     // map parsing completed. If we ever want to do any wrap up
     // (maybe some sanity checking), this would be the best place
     // for it.
 };
 
-// This represents top-level entries: DhcpDdns.
-global_objects: global_object
-              ;
-
-// This represents a single top level entry, e.g. DhcpDdns.
-global_object: dhcpddns_object
-             ;
-
 // --- dhcp ddns ---------------------------------------------
-
-dhcpddns_object: DHCPDDNS {
+// This represents the single top level entry, e.g. DhcpDdns.
+global_object: DHCPDDNS {
     ElementPtr m(new MapElement(ctx.loc2pos(@1)));
     ctx.stack_.back()->set("DhcpDdns", m);
     ctx.stack_.push_back(m);
index 22d4025497de65c8edce392f35932941c6e701f3..14376fd0419cdab90d92111094e65b530d589c51 100644 (file)
@@ -399,7 +399,7 @@ syntax_map: LCURLY_BRACKET {
     // the content of the map
     ElementPtr m(new MapElement(ctx.loc2pos(@1)));
     ctx.stack_.push_back(m);
-} global_objects RCURLY_BRACKET {
+} global_object RCURLY_BRACKET {
     // map parsing completed. If we ever want to do any wrap up
     // (maybe some sanity checking), this would be the best place
     // for it.
@@ -408,16 +408,8 @@ syntax_map: LCURLY_BRACKET {
     ctx.require("Dhcp4", ctx.loc2pos(@1), ctx.loc2pos(@4));
 };
 
-// This represents top-level entries: Dhcp4
-global_objects: global_object
-              | global_objects COMMA global_object
-              ;
-
-// This represents a single top level entry, e.g. Dhcp4.
-global_object: dhcp4_object
-             ;
-
-dhcp4_object: DHCP4 {
+// This represents the single top level entry, e.g. Dhcp4.
+global_object: DHCP4 {
     // This code is executed when we're about to start parsing
     // the content of the map
     // Prevent against duplicate.
index a52ce8906f01236a56e961102f094edd25dfb64c..44a02e8f2e3b5799a4e5182da206387aaac7fcbf 100644 (file)
@@ -406,7 +406,7 @@ syntax_map: LCURLY_BRACKET {
     // the content of the map
     ElementPtr m(new MapElement(ctx.loc2pos(@1)));
     ctx.stack_.push_back(m);
-} global_objects RCURLY_BRACKET {
+} global_object RCURLY_BRACKET {
     // map parsing completed. If we ever want to do any wrap up
     // (maybe some sanity checking), this would be the best place
     // for it.
@@ -415,16 +415,8 @@ syntax_map: LCURLY_BRACKET {
     ctx.require("Dhcp6", ctx.loc2pos(@1), ctx.loc2pos(@4));
 };
 
-// This represents top-level entries: Dhcp6
-global_objects: global_object
-              | global_objects COMMA global_object
-              ;
-
-// This represents a single top level entry, e.g. Dhcp6.
-global_object: dhcp6_object
-             ;
-
-dhcp6_object: DHCP6 {
+// This represents the single top level entry, e.g. Dhcp6.
+global_object: DHCP6 {
     // This code is executed when we're about to start parsing
     // the content of the map
     // Prevent against duplicate.
index 6065daae7626bfad4d9eee9a658f5daf6075c65b..002b145a907eba9300104bbe0c50e4857702ee5e 100644 (file)
@@ -228,23 +228,14 @@ netconf_syntax_map: LCURLY_BRACKET {
     // the content of the map
     ElementPtr m(new MapElement(ctx.loc2pos(@1)));
     ctx.stack_.push_back(m);
-} global_objects RCURLY_BRACKET {
+} global_object RCURLY_BRACKET {
     // map parsing completed. If we ever want to do any wrap up
     // (maybe some sanity checking), this would be the best place
     // for it.
 };
 
-// This represents top-level entries: Netconf.
-global_objects: global_object
-              | global_objects COMMA global_object
-              ;
-
-// This represents a single top level entry, e.g. Netconf.
-global_object: netconf_object
-             ;
-
-// This define the Netconf object.
-netconf_object: NETCONF {
+// This represents the single top level entry, e.g. Netconf.
+global_object: NETCONF {
 
     // Let's create a MapElement that will represent it, add it to the
     // top level map (that's already on the stack) and put the new map