#line 168 "d2_parser.yy"
{
// map containing a single entry
+ ctx.unique(yystack_[2].value.as < std::string > (), ctx.loc2pos(yystack_[2].location));
ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ());
}
-#line 830 "d2_parser.cc"
+#line 831 "d2_parser.cc"
break;
case 34: // not_empty_map: not_empty_map "," "constant string" ":" value
-#line 172 "d2_parser.yy"
+#line 173 "d2_parser.yy"
{
// map consisting of a shorter map followed by
// comma and string:value
+ ctx.unique(yystack_[2].value.as < std::string > (), ctx.loc2pos(yystack_[2].location));
ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ());
}
-#line 840 "d2_parser.cc"
+#line 842 "d2_parser.cc"
break;
case 35: // $@11: %empty
-#line 179 "d2_parser.yy"
+#line 181 "d2_parser.yy"
{
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(l);
}
-#line 849 "d2_parser.cc"
+#line 851 "d2_parser.cc"
break;
case 36: // list_generic: "[" $@11 list_content "]"
-#line 182 "d2_parser.yy"
+#line 184 "d2_parser.yy"
{
// list parsing complete. Put any sanity checking here
}
-#line 857 "d2_parser.cc"
+#line 859 "d2_parser.cc"
break;
case 39: // not_empty_list: value
-#line 190 "d2_parser.yy"
+#line 192 "d2_parser.yy"
{
// List consisting of a single element.
ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ());
}
-#line 866 "d2_parser.cc"
+#line 868 "d2_parser.cc"
break;
case 40: // not_empty_list: not_empty_list "," value
-#line 194 "d2_parser.yy"
+#line 196 "d2_parser.yy"
{
// List ending with , and a value.
ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ());
}
-#line 875 "d2_parser.cc"
+#line 877 "d2_parser.cc"
break;
case 41: // unknown_map_entry: "constant string" ":"
-#line 205 "d2_parser.yy"
+#line 207 "d2_parser.yy"
{
const std::string& where = ctx.contextName();
const std::string& keyword = yystack_[1].value.as < std::string > ();
error(yystack_[1].location,
"got unexpected keyword \"" + keyword + "\" in " + where + " map.");
}
-#line 886 "d2_parser.cc"
+#line 888 "d2_parser.cc"
break;
case 42: // $@12: %empty
-#line 214 "d2_parser.yy"
+#line 216 "d2_parser.yy"
{
// This code is executed when we're about to start parsing
// the content of the map
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(m);
}
-#line 897 "d2_parser.cc"
+#line 899 "d2_parser.cc"
break;
case 43: // syntax_map: "{" $@12 global_object "}"
-#line 219 "d2_parser.yy"
+#line 221 "d2_parser.yy"
{
// map parsing completed. If we ever want to do any wrap up
// (maybe some sanity checking), this would be the best place
// for it.
}
-#line 907 "d2_parser.cc"
+#line 909 "d2_parser.cc"
break;
case 44: // $@13: %empty
-#line 227 "d2_parser.yy"
+#line 229 "d2_parser.yy"
{
+ ctx.unique("DhcpDdns", ctx.loc2pos(yystack_[0].location));
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("DhcpDdns", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.DHCPDDNS);
}
-#line 918 "d2_parser.cc"
+#line 921 "d2_parser.cc"
break;
case 45: // global_object: "DhcpDdns" $@13 ":" "{" dhcpddns_params "}"
-#line 232 "d2_parser.yy"
+#line 235 "d2_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 927 "d2_parser.cc"
+#line 930 "d2_parser.cc"
break;
case 46: // $@14: %empty
-#line 237 "d2_parser.yy"
+#line 240 "d2_parser.yy"
{
// Parse the dhcpddns map
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(m);
}
-#line 937 "d2_parser.cc"
+#line 940 "d2_parser.cc"
break;
case 47: // sub_dhcpddns: "{" $@14 dhcpddns_params "}"
-#line 241 "d2_parser.yy"
+#line 244 "d2_parser.yy"
{
// parsing completed
}
-#line 945 "d2_parser.cc"
+#line 948 "d2_parser.cc"
break;
case 63: // $@15: %empty
-#line 265 "d2_parser.yy"
+#line 268 "d2_parser.yy"
{
+ ctx.unique("ip-address", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORD);
}
-#line 953 "d2_parser.cc"
+#line 957 "d2_parser.cc"
break;
case 64: // ip_address: "ip-address" $@15 ":" "constant string"
-#line 267 "d2_parser.yy"
+#line 271 "d2_parser.yy"
{
ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("ip-address", s);
ctx.leave();
}
-#line 963 "d2_parser.cc"
+#line 967 "d2_parser.cc"
break;
case 65: // port: "port" ":" "integer"
-#line 273 "d2_parser.yy"
+#line 277 "d2_parser.yy"
{
+ ctx.unique("port", ctx.loc2pos(yystack_[2].location));
if (yystack_[0].value.as < int64_t > () <= 0 || yystack_[0].value.as < int64_t > () >= 65536 ) {
error(yystack_[0].location, "port must be greater than zero but less than 65536");
}
ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("port", i);
}
-#line 975 "d2_parser.cc"
+#line 980 "d2_parser.cc"
break;
case 66: // dns_server_timeout: "dns-server-timeout" ":" "integer"
-#line 281 "d2_parser.yy"
+#line 286 "d2_parser.yy"
{
+ ctx.unique("dns-server-timeout", ctx.loc2pos(yystack_[2].location));
if (yystack_[0].value.as < int64_t > () <= 0) {
error(yystack_[0].location, "dns-server-timeout must be greater than zero");
} else {
ctx.stack_.back()->set("dns-server-timeout", i);
}
}
-#line 988 "d2_parser.cc"
+#line 994 "d2_parser.cc"
break;
case 67: // $@16: %empty
-#line 290 "d2_parser.yy"
+#line 296 "d2_parser.yy"
{
+ ctx.unique("ncr-protocol", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NCR_PROTOCOL);
}
-#line 996 "d2_parser.cc"
+#line 1003 "d2_parser.cc"
break;
case 68: // ncr_protocol: "ncr-protocol" $@16 ":" ncr_protocol_value
-#line 292 "d2_parser.yy"
+#line 299 "d2_parser.yy"
{
ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as < ElementPtr > ());
ctx.leave();
}
-#line 1005 "d2_parser.cc"
+#line 1012 "d2_parser.cc"
break;
case 69: // ncr_protocol_value: "UDP"
-#line 298 "d2_parser.yy"
+#line 305 "d2_parser.yy"
{ yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); }
-#line 1011 "d2_parser.cc"
+#line 1018 "d2_parser.cc"
break;
case 70: // ncr_protocol_value: "TCP"
-#line 299 "d2_parser.yy"
+#line 306 "d2_parser.yy"
{ yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); }
-#line 1017 "d2_parser.cc"
+#line 1024 "d2_parser.cc"
break;
case 71: // $@17: %empty
-#line 302 "d2_parser.yy"
+#line 309 "d2_parser.yy"
{
+ ctx.unique("ncr-format", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NCR_FORMAT);
}
-#line 1025 "d2_parser.cc"
+#line 1033 "d2_parser.cc"
break;
case 72: // ncr_format: "ncr-format" $@17 ":" "JSON"
-#line 304 "d2_parser.yy"
+#line 312 "d2_parser.yy"
{
ElementPtr json(new StringElement("JSON", ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("ncr-format", json);
ctx.leave();
}
-#line 1035 "d2_parser.cc"
+#line 1043 "d2_parser.cc"
break;
case 73: // $@18: %empty
-#line 310 "d2_parser.yy"
+#line 318 "d2_parser.yy"
{
ctx.enter(ctx.NO_KEYWORD);
}
-#line 1043 "d2_parser.cc"
+#line 1051 "d2_parser.cc"
break;
case 74: // user_context: "user-context" $@18 ":" map_value
-#line 312 "d2_parser.yy"
+#line 320 "d2_parser.yy"
{
ElementPtr parent = ctx.stack_.back();
ElementPtr user_context = yystack_[0].value.as < ElementPtr > ();
parent->set("user-context", user_context);
ctx.leave();
}
-#line 1070 "d2_parser.cc"
+#line 1078 "d2_parser.cc"
break;
case 75: // $@19: %empty
-#line 335 "d2_parser.yy"
+#line 343 "d2_parser.yy"
{
ctx.enter(ctx.NO_KEYWORD);
}
-#line 1078 "d2_parser.cc"
+#line 1086 "d2_parser.cc"
break;
case 76: // comment: "comment" $@19 ":" "constant string"
-#line 337 "d2_parser.yy"
+#line 345 "d2_parser.yy"
{
ElementPtr parent = ctx.stack_.back();
ElementPtr user_context(new MapElement(ctx.loc2pos(yystack_[3].location)));
parent->set("user-context", user_context);
ctx.leave();
}
-#line 1107 "d2_parser.cc"
+#line 1115 "d2_parser.cc"
break;
case 77: // $@20: %empty
-#line 362 "d2_parser.yy"
+#line 370 "d2_parser.yy"
{
+ ctx.unique("forward-ddns", ctx.loc2pos(yystack_[0].location));
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("forward-ddns", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.FORWARD_DDNS);
}
-#line 1118 "d2_parser.cc"
+#line 1127 "d2_parser.cc"
break;
case 78: // forward_ddns: "forward-ddns" $@20 ":" "{" ddns_mgr_params "}"
-#line 367 "d2_parser.yy"
+#line 376 "d2_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1127 "d2_parser.cc"
+#line 1136 "d2_parser.cc"
break;
case 79: // $@21: %empty
-#line 372 "d2_parser.yy"
+#line 381 "d2_parser.yy"
{
+ ctx.unique("reverse-ddns", ctx.loc2pos(yystack_[0].location));
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("reverse-ddns", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.REVERSE_DDNS);
}
-#line 1138 "d2_parser.cc"
+#line 1148 "d2_parser.cc"
break;
case 80: // reverse_ddns: "reverse-ddns" $@21 ":" "{" ddns_mgr_params "}"
-#line 377 "d2_parser.yy"
+#line 387 "d2_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1147 "d2_parser.cc"
+#line 1157 "d2_parser.cc"
break;
case 87: // $@22: %empty
-#line 396 "d2_parser.yy"
+#line 406 "d2_parser.yy"
{
+ ctx.unique("ddns-domains", ctx.loc2pos(yystack_[0].location));
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("ddns-domains", l);
ctx.stack_.push_back(l);
ctx.enter(ctx.DDNS_DOMAINS);
}
-#line 1158 "d2_parser.cc"
+#line 1169 "d2_parser.cc"
break;
case 88: // ddns_domains: "ddns-domains" $@22 ":" "[" ddns_domain_list "]"
-#line 401 "d2_parser.yy"
+#line 412 "d2_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1167 "d2_parser.cc"
+#line 1178 "d2_parser.cc"
break;
case 89: // $@23: %empty
-#line 406 "d2_parser.yy"
+#line 417 "d2_parser.yy"
{
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(l);
}
-#line 1176 "d2_parser.cc"
+#line 1187 "d2_parser.cc"
break;
case 90: // sub_ddns_domains: "[" $@23 ddns_domain_list "]"
-#line 409 "d2_parser.yy"
+#line 420 "d2_parser.yy"
{
// parsing completed
}
-#line 1184 "d2_parser.cc"
+#line 1195 "d2_parser.cc"
break;
case 95: // $@24: %empty
-#line 421 "d2_parser.yy"
+#line 432 "d2_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
}
-#line 1194 "d2_parser.cc"
+#line 1205 "d2_parser.cc"
break;
case 96: // ddns_domain: "{" $@24 ddns_domain_params "}"
-#line 425 "d2_parser.yy"
+#line 436 "d2_parser.yy"
{
ctx.stack_.pop_back();
}
-#line 1202 "d2_parser.cc"
+#line 1213 "d2_parser.cc"
break;
case 97: // $@25: %empty
-#line 429 "d2_parser.yy"
+#line 440 "d2_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(m);
}
-#line 1211 "d2_parser.cc"
+#line 1222 "d2_parser.cc"
break;
case 98: // sub_ddns_domain: "{" $@25 ddns_domain_params "}"
-#line 432 "d2_parser.yy"
+#line 443 "d2_parser.yy"
{
// parsing completed
}
-#line 1219 "d2_parser.cc"
+#line 1230 "d2_parser.cc"
break;
case 107: // $@26: %empty
-#line 449 "d2_parser.yy"
+#line 460 "d2_parser.yy"
{
+ ctx.unique("name", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORD);
}
-#line 1227 "d2_parser.cc"
+#line 1239 "d2_parser.cc"
break;
case 108: // ddns_domain_name: "name" $@26 ":" "constant string"
-#line 451 "d2_parser.yy"
+#line 463 "d2_parser.yy"
{
if (yystack_[0].value.as < std::string > () == "") {
error(yystack_[1].location, "Ddns domain name cannot be blank");
ctx.stack_.back()->set("name", name);
ctx.leave();
}
-#line 1241 "d2_parser.cc"
+#line 1253 "d2_parser.cc"
break;
case 109: // $@27: %empty
-#line 461 "d2_parser.yy"
+#line 473 "d2_parser.yy"
{
+ ctx.unique("key-name", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORD);
}
-#line 1249 "d2_parser.cc"
+#line 1262 "d2_parser.cc"
break;
case 110: // ddns_domain_key_name: "key-name" $@27 ":" "constant string"
-#line 463 "d2_parser.yy"
+#line 476 "d2_parser.yy"
{
ElementPtr elem(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("key-name", name);
ctx.leave();
}
-#line 1260 "d2_parser.cc"
+#line 1273 "d2_parser.cc"
break;
case 111: // $@28: %empty
-#line 473 "d2_parser.yy"
+#line 486 "d2_parser.yy"
{
+ ctx.unique("dns-servers", ctx.loc2pos(yystack_[0].location));
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("dns-servers", l);
ctx.stack_.push_back(l);
ctx.enter(ctx.DNS_SERVERS);
}
-#line 1271 "d2_parser.cc"
+#line 1285 "d2_parser.cc"
break;
case 112: // dns_servers: "dns-servers" $@28 ":" "[" dns_server_list "]"
-#line 478 "d2_parser.yy"
+#line 492 "d2_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1280 "d2_parser.cc"
+#line 1294 "d2_parser.cc"
break;
case 113: // $@29: %empty
-#line 483 "d2_parser.yy"
+#line 497 "d2_parser.yy"
{
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(l);
}
-#line 1289 "d2_parser.cc"
+#line 1303 "d2_parser.cc"
break;
case 114: // sub_dns_servers: "[" $@29 dns_server_list "]"
-#line 486 "d2_parser.yy"
+#line 500 "d2_parser.yy"
{
// parsing completed
}
-#line 1297 "d2_parser.cc"
+#line 1311 "d2_parser.cc"
break;
case 117: // $@30: %empty
-#line 494 "d2_parser.yy"
+#line 508 "d2_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
}
-#line 1307 "d2_parser.cc"
+#line 1321 "d2_parser.cc"
break;
case 118: // dns_server: "{" $@30 dns_server_params "}"
-#line 498 "d2_parser.yy"
+#line 512 "d2_parser.yy"
{
ctx.stack_.pop_back();
}
-#line 1315 "d2_parser.cc"
+#line 1329 "d2_parser.cc"
break;
case 119: // $@31: %empty
-#line 502 "d2_parser.yy"
+#line 516 "d2_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(m);
}
-#line 1324 "d2_parser.cc"
+#line 1338 "d2_parser.cc"
break;
case 120: // sub_dns_server: "{" $@31 dns_server_params "}"
-#line 505 "d2_parser.yy"
+#line 519 "d2_parser.yy"
{
// parsing completed
}
-#line 1332 "d2_parser.cc"
+#line 1346 "d2_parser.cc"
break;
case 129: // $@32: %empty
-#line 521 "d2_parser.yy"
+#line 535 "d2_parser.yy"
{
+ ctx.unique("hostname", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORD);
}
-#line 1340 "d2_parser.cc"
+#line 1355 "d2_parser.cc"
break;
case 130: // dns_server_hostname: "hostname" $@32 ":" "constant string"
-#line 523 "d2_parser.yy"
+#line 538 "d2_parser.yy"
{
if (yystack_[0].value.as < std::string > () != "") {
error(yystack_[1].location, "hostname is not yet supported");
ctx.stack_.back()->set("hostname", name);
ctx.leave();
}
-#line 1354 "d2_parser.cc"
+#line 1369 "d2_parser.cc"
break;
case 131: // $@33: %empty
-#line 533 "d2_parser.yy"
+#line 548 "d2_parser.yy"
{
+ ctx.unique("ip-address", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORD);
}
-#line 1362 "d2_parser.cc"
+#line 1378 "d2_parser.cc"
break;
case 132: // dns_server_ip_address: "ip-address" $@33 ":" "constant string"
-#line 535 "d2_parser.yy"
+#line 551 "d2_parser.yy"
{
ElementPtr s(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("ip-address", s);
ctx.leave();
}
-#line 1372 "d2_parser.cc"
+#line 1388 "d2_parser.cc"
break;
case 133: // dns_server_port: "port" ":" "integer"
-#line 541 "d2_parser.yy"
+#line 557 "d2_parser.yy"
{
+ ctx.unique("port", ctx.loc2pos(yystack_[2].location));
if (yystack_[0].value.as < int64_t > () <= 0 || yystack_[0].value.as < int64_t > () >= 65536 ) {
error(yystack_[0].location, "port must be greater than zero but less than 65536");
}
ElementPtr i(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("port", i);
}
-#line 1384 "d2_parser.cc"
+#line 1401 "d2_parser.cc"
break;
case 134: // $@34: %empty
-#line 555 "d2_parser.yy"
+#line 572 "d2_parser.yy"
{
+ ctx.unique("tsig-keys", ctx.loc2pos(yystack_[0].location));
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("tsig-keys", l);
ctx.stack_.push_back(l);
ctx.enter(ctx.TSIG_KEYS);
}
-#line 1395 "d2_parser.cc"
+#line 1413 "d2_parser.cc"
break;
case 135: // tsig_keys: "tsig-keys" $@34 ":" "[" tsig_keys_list "]"
-#line 560 "d2_parser.yy"
+#line 578 "d2_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1404 "d2_parser.cc"
+#line 1422 "d2_parser.cc"
break;
case 136: // $@35: %empty
-#line 565 "d2_parser.yy"
+#line 583 "d2_parser.yy"
{
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(l);
}
-#line 1413 "d2_parser.cc"
+#line 1431 "d2_parser.cc"
break;
case 137: // sub_tsig_keys: "[" $@35 tsig_keys_list "]"
-#line 568 "d2_parser.yy"
+#line 586 "d2_parser.yy"
{
// parsing completed
}
-#line 1421 "d2_parser.cc"
+#line 1439 "d2_parser.cc"
break;
case 142: // $@36: %empty
-#line 580 "d2_parser.yy"
+#line 598 "d2_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
}
-#line 1431 "d2_parser.cc"
+#line 1449 "d2_parser.cc"
break;
case 143: // tsig_key: "{" $@36 tsig_key_params "}"
-#line 584 "d2_parser.yy"
+#line 602 "d2_parser.yy"
{
ctx.stack_.pop_back();
}
-#line 1439 "d2_parser.cc"
+#line 1457 "d2_parser.cc"
break;
case 144: // $@37: %empty
-#line 588 "d2_parser.yy"
+#line 606 "d2_parser.yy"
{
// Parse tsig key list entry map
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(m);
}
-#line 1449 "d2_parser.cc"
+#line 1467 "d2_parser.cc"
break;
case 145: // sub_tsig_key: "{" $@37 tsig_key_params "}"
-#line 592 "d2_parser.yy"
+#line 610 "d2_parser.yy"
{
// parsing completed
}
-#line 1457 "d2_parser.cc"
+#line 1475 "d2_parser.cc"
break;
case 155: // $@38: %empty
-#line 610 "d2_parser.yy"
+#line 628 "d2_parser.yy"
{
+ ctx.unique("name", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORD);
}
-#line 1465 "d2_parser.cc"
+#line 1484 "d2_parser.cc"
break;
case 156: // tsig_key_name: "name" $@38 ":" "constant string"
-#line 612 "d2_parser.yy"
+#line 631 "d2_parser.yy"
{
if (yystack_[0].value.as < std::string > () == "") {
error(yystack_[1].location, "TSIG key name cannot be blank");
ctx.stack_.back()->set("name", name);
ctx.leave();
}
-#line 1479 "d2_parser.cc"
+#line 1498 "d2_parser.cc"
break;
case 157: // $@39: %empty
-#line 622 "d2_parser.yy"
+#line 641 "d2_parser.yy"
{
+ ctx.unique("algorithm", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORD);
}
-#line 1487 "d2_parser.cc"
+#line 1507 "d2_parser.cc"
break;
case 158: // tsig_key_algorithm: "algorithm" $@39 ":" "constant string"
-#line 624 "d2_parser.yy"
+#line 644 "d2_parser.yy"
{
if (yystack_[0].value.as < std::string > () == "") {
error(yystack_[1].location, "TSIG key algorithm cannot be blank");
ctx.stack_.back()->set("algorithm", elem);
ctx.leave();
}
-#line 1500 "d2_parser.cc"
+#line 1520 "d2_parser.cc"
break;
case 159: // tsig_key_digest_bits: "digest-bits" ":" "integer"
-#line 633 "d2_parser.yy"
+#line 653 "d2_parser.yy"
{
+ ctx.unique("digest-bits", ctx.loc2pos(yystack_[2].location));
if (yystack_[0].value.as < int64_t > () < 0 || (yystack_[0].value.as < int64_t > () > 0 && (yystack_[0].value.as < int64_t > () % 8 != 0))) {
error(yystack_[0].location, "TSIG key digest-bits must either be zero or a positive, multiple of eight");
}
ElementPtr elem(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("digest-bits", elem);
}
-#line 1512 "d2_parser.cc"
+#line 1533 "d2_parser.cc"
break;
case 160: // $@40: %empty
-#line 641 "d2_parser.yy"
+#line 662 "d2_parser.yy"
{
+ ctx.unique("secret", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORD);
}
-#line 1520 "d2_parser.cc"
+#line 1542 "d2_parser.cc"
break;
case 161: // tsig_key_secret: "secret" $@40 ":" "constant string"
-#line 643 "d2_parser.yy"
+#line 665 "d2_parser.yy"
{
if (yystack_[0].value.as < std::string > () == "") {
error(yystack_[1].location, "TSIG key secret cannot be blank");
ctx.stack_.back()->set("secret", elem);
ctx.leave();
}
-#line 1533 "d2_parser.cc"
+#line 1555 "d2_parser.cc"
break;
case 162: // $@41: %empty
-#line 657 "d2_parser.yy"
+#line 679 "d2_parser.yy"
{
+ ctx.unique("control-socket", ctx.loc2pos(yystack_[0].location));
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("control-socket", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.CONTROL_SOCKET);
}
-#line 1544 "d2_parser.cc"
+#line 1567 "d2_parser.cc"
break;
case 163: // control_socket: "control-socket" $@41 ":" "{" control_socket_params "}"
-#line 662 "d2_parser.yy"
+#line 685 "d2_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1553 "d2_parser.cc"
+#line 1576 "d2_parser.cc"
break;
case 171: // $@42: %empty
-#line 678 "d2_parser.yy"
+#line 701 "d2_parser.yy"
{
+ ctx.unique("socket-type", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORD);
}
-#line 1561 "d2_parser.cc"
+#line 1585 "d2_parser.cc"
break;
case 172: // control_socket_type: "socket-type" $@42 ":" "constant string"
-#line 680 "d2_parser.yy"
+#line 704 "d2_parser.yy"
{
ElementPtr stype(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("socket-type", stype);
ctx.leave();
}
-#line 1571 "d2_parser.cc"
+#line 1595 "d2_parser.cc"
break;
case 173: // $@43: %empty
-#line 686 "d2_parser.yy"
+#line 710 "d2_parser.yy"
{
+ ctx.unique("socket-name", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORD);
}
-#line 1579 "d2_parser.cc"
+#line 1604 "d2_parser.cc"
break;
case 174: // control_socket_name: "socket-name" $@43 ":" "constant string"
-#line 688 "d2_parser.yy"
+#line 713 "d2_parser.yy"
{
ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("socket-name", name);
ctx.leave();
}
-#line 1589 "d2_parser.cc"
+#line 1614 "d2_parser.cc"
break;
case 175: // $@44: %empty
-#line 696 "d2_parser.yy"
+#line 721 "d2_parser.yy"
{
+ ctx.unique("loggers", ctx.loc2pos(yystack_[0].location));
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("loggers", l);
ctx.stack_.push_back(l);
ctx.enter(ctx.LOGGERS);
}
-#line 1600 "d2_parser.cc"
+#line 1626 "d2_parser.cc"
break;
case 176: // loggers: "loggers" $@44 ":" "[" loggers_entries "]"
-#line 701 "d2_parser.yy"
+#line 727 "d2_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1609 "d2_parser.cc"
+#line 1635 "d2_parser.cc"
break;
case 179: // $@45: %empty
-#line 713 "d2_parser.yy"
+#line 739 "d2_parser.yy"
{
ElementPtr l(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(l);
ctx.stack_.push_back(l);
}
-#line 1619 "d2_parser.cc"
+#line 1645 "d2_parser.cc"
break;
case 180: // logger_entry: "{" $@45 logger_params "}"
-#line 717 "d2_parser.yy"
+#line 743 "d2_parser.yy"
{
ctx.stack_.pop_back();
}
-#line 1627 "d2_parser.cc"
+#line 1653 "d2_parser.cc"
break;
case 190: // $@46: %empty
-#line 734 "d2_parser.yy"
+#line 760 "d2_parser.yy"
{
+ ctx.unique("name", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORD);
}
-#line 1635 "d2_parser.cc"
+#line 1662 "d2_parser.cc"
break;
case 191: // name: "name" $@46 ":" "constant string"
-#line 736 "d2_parser.yy"
+#line 763 "d2_parser.yy"
{
ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("name", name);
ctx.leave();
}
-#line 1645 "d2_parser.cc"
+#line 1672 "d2_parser.cc"
break;
case 192: // debuglevel: "debuglevel" ":" "integer"
-#line 742 "d2_parser.yy"
+#line 769 "d2_parser.yy"
{
+ ctx.unique("debuglevel", ctx.loc2pos(yystack_[2].location));
ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("debuglevel", dl);
}
-#line 1654 "d2_parser.cc"
+#line 1682 "d2_parser.cc"
break;
case 193: // $@47: %empty
-#line 746 "d2_parser.yy"
+#line 775 "d2_parser.yy"
{
+ ctx.unique("severity", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORD);
}
-#line 1662 "d2_parser.cc"
+#line 1691 "d2_parser.cc"
break;
case 194: // severity: "severity" $@47 ":" "constant string"
-#line 748 "d2_parser.yy"
+#line 778 "d2_parser.yy"
{
ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("severity", sev);
ctx.leave();
}
-#line 1672 "d2_parser.cc"
+#line 1701 "d2_parser.cc"
break;
case 195: // $@48: %empty
-#line 754 "d2_parser.yy"
+#line 784 "d2_parser.yy"
{
+ ctx.unique("output_options", ctx.loc2pos(yystack_[0].location));
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("output_options", l);
ctx.stack_.push_back(l);
ctx.enter(ctx.OUTPUT_OPTIONS);
}
-#line 1683 "d2_parser.cc"
+#line 1713 "d2_parser.cc"
break;
case 196: // output_options_list: "output_options" $@48 ":" "[" output_options_list_content "]"
-#line 759 "d2_parser.yy"
+#line 790 "d2_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1692 "d2_parser.cc"
+#line 1722 "d2_parser.cc"
break;
case 199: // $@49: %empty
-#line 768 "d2_parser.yy"
+#line 799 "d2_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
}
-#line 1702 "d2_parser.cc"
+#line 1732 "d2_parser.cc"
break;
case 200: // output_entry: "{" $@49 output_params_list "}"
-#line 772 "d2_parser.yy"
+#line 803 "d2_parser.yy"
{
ctx.stack_.pop_back();
}
-#line 1710 "d2_parser.cc"
+#line 1740 "d2_parser.cc"
break;
case 208: // $@50: %empty
-#line 787 "d2_parser.yy"
+#line 818 "d2_parser.yy"
{
+ ctx.unique("output", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORD);
}
-#line 1718 "d2_parser.cc"
+#line 1749 "d2_parser.cc"
break;
case 209: // output: "output" $@50 ":" "constant string"
-#line 789 "d2_parser.yy"
+#line 821 "d2_parser.yy"
{
ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("output", sev);
ctx.leave();
}
-#line 1728 "d2_parser.cc"
+#line 1759 "d2_parser.cc"
break;
case 210: // flush: "flush" ":" "boolean"
-#line 795 "d2_parser.yy"
+#line 827 "d2_parser.yy"
{
+ ctx.unique("flush", ctx.loc2pos(yystack_[2].location));
ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("flush", flush);
}
-#line 1737 "d2_parser.cc"
+#line 1769 "d2_parser.cc"
break;
case 211: // maxsize: "maxsize" ":" "integer"
-#line 800 "d2_parser.yy"
+#line 833 "d2_parser.yy"
{
+ ctx.unique("maxsize", ctx.loc2pos(yystack_[2].location));
ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("maxsize", maxsize);
}
-#line 1746 "d2_parser.cc"
+#line 1779 "d2_parser.cc"
break;
case 212: // maxver: "maxver" ":" "integer"
-#line 805 "d2_parser.yy"
+#line 839 "d2_parser.yy"
{
+ ctx.unique("maxver", ctx.loc2pos(yystack_[2].location));
ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("maxver", maxver);
}
-#line 1755 "d2_parser.cc"
+#line 1789 "d2_parser.cc"
break;
case 213: // $@51: %empty
-#line 810 "d2_parser.yy"
+#line 845 "d2_parser.yy"
{
+ ctx.unique("pattern", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORD);
}
-#line 1763 "d2_parser.cc"
+#line 1798 "d2_parser.cc"
break;
case 214: // pattern: "pattern" $@51 ":" "constant string"
-#line 812 "d2_parser.yy"
+#line 848 "d2_parser.yy"
{
ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("pattern", sev);
ctx.leave();
}
-#line 1773 "d2_parser.cc"
+#line 1808 "d2_parser.cc"
break;
-#line 1777 "d2_parser.cc"
+#line 1812 "d2_parser.cc"
default:
break;
0, 120, 120, 120, 121, 121, 122, 122, 123, 123,
124, 124, 125, 125, 126, 126, 127, 127, 128, 128,
136, 137, 138, 139, 140, 141, 142, 145, 150, 150,
- 161, 164, 165, 168, 172, 179, 179, 186, 187, 190,
- 194, 205, 214, 214, 227, 227, 237, 237, 245, 246,
- 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
- 260, 261, 262, 265, 265, 273, 281, 290, 290, 298,
- 299, 302, 302, 310, 310, 335, 335, 362, 362, 372,
- 372, 382, 383, 386, 387, 390, 391, 396, 396, 406,
- 406, 413, 414, 417, 418, 421, 421, 429, 429, 436,
- 437, 440, 441, 442, 443, 444, 445, 449, 449, 461,
- 461, 473, 473, 483, 483, 490, 491, 494, 494, 502,
- 502, 509, 510, 513, 514, 515, 516, 517, 518, 521,
- 521, 533, 533, 541, 555, 555, 565, 565, 572, 573,
- 576, 577, 580, 580, 588, 588, 597, 598, 601, 602,
- 603, 604, 605, 606, 607, 610, 610, 622, 622, 633,
- 641, 641, 657, 657, 667, 668, 671, 672, 673, 674,
- 675, 678, 678, 686, 686, 696, 696, 708, 709, 713,
- 713, 721, 722, 725, 726, 727, 728, 729, 730, 731,
- 734, 734, 742, 746, 746, 754, 754, 764, 765, 768,
- 768, 776, 777, 780, 781, 782, 783, 784, 787, 787,
- 795, 800, 805, 810, 810
+ 161, 164, 165, 168, 173, 181, 181, 188, 189, 192,
+ 196, 207, 216, 216, 229, 229, 240, 240, 248, 249,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 268, 268, 277, 286, 296, 296, 305,
+ 306, 309, 309, 318, 318, 343, 343, 370, 370, 381,
+ 381, 392, 393, 396, 397, 400, 401, 406, 406, 417,
+ 417, 424, 425, 428, 429, 432, 432, 440, 440, 447,
+ 448, 451, 452, 453, 454, 455, 456, 460, 460, 473,
+ 473, 486, 486, 497, 497, 504, 505, 508, 508, 516,
+ 516, 523, 524, 527, 528, 529, 530, 531, 532, 535,
+ 535, 548, 548, 557, 572, 572, 583, 583, 590, 591,
+ 594, 595, 598, 598, 606, 606, 615, 616, 619, 620,
+ 621, 622, 623, 624, 625, 628, 628, 641, 641, 653,
+ 662, 662, 679, 679, 690, 691, 694, 695, 696, 697,
+ 698, 701, 701, 710, 710, 721, 721, 734, 735, 739,
+ 739, 747, 748, 751, 752, 753, 754, 755, 756, 757,
+ 760, 760, 769, 775, 775, 784, 784, 795, 796, 799,
+ 799, 807, 808, 811, 812, 813, 814, 815, 818, 818,
+ 827, 833, 839, 845, 845
};
void
#line 14 "d2_parser.yy"
} } // isc::d2
-#line 2523 "d2_parser.cc"
+#line 2558 "d2_parser.cc"
-#line 818 "d2_parser.yy"
+#line 854 "d2_parser.yy"
void
#line 180 "netconf_parser.yy"
{
// map containing a single entry
+ ctx.unique(yystack_[2].value.as < std::string > (), ctx.loc2pos(yystack_[2].location));
ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ());
}
-#line 812 "netconf_parser.cc"
+#line 813 "netconf_parser.cc"
break;
case 24: // not_empty_map: not_empty_map "," "constant string" ":" value
-#line 184 "netconf_parser.yy"
+#line 185 "netconf_parser.yy"
{
// map consisting of a shorter map followed by
// comma and string:value
+ ctx.unique(yystack_[2].value.as < std::string > (), ctx.loc2pos(yystack_[2].location));
ctx.stack_.back()->set(yystack_[2].value.as < std::string > (), yystack_[0].value.as < ElementPtr > ());
}
-#line 822 "netconf_parser.cc"
+#line 824 "netconf_parser.cc"
break;
case 25: // $@6: %empty
-#line 191 "netconf_parser.yy"
+#line 193 "netconf_parser.yy"
{
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(l);
}
-#line 831 "netconf_parser.cc"
+#line 833 "netconf_parser.cc"
break;
case 26: // list_generic: "[" $@6 list_content "]"
-#line 194 "netconf_parser.yy"
+#line 196 "netconf_parser.yy"
{
}
-#line 838 "netconf_parser.cc"
+#line 840 "netconf_parser.cc"
break;
case 29: // not_empty_list: value
-#line 201 "netconf_parser.yy"
+#line 203 "netconf_parser.yy"
{
// List consisting of a single element.
ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ());
}
-#line 847 "netconf_parser.cc"
+#line 849 "netconf_parser.cc"
break;
case 30: // not_empty_list: not_empty_list "," value
-#line 205 "netconf_parser.yy"
+#line 207 "netconf_parser.yy"
{
// List ending with , and a value.
ctx.stack_.back()->add(yystack_[0].value.as < ElementPtr > ());
}
-#line 856 "netconf_parser.cc"
+#line 858 "netconf_parser.cc"
break;
case 31: // unknown_map_entry: "constant string" ":"
-#line 218 "netconf_parser.yy"
+#line 220 "netconf_parser.yy"
{
const std::string& where = ctx.contextName();
const std::string& keyword = yystack_[1].value.as < std::string > ();
error(yystack_[1].location,
"got unexpected keyword \"" + keyword + "\" in " + where + " map.");
}
-#line 867 "netconf_parser.cc"
+#line 869 "netconf_parser.cc"
break;
case 32: // $@7: %empty
-#line 226 "netconf_parser.yy"
+#line 228 "netconf_parser.yy"
{
// This code is executed when we're about to start parsing
// the content of the map
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.push_back(m);
}
-#line 878 "netconf_parser.cc"
+#line 880 "netconf_parser.cc"
break;
case 33: // netconf_syntax_map: "{" $@7 global_object "}"
-#line 231 "netconf_parser.yy"
+#line 233 "netconf_parser.yy"
{
// map parsing completed. If we ever want to do any wrap up
// (maybe some sanity checking), this would be the best place
// for it.
}
-#line 888 "netconf_parser.cc"
+#line 890 "netconf_parser.cc"
break;
case 34: // $@8: %empty
-#line 238 "netconf_parser.yy"
+#line 240 "netconf_parser.yy"
{
// Let's create a MapElement that will represent it, add it to the
ctx.stack_.push_back(m);
ctx.enter(ctx.NETCONF);
}
-#line 907 "netconf_parser.cc"
+#line 909 "netconf_parser.cc"
break;
case 35: // global_object: "Netconf" $@8 ":" "{" global_params "}"
-#line 251 "netconf_parser.yy"
+#line 253 "netconf_parser.yy"
{
// Ok, we're done with parsing Netconf. Let's take the map
// off the stack.
ctx.stack_.pop_back();
ctx.leave();
}
-#line 918 "netconf_parser.cc"
+#line 920 "netconf_parser.cc"
break;
case 49: // boot_update: "boot-update" ":" "boolean"
-#line 279 "netconf_parser.yy"
+#line 281 "netconf_parser.yy"
{
+ ctx.unique("boot-update", ctx.loc2pos(yystack_[2].location));
ElementPtr flag(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("boot-update", flag);
}
-#line 927 "netconf_parser.cc"
+#line 930 "netconf_parser.cc"
break;
case 50: // subscribe_changes: "subscribe-changes" ":" "boolean"
-#line 284 "netconf_parser.yy"
+#line 287 "netconf_parser.yy"
{
+ ctx.unique("subscribe-changes", ctx.loc2pos(yystack_[2].location));
ElementPtr flag(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("subscribe-changes", flag);
}
-#line 936 "netconf_parser.cc"
+#line 940 "netconf_parser.cc"
break;
case 51: // validate_changes: "validate-changes" ":" "boolean"
-#line 289 "netconf_parser.yy"
+#line 293 "netconf_parser.yy"
{
+ ctx.unique("validate-changes", ctx.loc2pos(yystack_[2].location));
ElementPtr flag(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("validate-changes", flag);
}
-#line 945 "netconf_parser.cc"
+#line 950 "netconf_parser.cc"
break;
case 52: // $@9: %empty
-#line 294 "netconf_parser.yy"
+#line 299 "netconf_parser.yy"
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 953 "netconf_parser.cc"
+#line 958 "netconf_parser.cc"
break;
case 53: // user_context: "user-context" $@9 ":" map_value
-#line 296 "netconf_parser.yy"
+#line 301 "netconf_parser.yy"
{
ElementPtr parent = ctx.stack_.back();
ElementPtr user_context = yystack_[0].value.as < ElementPtr > ();
parent->set("user-context", user_context);
ctx.leave();
}
-#line 980 "netconf_parser.cc"
+#line 985 "netconf_parser.cc"
break;
case 54: // $@10: %empty
-#line 319 "netconf_parser.yy"
+#line 324 "netconf_parser.yy"
{
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 988 "netconf_parser.cc"
+#line 993 "netconf_parser.cc"
break;
case 55: // comment: "comment" $@10 ":" "constant string"
-#line 321 "netconf_parser.yy"
+#line 326 "netconf_parser.yy"
{
ElementPtr parent = ctx.stack_.back();
ElementPtr user_context(new MapElement(ctx.loc2pos(yystack_[3].location)));
parent->set("user-context", user_context);
ctx.leave();
}
-#line 1017 "netconf_parser.cc"
+#line 1022 "netconf_parser.cc"
break;
case 56: // $@11: %empty
-#line 347 "netconf_parser.yy"
+#line 352 "netconf_parser.yy"
{
+ ctx.unique("hooks-libraries", ctx.loc2pos(yystack_[0].location));
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("hooks-libraries", l);
ctx.stack_.push_back(l);
ctx.enter(ctx.HOOKS_LIBRARIES);
}
-#line 1028 "netconf_parser.cc"
+#line 1034 "netconf_parser.cc"
break;
case 57: // hooks_libraries: "hooks-libraries" $@11 ":" "[" hooks_libraries_list "]"
-#line 352 "netconf_parser.yy"
+#line 358 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1037 "netconf_parser.cc"
+#line 1043 "netconf_parser.cc"
break;
case 62: // $@12: %empty
-#line 365 "netconf_parser.yy"
+#line 371 "netconf_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
}
-#line 1047 "netconf_parser.cc"
+#line 1053 "netconf_parser.cc"
break;
case 63: // hooks_library: "{" $@12 hooks_params "}"
-#line 369 "netconf_parser.yy"
+#line 375 "netconf_parser.yy"
{
ctx.stack_.pop_back();
}
-#line 1055 "netconf_parser.cc"
+#line 1061 "netconf_parser.cc"
break;
case 69: // $@13: %empty
-#line 382 "netconf_parser.yy"
+#line 388 "netconf_parser.yy"
{
+ ctx.unique("library", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1063 "netconf_parser.cc"
+#line 1070 "netconf_parser.cc"
break;
case 70: // library: "library" $@13 ":" "constant string"
-#line 384 "netconf_parser.yy"
+#line 391 "netconf_parser.yy"
{
ElementPtr lib(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("library", lib);
ctx.leave();
}
-#line 1073 "netconf_parser.cc"
+#line 1080 "netconf_parser.cc"
break;
case 71: // $@14: %empty
-#line 390 "netconf_parser.yy"
+#line 397 "netconf_parser.yy"
{
+ ctx.unique("parameters", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1081 "netconf_parser.cc"
+#line 1089 "netconf_parser.cc"
break;
case 72: // parameters: "parameters" $@14 ":" map_value
-#line 392 "netconf_parser.yy"
+#line 400 "netconf_parser.yy"
{
ctx.stack_.back()->set("parameters", yystack_[0].value.as < ElementPtr > ());
ctx.leave();
}
-#line 1090 "netconf_parser.cc"
+#line 1098 "netconf_parser.cc"
break;
case 73: // $@15: %empty
-#line 400 "netconf_parser.yy"
+#line 408 "netconf_parser.yy"
{
+ ctx.unique("managed-servers", ctx.loc2pos(yystack_[2].location));
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[2].location)));
ctx.stack_.back()->set("managed-servers", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.MANAGED_SERVERS);
}
-#line 1101 "netconf_parser.cc"
+#line 1110 "netconf_parser.cc"
break;
case 74: // managed_servers: "managed-servers" ":" "{" $@15 servers_entries "}"
-#line 405 "netconf_parser.yy"
+#line 414 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1110 "netconf_parser.cc"
+#line 1119 "netconf_parser.cc"
break;
case 84: // $@16: %empty
-#line 429 "netconf_parser.yy"
+#line 438 "netconf_parser.yy"
{
+ ctx.unique("dhcp4", ctx.loc2pos(yystack_[0].location));
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("dhcp4", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.SERVER);
}
-#line 1121 "netconf_parser.cc"
+#line 1131 "netconf_parser.cc"
break;
case 85: // dhcp4_server: "dhcp4" $@16 ":" "{" managed_server_params "}"
-#line 434 "netconf_parser.yy"
+#line 444 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1130 "netconf_parser.cc"
+#line 1140 "netconf_parser.cc"
break;
case 86: // $@17: %empty
-#line 440 "netconf_parser.yy"
+#line 450 "netconf_parser.yy"
{
+ ctx.unique("dhcp6", ctx.loc2pos(yystack_[0].location));
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("dhcp6", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.SERVER);
}
-#line 1141 "netconf_parser.cc"
+#line 1152 "netconf_parser.cc"
break;
case 87: // dhcp6_server: "dhcp6" $@17 ":" "{" managed_server_params "}"
-#line 445 "netconf_parser.yy"
+#line 456 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1150 "netconf_parser.cc"
+#line 1161 "netconf_parser.cc"
break;
case 88: // $@18: %empty
-#line 451 "netconf_parser.yy"
+#line 462 "netconf_parser.yy"
{
+ ctx.unique("d2", ctx.loc2pos(yystack_[0].location));
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("d2", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.SERVER);
}
-#line 1161 "netconf_parser.cc"
+#line 1173 "netconf_parser.cc"
break;
case 89: // d2_server: "d2" $@18 ":" "{" managed_server_params "}"
-#line 456 "netconf_parser.yy"
+#line 468 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1170 "netconf_parser.cc"
+#line 1182 "netconf_parser.cc"
break;
case 90: // $@19: %empty
-#line 462 "netconf_parser.yy"
+#line 474 "netconf_parser.yy"
{
+ ctx.unique("ca", ctx.loc2pos(yystack_[0].location));
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("ca", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.SERVER);
}
-#line 1181 "netconf_parser.cc"
+#line 1194 "netconf_parser.cc"
break;
case 91: // ca_server: "ca" $@19 ":" "{" managed_server_params "}"
-#line 467 "netconf_parser.yy"
+#line 480 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1190 "netconf_parser.cc"
+#line 1203 "netconf_parser.cc"
break;
case 102: // $@20: %empty
-#line 489 "netconf_parser.yy"
+#line 502 "netconf_parser.yy"
{
+ ctx.unique("model", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1198 "netconf_parser.cc"
+#line 1212 "netconf_parser.cc"
break;
case 103: // model: "model" $@20 ":" "constant string"
-#line 491 "netconf_parser.yy"
+#line 505 "netconf_parser.yy"
{
ElementPtr model(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("model", model);
ctx.leave();
}
-#line 1208 "netconf_parser.cc"
+#line 1222 "netconf_parser.cc"
break;
case 104: // $@21: %empty
-#line 498 "netconf_parser.yy"
+#line 512 "netconf_parser.yy"
{
+ ctx.unique("control-socket", ctx.loc2pos(yystack_[0].location));
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("control-socket", m);
ctx.stack_.push_back(m);
ctx.enter(ctx.CONTROL_SOCKET);
}
-#line 1219 "netconf_parser.cc"
+#line 1234 "netconf_parser.cc"
break;
case 105: // control_socket: "control-socket" $@21 ":" "{" control_socket_params "}"
-#line 503 "netconf_parser.yy"
+#line 518 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1228 "netconf_parser.cc"
+#line 1243 "netconf_parser.cc"
break;
case 114: // $@22: %empty
-#line 521 "netconf_parser.yy"
+#line 536 "netconf_parser.yy"
{
+ ctx.unique("socket-type", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.SOCKET_TYPE);
}
-#line 1236 "netconf_parser.cc"
+#line 1252 "netconf_parser.cc"
break;
case 115: // socket_type: "socket-type" $@22 ":" socket_type_value
-#line 523 "netconf_parser.yy"
+#line 539 "netconf_parser.yy"
{
ctx.stack_.back()->set("socket-type", yystack_[0].value.as < ElementPtr > ());
ctx.leave();
}
-#line 1245 "netconf_parser.cc"
+#line 1261 "netconf_parser.cc"
break;
case 116: // socket_type_value: "unix"
-#line 529 "netconf_parser.yy"
+#line 545 "netconf_parser.yy"
{ yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("unix", ctx.loc2pos(yystack_[0].location))); }
-#line 1251 "netconf_parser.cc"
+#line 1267 "netconf_parser.cc"
break;
case 117: // socket_type_value: "http"
-#line 530 "netconf_parser.yy"
+#line 546 "netconf_parser.yy"
{ yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("http", ctx.loc2pos(yystack_[0].location))); }
-#line 1257 "netconf_parser.cc"
+#line 1273 "netconf_parser.cc"
break;
case 118: // socket_type_value: "stdout"
-#line 531 "netconf_parser.yy"
+#line 547 "netconf_parser.yy"
{ yylhs.value.as < ElementPtr > () = ElementPtr(new StringElement("stdout", ctx.loc2pos(yystack_[0].location))); }
-#line 1263 "netconf_parser.cc"
+#line 1279 "netconf_parser.cc"
break;
case 119: // $@23: %empty
-#line 534 "netconf_parser.yy"
+#line 550 "netconf_parser.yy"
{
+ ctx.unique("socket-name", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1271 "netconf_parser.cc"
+#line 1288 "netconf_parser.cc"
break;
case 120: // socket_name: "socket-name" $@23 ":" "constant string"
-#line 536 "netconf_parser.yy"
+#line 553 "netconf_parser.yy"
{
ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("socket-name", name);
ctx.leave();
}
-#line 1281 "netconf_parser.cc"
+#line 1298 "netconf_parser.cc"
break;
case 121: // $@24: %empty
-#line 543 "netconf_parser.yy"
+#line 560 "netconf_parser.yy"
{
+ ctx.unique("socket-url", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1289 "netconf_parser.cc"
+#line 1307 "netconf_parser.cc"
break;
case 122: // socket_url: "socket-url" $@24 ":" "constant string"
-#line 545 "netconf_parser.yy"
+#line 563 "netconf_parser.yy"
{
ElementPtr url(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("socket-url", url);
ctx.leave();
}
-#line 1299 "netconf_parser.cc"
+#line 1317 "netconf_parser.cc"
break;
case 123: // $@25: %empty
-#line 555 "netconf_parser.yy"
+#line 573 "netconf_parser.yy"
{
+ ctx.unique("loggers", ctx.loc2pos(yystack_[0].location));
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("loggers", l);
ctx.stack_.push_back(l);
ctx.enter(ctx.LOGGERS);
}
-#line 1310 "netconf_parser.cc"
+#line 1329 "netconf_parser.cc"
break;
case 124: // loggers: "loggers" $@25 ":" "[" loggers_entries "]"
-#line 560 "netconf_parser.yy"
+#line 579 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1319 "netconf_parser.cc"
+#line 1338 "netconf_parser.cc"
break;
case 127: // $@26: %empty
-#line 572 "netconf_parser.yy"
+#line 591 "netconf_parser.yy"
{
ElementPtr l(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(l);
ctx.stack_.push_back(l);
}
-#line 1329 "netconf_parser.cc"
+#line 1348 "netconf_parser.cc"
break;
case 128: // logger_entry: "{" $@26 logger_params "}"
-#line 576 "netconf_parser.yy"
+#line 595 "netconf_parser.yy"
{
ctx.stack_.pop_back();
}
-#line 1337 "netconf_parser.cc"
+#line 1356 "netconf_parser.cc"
break;
case 138: // $@27: %empty
-#line 593 "netconf_parser.yy"
+#line 612 "netconf_parser.yy"
{
+ ctx.unique("name", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1345 "netconf_parser.cc"
+#line 1365 "netconf_parser.cc"
break;
case 139: // name: "name" $@27 ":" "constant string"
-#line 595 "netconf_parser.yy"
+#line 615 "netconf_parser.yy"
{
ElementPtr name(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("name", name);
ctx.leave();
}
-#line 1355 "netconf_parser.cc"
+#line 1375 "netconf_parser.cc"
break;
case 140: // debuglevel: "debuglevel" ":" "integer"
-#line 601 "netconf_parser.yy"
+#line 621 "netconf_parser.yy"
{
+ ctx.unique("debuglevel", ctx.loc2pos(yystack_[2].location));
ElementPtr dl(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("debuglevel", dl);
}
-#line 1364 "netconf_parser.cc"
+#line 1385 "netconf_parser.cc"
break;
case 141: // $@28: %empty
-#line 606 "netconf_parser.yy"
+#line 627 "netconf_parser.yy"
{
+ ctx.unique("severity", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1372 "netconf_parser.cc"
+#line 1394 "netconf_parser.cc"
break;
case 142: // severity: "severity" $@28 ":" "constant string"
-#line 608 "netconf_parser.yy"
+#line 630 "netconf_parser.yy"
{
ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("severity", sev);
ctx.leave();
}
-#line 1382 "netconf_parser.cc"
+#line 1404 "netconf_parser.cc"
break;
case 143: // $@29: %empty
-#line 614 "netconf_parser.yy"
+#line 636 "netconf_parser.yy"
{
+ ctx.unique("output_options", ctx.loc2pos(yystack_[0].location));
ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("output_options", l);
ctx.stack_.push_back(l);
ctx.enter(ctx.OUTPUT_OPTIONS);
}
-#line 1393 "netconf_parser.cc"
+#line 1416 "netconf_parser.cc"
break;
case 144: // output_options_list: "output_options" $@29 ":" "[" output_options_list_content "]"
-#line 619 "netconf_parser.yy"
+#line 642 "netconf_parser.yy"
{
ctx.stack_.pop_back();
ctx.leave();
}
-#line 1402 "netconf_parser.cc"
+#line 1425 "netconf_parser.cc"
break;
case 147: // $@30: %empty
-#line 628 "netconf_parser.yy"
+#line 651 "netconf_parser.yy"
{
ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->add(m);
ctx.stack_.push_back(m);
}
-#line 1412 "netconf_parser.cc"
+#line 1435 "netconf_parser.cc"
break;
case 148: // output_entry: "{" $@30 output_params_list "}"
-#line 632 "netconf_parser.yy"
+#line 655 "netconf_parser.yy"
{
ctx.stack_.pop_back();
}
-#line 1420 "netconf_parser.cc"
+#line 1443 "netconf_parser.cc"
break;
case 156: // $@31: %empty
-#line 647 "netconf_parser.yy"
+#line 670 "netconf_parser.yy"
{
+ ctx.unique("output", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1428 "netconf_parser.cc"
+#line 1452 "netconf_parser.cc"
break;
case 157: // output: "output" $@31 ":" "constant string"
-#line 649 "netconf_parser.yy"
+#line 673 "netconf_parser.yy"
{
ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("output", sev);
ctx.leave();
}
-#line 1438 "netconf_parser.cc"
+#line 1462 "netconf_parser.cc"
break;
case 158: // flush: "flush" ":" "boolean"
-#line 655 "netconf_parser.yy"
+#line 679 "netconf_parser.yy"
{
+ ctx.unique("flush", ctx.loc2pos(yystack_[2].location));
ElementPtr flush(new BoolElement(yystack_[0].value.as < bool > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("flush", flush);
}
-#line 1447 "netconf_parser.cc"
+#line 1472 "netconf_parser.cc"
break;
case 159: // maxsize: "maxsize" ":" "integer"
-#line 660 "netconf_parser.yy"
+#line 685 "netconf_parser.yy"
{
+ ctx.unique("maxsize", ctx.loc2pos(yystack_[2].location));
ElementPtr maxsize(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("maxsize", maxsize);
}
-#line 1456 "netconf_parser.cc"
+#line 1482 "netconf_parser.cc"
break;
case 160: // maxver: "maxver" ":" "integer"
-#line 665 "netconf_parser.yy"
+#line 691 "netconf_parser.yy"
{
+ ctx.unique("maxver", ctx.loc2pos(yystack_[2].location));
ElementPtr maxver(new IntElement(yystack_[0].value.as < int64_t > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("maxver", maxver);
}
-#line 1465 "netconf_parser.cc"
+#line 1492 "netconf_parser.cc"
break;
case 161: // $@32: %empty
-#line 670 "netconf_parser.yy"
+#line 697 "netconf_parser.yy"
{
+ ctx.unique("pattern", ctx.loc2pos(yystack_[0].location));
ctx.enter(ctx.NO_KEYWORDS);
}
-#line 1473 "netconf_parser.cc"
+#line 1501 "netconf_parser.cc"
break;
case 162: // pattern: "pattern" $@32 ":" "constant string"
-#line 672 "netconf_parser.yy"
+#line 700 "netconf_parser.yy"
{
ElementPtr sev(new StringElement(yystack_[0].value.as < std::string > (), ctx.loc2pos(yystack_[0].location)));
ctx.stack_.back()->set("pattern", sev);
ctx.leave();
}
-#line 1483 "netconf_parser.cc"
+#line 1511 "netconf_parser.cc"
break;
-#line 1487 "netconf_parser.cc"
+#line 1515 "netconf_parser.cc"
default:
break;
{
0, 118, 118, 118, 119, 119, 120, 120, 128, 128,
139, 145, 146, 147, 148, 149, 150, 151, 155, 155,
- 166, 171, 172, 180, 184, 191, 191, 197, 198, 201,
- 205, 218, 226, 226, 238, 238, 258, 259, 262, 263,
- 268, 269, 270, 271, 272, 273, 274, 275, 276, 279,
- 284, 289, 294, 294, 319, 319, 347, 347, 357, 358,
- 361, 362, 365, 365, 373, 374, 375, 378, 379, 382,
- 382, 390, 390, 400, 400, 410, 411, 414, 415, 421,
- 422, 423, 424, 425, 429, 429, 440, 440, 451, 451,
- 462, 462, 473, 474, 478, 479, 480, 481, 482, 483,
- 484, 485, 489, 489, 498, 498, 509, 510, 513, 514,
- 515, 516, 517, 518, 521, 521, 529, 530, 531, 534,
- 534, 543, 543, 555, 555, 567, 568, 572, 572, 580,
- 581, 584, 585, 586, 587, 588, 589, 590, 593, 593,
- 601, 606, 606, 614, 614, 624, 625, 628, 628, 636,
- 637, 640, 641, 642, 643, 644, 647, 647, 655, 660,
- 665, 670, 670
+ 166, 171, 172, 180, 185, 193, 193, 199, 200, 203,
+ 207, 220, 228, 228, 240, 240, 260, 261, 264, 265,
+ 270, 271, 272, 273, 274, 275, 276, 277, 278, 281,
+ 287, 293, 299, 299, 324, 324, 352, 352, 363, 364,
+ 367, 368, 371, 371, 379, 380, 381, 384, 385, 388,
+ 388, 397, 397, 408, 408, 419, 420, 423, 424, 430,
+ 431, 432, 433, 434, 438, 438, 450, 450, 462, 462,
+ 474, 474, 486, 487, 491, 492, 493, 494, 495, 496,
+ 497, 498, 502, 502, 512, 512, 524, 525, 528, 529,
+ 530, 531, 532, 533, 536, 536, 545, 546, 547, 550,
+ 550, 560, 560, 573, 573, 586, 587, 591, 591, 599,
+ 600, 603, 604, 605, 606, 607, 608, 609, 612, 612,
+ 621, 627, 627, 636, 636, 647, 648, 651, 651, 659,
+ 660, 663, 664, 665, 666, 667, 670, 670, 679, 685,
+ 691, 697, 697
};
void
#line 14 "netconf_parser.yy"
} } // isc::netconf
-#line 2164 "netconf_parser.cc"
+#line 2192 "netconf_parser.cc"
-#line 678 "netconf_parser.yy"
+#line 706 "netconf_parser.yy"
void