Commit 83226a1c authored by Francis Dupont's avatar Francis Dupont
Browse files

[5351] Extended syntax

parent 869ab1ed
......@@ -579,12 +579,19 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
\"user-context\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
case isc::dhcp::Parser4Context::INTERFACES_CONFIG:
case isc::dhcp::Parser4Context::LEASE_DATABASE:
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
case isc::dhcp::Parser4Context::HOOKS_LIBRARIES:
case isc::dhcp::Parser4Context::SUBNET4:
case isc::dhcp::Parser4Context::POOLS:
case isc::dhcp::Parser4Context::SHARED_NETWORK:
case isc::dhcp::Parser4Context::OPTION_DEF:
case isc::dhcp::Parser4Context::OPTION_DATA:
case isc::dhcp::Parser4Context::RESERVATIONS:
case isc::dhcp::Parser4Context::CLIENT_CLASSES:
case isc::dhcp::Parser4Context::LOGGERS:
case isc::dhcp::Parser4Context::DHCP_DDNS:
return isc::dhcp::Dhcp4Parser::make_USER_CONTEXT(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("user-context", driver.loc_);
......@@ -594,12 +601,19 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
\"comment\" {
switch(driver.ctx_) {
case isc::dhcp::Parser4Context::DHCP4:
case isc::dhcp::Parser4Context::INTERFACES_CONFIG:
case isc::dhcp::Parser4Context::LEASE_DATABASE:
case isc::dhcp::Parser4Context::HOSTS_DATABASE:
case isc::dhcp::Parser4Context::HOOKS_LIBRARIES:
case isc::dhcp::Parser4Context::SUBNET4:
case isc::dhcp::Parser4Context::POOLS:
case isc::dhcp::Parser4Context::SHARED_NETWORK:
case isc::dhcp::Parser4Context::OPTION_DEF:
case isc::dhcp::Parser4Context::OPTION_DATA:
case isc::dhcp::Parser4Context::RESERVATIONS:
case isc::dhcp::Parser4Context::CLIENT_CLASSES:
case isc::dhcp::Parser4Context::LOGGERS:
case isc::dhcp::Parser4Context::DHCP_DDNS:
return isc::dhcp::Dhcp4Parser::make_COMMENT(driver.loc_);
default:
return isc::dhcp::Dhcp4Parser::make_STRING("comment", driver.loc_);
......
......@@ -488,6 +488,9 @@ interfaces_config_param: interfaces_list
| dhcp_socket_type
| outbound_interface
| re_detect
| user_context
| comment
| unknown_map_entry
;
sub_interfaces4: LCURLY_BRACKET {
......@@ -579,8 +582,10 @@ database_map_param: database_type
| connect_timeout
| contact_points
| keyspace
| user_context
| comment
| unknown_map_entry
;
;
database_type: TYPE {
ctx.enter(ctx.DATABASE_TYPE);
......@@ -755,11 +760,13 @@ sub_hooks_library: LCURLY_BRACKET {
hooks_params: hooks_param
| hooks_params COMMA hooks_param
| unknown_map_entry
;
hooks_param: library
| parameters
| user_context
| comment
| unknown_map_entry
;
library: LIBRARY {
......@@ -1428,6 +1435,8 @@ reservation_param: duid
| next_server
| server_hostname
| boot_file_name
| user_context
| comment
| unknown_map_entry
;
......@@ -1686,6 +1695,8 @@ dhcp_ddns_param: enable_updates
| override_client_update
| replace_client_name
| generated_prefix
| user_context
| comment
| unknown_map_entry
;
......@@ -1851,7 +1862,7 @@ logging_params: logging_param
logging_param: loggers;
// "loggers", the only parameter currently defined in "Logging" object,
// is "Loggers": [ ... ].
// is "loggers": [ ... ].
loggers: LOGGERS {
ElementPtr l(new ListElement(ctx.loc2pos(@1)));
ctx.stack_.back()->set("loggers", l);
......@@ -1885,6 +1896,8 @@ logger_param: name
| output_options_list
| debuglevel
| severity
| user_context
| comment
| unknown_map_entry
;
......
......@@ -809,13 +809,21 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
\"user-context\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
case isc::dhcp::Parser6Context::POOLS:
case isc::dhcp::Parser6Context::PD_POOLS:
case isc::dhcp::Parser6Context::INTERFACES_CONFIG:
case isc::dhcp::Parser6Context::LEASE_DATABASE:
case isc::dhcp::Parser6Context::HOSTS_DATABASE:
case isc::dhcp::Parser6Context::HOOKS_LIBRARIES:
case isc::dhcp::Parser6Context::SUBNET6:
case isc::dhcp::Parser6Context::SHARED_NETWORK:
case isc::dhcp::Parser6Context::OPTION_DEF:
case isc::dhcp::Parser6Context::OPTION_DATA:
case isc::dhcp::Parser6Context::CLIENT_CLASSES:
case isc::dhcp::Parser6Context::SERVER_ID:
case isc::dhcp::Parser6Context::POOLS:
case isc::dhcp::Parser6Context::PD_POOLS:
case isc::dhcp::Parser6Context::RESERVATIONS:
case isc::dhcp::Parser6Context::LOGGERS:
case isc::dhcp::Parser6Context::DHCP_DDNS:
return isc::dhcp::Dhcp6Parser::make_USER_CONTEXT(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("user-context", driver.loc_);
......@@ -825,13 +833,21 @@ ControlCharacterFill [^"\\]|\\{JSONEscapeSequence}
\"comment\" {
switch(driver.ctx_) {
case isc::dhcp::Parser6Context::DHCP6:
case isc::dhcp::Parser6Context::POOLS:
case isc::dhcp::Parser6Context::PD_POOLS:
case isc::dhcp::Parser6Context::INTERFACES_CONFIG:
case isc::dhcp::Parser6Context::LEASE_DATABASE:
case isc::dhcp::Parser6Context::HOSTS_DATABASE:
case isc::dhcp::Parser6Context::HOOKS_LIBRARIES:
case isc::dhcp::Parser6Context::SUBNET6:
case isc::dhcp::Parser6Context::SHARED_NETWORK:
case isc::dhcp::Parser6Context::OPTION_DEF:
case isc::dhcp::Parser6Context::OPTION_DATA:
case isc::dhcp::Parser6Context::CLIENT_CLASSES:
case isc::dhcp::Parser6Context::SERVER_ID:
case isc::dhcp::Parser6Context::POOLS:
case isc::dhcp::Parser6Context::PD_POOLS:
case isc::dhcp::Parser6Context::RESERVATIONS:
case isc::dhcp::Parser6Context::LOGGERS:
case isc::dhcp::Parser6Context::DHCP_DDNS:
return isc::dhcp::Dhcp6Parser::make_COMMENT(driver.loc_);
default:
return isc::dhcp::Dhcp6Parser::make_STRING("comment", driver.loc_);
......
......@@ -491,6 +491,9 @@ interfaces_config_params: interfaces_config_param
interfaces_config_param: interfaces_list
| re_detect
| user_context
| comment
| unknown_map_entry
;
interfaces_list: INTERFACES {
......@@ -549,8 +552,10 @@ database_map_param: database_type
| connect_timeout
| contact_points
| keyspace
| user_context
| comment
| unknown_map_entry
;
;
database_type: TYPE {
ctx.enter(ctx.DATABASE_TYPE);
......@@ -753,6 +758,9 @@ hooks_params: hooks_param
hooks_param: library
| parameters
| user_context
| comment
| unknown_map_entry
;
library: LIBRARY {
......@@ -1480,6 +1488,8 @@ reservation_param: duid
| hostname
| flex_id_value
| option_data_list
| user_context
| comment
| unknown_map_entry
;
......@@ -1644,6 +1654,8 @@ server_id_param: server_id_type
| htype
| enterprise_id
| persist
| user_context
| comment
| unknown_map_entry
;
......@@ -1767,6 +1779,8 @@ dhcp_ddns_param: enable_updates
| override_client_update
| replace_client_name
| generated_prefix
| user_context
| comment
| unknown_map_entry
;
......@@ -1967,6 +1981,8 @@ logger_param: name
| output_options_list
| debuglevel
| severity
| user_context
| comment
| unknown_map_entry
;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment