From: Francis Dupont Date: Thu, 9 Mar 2023 13:10:22 +0000 (+0100) Subject: [#720] Updated syntax X-Git-Tag: Kea-2.3.6~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b91899359f7f9add77e59813c56dd2ec15b37a1;p=thirdparty%2Fkea.git [#720] Updated syntax --- diff --git a/src/bin/dhcp4/dhcp4_lexer.ll b/src/bin/dhcp4/dhcp4_lexer.ll index 6202c55914..992810232d 100644 --- a/src/bin/dhcp4/dhcp4_lexer.ll +++ b/src/bin/dhcp4/dhcp4_lexer.ll @@ -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. diff --git a/src/bin/dhcp4/dhcp4_parser.yy b/src/bin/dhcp4/dhcp4_parser.yy index b08e7a3193..255d89cbab 100644 --- a/src/bin/dhcp4/dhcp4_parser.yy +++ b/src/bin/dhcp4/dhcp4_parser.yy @@ -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