]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#720] Updated syntax
authorFrancis Dupont <fdupont@isc.org>
Thu, 9 Mar 2023 13:10:22 +0000 (14:10 +0100)
committerFrancis Dupont <fdupont@isc.org>
Mon, 13 Mar 2023 13:52:20 +0000 (14:52 +0100)
src/bin/dhcp4/dhcp4_lexer.ll
src/bin/dhcp4/dhcp4_parser.yy

index 6202c55914e73cf5a4077b4a0d522a8606288ddc..992810232d49a06f066a7458791e22f7213f38fd 100644 (file)
@@ -2075,6 +2075,15 @@ ControlCharacterFill            [^"\\]|\\["\\/bfnrtu]
     }
 }
 
+\"exclude-first-last-24\" {
+    switch(driver.ctx_) {
+    case isc::dhcp::Parser4Context::COMPATIBILITY:
+        return isc::dhcp::Dhcp4Parser::make_EXCLUDE_FIRST_LAST_24(driver.loc_);
+    default:
+        return isc::dhcp::Dhcp4Parser::make_STRING("exclude-first-last-24", driver.loc_);
+    }
+}
+
 
 {JSONString} {
     /* A string has been matched. It contains the actual string and single quotes.
index b08e7a31930d2281a05d1d85c5d3cc1ac5e3377a..255d89cbabea513337416a338e20e4bf8003f667 100644 (file)
@@ -257,6 +257,7 @@ using namespace std;
   COMPATIBILITY "compatibility"
   LENIENT_OPTION_PARSING "lenient-option-parsing"
   IGNORE_RAI_LINK_SEL "ignore-rai-link-selection"
+  EXCLUDE_FIRST_LAST_24 "exclude-first-last-24"
 
  // Not real tokens, just a way to signal what the parser is expected to
  // parse.
@@ -2918,6 +2919,7 @@ compatibility_params: compatibility_param
 
 compatibility_param: lenient_option_parsing
                    | ignore-rai-link-selection
+                   | exclude_first_last_24
                    | unknown_map_entry
                    ;
 
@@ -2933,6 +2935,12 @@ ignore-rai-link-selection: IGNORE_RAI_LINK_SEL COLON BOOLEAN {
     ctx.stack_.back()->set("ignore-rai-link-selection", b);
 }
 
+exclude_first_last_24: EXCLUDE_FIRST_LAST_24 COLON BOOLEAN {
+    ctx.unique("exclude-first-last-24", ctx.loc2pos(@1));
+    ElementPtr b(new BoolElement($3, ctx.loc2pos(@3)));
+    ctx.stack_.back()->set("exclude-first-last-24", b);
+};
+
 %%
 
 void