From: Andrei Pavel Date: Fri, 10 Dec 2021 10:52:35 +0000 (+0200) Subject: [#2084] format parser X-Git-Tag: Kea-2.1.2~188 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbfb0a5b35aecefba3638446bf8bb67a5ba8ecd2;p=thirdparty%2Fkea.git [#2084] format parser --- diff --git a/src/bin/agent/agent_parser.yy b/src/bin/agent/agent_parser.yy index 6253da9fdc..6b4937e557 100644 --- a/src/bin/agent/agent_parser.yy +++ b/src/bin/agent/agent_parser.yy @@ -195,8 +195,8 @@ not_empty_map: STRING COLON value { ctx.stack_.back()->set($3, $5); } | not_empty_map COMMA { - ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); -} + ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); + } ; list_generic: LSQUARE_BRACKET { @@ -218,8 +218,8 @@ not_empty_list: value { ctx.stack_.back()->add($3); } | not_empty_list COMMA { - ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); -} + ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); + } ; // --- generic JSON parser ends here ------------------------------------------- @@ -266,15 +266,15 @@ global_object: CONTROL_AGENT { ctx.leave(); } | global_object COMMA { - ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); -} + ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); + } ; global_params: global_param | global_params COMMA global_param | global_params COMMA { - ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); -} + ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); + } ; // These are the parameters that are allowed in the top-level for @@ -413,8 +413,8 @@ hooks_libraries_list: %empty not_empty_hooks_libraries_list: hooks_library | not_empty_hooks_libraries_list COMMA hooks_library | not_empty_hooks_libraries_list COMMA { - ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); -} + ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); + } ; hooks_library: LCURLY_BRACKET { @@ -428,8 +428,8 @@ hooks_library: LCURLY_BRACKET { hooks_params: hooks_param | hooks_params COMMA hooks_param | hooks_params COMMA { - ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); -} + ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); + } | unknown_map_entry ; @@ -474,8 +474,8 @@ control_sockets: CONTROL_SOCKETS COLON LCURLY_BRACKET { control_sockets_params: control_socket | control_sockets_params COMMA control_socket | control_sockets_params COMMA { - ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); -} + ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); + } ; // We currently support three types of sockets: DHCPv4, DHCPv6 and D2 @@ -526,8 +526,8 @@ d2_server_socket: D2_SERVER { control_socket_params: control_socket_param | control_socket_params COMMA control_socket_param | control_socket_params COMMA { - ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); -} + ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); + } ; // We currently support two socket parameters: type and name. @@ -581,8 +581,8 @@ authentication: AUTHENTICATION { auth_params: auth_param | auth_params COMMA auth_param | auth_params COMMA { - ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); -} + ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); + } ; auth_param: auth_type @@ -631,8 +631,8 @@ clients_list: %empty not_empty_clients_list: basic_auth | not_empty_clients_list COMMA basic_auth | not_empty_clients_list COMMA { - ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); -} + ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); + } ; basic_auth: LCURLY_BRACKET { @@ -646,8 +646,8 @@ basic_auth: LCURLY_BRACKET { clients_params: clients_param | clients_params COMMA clients_param | clients_params COMMA { - ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); -} + ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); + } ; clients_param: user @@ -695,8 +695,8 @@ loggers: LOGGERS { loggers_entries: logger_entry | loggers_entries COMMA logger_entry | loggers_entries COMMA { - ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); -} + ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); + } ; // This defines a single entry defined in loggers. @@ -711,8 +711,8 @@ logger_entry: LCURLY_BRACKET { logger_params: logger_param | logger_params COMMA logger_param | logger_params COMMA { - ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); -} + ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); + } ; logger_param: name @@ -762,8 +762,8 @@ output_options_list: OUTPUT_OPTIONS { output_options_list_content: output_entry | output_options_list_content COMMA output_entry | output_options_list_content COMMA { - ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); -} + ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); + } ; output_entry: LCURLY_BRACKET { @@ -777,8 +777,8 @@ output_entry: LCURLY_BRACKET { output_params_list: output_params | output_params_list COMMA output_params | output_params_list COMMA { - ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); -} + ctx.warning(@1, "Extraneous comma. A piece of configuration may have been omitted."); + } ; output_params: output