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);
}
;
;
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);
};
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)));
};
echo_client_id: ECHO_CLIENT_ID COLON BOOLEAN {
+ ctx.unique("echo-client-id", ctx.loc2pos(@1));
ElementPtr echo(new BoolElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("echo-client-id", echo);
};
match_client_id: MATCH_CLIENT_ID COLON BOOLEAN {
+ ctx.unique("match-client-id", ctx.loc2pos(@1));
ElementPtr match(new BoolElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("match-client-id", match);
};
authoritative: AUTHORITATIVE COLON BOOLEAN {
+ ctx.unique("authoritative", ctx.loc2pos(@1));
ElementPtr prf(new BoolElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("authoritative", prf);
};
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.enter(ctx.REPLACE_CLIENT_NAME);
+ ctx.unique("ddns-replace-client-name", ctx.loc2pos(@1));
} COLON ddns_replace_client_name_value {
ctx.stack_.back()->set("ddns-replace-client-name", $4);
ctx.leave();
;
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)));
};
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)));
};
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)));
};
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)));
};
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);
};
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);
};
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);
};
dhcp_socket_type: DHCP_SOCKET_TYPE {
+ ctx.unique("dhcp-socket-type", ctx.loc2pos(@1));
ctx.enter(ctx.DHCP_SOCKET_TYPE);
} COLON socket_type {
ctx.stack_.back()->set("dhcp-socket-type", $4);
;
outbound_interface: OUTBOUND_INTERFACE {
+ ctx.unique("outbound-interface", ctx.loc2pos(@1));
ctx.enter(ctx.OUTBOUND_INTERFACE);
} COLON outbound_interface_value {
ctx.stack_.back()->set("outbound-interface", $4);
} ;
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);
};
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);
sanity_checks_param: lease_checks;
lease_checks: LEASE_CHECKS {
+ ctx.unique("lease-checks", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
}
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);
};
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);
;
database_type: TYPE {
+ ctx.unique("type", ctx.loc2pos(@1));
ctx.enter(ctx.DATABASE_TYPE);
} COLON db_type {
ctx.stack_.back()->set("type", $4);
;
user: USER {
+ ctx.unique("user", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr user(new StringElement($4, ctx.loc2pos(@4)));
};
password: PASSWORD {
+ ctx.unique("password", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr pwd(new StringElement($4, ctx.loc2pos(@4)));
};
host: HOST {
+ ctx.unique("host", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr h(new StringElement($4, ctx.loc2pos(@4)));
};
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)));
};
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);
};
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)));
};
keyspace: KEYSPACE {
+ ctx.unique("keyspace", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr ks(new StringElement($4, ctx.loc2pos(@4)));
};
consistency: CONSISTENCY {
+ ctx.unique("consistency", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr c(new StringElement($4, ctx.loc2pos(@4)));
};
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)));
};
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);
};
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);
};
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);
// --- 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);
;
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);
;
library: LIBRARY {
+ ctx.unique("library", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr lib(new StringElement($4, ctx.loc2pos(@4)));
};
parameters: PARAMETERS {
+ ctx.unique("parameters", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON map_value {
ctx.stack_.back()->set("parameters", $4);
// --- 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);
;
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);
};
// This defines subnet4 as a list of maps.
// "subnet4": [ ... ]
subnet4_list: SUBNET4 {
+ ctx.unique("subnet4", ctx.loc2pos(@1));
ElementPtr l(new ListElement(ctx.loc2pos(@1)));
ctx.stack_.back()->set("subnet4", l);
ctx.stack_.push_back(l);
;
subnet: SUBNET {
+ ctx.unique("subnet", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr subnet(new StringElement($4, ctx.loc2pos(@4)));
};
subnet_4o6_interface: SUBNET_4O6_INTERFACE {
+ ctx.unique("4o6-interface", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr iface(new StringElement($4, ctx.loc2pos(@4)));
};
subnet_4o6_interface_id: SUBNET_4O6_INTERFACE_ID {
+ ctx.unique("4o6-interface-id", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr iface(new StringElement($4, ctx.loc2pos(@4)));
};
subnet_4o6_subnet: SUBNET_4O6_SUBNET {
+ ctx.unique("4o6-subnet", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr iface(new StringElement($4, ctx.loc2pos(@4)));
};
interface: INTERFACE {
+ ctx.unique("interface", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr iface(new StringElement($4, ctx.loc2pos(@4)));
};
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)));
};
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);
};
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);
;
id: ID COLON INTEGER {
+ ctx.unique("id", ctx.loc2pos(@1));
ElementPtr id(new IntElement($3, ctx.loc2pos(@3)));
ctx.stack_.back()->set("id", id);
};
// ---- 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);
// 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);
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);
};
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)));
};
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)));
};
space: SPACE {
+ ctx.unique("space", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr space(new StringElement($4, ctx.loc2pos(@4)));
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)));
};
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);
};
// This defines the "option-data": [ ... ] entry that may appear
// in several places, but most notably in subnet4 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);
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)));
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);
};
// This defines the "pools": [ ... ] entry that may appear in subnet4.
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);
;
pool_entry: POOL {
+ ctx.unique("pool", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr pool(new StringElement($4, ctx.loc2pos(@4)));
// --- 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);
;
next_server: NEXT_SERVER {
+ ctx.unique("next-server", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr next_server(new StringElement($4, ctx.loc2pos(@4)));
};
server_hostname: SERVER_HOSTNAME {
+ ctx.unique("server-hostname", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr srv(new StringElement($4, ctx.loc2pos(@4)));
};
boot_file_name: BOOT_FILE_NAME {
+ ctx.unique("boot-file-name", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr bootfile(new StringElement($4, ctx.loc2pos(@4)));
};
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)));
};
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);
};
duid: DUID {
+ ctx.unique("duid", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr d(new StringElement($4, ctx.loc2pos(@4)));
};
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)));
};
client_id_value: CLIENT_ID {
+ ctx.unique("client-id", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr hw(new StringElement($4, ctx.loc2pos(@4)));
};
circuit_id_value: CIRCUIT_ID {
+ ctx.unique("circuit-id", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr hw(new StringElement($4, ctx.loc2pos(@4)));
};
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)));
};
hostname: HOSTNAME {
+ ctx.unique("hostname", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr host(new StringElement($4, ctx.loc2pos(@4)));
};
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);
// --- 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);
// --- 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);
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)));
};
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);
};
// --- end of client classes ---------------------------------
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);
};
// --- 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);
;
control_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)));
};
control_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)));
// --- 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);
;
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)));
};
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);
// --- 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);
;
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);
};
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)));
};
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)));
};
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);
;
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)));
// 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)));
// 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);
// 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)));
// 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)));
// 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)));
// 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);
;
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);
};
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);
};
// --- 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);
;
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)));
};
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);
;
output: OUTPUT {
+ ctx.unique("output", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
ElementPtr sev(new StringElement($4, ctx.loc2pos(@4)));
};
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)));