diff options
author | Francis Dupont <fdupont@isc.org> | 2020-09-05 22:12:24 +0200 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2020-09-21 12:36:02 +0200 |
commit | 63f5a72421cbac4e4b7eb48430bf561a0911ab57 (patch) | |
tree | ef314b6a49cccaa4229ce22477de44b7552addfd /src/bin/dhcp6/dhcp6_parser.yy | |
parent | [#1102] regen bison (diff) | |
download | kea-63f5a72421cbac4e4b7eb48430bf561a0911ab57.tar.xz kea-63f5a72421cbac4e4b7eb48430bf561a0911ab57.zip |
[#1102] Checkpoint: finished code
Diffstat (limited to 'src/bin/dhcp6/dhcp6_parser.yy')
-rw-r--r-- | src/bin/dhcp6/dhcp6_parser.yy | 157 |
1 files changed, 157 insertions, 0 deletions
diff --git a/src/bin/dhcp6/dhcp6_parser.yy b/src/bin/dhcp6/dhcp6_parser.yy index 44a02e8f2e..207c72cc5f 100644 --- a/src/bin/dhcp6/dhcp6_parser.yy +++ b/src/bin/dhcp6/dhcp6_parser.yy @@ -335,11 +335,13 @@ map_content: %empty // empty map not_empty_map: STRING COLON value { // map containing a single entry + ctx.unique($1, ctx.loc2pos(@1)); ctx.stack_.back()->set($1, $3); } | not_empty_map COMMA STRING COLON value { // map consisting of a shorter map followed by // comma and string:value + ctx.unique($3, ctx.loc2pos(@3)); ctx.stack_.back()->set($3, $5); } ; @@ -504,6 +506,7 @@ global_param: data_directory ; data_directory: DATA_DIRECTORY { + ctx.unique("data-directory", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr datadir(new StringElement($4, ctx.loc2pos(@4))); @@ -512,81 +515,97 @@ data_directory: DATA_DIRECTORY { }; preferred_lifetime: PREFERRED_LIFETIME COLON INTEGER { + ctx.unique("preferred-lifetime", ctx.loc2pos(@1)); ElementPtr prf(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("preferred-lifetime", prf); }; min_preferred_lifetime: MIN_PREFERRED_LIFETIME COLON INTEGER { + ctx.unique("min-preferred-lifetime", ctx.loc2pos(@1)); ElementPtr prf(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("min-preferred-lifetime", prf); }; max_preferred_lifetime: MAX_PREFERRED_LIFETIME COLON INTEGER { + ctx.unique("max-preferred-lifetime", ctx.loc2pos(@1)); ElementPtr prf(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("max-preferred-lifetime", prf); }; valid_lifetime: VALID_LIFETIME COLON INTEGER { + ctx.unique("valid-lifetime", ctx.loc2pos(@1)); ElementPtr prf(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("valid-lifetime", prf); }; min_valid_lifetime: MIN_VALID_LIFETIME COLON INTEGER { + ctx.unique("min-valid-lifetime", ctx.loc2pos(@1)); ElementPtr prf(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("min-valid-lifetime", prf); }; max_valid_lifetime: MAX_VALID_LIFETIME COLON INTEGER { + ctx.unique("max-valid-lifetime", ctx.loc2pos(@1)); ElementPtr prf(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("max-valid-lifetime", prf); }; renew_timer: RENEW_TIMER COLON INTEGER { + ctx.unique("renew-timer", ctx.loc2pos(@1)); ElementPtr prf(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("renew-timer", prf); }; rebind_timer: REBIND_TIMER COLON INTEGER { + ctx.unique("rebind-timer", ctx.loc2pos(@1)); ElementPtr prf(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("rebind-timer", prf); }; calculate_tee_times: CALCULATE_TEE_TIMES COLON BOOLEAN { + ctx.unique("calculate-tee-times", ctx.loc2pos(@1)); ElementPtr ctt(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("calculate-tee-times", ctt); }; t1_percent: T1_PERCENT COLON FLOAT { + ctx.unique("t1-percent", ctx.loc2pos(@1)); ElementPtr t1(new DoubleElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("t1-percent", t1); }; t2_percent: T2_PERCENT COLON FLOAT { + ctx.unique("t2-percent", ctx.loc2pos(@1)); ElementPtr t2(new DoubleElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("t2-percent", t2); }; decline_probation_period: DECLINE_PROBATION_PERIOD COLON INTEGER { + ctx.unique("decline-probation-period", ctx.loc2pos(@1)); ElementPtr dpp(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("decline-probation-period", dpp); }; ddns_send_updates: DDNS_SEND_UPDATES COLON BOOLEAN { + ctx.unique("ddns-send-updates", ctx.loc2pos(@1)); ElementPtr b(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("ddns-send-updates", b); }; ddns_override_no_update: DDNS_OVERRIDE_NO_UPDATE COLON BOOLEAN { + ctx.unique("ddns-override-no-update", ctx.loc2pos(@1)); ElementPtr b(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("ddns-override-no-update", b); }; ddns_override_client_update: DDNS_OVERRIDE_CLIENT_UPDATE COLON BOOLEAN { + ctx.unique("ddns-override-client-update", ctx.loc2pos(@1)); ElementPtr b(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("ddns-override-client-update", b); }; ddns_replace_client_name: DDNS_REPLACE_CLIENT_NAME { + ctx.unique("ddns-replace-client-name", ctx.loc2pos(@1)); ctx.enter(ctx.REPLACE_CLIENT_NAME); } COLON ddns_replace_client_name_value { ctx.stack_.back()->set("ddns-replace-client-name", $4); @@ -613,6 +632,7 @@ ddns_replace_client_name_value: ; ddns_generated_prefix: DDNS_GENERATED_PREFIX { + ctx.unique("ddns-generated-prefix", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr s(new StringElement($4, ctx.loc2pos(@4))); @@ -621,6 +641,7 @@ ddns_generated_prefix: DDNS_GENERATED_PREFIX { }; ddns_qualifying_suffix: DDNS_QUALIFYING_SUFFIX { + ctx.unique("ddns-qualifying-suffix", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr s(new StringElement($4, ctx.loc2pos(@4))); @@ -629,6 +650,7 @@ ddns_qualifying_suffix: DDNS_QUALIFYING_SUFFIX { }; hostname_char_set: HOSTNAME_CHAR_SET { + ctx.unique("hostname-char-set", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr s(new StringElement($4, ctx.loc2pos(@4))); @@ -637,6 +659,7 @@ hostname_char_set: HOSTNAME_CHAR_SET { }; hostname_char_replacement: HOSTNAME_CHAR_REPLACEMENT { + ctx.unique("hostname-char-replacement", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr s(new StringElement($4, ctx.loc2pos(@4))); @@ -645,21 +668,25 @@ hostname_char_replacement: HOSTNAME_CHAR_REPLACEMENT { }; store_extended_info: STORE_EXTENDED_INFO COLON BOOLEAN { + ctx.unique("store-extended-info", ctx.loc2pos(@1)); ElementPtr b(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("store-extended-info", b); }; statistic_default_sample_count: STATISTIC_DEFAULT_SAMPLE_COUNT COLON INTEGER { + ctx.unique("statistic-default-sample-count", ctx.loc2pos(@1)); ElementPtr count(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("statistic-default-sample-count", count); }; statistic_default_sample_age: STATISTIC_DEFAULT_SAMPLE_AGE COLON INTEGER { + ctx.unique("statistic-default-sample-age", ctx.loc2pos(@1)); ElementPtr age(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("statistic-default-sample-age", age); }; server_tag: SERVER_TAG { + ctx.unique("server-tag", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr stag(new StringElement($4, ctx.loc2pos(@4))); @@ -668,6 +695,7 @@ server_tag: SERVER_TAG { }; interfaces_config: INTERFACES_CONFIG { + ctx.unique("interfaces-config", ctx.loc2pos(@1)); ElementPtr i(new MapElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("interfaces-config", i); ctx.stack_.push_back(i); @@ -699,6 +727,7 @@ interfaces_config_param: interfaces_list ; interfaces_list: INTERFACES { + ctx.unique("interfaces", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("interfaces", l); ctx.stack_.push_back(l); @@ -709,11 +738,13 @@ interfaces_list: INTERFACES { }; re_detect: RE_DETECT COLON BOOLEAN { + ctx.unique("re-detect", ctx.loc2pos(@1)); ElementPtr b(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("re-detect", b); }; lease_database: LEASE_DATABASE { + ctx.unique("lease-database", ctx.loc2pos(@1)); ElementPtr i(new MapElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("lease-database", i); ctx.stack_.push_back(i); @@ -726,6 +757,7 @@ lease_database: LEASE_DATABASE { }; hosts_database: HOSTS_DATABASE { + ctx.unique("hosts-database", ctx.loc2pos(@1)); ElementPtr i(new MapElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("hosts-database", i); ctx.stack_.push_back(i); @@ -738,6 +770,7 @@ hosts_database: HOSTS_DATABASE { }; hosts_databases: HOSTS_DATABASES { + ctx.unique("hosts-databases", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("hosts-databases", l); ctx.stack_.push_back(l); @@ -793,6 +826,7 @@ database_map_param: database_type ; database_type: TYPE { + ctx.unique("type", ctx.loc2pos(@1)); ctx.enter(ctx.DATABASE_TYPE); } COLON db_type { ctx.stack_.back()->set("type", $4); @@ -806,6 +840,7 @@ db_type: MEMFILE { $$ = ElementPtr(new StringElement("memfile", ctx.loc2pos(@1)) ; user: USER { + ctx.unique("user", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr user(new StringElement($4, ctx.loc2pos(@4))); @@ -814,6 +849,7 @@ user: USER { }; password: PASSWORD { + ctx.unique("password", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr pwd(new StringElement($4, ctx.loc2pos(@4))); @@ -822,6 +858,7 @@ password: PASSWORD { }; host: HOST { + ctx.unique("host", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr h(new StringElement($4, ctx.loc2pos(@4))); @@ -830,11 +867,13 @@ host: HOST { }; port: PORT COLON INTEGER { + ctx.unique("port", ctx.loc2pos(@1)); ElementPtr p(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("port", p); }; name: NAME { + ctx.unique("name", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr name(new StringElement($4, ctx.loc2pos(@4))); @@ -843,51 +882,61 @@ name: NAME { }; persist: PERSIST COLON BOOLEAN { + ctx.unique("persist", ctx.loc2pos(@1)); ElementPtr n(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("persist", n); }; lfc_interval: LFC_INTERVAL COLON INTEGER { + ctx.unique("lfc-interval", ctx.loc2pos(@1)); ElementPtr n(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("lfc-interval", n); }; readonly: READONLY COLON BOOLEAN { + ctx.unique("readonly", ctx.loc2pos(@1)); ElementPtr n(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("readonly", n); }; connect_timeout: CONNECT_TIMEOUT COLON INTEGER { + ctx.unique("connect-timeout", ctx.loc2pos(@1)); ElementPtr n(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("connect-timeout", n); }; reconnect_wait_time: RECONNECT_WAIT_TIME COLON INTEGER { + ctx.unique("reconnect-wait-time", ctx.loc2pos(@1)); ElementPtr n(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("reconnect-wait-time", n); }; max_row_errors: MAX_ROW_ERRORS COLON INTEGER { + ctx.unique("max-row-errors", ctx.loc2pos(@1)); ElementPtr n(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("max-row-errors", n); }; request_timeout: REQUEST_TIMEOUT COLON INTEGER { + ctx.unique("request-timeout", ctx.loc2pos(@1)); ElementPtr n(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("request-timeout", n); }; tcp_keepalive: TCP_KEEPALIVE COLON INTEGER { + ctx.unique("tcp-keepalive", ctx.loc2pos(@1)); ElementPtr n(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("tcp-keepalive", n); }; tcp_nodelay: TCP_NODELAY COLON BOOLEAN { + ctx.unique("tcp-nodelay", ctx.loc2pos(@1)); ElementPtr n(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("tcp-nodelay", n); }; contact_points: CONTACT_POINTS { + ctx.unique("contact-points", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr cp(new StringElement($4, ctx.loc2pos(@4))); @@ -896,11 +945,13 @@ contact_points: CONTACT_POINTS { }; max_reconnect_tries: MAX_RECONNECT_TRIES COLON INTEGER { + ctx.unique("max-reconnect-tries", ctx.loc2pos(@1)); ElementPtr n(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("max-reconnect-tries", n); }; keyspace: KEYSPACE { + ctx.unique("keyspace", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr ks(new StringElement($4, ctx.loc2pos(@4))); @@ -909,6 +960,7 @@ keyspace: KEYSPACE { }; consistency: CONSISTENCY { + ctx.unique("consistency", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr c(new StringElement($4, ctx.loc2pos(@4))); @@ -917,6 +969,7 @@ consistency: CONSISTENCY { }; serial_consistency: SERIAL_CONSISTENCY { + ctx.unique("serial-consistency", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr c(new StringElement($4, ctx.loc2pos(@4))); @@ -925,6 +978,7 @@ serial_consistency: SERIAL_CONSISTENCY { }; sanity_checks: SANITY_CHECKS { + ctx.unique("sanity-checks", ctx.loc2pos(@1)); ElementPtr m(new MapElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("sanity-checks", m); ctx.stack_.push_back(m); @@ -940,6 +994,7 @@ sanity_checks_params: sanity_checks_param sanity_checks_param: lease_checks; lease_checks: LEASE_CHECKS { + ctx.unique("lease-checks", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { @@ -958,6 +1013,7 @@ lease_checks: LEASE_CHECKS { } mac_sources: MAC_SOURCES { + ctx.unique("mac-sources", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("mac-sources", l); ctx.stack_.push_back(l); @@ -986,6 +1042,7 @@ string_id : STRING { }; host_reservation_identifiers: HOST_RESERVATION_IDENTIFIERS { + ctx.unique("host-reservation-identifiers", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("host-reservation-identifiers", l); ctx.stack_.push_back(l); @@ -1017,6 +1074,7 @@ flex_id : FLEX_ID { // list_content below accepts any value when options are by name (string) // or by code (number) relay_supplied_options: RELAY_SUPPLIED_OPTIONS { + ctx.unique("relay-supplied-options", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("relay-supplied-options", l); ctx.stack_.push_back(l); @@ -1029,6 +1087,7 @@ relay_supplied_options: RELAY_SUPPLIED_OPTIONS { // --- multi-threading ------------------------------------------------ dhcp_multi_threading: DHCP_MULTI_THREADING { + ctx.unique("multi-threading", ctx.loc2pos(@1)); ElementPtr mt(new MapElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("multi-threading", mt); ctx.stack_.push_back(mt); @@ -1053,21 +1112,25 @@ multi_threading_param: enable_multi_threading ; enable_multi_threading: ENABLE_MULTI_THREADING COLON BOOLEAN { + ctx.unique("enable-multi-threading", ctx.loc2pos(@1)); ElementPtr b(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("enable-multi-threading", b); }; thread_pool_size: THREAD_POOL_SIZE COLON INTEGER { + ctx.unique("thread-pool-size", ctx.loc2pos(@1)); ElementPtr prf(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("thread-pool-size", prf); }; packet_queue_size: PACKET_QUEUE_SIZE COLON INTEGER { + ctx.unique("packet-queue-size", ctx.loc2pos(@1)); ElementPtr prf(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("packet-queue-size", prf); }; hooks_libraries: HOOKS_LIBRARIES { + ctx.unique("hooks-libraries", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("hooks-libraries", l); ctx.stack_.push_back(l); @@ -1115,6 +1178,7 @@ hooks_param: library ; library: LIBRARY { + ctx.unique("library", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr lib(new StringElement($4, ctx.loc2pos(@4))); @@ -1123,6 +1187,7 @@ library: LIBRARY { }; parameters: PARAMETERS { + ctx.unique("parameters", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON map_value { ctx.stack_.back()->set("parameters", $4); @@ -1131,6 +1196,7 @@ parameters: PARAMETERS { // --- expired-leases-processing ------------------------ expired_leases_processing: EXPIRED_LEASES_PROCESSING { + ctx.unique("expired-leases-processing", ctx.loc2pos(@1)); ElementPtr m(new MapElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("expired-leases-processing", m); ctx.stack_.push_back(m); @@ -1154,31 +1220,37 @@ expired_leases_param: reclaim_timer_wait_time ; reclaim_timer_wait_time: RECLAIM_TIMER_WAIT_TIME COLON INTEGER { + ctx.unique("reclaim-timer-wait-time", ctx.loc2pos(@1)); ElementPtr value(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("reclaim-timer-wait-time", value); }; flush_reclaimed_timer_wait_time: FLUSH_RECLAIMED_TIMER_WAIT_TIME COLON INTEGER { + ctx.unique("flush-reclaimed-timer-wait-time", ctx.loc2pos(@1)); ElementPtr value(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("flush-reclaimed-timer-wait-time", value); }; hold_reclaimed_time: HOLD_RECLAIMED_TIME COLON INTEGER { + ctx.unique("hold-reclaimed-time", ctx.loc2pos(@1)); ElementPtr value(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("hold-reclaimed-time", value); }; max_reclaim_leases: MAX_RECLAIM_LEASES COLON INTEGER { + ctx.unique("max-reclaim-leases", ctx.loc2pos(@1)); ElementPtr value(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("max-reclaim-leases", value); }; max_reclaim_time: MAX_RECLAIM_TIME COLON INTEGER { + ctx.unique("max-reclaim-time", ctx.loc2pos(@1)); ElementPtr value(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("max-reclaim-time", value); }; unwarned_reclaim_cycles: UNWARNED_RECLAIM_CYCLES COLON INTEGER { + ctx.unique("unwarned-reclaim-cycles", ctx.loc2pos(@1)); ElementPtr value(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("unwarned-reclaim-cycles", value); }; @@ -1187,6 +1259,7 @@ unwarned_reclaim_cycles: UNWARNED_RECLAIM_CYCLES COLON INTEGER { // This defines subnet6 as a list of maps. // "subnet6": [ ... ] subnet6_list: SUBNET6 { + ctx.unique("subnet6", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("subnet6", l); ctx.stack_.push_back(l); @@ -1292,6 +1365,7 @@ subnet6_param: preferred_lifetime ; subnet: SUBNET { + ctx.unique("subnet", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr subnet(new StringElement($4, ctx.loc2pos(@4))); @@ -1300,6 +1374,7 @@ subnet: SUBNET { }; interface: INTERFACE { + ctx.unique("interface", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr iface(new StringElement($4, ctx.loc2pos(@4))); @@ -1308,6 +1383,7 @@ interface: INTERFACE { }; interface_id: INTERFACE_ID { + ctx.unique("interface-id", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr iface(new StringElement($4, ctx.loc2pos(@4))); @@ -1316,6 +1392,7 @@ interface_id: INTERFACE_ID { }; client_class: CLIENT_CLASS { + ctx.unique("client-class", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr cls(new StringElement($4, ctx.loc2pos(@4))); @@ -1324,6 +1401,7 @@ client_class: CLIENT_CLASS { }; require_client_classes: REQUIRE_CLIENT_CLASSES { + ctx.unique("require-client-classes", ctx.loc2pos(@1)); ElementPtr c(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("require-client-classes", c); ctx.stack_.push_back(c); @@ -1334,6 +1412,7 @@ require_client_classes: REQUIRE_CLIENT_CLASSES { }; reservation_mode: RESERVATION_MODE { + ctx.unique("reservation-mode", ctx.loc2pos(@1)); ctx.enter(ctx.RESERVATION_MODE); } COLON hr_mode { ctx.stack_.back()->set("reservation-mode", $4); @@ -1347,11 +1426,13 @@ hr_mode: DISABLED { $$ = ElementPtr(new StringElement("disabled", ctx.loc2pos(@1 ; id: ID COLON INTEGER { + ctx.unique("id", ctx.loc2pos(@1)); ElementPtr id(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("id", id); }; rapid_commit: RAPID_COMMIT COLON BOOLEAN { + ctx.unique("rapid-commit", ctx.loc2pos(@1)); ElementPtr rc(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("rapid-commit", rc); }; @@ -1359,6 +1440,7 @@ rapid_commit: RAPID_COMMIT COLON BOOLEAN { // ---- shared-networks --------------------- shared_networks: SHARED_NETWORKS { + ctx.unique("shared-networks", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("shared-networks", l); ctx.stack_.push_back(l); @@ -1430,6 +1512,7 @@ shared_network_param: name // This defines the "option-def": [ ... ] entry that may appear // at a global option. option_def_list: OPTION_DEF { + ctx.unique("option-def", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("option-def", l); ctx.stack_.push_back(l); @@ -1513,6 +1596,7 @@ option_def_param: option_def_name option_def_name: name; code: CODE COLON INTEGER { + ctx.unique("code", ctx.loc2pos(@1)); ElementPtr code(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("code", code); }; @@ -1520,6 +1604,7 @@ code: CODE COLON INTEGER { option_def_code: code; option_def_type: TYPE { + ctx.unique("type", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr prf(new StringElement($4, ctx.loc2pos(@4))); @@ -1528,6 +1613,7 @@ option_def_type: TYPE { }; option_def_record_types: RECORD_TYPES { + ctx.unique("record-types", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr rtypes(new StringElement($4, ctx.loc2pos(@4))); @@ -1536,6 +1622,7 @@ option_def_record_types: RECORD_TYPES { }; space: SPACE { + ctx.unique("space", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr space(new StringElement($4, ctx.loc2pos(@4))); @@ -1546,6 +1633,7 @@ space: SPACE { option_def_space: space; option_def_encapsulate: ENCAPSULATE { + ctx.unique("encapsulate", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr encap(new StringElement($4, ctx.loc2pos(@4))); @@ -1554,6 +1642,7 @@ option_def_encapsulate: ENCAPSULATE { }; option_def_array: ARRAY COLON BOOLEAN { + ctx.unique("array", ctx.loc2pos(@1)); ElementPtr array(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("array", array); }; @@ -1563,6 +1652,7 @@ option_def_array: ARRAY COLON BOOLEAN { // This defines the "option-data": [ ... ] entry that may appear // in several places, but most notably in subnet6 entries. option_data_list: OPTION_DATA { + ctx.unique("option-data", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("option-data", l); ctx.stack_.push_back(l); @@ -1636,6 +1726,7 @@ option_data_param: option_data_name option_data_name: name; option_data_data: DATA { + ctx.unique("data", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr data(new StringElement($4, ctx.loc2pos(@4))); @@ -1648,11 +1739,13 @@ option_data_code: code; option_data_space: space; option_data_csv_format: CSV_FORMAT COLON BOOLEAN { + ctx.unique("csv-format", ctx.loc2pos(@1)); ElementPtr space(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("csv-format", space); }; option_data_always_send: ALWAYS_SEND COLON BOOLEAN { + ctx.unique("always-send", ctx.loc2pos(@1)); ElementPtr persist(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("always-send", persist); }; @@ -1661,6 +1754,7 @@ option_data_always_send: ALWAYS_SEND COLON BOOLEAN { // This defines the "pools": [ ... ] entry that may appear in subnet6. pools_list: POOLS { + ctx.unique("pools", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("pools", l); ctx.stack_.push_back(l); @@ -1714,6 +1808,7 @@ pool_param: pool_entry ; pool_entry: POOL { + ctx.unique("pool", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr pool(new StringElement($4, ctx.loc2pos(@4))); @@ -1777,6 +1872,7 @@ comment: COMMENT { // --- pd-pools ---------------------------------------------- pd_pools_list: PD_POOLS { + ctx.unique("pd-pools", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("pd-pools", l); ctx.stack_.push_back(l); @@ -1838,6 +1934,7 @@ pd_pool_param: pd_prefix ; pd_prefix: PREFIX { + ctx.unique("prefix", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr prf(new StringElement($4, ctx.loc2pos(@4))); @@ -1846,11 +1943,13 @@ pd_prefix: PREFIX { }; pd_prefix_len: PREFIX_LEN COLON INTEGER { + ctx.unique("prefix-len", ctx.loc2pos(@1)); ElementPtr prf(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("prefix-len", prf); }; excluded_prefix: EXCLUDED_PREFIX { + ctx.unique("excluded-prefix", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr prf(new StringElement($4, ctx.loc2pos(@4))); @@ -1859,11 +1958,13 @@ excluded_prefix: EXCLUDED_PREFIX { }; excluded_prefix_len: EXCLUDED_PREFIX_LEN COLON INTEGER { + ctx.unique("excluded-prefix-len", ctx.loc2pos(@1)); ElementPtr prf(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("excluded-prefix-len", prf); }; pd_delegated_len: DELEGATED_LEN COLON INTEGER { + ctx.unique("delegated-len", ctx.loc2pos(@1)); ElementPtr deleg(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("delegated-len", deleg); }; @@ -1872,6 +1973,7 @@ pd_delegated_len: DELEGATED_LEN COLON INTEGER { // --- reservations ------------------------------------------ reservations: RESERVATIONS { + ctx.unique("reservations", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("reservations", l); ctx.stack_.push_back(l); @@ -1930,6 +2032,7 @@ reservation_param: duid ; ip_addresses: IP_ADDRESSES { + ctx.unique("ip-addresses", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("ip-addresses", l); ctx.stack_.push_back(l); @@ -1940,6 +2043,7 @@ ip_addresses: IP_ADDRESSES { }; prefixes: PREFIXES { + ctx.unique("prefixes", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("prefixes", l); ctx.stack_.push_back(l); @@ -1950,6 +2054,7 @@ prefixes: PREFIXES { }; duid: DUID { + ctx.unique("duid", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr d(new StringElement($4, ctx.loc2pos(@4))); @@ -1958,6 +2063,7 @@ duid: DUID { }; hw_address: HW_ADDRESS { + ctx.unique("hw-address", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr hw(new StringElement($4, ctx.loc2pos(@4))); @@ -1966,6 +2072,7 @@ hw_address: HW_ADDRESS { }; hostname: HOSTNAME { + ctx.unique("hostname", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr host(new StringElement($4, ctx.loc2pos(@4))); @@ -1974,6 +2081,7 @@ hostname: HOSTNAME { }; flex_id_value: FLEX_ID { + ctx.unique("flex-id", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr hw(new StringElement($4, ctx.loc2pos(@4))); @@ -1982,6 +2090,7 @@ flex_id_value: FLEX_ID { }; reservation_client_classes: CLIENT_CLASSES { + ctx.unique("client-classes", ctx.loc2pos(@1)); ElementPtr c(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("client-classes", c); ctx.stack_.push_back(c); @@ -1995,6 +2104,7 @@ reservation_client_classes: CLIENT_CLASSES { // --- relay ------------------------------------------------- relay: RELAY { + ctx.unique("relay", ctx.loc2pos(@1)); ElementPtr m(new MapElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("relay", m); ctx.stack_.push_back(m); @@ -2009,6 +2119,7 @@ relay_map: ip_address ; ip_address: IP_ADDRESS { + ctx.unique("ip-address", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr addr(new StringElement($4, ctx.loc2pos(@4))); @@ -2020,6 +2131,7 @@ ip_address: IP_ADDRESS { // --- client classes ---------------------------------------- client_classes: CLIENT_CLASSES { + ctx.unique("client-classes", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("client-classes", l); ctx.stack_.push_back(l); @@ -2063,6 +2175,7 @@ client_class_param: client_class_name client_class_name: name; client_class_test: TEST { + ctx.unique("test", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr test(new StringElement($4, ctx.loc2pos(@4))); @@ -2071,6 +2184,7 @@ client_class_test: TEST { }; only_if_required: ONLY_IF_REQUIRED COLON BOOLEAN { + ctx.unique("only-if-required", ctx.loc2pos(@1)); ElementPtr b(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("only-if-required", b); }; @@ -2079,6 +2193,7 @@ only_if_required: ONLY_IF_REQUIRED COLON BOOLEAN { // --- server-id --------------------------------------------- server_id: SERVER_ID { + ctx.unique("server-id", ctx.loc2pos(@1)); ElementPtr m(new MapElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("server-id", m); ctx.stack_.push_back(m); @@ -2106,6 +2221,7 @@ server_id_param: server_id_type ; server_id_type: TYPE { + ctx.unique("type", ctx.loc2pos(@1)); ctx.enter(ctx.DUID_TYPE); } COLON duid_type { ctx.stack_.back()->set("type", $4); @@ -2118,11 +2234,13 @@ duid_type: LLT { $$ = ElementPtr(new StringElement("LLT", ctx.loc2pos(@1))); } ; htype: HTYPE COLON INTEGER { + ctx.unique("htype", ctx.loc2pos(@1)); ElementPtr htype(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("htype", htype); }; identifier: IDENTIFIER { + ctx.unique("identifier", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr id(new StringElement($4, ctx.loc2pos(@4))); @@ -2131,11 +2249,13 @@ identifier: IDENTIFIER { }; time: TIME COLON INTEGER { + ctx.unique("time", ctx.loc2pos(@1)); ElementPtr time(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("time", time); }; enterprise_id: ENTERPRISE_ID COLON INTEGER { + ctx.unique("enterprise-id", ctx.loc2pos(@1)); ElementPtr time(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("enterprise-id", time); }; @@ -2143,6 +2263,7 @@ enterprise_id: ENTERPRISE_ID COLON INTEGER { // --- end of server-id -------------------------------------- dhcp4o6_port: DHCP4O6_PORT COLON INTEGER { + ctx.unique("dhcp4o6-port", ctx.loc2pos(@1)); ElementPtr time(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("dhcp4o6-port", time); }; @@ -2150,6 +2271,7 @@ dhcp4o6_port: DHCP4O6_PORT COLON INTEGER { // --- control socket ---------------------------------------- control_socket: CONTROL_SOCKET { + ctx.unique("control-socket", ctx.loc2pos(@1)); ElementPtr m(new MapElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("control-socket", m); ctx.stack_.push_back(m); @@ -2171,6 +2293,7 @@ control_socket_param: socket_type ; socket_type: SOCKET_TYPE { + ctx.unique("socket-type", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr stype(new StringElement($4, ctx.loc2pos(@4))); @@ -2179,6 +2302,7 @@ socket_type: SOCKET_TYPE { }; socket_name: SOCKET_NAME { + ctx.unique("socket-name", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr name(new StringElement($4, ctx.loc2pos(@4))); @@ -2190,6 +2314,7 @@ socket_name: SOCKET_NAME { // --- dhcp-queue-control --------------------------------------------- dhcp_queue_control: DHCP_QUEUE_CONTROL { + ctx.unique("dhcp-queue-control", ctx.loc2pos(@1)); ElementPtr qc(new MapElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("dhcp-queue-control", qc); ctx.stack_.push_back(qc); @@ -2214,11 +2339,13 @@ queue_control_param: enable_queue ; enable_queue: ENABLE_QUEUE COLON BOOLEAN { + ctx.unique("enable-queue", ctx.loc2pos(@1)); ElementPtr b(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("enable-queue", b); }; queue_type: QUEUE_TYPE { + ctx.unique("queue-type", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr qt(new StringElement($4, ctx.loc2pos(@4))); @@ -2227,11 +2354,13 @@ queue_type: QUEUE_TYPE { }; capacity: CAPACITY COLON INTEGER { + ctx.unique("capacity", ctx.loc2pos(@1)); ElementPtr c(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("capacity", c); }; arbitrary_map_entry: STRING { + ctx.unique($1, ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON value { ctx.stack_.back()->set($1, $4); @@ -2241,6 +2370,7 @@ arbitrary_map_entry: STRING { // --- dhcp ddns --------------------------------------------- dhcp_ddns: DHCP_DDNS { + ctx.unique("dhcp-ddns", ctx.loc2pos(@1)); ElementPtr m(new MapElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("dhcp-ddns", m); ctx.stack_.push_back(m); @@ -2287,12 +2417,14 @@ dhcp_ddns_param: enable_updates ; enable_updates: ENABLE_UPDATES COLON BOOLEAN { + ctx.unique("enable-updates", ctx.loc2pos(@1)); ElementPtr b(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("enable-updates", b); }; // Deprecated, moved to global/network scopes. Eventually it should be removed. dep_qualifying_suffix: QUALIFYING_SUFFIX { + ctx.unique("qualifying-suffix", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr s(new StringElement($4, ctx.loc2pos(@4))); @@ -2301,6 +2433,7 @@ dep_qualifying_suffix: QUALIFYING_SUFFIX { }; server_ip: SERVER_IP { + ctx.unique("server-ip", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr s(new StringElement($4, ctx.loc2pos(@4))); @@ -2309,11 +2442,13 @@ server_ip: SERVER_IP { }; server_port: SERVER_PORT COLON INTEGER { + ctx.unique("server-port", ctx.loc2pos(@1)); ElementPtr i(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("server-port", i); }; sender_ip: SENDER_IP { + ctx.unique("sender-ip", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr s(new StringElement($4, ctx.loc2pos(@4))); @@ -2322,16 +2457,19 @@ sender_ip: SENDER_IP { }; sender_port: SENDER_PORT COLON INTEGER { + ctx.unique("sender-port", ctx.loc2pos(@1)); ElementPtr i(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("sender-port", i); }; max_queue_size: MAX_QUEUE_SIZE COLON INTEGER { + ctx.unique("max-queue-size", ctx.loc2pos(@1)); ElementPtr i(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("max-queue-size", i); }; ncr_protocol: NCR_PROTOCOL { + ctx.unique("ncr-protocol", ctx.loc2pos(@1)); ctx.enter(ctx.NCR_PROTOCOL); } COLON ncr_protocol_value { ctx.stack_.back()->set("ncr-protocol", $4); @@ -2344,6 +2482,7 @@ ncr_protocol_value: ; ncr_format: NCR_FORMAT { + ctx.unique("ncr-format", ctx.loc2pos(@1)); ctx.enter(ctx.NCR_FORMAT); } COLON JSON { ElementPtr json(new StringElement("JSON", ctx.loc2pos(@4))); @@ -2353,18 +2492,21 @@ ncr_format: NCR_FORMAT { // Deprecated, moved to global/network scopes. Eventually it should be removed. dep_override_no_update: OVERRIDE_NO_UPDATE COLON BOOLEAN { + ctx.unique("override-no-update", ctx.loc2pos(@1)); ElementPtr b(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("override-no-update", b); }; // Deprecated, moved to global/network scopes. Eventually it should be removed. dep_override_client_update: OVERRIDE_CLIENT_UPDATE COLON BOOLEAN { + ctx.unique("override-client-update", ctx.loc2pos(@1)); ElementPtr b(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("override-client-update", b); }; // Deprecated, moved to global/network scopes. Eventually it should be removed. dep_replace_client_name: REPLACE_CLIENT_NAME { + ctx.unique("replace-client-name", ctx.loc2pos(@1)); ctx.enter(ctx.REPLACE_CLIENT_NAME); } COLON ddns_replace_client_name_value { ctx.stack_.back()->set("replace-client-name", $4); @@ -2373,6 +2515,7 @@ dep_replace_client_name: REPLACE_CLIENT_NAME { // Deprecated, moved to global/network scopes. Eventually it should be removed. dep_generated_prefix: GENERATED_PREFIX { + ctx.unique("generated-prefix", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr s(new StringElement($4, ctx.loc2pos(@4))); @@ -2382,6 +2525,7 @@ dep_generated_prefix: GENERATED_PREFIX { // Deprecated, moved to global/network scopes. Eventually it should be removed. dep_hostname_char_set: HOSTNAME_CHAR_SET { + ctx.unique("hostname-char-set", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr s(new StringElement($4, ctx.loc2pos(@4))); @@ -2391,6 +2535,7 @@ dep_hostname_char_set: HOSTNAME_CHAR_SET { // Deprecated, moved to global/network scopes. Eventually it should be removed. dep_hostname_char_replacement: HOSTNAME_CHAR_REPLACEMENT { + ctx.unique("hostname-char-replacement", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr s(new StringElement($4, ctx.loc2pos(@4))); @@ -2402,6 +2547,7 @@ dep_hostname_char_replacement: HOSTNAME_CHAR_REPLACEMENT { // Config control information element config_control: CONFIG_CONTROL { + ctx.unique("config-control", ctx.loc2pos(@1)); ElementPtr i(new MapElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("config-control", i); ctx.stack_.push_back(i); @@ -2432,6 +2578,7 @@ config_control_param: config_databases ; config_databases: CONFIG_DATABASES { + ctx.unique("config-databases", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("config-databases", l); ctx.stack_.push_back(l); @@ -2442,6 +2589,7 @@ config_databases: CONFIG_DATABASES { }; config_fetch_wait_time: CONFIG_FETCH_WAIT_TIME COLON INTEGER { + ctx.unique("config-fetch-wait-time", ctx.loc2pos(@1)); ElementPtr value(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("config-fetch-wait-time", value); }; @@ -2449,6 +2597,7 @@ config_fetch_wait_time: CONFIG_FETCH_WAIT_TIME COLON INTEGER { // --- loggers entry ----------------------------------------- loggers: LOGGERS { + ctx.unique("loggers", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("loggers", l); ctx.stack_.push_back(l); @@ -2487,11 +2636,13 @@ logger_param: name ; debuglevel: DEBUGLEVEL COLON INTEGER { + ctx.unique("debuglevel", ctx.loc2pos(@1)); ElementPtr dl(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("debuglevel", dl); }; severity: SEVERITY { + ctx.unique("severity", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr sev(new StringElement($4, ctx.loc2pos(@4))); @@ -2500,6 +2651,7 @@ severity: SEVERITY { }; output_options_list: OUTPUT_OPTIONS { + ctx.unique("output_options", ctx.loc2pos(@1)); ElementPtr l(new ListElement(ctx.loc2pos(@1))); ctx.stack_.back()->set("output_options", l); ctx.stack_.push_back(l); @@ -2533,6 +2685,7 @@ output_params: output ; output: OUTPUT { + ctx.unique("output", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr sev(new StringElement($4, ctx.loc2pos(@4))); @@ -2541,21 +2694,25 @@ output: OUTPUT { }; flush: FLUSH COLON BOOLEAN { + ctx.unique("flush", ctx.loc2pos(@1)); ElementPtr flush(new BoolElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("flush", flush); }; maxsize: MAXSIZE COLON INTEGER { + ctx.unique("maxsize", ctx.loc2pos(@1)); ElementPtr maxsize(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("maxsize", maxsize); }; maxver: MAXVER COLON INTEGER { + ctx.unique("maxver", ctx.loc2pos(@1)); ElementPtr maxver(new IntElement($3, ctx.loc2pos(@3))); ctx.stack_.back()->set("maxver", maxver); }; pattern: PATTERN { + ctx.unique("pattern", ctx.loc2pos(@1)); ctx.enter(ctx.NO_KEYWORD); } COLON STRING { ElementPtr sev(new StringElement($4, ctx.loc2pos(@4))); |