]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5110] D2 TSIG key list now uses bison parsing and SimpleParsers
authorThomas Markwalder <tmark@isc.org>
Wed, 25 Jan 2017 19:22:56 +0000 (14:22 -0500)
committerThomas Markwalder <tmark@isc.org>
Thu, 26 Jan 2017 19:37:31 +0000 (14:37 -0500)
src/bin/d2/d2_cfg_mgr.cc
    D2CfgMgr::parseElement() - now handles tsig-keys

src/bin/d2/d2_config.h
src/bin/d2/d2_config.cc
    TSIGKeyInfoParser and TSIGKeyInfoListParser now
    derive from SimpleParser

src/bin/d2/d2_lexer.ll
    Added algoritm, digest-bits, secret regexps

src/bin/d2/d2_parser.yy
    Added ALGORITHM, DIGEST_BITS, SECRET tokens
    Added rules for "tsig-keys"

src/bin/d2/parser_context.h
src/bin/d2/parser_context.cc
    Added contexts: TSIG_KEYS, ALGORITHM, DIGEST_BITS, SECRET

src/bin/d2/tests/d2_cfg_mgr_unittests.cc
    Revamped TSIG key tests

src/bin/d2/tests/testdata/d2_cfg_tests.json
    changed appropriate logic-errors to syntax-errors

13 files changed:
src/bin/d2/d2_cfg_mgr.cc
src/bin/d2/d2_cfg_mgr.h
src/bin/d2/d2_config.cc
src/bin/d2/d2_config.h
src/bin/d2/d2_lexer.cc
src/bin/d2/d2_lexer.ll
src/bin/d2/d2_parser.cc
src/bin/d2/d2_parser.h
src/bin/d2/d2_parser.yy
src/bin/d2/parser_context.cc
src/bin/d2/parser_context.h
src/bin/d2/tests/d2_cfg_mgr_unittests.cc
src/bin/d2/tests/testdata/d2_cfg_tests.json

index 6b2567cc6f4ff39ebc37d2d2bc6d36d92cffadec..d9d8920dc482655e526f548d6dd337e67824a4be 100644 (file)
@@ -264,11 +264,17 @@ D2CfgMgr::parseElement(const std::string& element_id,
             (element_id == "ncr-format") ||
             (element_id == "port")  ||
             (element_id == "dns-server-timeout"))  {
-            // global scalar params require nothing extra
+            // global scalar params require nothing extra be done
+        } else if (element_id == "tsig-keys") {
+            TSIGKeyInfoListParser parser;
+            getD2CfgContext()->setKeys(parser.parse(element));
         } else {
             // not something we handle here
             return (false);
         }
+    } catch (const D2CfgError& ex) {
+        // Should already have a specific error and postion info
+        throw ex;
     } catch (const std::exception& ex) {
         isc_throw(D2CfgError, "element: " << element_id << " : "  << ex.what()
                               << element->getPosition());
@@ -297,6 +303,7 @@ D2CfgMgr::buildParams(isc::data::ConstElementPtr params_config) {
     dhcp_ddns::NameChangeProtocol ncr_protocol = dhcp_ddns::NCR_UDP;
     dhcp_ddns::NameChangeFormat ncr_format = dhcp_ddns::FMT_JSON;
 
+    // Assumes that params_config has had defaults added
     BOOST_FOREACH(isc::dhcp::ConfigPair param, params_config->mapValue()) {
         std::string entry(param.first);
         isc::data::ConstElementPtr value(param.second);
@@ -358,16 +365,7 @@ D2CfgMgr::createConfigParser(const std::string& config_id,
 
     // Create parser instance based on element_id.
     isc::dhcp::ParserPtr parser;
-    if ((config_id.compare("port") == 0) ||
-        (config_id.compare("dns-server-timeout") == 0)) {
-        parser.reset(new isc::dhcp::Uint32Parser(config_id,
-                                                 context->getUint32Storage()));
-    } else if ((config_id.compare("ip-address") == 0) ||
-        (config_id.compare("ncr-protocol") == 0) ||
-        (config_id.compare("ncr-format") == 0)) {
-        parser.reset(new isc::dhcp::StringParser(config_id,
-                                                 context->getStringStorage()));
-    } else if (config_id ==  "forward-ddns") {
+    if (config_id ==  "forward-ddns") {
         parser.reset(new DdnsDomainListMgrParser("forward-ddns",
                                                  context->getForwardMgr(),
                                                  context->getKeys()));
@@ -375,9 +373,6 @@ D2CfgMgr::createConfigParser(const std::string& config_id,
         parser.reset(new DdnsDomainListMgrParser("reverse-ddns",
                                                  context->getReverseMgr(),
                                                  context->getKeys()));
-    } else if (config_id ==  "tsig-keys") {
-        parser.reset(new TSIGKeyInfoListParser("tsig-key-list",
-                                               context->getKeys()));
     } else {
         isc_throw(NotImplemented,
                   "parser error: D2CfgMgr parameter not supported : "
index 980d8bda69d04be10fcfcb74841902fa1c2c0d86..96f7b3de230c7092d274ec3c91541c1b1d5602b6 100644 (file)
@@ -71,6 +71,13 @@ public:
         return (keys_);
     }
 
+    /// @brief Sets the may of TSIG keys
+    ///
+    /// @param new of TSIG keys
+    void setKeys(const TSIGKeyInfoMapPtr& keys) {
+        keys_ = keys;
+    }
+
 protected:
     /// @brief Copy constructor for use by derivations in clone().
     D2CfgContext(const D2CfgContext& rhs);
index 9ba8de81dd5a956438153f8e61b5745a871e11ba..f223b7a561c60fa03930be0ea393587a65733f5b 100644 (file)
@@ -336,121 +336,106 @@ DdnsDomainListMgr::matchDomain(const std::string& fqdn, DdnsDomainPtr& domain) {
 
 // *********************** TSIGKeyInfoParser  *************************
 
-TSIGKeyInfoParser::TSIGKeyInfoParser(const std::string& entry_name,
-                                     TSIGKeyInfoMapPtr keys)
-    : entry_name_(entry_name), keys_(keys), local_scalars_() {
-    if (!keys_) {
-        isc_throw(D2CfgError, "TSIGKeyInfoParser ctor:"
-                  " key storage cannot be null");
-    }
-}
-
-TSIGKeyInfoParser::~TSIGKeyInfoParser() {
-}
-
-void
-TSIGKeyInfoParser::build(isc::data::ConstElementPtr key_config) {
-    isc::dhcp::ConfigPair config_pair;
-    // For each element in the key configuration:
-    // 1. Create a parser for the element.
-    // 2. Invoke the parser's build method passing in the element's
-    // configuration.
-    // 3. Invoke the parser's commit method to store the element's parsed
-    // data to the parser's local storage.
-    BOOST_FOREACH (config_pair, key_config->mapValue()) {
-        isc::dhcp::ParserPtr parser(createConfigParser(config_pair.first,
-                                                       config_pair.second->
-                                                       getPosition()));
-        parser->build(config_pair.second);
-        parser->commit();
-    }
-
+TSIGKeyInfoPtr
+TSIGKeyInfoParser::parse(isc::data::ConstElementPtr key_config) {
     std::string name;
     std::string algorithm;
     uint32_t digestbits = 0;
     std::string secret;
-    std::map<std::string, isc::data::Element::Position> pos;
 
-    // Fetch the key's parsed scalar values from parser's local storage.
-    // Only digestbits is optional and doesn't throw when missing
-    try {
-        pos["name"] = local_scalars_.getParam("name", name);
-        pos["algorithm"] = local_scalars_.getParam("algorithm", algorithm);
-        pos["digest-bits"] = local_scalars_.getParam("digest-bits", digestbits,
-                                                     DCfgContextBase::OPTIONAL);
-        pos["secret"] = local_scalars_.getParam("secret", secret);
-    } catch (const std::exception& ex) {
-        isc_throw(D2CfgError, "TSIG Key incomplete : " << ex.what()
-                  << " (" << key_config->getPosition() << ")");
+    isc::data::ConstElementPtr name_elem;
+    isc::data::ConstElementPtr algo_elem;
+    isc::data::ConstElementPtr bits_elem;
+    isc::data::ConstElementPtr secret_elem;
+
+    BOOST_FOREACH(isc::dhcp::ConfigPair param, key_config->mapValue()) {
+        std::string entry(param.first);
+        isc::data::ConstElementPtr value(param.second);
+        try {
+            if (entry == "name") {
+                name = value->stringValue();
+                if (name.empty()) {
+                    isc_throw(D2CfgError, "tsig-key: name cannot be blank"
+                              << " (" << value->getPosition() << ")");
+                }
+                name_elem = value;
+            } else if (entry == "algorithm") {
+                algorithm = value->stringValue();
+                // Algorithm must be valid.
+                try {
+                    TSIGKeyInfo::stringToAlgorithmName(algorithm);
+                } catch (const std::exception& ex) {
+                    isc_throw(D2CfgError, "tsig-key : " << ex.what()
+                        << " (" << value->getPosition() << ")");
+                }
+                algo_elem = value;
+            } else if (entry == "digest-bits") {
+                digestbits = value->intValue();
+                bits_elem = value;
+            } else if (entry == "secret") {
+                secret = value->stringValue();
+                // Secret cannot be blank.
+                // Cryptolink lib doesn't offer any way to validate these.
+                // As long as it isn't blank we'll accept it. If the content
+                // is bad, the call to TSIGKeyInfo::remakeKey() made in
+                // the TSIGKeyInfo ctor below will throw.
+                if (secret.empty()) {
+                    isc_throw(D2CfgError, "tsig-key: secret cannot be blank ("
+                              << value->getPosition() << ")");
+                }
+                secret_elem = value;
+            } else {
+                isc_throw(D2CfgError, "tsig-key: unsupported parameter '"
+                          << entry << " (" << value->getPosition() << ")");
+            }
+        } catch (const isc::data::TypeError&) {
+            isc_throw(D2CfgError,
+                      "tsig-key: invalid value type specified for parameter '"
+                      << entry << " (" << value->getPosition() << ")");
+        }
     }
 
-    // Name cannot be blank.
-    if (name.empty()) {
-        isc_throw(D2CfgError, "TSIG key must specify name (" << pos["name"] << ")");
+    if (!name_elem) {
+        isc_throw(D2CfgError, "tsig-key: must specify name"
+                  << " (" << key_config->getPosition() << ")");
     }
 
-    // Currently, the premise is that key storage is always empty prior to
-    // parsing so we are always adding keys never replacing them. Duplicates
-    // are not allowed and should be flagged as a configuration error.
-    if (keys_->find(name) != keys_->end()) {
-        isc_throw(D2CfgError, "Duplicate TSIG key name specified : " << name
-                              << " (" << pos["name"] << ")");
+    if (!algo_elem) {
+        isc_throw(D2CfgError,
+                  "tsig-key: must specify algorithm"
+                  << " (" << key_config->getPosition() << ")");
     }
 
-    // Algorithm must be valid.
-    try {
-        TSIGKeyInfo::stringToAlgorithmName(algorithm);
-    } catch (const std::exception& ex) {
-        isc_throw(D2CfgError, "TSIG key : " << ex.what() << " (" << pos["algorithm"] << ")");
+    if (!secret_elem) {
+        isc_throw(D2CfgError,
+                  "tsig-key: must specify secret"
+                  << " (" << key_config->getPosition() << ")");
     }
 
-    // Not zero Digestbits must be an integral number of octets, greater
-    // than 80 and the half of the full length
+    // Non-zero digest-bits must be an integral number of octets, greater
+    // than 80 and at least half of the algorithm key length.
     if (digestbits > 0) {
-      if ((digestbits % 8) != 0) {
-          isc_throw(D2CfgError, "Invalid TSIG key digest_bits specified : " <<
-                                digestbits << " (" << pos["digest-bits"] << ")");
-      }
-      if (digestbits < 80) {
-          isc_throw(D2CfgError, "TSIG key digest_bits too small : " <<
-                                digestbits << " (" << pos["digest-bits"] << ")");
-      }
-      if (boost::iequals(algorithm, TSIGKeyInfo::HMAC_SHA224_STR)) {
-          if (digestbits < 112) {
-              isc_throw(D2CfgError, "TSIG key digest_bits too small : " <<
-                                    digestbits << " (" << pos["digest-bits"]
-                                    << ")");
-          }
-      } else if (boost::iequals(algorithm, TSIGKeyInfo::HMAC_SHA256_STR)) {
-          if (digestbits < 128) {
-              isc_throw(D2CfgError, "TSIG key digest_bits too small : " <<
-                                    digestbits << " (" << pos["digest-bits"]
-                                    << ")");
-          }
-      } else if (boost::iequals(algorithm, TSIGKeyInfo::HMAC_SHA384_STR)) {
-          if (digestbits < 192) {
-              isc_throw(D2CfgError, "TSIG key digest_bits too small : " <<
-                                    digestbits << " (" << pos["digest-bits"]
-                                    << ")");
-          }
-      } else if (boost::iequals(algorithm, TSIGKeyInfo::HMAC_SHA512_STR)) {
-          if (digestbits < 256) {
-              isc_throw(D2CfgError, "TSIG key digest_bits too small : " <<
-                                    digestbits << " (" << pos["digest-bits"]
-                                    << ")");
-          }
-      }
-    }
-
-    // Secret cannot be blank.
-    // Cryptolink lib doesn't offer any way to validate these. As long as it
-    // isn't blank we'll accept it.  If the content is bad, the call to in
-    // TSIGKeyInfo::remakeKey() made in the TSIGKeyInfo ctor will throw.
-    // We'll deal with that below.
-    if (secret.empty()) {
-        isc_throw(D2CfgError, "TSIG key must specify secret (" << pos["secret"] << ")");
+        if ((digestbits % 8) != 0) {
+            isc_throw(D2CfgError,
+                      "tsig-key: digest bits must be a multiple of 8"
+                       << " (" << bits_elem->getPosition() << ")");
+        }
+
+        if ((digestbits < 80) ||
+            (boost::iequals(algorithm, TSIGKeyInfo::HMAC_SHA224_STR)
+             && (digestbits < 112)) ||
+            (boost::iequals(algorithm, TSIGKeyInfo::HMAC_SHA256_STR)
+             && (digestbits < 128)) ||
+            (boost::iequals(algorithm, TSIGKeyInfo::HMAC_SHA384_STR)
+             && (digestbits < 192)) ||
+            (boost::iequals(algorithm, TSIGKeyInfo::HMAC_SHA512_STR)
+                   && (digestbits < 256))) {
+                isc_throw(D2CfgError, "tsig-key: digest-bits too small : "
+                          << " (" << bits_elem->getPosition() << ")");
+        }
     }
 
+
     // Everything should be valid, so create the key instance.
     // It is possible for the asiodns::dns::TSIGKey create to fail such as
     // with an invalid secret content.
@@ -458,88 +443,34 @@ TSIGKeyInfoParser::build(isc::data::ConstElementPtr key_config) {
     try {
         key_info.reset(new TSIGKeyInfo(name, algorithm, secret, digestbits));
     } catch (const std::exception& ex) {
-        isc_throw(D2CfgError, ex.what() << " (" << key_config->getPosition() << ")");
-
+        isc_throw(D2CfgError, ex.what() << " ("
+                  << key_config->getPosition() << ")");
     }
 
-    // Add the new TSIGKeyInfo to the key storage.
-    (*keys_)[name]=key_info;
-}
-
-isc::dhcp::ParserPtr
-TSIGKeyInfoParser::createConfigParser(const std::string& config_id,
-                                      const isc::data::Element::Position& pos) {
-    DhcpConfigParser* parser = NULL;
-    // Based on the configuration id of the element, create the appropriate
-    // parser. Scalars are set to use the parser's local scalar storage.
-    if ((config_id == "name")  ||
-        (config_id == "algorithm") ||
-        (config_id == "secret")) {
-        parser = new isc::dhcp::StringParser(config_id,
-                                             local_scalars_.getStringStorage());
-    } else if (config_id == "digest-bits") {
-        parser = new isc::dhcp::Uint32Parser(config_id,
-                                             local_scalars_.getUint32Storage());
-    } else {
-        isc_throw(NotImplemented,
-                  "parser error: TSIGKeyInfo parameter not supported: "
-                  << config_id << " (" << pos << ")");
-    }
-
-    // Return the new parser instance.
-    return (isc::dhcp::ParserPtr(parser));
-}
-
-void
-TSIGKeyInfoParser::commit() {
+    return (key_info);
 }
 
 // *********************** TSIGKeyInfoListParser  *************************
 
-TSIGKeyInfoListParser::TSIGKeyInfoListParser(const std::string& list_name,
-                                       TSIGKeyInfoMapPtr keys)
-    :list_name_(list_name), keys_(keys), local_keys_(new TSIGKeyInfoMap()),
-     parsers_() {
-    if (!keys_) {
-        isc_throw(D2CfgError, "TSIGKeyInfoListParser ctor:"
-                  " key storage cannot be null");
-    }
-}
-
-TSIGKeyInfoListParser::~TSIGKeyInfoListParser() {
-}
-
-void
-TSIGKeyInfoListParser::
-build(isc::data::ConstElementPtr key_list) {
-    int i = 0;
+TSIGKeyInfoMapPtr
+TSIGKeyInfoListParser::parse(isc::data::ConstElementPtr key_list) {
+    TSIGKeyInfoMapPtr keys(new TSIGKeyInfoMap());
     isc::data::ConstElementPtr key_config;
-    // For each key element in the key list:
-    // 1. Create a parser for the key element.
-    // 2. Invoke the parser's build method passing in the key's
-    // configuration.
-    // 3. Add the parser to a local collection of parsers.
     BOOST_FOREACH(key_config, key_list->listValue()) {
-        // Create a name for the parser based on its position in the list.
-        std::string entry_name = boost::lexical_cast<std::string>(i++);
-        isc::dhcp::ParserPtr parser(new TSIGKeyInfoParser(entry_name,
-                                                            local_keys_));
-        parser->build(key_config);
-        parsers_.push_back(parser);
-    }
-
-    // Now that we know we have a valid list, commit that list to the
-    // area given to us during construction (i.e. to the d2 context).
-    *keys_ = *local_keys_;
-}
+        TSIGKeyInfoParser key_parser;
+        TSIGKeyInfoPtr key = key_parser.parse(key_config);
+
+        // Duplicates are not allowed and should be flagged as an error.
+        if (keys->find(key->getName()) != keys->end()) {
+            isc_throw(D2CfgError, "Duplicate TSIG key name specified : "
+                      << key->getName()
+                      << " (" << getPosition("name", key_config) << ")");
+        }
 
-void
-TSIGKeyInfoListParser::commit() {
-    // Invoke commit on each server parser. This will cause each one to
-    // create it's server instance and commit it to storage.
-    BOOST_FOREACH(isc::dhcp::ParserPtr parser, parsers_) {
-        parser->commit();
+        (*keys)[key->getName()] = key;
     }
+
+    return (keys);
 }
 
 // *********************** DnsServerInfoParser  *************************
index 0dfb84ef23fe1cecaffaaadab83c6f17671d41df..60fd3973aaa43be89adfabb3563dca8fc47f95e1 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <asiolink/io_service.h>
 #include <cc/data.h>
+#include <cc/simple_parser.h>
 #include <dhcpsrv/parsers/dhcp_parsers.h>
 #include <dns/tsig.h>
 #include <exceptions/exceptions.h>
@@ -731,69 +732,25 @@ typedef boost::shared_ptr<DScalarContext> DScalarContextPtr;
 ///
 /// This class parses the configuration element "tsig-key" defined in
 /// src/bin/d2/dhcp-ddns.spec and creates an instance of a TSIGKeyInfo.
-class TSIGKeyInfoParser : public  isc::dhcp::DhcpConfigParser {
+class TSIGKeyInfoParser : public  isc::data::SimpleParser { 
 public:
     /// @brief Constructor
-    ///
-    /// @param entry_name is an arbitrary label assigned to this configuration
-    /// definition. Since servers are specified in a list this value is likely
-    /// be something akin to "key:0", set during parsing.
-    /// @param keys is a pointer to the storage area to which the parser
-    /// should commit the newly created TSIGKeyInfo instance.
-    TSIGKeyInfoParser(const std::string& entry_name, TSIGKeyInfoMapPtr keys);
-
+    TSIGKeyInfoParser(){};    
+    
     /// @brief Destructor
-    virtual ~TSIGKeyInfoParser();
+    virtual ~TSIGKeyInfoParser(){};
 
     /// @brief Performs the actual parsing of the given  "tsig-key" element.
     ///
     /// Parses a configuration for the elements needed to instantiate a
     /// TSIGKeyInfo, validates those entries, creates a TSIGKeyInfo instance
-    /// then attempts to add to a list of keys
     ///
     /// @param key_config is the "tsig-key" configuration to parse
-    virtual void build(isc::data::ConstElementPtr key_config);
-
-    /// @brief Creates a parser for the given "tsig-key" member element id.
-    ///
-    /// The key elements currently supported are(see dhcp-ddns.spec):
-    ///   1. name
-    ///   2. algorithm
-    ///   3. digestbits
-    ///   4. secret
-    ///
-    /// @param config_id is the "item_name" for a specific member element of
-    /// the "tsig-key" specification.
-    /// @param pos position within the configuration text (or file) of element
-    /// to be parsed.  This is passed for error messaging.
-    ///
-    /// @return returns a pointer to newly created parser.
     ///
-    /// @throw D2CfgError if configuration contains an unknown parameter
-    virtual isc::dhcp::ParserPtr
-    createConfigParser(const std::string& config_id,
-                       const isc::data::Element::Position& pos =
-                       isc::data::Element::ZERO_POSITION());
-
-    /// @brief Commits the TSIGKeyInfo configuration
-    /// Currently this method is a NOP, as the key instance is created and
-    /// then added to a local list of keys in build().
-    virtual void commit();
+    /// @return pointer to the new TSIGKeyInfo instance
+    TSIGKeyInfoPtr parse(isc::data::ConstElementPtr key_config);
 
 private:
-    /// @brief Arbitrary label assigned to this parser instance.
-    /// Since servers are specified in a list this value is likely be something
-    /// akin to "key:0", set during parsing.  Primarily here for diagnostics.
-    std::string entry_name_;
-
-    /// @brief Pointer to the storage area to which the parser should commit
-    /// the newly created TSIGKeyInfo instance. This is given to us as a
-    /// constructor argument by an upper level.
-    TSIGKeyInfoMapPtr keys_;
-
-    /// @brief Local storage area for scalar parameter values. Use to hold
-    /// data until time to commit.
-    DScalarContext local_scalars_;
 };
 
 /// @brief Parser for a list of TSIGKeyInfos
@@ -801,53 +758,27 @@ private:
 /// This class parses a list of "tsig-key" configuration elements.
 /// (see src/bin/d2/dhcp-ddns.spec). The TSIGKeyInfo instances are added
 /// to the given storage upon commit.
-class TSIGKeyInfoListParser : public isc::dhcp::DhcpConfigParser {
+class TSIGKeyInfoListParser : public isc::data::SimpleParser {
 public:
-
     /// @brief Constructor
-    ///
-    /// @param list_name is an arbitrary label assigned to this parser instance.
-    /// @param keys is a pointer to the storage area to which the parser
-    /// should commit the newly created TSIGKeyInfo instance.
-    TSIGKeyInfoListParser(const std::string& list_name, TSIGKeyInfoMapPtr keys);
+    TSIGKeyInfoListParser(){};
 
     /// @brief Destructor
-    virtual ~TSIGKeyInfoListParser();
+    virtual ~TSIGKeyInfoListParser(){};
 
     /// @brief Performs the parsing of the given list "tsig-key" elements.
     ///
+    /// Creates an emtpy TSIGKeyInfoMap
+    ///
     /// It iterates over each key entry in the list:
     ///   1. Instantiate a TSIGKeyInfoParser for the entry
-    ///   2. Pass the element configuration to the parser's build method
-    ///   3. Add the parser instance to local storage
-    ///
-    /// The net effect is to parse all of the key entries in the list
-    /// prepping them for commit.
+    ///   2. Pass the element configuration to the parser's parse method
+    ///   3. Add the new TSIGKeyInfo instance to the key map
     ///
     /// @param key_list_config is the list of "tsig_key" elements to parse.
-    virtual void build(isc::data::ConstElementPtr key_list_config);
-
-    /// @brief Commits the list of TSIG keys
     ///
-    /// Iterates over the internal list of TSIGKeyInfoParsers, invoking
-    /// commit on each one.  Then commits the local list of keys to
-    /// storage.
-    virtual void commit();
-
-private:
-    /// @brief Arbitrary label assigned to this parser instance.
-    std::string list_name_;
-
-    /// @brief Pointer to the storage area to which the parser should commit
-    /// the list of newly created TSIGKeyInfo instances. This is given to us
-    /// as a constructor argument by an upper level.
-    TSIGKeyInfoMapPtr keys_;
-
-    /// @brief Local storage area to which individual key parsers commit.
-    TSIGKeyInfoMapPtr local_keys_;
-
-    /// @brief Local storage of TSIGKeyInfoParser instances
-    isc::dhcp::ParserCollection parsers_;
+    /// @return a map containing the TSIGKeyInfo instances 
+    TSIGKeyInfoMapPtr parse(isc::data::ConstElementPtr key_list_config);
 };
 
 /// @brief Parser for  DnsServerInfo
index 1e51ee4f27d43eda30ebc75c1787a2000f606c59..4c910b495ba0f705a055b4fa4925707d3f2f02f4 100644 (file)
@@ -524,8 +524,8 @@ static void yynoreturn yy_fatal_error ( const char* msg  );
 /* %% [3.0] code to copy yytext_ptr to d2_parser_text[] goes here, if %array \ */\
        (yy_c_buf_p) = yy_cp;
 /* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
-#define YY_NUM_RULES 51
-#define YY_END_OF_BUFFER 52
+#define YY_NUM_RULES 54
+#define YY_END_OF_BUFFER 55
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -533,38 +533,42 @@ struct yy_trans_info
        flex_int32_t yy_verify;
        flex_int32_t yy_nxt;
        };
-static const flex_int16_t yy_accept[278] =
+static const flex_int16_t yy_accept[304] =
     {   0,
-       44,   44,    0,    0,    0,    0,    0,    0,    0,    0,
-       52,   50,   10,   11,   50,    1,   44,   41,   44,   44,
-       50,   43,   42,   50,   50,   50,   50,   50,   37,   38,
-       50,   50,   50,   39,   40,    5,    5,    5,   50,   50,
-       50,   10,   11,    0,    0,   33,    0,    0,    0,    0,
+       47,   47,    0,    0,    0,    0,    0,    0,    0,    0,
+       55,   53,   10,   11,   53,    1,   47,   44,   47,   47,
+       53,   46,   45,   53,   53,   53,   53,   53,   40,   41,
+       53,   53,   53,   42,   43,    5,    5,    5,   53,   53,
+       53,   10,   11,    0,    0,   36,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    1,   44,   44,    0,   43,   44,    3,    2,
-        6,    0,   44,    0,    0,    0,    0,    0,    0,    4,
-        0,    0,    9,    0,   34,    0,    0,    0,    0,    0,
-        0,    0,   36,    0,    0,    0,    0,    0,    0,    0,
-
-        0,    0,    0,    0,    0,    0,    2,    0,    0,    0,
-        0,    0,    0,    0,    8,    0,    0,    0,    0,    0,
-        0,    0,   35,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,   49,   47,    0,
-       46,   45,    0,    0,    0,    0,    0,   19,   18,    0,
+        0,    0,    0,    1,   47,   47,    0,   46,   47,    3,
+        2,    6,    0,   47,    0,    0,    0,    0,    0,    0,
+        4,    0,    0,    9,    0,   37,    0,    0,    0,    0,
+        0,    0,    0,   39,    0,    0,    0,    0,    0,    0,
+
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    2,
+        0,    0,    0,    0,    0,    0,    0,    8,    0,    0,
+        0,    0,    0,    0,    0,   38,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,   48,   45,    0,    0,    0,    0,    0,   20,
-        0,    0,    0,    0,    0,    0,    0,   28,    0,    0,
-        0,   14,    0,    0,    0,    0,    0,   31,   32,    0,
+        0,    0,    0,   52,   50,    0,   49,   48,    0,    0,
+        0,    0,    0,   19,   18,    0,    0,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-
-        0,    0,    7,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,   27,    0,    0,    0,    0,    0,   24,    0,
+        0,   51,   48,    0,    0,    0,    0,    0,   20,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,   31,    0,
+        0,    0,   14,    0,    0,    0,    0,    0,    0,   34,
+
+       35,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    7,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,   30,
+        0,    0,   26,    0,    0,    0,   27,    0,    0,    0,
+        0,    0,    0,   28,    0,    0,    0,    0,    0,    0,
+       12,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,   33,    0,   24,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,   23,   32,    0,    0,    0,   13,   17,
         0,    0,    0,   25,    0,    0,    0,    0,    0,    0,
-       12,    0,    0,    0,    0,    0,    0,    0,    0,   30,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,   23,
-       29,    0,    0,   13,   17,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,   21,   16,    0,   22,    0,    0,
-        0,   26,    0,    0,    0,   15,    0
+       21,   16,    0,   22,    0,    0,    0,   29,    0,    0,
+
+        0,   15,    0
     } ;
 
 static const YY_CHAR yy_ec[256] =
@@ -610,77 +614,85 @@ static const YY_CHAR yy_meta[65] =
         3,    3,    3,    3
     } ;
 
-static const flex_int16_t yy_base[290] =
+static const flex_int16_t yy_base[316] =
     {   0,
         0,    0,   63,   66,   69,    0,   67,   71,   52,   68,
-      288, 1784,   87,  281,  133,    0,   96, 1784,  129,  133,
-       84,  150, 1784,  234,  109,   69,   67,   72, 1784, 1784,
-      110,   71,   97, 1784, 1784, 1784,   97,  225,  179,    0,
-      209,  167,  220,  146,  194, 1784,  200,  206,  212,  218,
-      224,  227,  250,  256,  268,  275,  294,  305,  312,  318,
-      324,  337,    0,  331,  338,  356,  371,  374, 1784,    0,
-     1784,  220,  230,  123,  128,  145,  165,  171,  170, 1784,
-      168,  179, 1784,  205, 1784,  363,  400,  408,  422,  429,
-      438,  166,  445,  480,  451,  470,  477,  507,  528,  534,
-
-      540,  546,  552,  558,  566,  579,    0,  232,  222,  173,
-      242,  251,  257,  112, 1784,    0,  591,  604,  618,  611,
-      628,  153, 1784,  652,  648,  634,  678,  685,  697,  703,
-      715,  726,  735,  743,  752,  758,  265, 1784, 1784,  273,
-     1784, 1784,   96,    0,  768,  776,  796, 1784, 1784,  831,
-      805,  813,  821,  861,  876,  828,  882,  888,  894,  904,
-      915,  927, 1784, 1784,  103,    0,  933,  942,  948, 1784,
-      955,  995,  975,  987,  966, 1026,  993, 1784, 1040, 1049,
-     1055, 1784, 1064, 1070, 1077,   98,    0, 1784, 1784, 1087,
-     1096, 1109, 1128, 1135, 1142, 1148, 1154, 1160, 1167, 1174,
-
-     1180, 1186, 1784, 1206, 1218, 1225, 1231, 1238, 1244, 1250,
-     1258, 1264, 1784, 1270, 1291, 1276, 1297, 1303, 1784, 1313,
-     1324, 1330, 1340, 1784, 1346, 1352, 1363, 1373, 1389, 1401,
-     1784, 1411, 1418, 1426, 1433, 1439, 1450, 1458, 1465, 1784,
-     1476, 1482, 1498, 1504, 1519, 1525, 1531, 1541, 1547, 1784,
-     1784, 1557, 1564, 1784, 1784, 1571, 1580, 1589, 1596, 1603,
-     1610, 1617, 1626, 1635, 1784, 1784, 1647, 1784, 1654, 1663,
-     1672, 1784, 1679, 1687, 1693, 1784, 1784, 1745, 1750, 1755,
-     1760, 1765, 1770, 1775, 1778,  133,  132,   91,   88
+      311, 1963,   87,  307,  133,    0,   96, 1963,  130,  133,
+       84,  150, 1963,  288,  109,   69,   67,   72, 1963, 1963,
+      110,   71,   97, 1963, 1963, 1963,   97,  283,  242,    0,
+      273,  139,  281,  132,  194, 1963,  200,  206,  212,  218,
+      224,  227,  250,  256,  268,  275,  288,  296,  312,  318,
+      325,  338,  344,    0,  343,  349,  369,  380,  374, 1963,
+        0, 1963,  220,  230,  128,  165,  124,  171,  177,  145,
+     1963,  233,  248, 1963,  148, 1963,  385,  405,  426,  411,
+      433,  448,  232,  459,  490,  471,  481,  491,  518,  537,
+
+      465,  543,  550,  557,  563,  570,  580,  595,  602,    0,
+      246,  214,  127,  249,  222,  173,  181, 1963,    0,  608,
+      617,  627,  641,  650,  217, 1963,  674,  656,  665,  702,
+      674,  719,  725,  731,  739,  747,  758,  768,  784,  790,
+      796,  805,  185, 1963, 1963,  263, 1963, 1963,  152,    0,
+      828,  813,  835, 1963, 1963,  870,  852,  860,  867,  897,
+      915,  924,  934,  940,  947,  956,  962,  973,  979,  985,
+      994, 1963, 1963,  129,    0, 1005, 1011, 1018, 1963, 1031,
+     1071, 1043, 1037, 1061, 1098, 1069, 1120, 1127, 1963, 1135,
+     1142, 1148, 1963, 1159, 1165, 1172, 1185,  119,    0, 1963,
+
+     1963, 1191, 1202, 1209, 1224, 1239, 1250, 1256, 1263, 1271,
+     1277, 1283, 1295, 1301, 1289, 1309, 1315, 1963, 1321, 1338,
+     1347, 1354, 1360, 1367, 1379, 1386, 1397, 1404, 1416, 1963,
+     1423, 1434, 1963, 1441, 1448, 1456, 1963, 1462, 1478, 1486,
+     1494, 1503, 1510, 1963, 1518, 1524, 1542, 1548, 1562, 1568,
+     1963, 1574, 1580, 1586, 1592, 1600, 1612, 1618, 1633, 1644,
+     1650, 1963, 1657, 1963, 1671, 1677, 1689, 1683, 1695, 1703,
+     1709, 1716, 1722, 1963, 1963, 1736, 1742, 1748, 1963, 1963,
+     1755, 1764, 1775, 1963, 1785, 1792, 1801, 1807, 1813, 1822,
+     1963, 1963, 1833, 1963, 1839, 1845, 1851, 1963, 1860, 1866,
+
+     1878, 1963, 1963, 1924, 1929, 1934, 1939, 1944, 1949, 1954,
+     1957,  146,  132,   91,   88
     } ;
 
-static const flex_int16_t yy_def[290] =
+static const flex_int16_t yy_def[316] =
     {   0,
-      277,    1,  278,  278,    1,    5,    5,    5,    5,    5,
-      277,  277,  277,  277,  279,  280,  277,  277,  277,  277,
-      277,  277,  277,  277,  277,  277,  277,  277,  277,  277,
-      277,  277,  277,  277,  277,  277,  277,  277,  277,  281,
-      277,  277,  277,  282,  279,  277,  279,  279,  279,  279,
-      279,  283,  279,  279,  279,  279,  279,  279,  279,  279,
-      279,  279,  280,  277,  277,  277,  277,  277,  277,  284,
-      277,  277,  277,  277,  277,  277,  277,  277,  277,  277,
-      277,  281,  277,  282,  277,  277,  279,  279,  279,  279,
-      279,  285,  279,  283,  279,  279,  279,  279,  279,  279,
-
-      279,  279,  279,  279,  279,  279,  284,  277,  277,  277,
-      277,  277,  277,  277,  277,  286,  279,  279,  279,  279,
-      279,  285,  277,  283,  279,  279,  279,  279,  279,  279,
-      279,  279,  279,  279,  279,  279,  277,  277,  277,  277,
-      277,  277,  277,  287,  279,  279,  279,  277,  277,  283,
-      279,  279,  279,  279,  279,  279,  279,  279,  279,  279,
-      279,  279,  277,  277,  277,  288,  279,  279,  279,  277,
-      279,  283,  279,  279,  279,  279,  279,  277,  279,  279,
-      279,  277,  279,  279,  279,  277,  289,  277,  277,  279,
-      279,  279,  279,  279,  279,  279,  279,  279,  279,  279,
-
-      279,  279,  277,  279,  279,  279,  279,  279,  279,  279,
-      279,  279,  277,  279,  279,  279,  279,  279,  277,  279,
-      279,  279,  279,  277,  279,  279,  279,  279,  279,  279,
-      277,  279,  279,  279,  279,  279,  279,  279,  279,  277,
-      279,  279,  279,  279,  279,  279,  279,  279,  279,  277,
-      277,  279,  279,  277,  277,  279,  279,  279,  279,  279,
-      279,  279,  279,  279,  277,  277,  279,  277,  279,  279,
-      279,  277,  279,  279,  279,  277,    0,  277,  277,  277,
-      277,  277,  277,  277,  277,  277,  277,  277,  277
+      303,    1,  304,  304,    1,    5,    5,    5,    5,    5,
+      303,  303,  303,  303,  305,  306,  303,  303,  303,  303,
+      303,  303,  303,  303,  303,  303,  303,  303,  303,  303,
+      303,  303,  303,  303,  303,  303,  303,  303,  303,  307,
+      303,  303,  303,  308,  305,  303,  305,  305,  305,  305,
+      305,  309,  305,  305,  305,  305,  305,  305,  305,  305,
+      305,  305,  305,  306,  303,  303,  303,  303,  303,  303,
+      310,  303,  303,  303,  303,  303,  303,  303,  303,  303,
+      303,  303,  307,  303,  308,  303,  303,  305,  305,  305,
+      305,  305,  311,  305,  309,  305,  305,  305,  305,  305,
+
+      305,  305,  305,  305,  305,  305,  305,  305,  305,  310,
+      303,  303,  303,  303,  303,  303,  303,  303,  312,  305,
+      305,  305,  305,  305,  311,  303,  309,  305,  305,  305,
+      305,  305,  305,  305,  305,  305,  305,  305,  305,  305,
+      305,  305,  303,  303,  303,  303,  303,  303,  303,  313,
+      305,  305,  305,  303,  303,  309,  305,  305,  305,  305,
+      305,  305,  305,  305,  305,  305,  305,  305,  305,  305,
+      305,  303,  303,  303,  314,  305,  305,  305,  303,  305,
+      309,  305,  305,  305,  305,  305,  305,  305,  303,  305,
+      305,  305,  303,  305,  305,  305,  305,  303,  315,  303,
+
+      303,  305,  305,  305,  305,  305,  305,  305,  305,  305,
+      305,  305,  305,  305,  305,  305,  305,  303,  305,  305,
+      305,  305,  305,  305,  305,  305,  305,  305,  305,  303,
+      305,  305,  303,  305,  305,  305,  303,  305,  305,  305,
+      305,  305,  305,  303,  305,  305,  305,  305,  305,  305,
+      303,  305,  305,  305,  305,  305,  305,  305,  305,  305,
+      305,  303,  305,  303,  305,  305,  305,  305,  305,  305,
+      305,  305,  305,  303,  303,  305,  305,  305,  303,  303,
+      305,  305,  305,  303,  305,  305,  305,  305,  305,  305,
+      303,  303,  305,  303,  305,  305,  305,  303,  305,  305,
+
+      305,  303,    0,  303,  303,  303,  303,  303,  303,  303,
+      303,  303,  303,  303,  303
     } ;
 
-static const flex_int16_t yy_nxt[1849] =
+static const flex_int16_t yy_nxt[2028] =
     {   0,
        12,   13,   14,   13,   12,   15,   16,   12,   17,   18,
        19,   20,   21,   22,   22,   22,   23,   24,   12,   12,
@@ -690,204 +702,224 @@ static const flex_int16_t yy_nxt[1849] =
        12,   12,   32,   12,   12,   12,   12,   33,   12,   12,
        12,   12,   34,   35,   37,   14,   37,   37,   14,   37,
        38,   41,   40,   38,   12,   12,   40,   12,   12,   12,
-       12,   12,   12,   12,   12,   12,   12,   41,   42,   74,
-       42,   69,   84,   12,   12,  187,   70,   12,   42,   12,
-
-       42,   75,   12,   76,   12,   75,   12,   64,   74,   65,
-       65,   65,   12,   12,   12,   12,   39,   72,   12,   72,
-       66,   12,   73,   73,   73,   75,   12,   76,   76,   78,
-       74,   12,   12,   44,   44,   44,  166,  144,   46,   66,
-       64,  203,   67,   67,   67,  186,   68,   68,   68,   77,
-      108,   85,   79,   66,  165,  109,   47,   66,  123,   48,
-       49,   64,  143,   67,   67,   67,   50,   51,   42,   52,
-       42,  123,   66,  108,   66,   53,   66,   54,  109,  110,
-       55,   48,   86,   56,  115,   57,   58,   59,   60,   61,
-       62,   51,  108,   66,   44,   44,   44,  139,  109,   46,
-
-       44,   44,   44,  110,  110,   46,   44,   44,   44,  114,
-       85,   46,   44,   44,   44,  111,  139,   46,   44,   44,
-       44,  112,   43,   46,   44,   44,   44,   83,  113,   46,
-       52,   81,   93,   73,   73,   73,   52,   80,   88,   45,
-       90,   86,   52,   73,   73,   73,   87,   91,   52,  138,
-       44,   44,   44,   71,   52,   46,   44,   44,   44,   90,
-       52,   46,   88,   45,  137,   89,   91,   45,   44,   44,
-       44,   45,  138,   46,  137,   44,   44,   44,  138,   45,
-       46,  139,   45,   43,   45,   94,   52,  277,  137,  163,
-      277,  277,   52,   95,   44,   44,   44,  163,  140,   46,
-
-      142,  141,   96,  277,   52,   44,   44,   44,  163,   97,
-       46,   52,   44,   44,   44,  277,  164,   46,   44,   44,
-       44,  277,   98,   46,   44,   44,   44,  277,   99,   46,
-       52,  277,  277,  100,  277,  101,  277,   44,   44,   44,
-      277,   52,   46,  277,   68,   68,   68,  277,   52,   64,
-      277,   65,   65,   65,   52,   66,  277,  277,  277,   90,
-       52,  104,   66,  102,   72,  103,   72,  105,   84,   73,
-       73,   73,  277,   52,   66,   84,  277,  277,   90,  277,
-      277,   66,   64,  277,   67,   67,   67,   68,   68,   68,
-      277,  277,  277,  106,  277,   66,  277,  277,   66,   84,
-
-       44,   44,   44,   84,  277,   46,  277,   84,   44,   44,
-       44,  277,  277,   46,   66,   84,  277,   66,   84,  277,
-       84,  116,   44,   44,   44,  277,  277,   46,  277,   44,
-       44,   44,  277,  277,   46,  277,   52,  118,   44,   44,
-       44,  117,  277,   46,   52,   44,   44,   44,  277,  277,
-       46,   44,   44,   44,  277,  277,   46,  277,   52,  120,
-      277,  118,  277,  277,  277,   52,  277,  119,  121,  277,
-       44,   44,   44,  277,   52,   46,  277,   44,   44,   44,
-      277,   52,   46,  120,  277,  277,  277,   52,  277,  277,
-      277,  125,  121,  124,  124,  124,  277,  277,  277,  277,
-
-      124,  124,  124,  124,  124,  124,   52,   44,   44,   44,
-      277,  277,   46,   52,  277,  277,  277,  128,  277,  124,
-      124,  124,  124,  124,  124,  277,  126,  277,   44,   44,
-       44,  277,  127,   46,   44,   44,   44,  277,  277,   46,
-       44,   44,   44,   52,  277,   46,   44,   44,   44,  277,
-      277,   46,   44,   44,   44,  277,  277,   46,   44,   44,
-       44,  277,  277,   46,   52,  277,   44,   44,   44,  277,
-       52,   46,  277,  129,  277,  277,   52,  277,  277,   44,
-       44,   44,   52,  277,   46,  130,  277,  277,   52,  277,
-      277,   44,   44,   44,   52,  131,   46,  277,  277,  277,
-
-      277,  277,   52,  132,   44,   44,   44,  133,  277,   46,
-      277,   44,   44,   44,  277,   52,  148,  134,   44,   44,
-       44,  277,  277,   46,  277,  135,  136,   52,   44,   44,
-       44,  277,  146,  149,   44,   44,   44,  277,  277,   46,
-       52,  277,  277,  277,  152,  145,  277,   52,   44,   44,
-       44,  277,  277,   46,   52,  277,  146,  277,  277,  277,
-      277,  277,  277,  147,   52,  150,  150,  150,  277,  277,
-       52,  277,  150,  150,  150,  150,  150,  150,   44,   44,
-       44,  277,  277,   46,   52,   44,   44,   44,  277,  277,
-       46,  150,  150,  150,  150,  150,  150,   44,   44,   44,
-
-      277,  277,   46,   44,   44,   44,  151,  277,   46,  277,
-      277,  277,  277,  277,   52,   44,   44,   44,  277,  277,
-       46,   52,  277,  277,  154,  157,   44,   44,   44,  277,
-      277,   46,  277,   52,  277,   44,   44,   44,  153,   52,
-       46,  277,  155,   44,   44,   44,  156,  277,   46,  277,
-      277,   52,   44,   44,   44,  277,  277,   46,   44,   44,
-       44,  277,   52,   46,  277,  277,  277,  277,   44,   44,
-       44,   52,  277,   46,  277,  277,   44,   44,   44,   52,
-      158,  170,  167,  168,  277,  277,  160,  277,   52,  277,
-      277,  169,  159,  277,   52,  161,   44,   44,   44,  277,
-
-      277,   46,  277,  162,   52,   44,   44,   44,  277,  277,
-       46,  277,   52,   44,   44,   44,  277,  277,   46,  277,
-      277,   44,   44,   44,  277,  277,   46,  277,   44,   44,
-       44,  277,   52,  178,  277,  277,  277,  277,  277,  277,
-      277,   52,  277,  171,  172,  172,  172,  277,  277,   52,
-      173,  172,  172,  172,  172,  172,  172,   52,  277,  277,
-      175,   44,   44,   44,   52,  277,   46,  277,  277,  174,
-      172,  172,  172,  172,  172,  172,   44,   44,   44,  277,
-      277,   46,   44,   44,   44,  277,  277,   46,   44,   44,
-       44,  277,  277,   46,   44,   44,   44,   52,  277,  182,
-
-      277,  277,  277,  176,   44,   44,   44,  277,  277,   46,
-      277,  277,   52,  277,  277,   44,   44,   44,   52,  177,
-       46,  277,  277,  277,   52,  277,  179,   44,   44,   44,
-       52,  277,   46,   44,   44,   44,  180,  185,  188,  277,
-       52,  277,   44,   44,   44,  277,  181,  189,   44,   44,
-       44,   52,  277,   46,  277,   44,   44,   44,  277,  183,
-       46,  277,  277,   52,  277,  277,   44,   44,   44,   52,
-      184,   46,  277,  277,  277,   44,   44,   44,   52,  277,
-       46,  277,  277,  277,   52,  277,  277,   44,   44,   44,
-      190,   52,   46,   44,   44,   44,  277,  277,   46,  277,
-
-      277,  277,   52,  277,  277,  277,  277,  191,   45,   45,
-       45,   52,  277,  277,  277,   45,   45,   45,   45,   45,
-       45,  194,  277,   52,  277,  192,   44,   44,   44,   52,
-      193,   46,  277,  277,   45,   45,   45,   45,   45,   45,
-       44,   44,   44,  277,  277,   46,  277,  277,  196,   44,
-       44,   44,  277,  277,   46,   44,   44,   44,  277,  277,
-       46,  277,   52,  277,   44,   44,   44,  277,  195,   46,
-       44,   44,   44,  277,  277,   46,   52,   44,   44,   44,
-      277,  277,   46,  277,  277,   52,  277,   44,   44,   44,
-      277,   52,   46,  197,  277,  277,   44,   44,   44,  277,
-
-       52,   46,  277,  277,  198,  277,   52,  277,  277,   44,
-       44,   44,  199,   52,   46,  277,  277,  201,  277,  277,
-      200,  277,  277,   52,  277,  277,  202,  277,   44,   44,
-       44,  277,   52,   46,  277,   44,   44,   44,  277,  204,
-       46,  205,   44,   44,   44,   52,  277,   46,   44,   44,
-       44,  277,  206,   46,   44,   44,   44,  277,  277,   46,
-       44,   44,   44,  277,   52,   46,  277,   44,   44,   44,
-      277,   52,  213,  277,   44,   44,   44,  208,   52,   46,
-       44,   44,   44,  207,   52,   46,   44,   44,   44,  277,
-       52,   46,  277,  277,  277,  277,   52,  209,  277,  277,
-
-      277,  277,  277,   52,  210,  214,   44,   44,   44,  211,
-       52,   46,  277,  212,  277,  277,   52,  215,   44,   44,
-       44,  277,   52,  219,  277,   44,   44,   44,  277,  217,
-       46,   44,   44,   44,  277,  277,   46,  216,   44,   44,
-       44,  277,   52,   46,   44,   44,   44,  277,  222,   46,
-       44,   44,   44,  277,   52,  224,  277,  277,   44,   44,
-       44,   52,  218,   46,   44,   44,   44,   52,  277,   46,
-       44,   44,   44,  277,   52,   46,   44,   44,   44,  277,
-       52,   46,  277,  277,  220,  277,   52,  223,  277,  277,
-      221,   44,   44,   44,   52,  277,   46,   44,   44,   44,
-
-       52,  228,   46,   44,   44,   44,   52,  277,  231,  225,
-      277,  277,   52,   44,   44,   44,  277,  277,   46,  277,
-      277,  226,  277,  227,   44,   44,   44,   52,  277,   46,
-       44,   44,   44,   52,  277,   46,  277,  229,  277,   52,
-       44,   44,   44,  277,  277,   46,   44,   44,   44,   52,
-      277,   46,   44,   44,   44,  277,  232,   46,  230,  277,
-       52,  277,  277,   44,   44,   44,   52,  233,   46,  277,
-      277,  277,  234,   44,   44,   44,   52,  277,   46,  277,
-      277,  277,   52,  277,  277,  236,  277,  277,   52,   44,
-       44,   44,  277,  277,  240,  277,  235,  277,  277,   52,
-
-      277,   44,   44,   44,  277,  237,   46,  277,  277,   52,
-      277,   44,   44,   44,  277,  239,   46,  238,   44,   44,
-       44,  277,  277,   46,  277,   52,   44,   44,   44,  277,
-      277,   46,  277,   44,   44,   44,  277,   52,   46,   44,
-       44,   44,  277,  277,   46,  277,  277,   52,  277,  277,
-       44,   44,   44,  277,   52,   46,  277,  241,   44,   44,
-       44,  242,   52,   46,  277,   44,   44,   44,  244,   52,
-       46,  277,  277,  243,  277,   52,   44,   44,   44,  277,
-      277,  250,   44,   44,   44,  277,   52,  251,  277,  245,
-      277,  247,  277,  277,   52,  277,  246,  277,   44,   44,
-
-       44,   52,  277,   46,   44,   44,   44,  249,  252,   46,
-      277,  277,   52,  277,  277,  248,  277,  277,   52,   44,
-       44,   44,  277,  277,  254,   44,   44,   44,  277,  277,
-      255,   44,   44,   44,   52,  277,   46,  277,  277,  277,
-       52,   44,   44,   44,  277,  277,   46,   44,   44,   44,
-      277,  277,   46,  277,  277,   52,  253,   44,   44,   44,
-      277,   52,   46,  277,   44,   44,   44,   52,  277,   46,
-      277,   44,   44,   44,  277,  277,   46,   52,  277,  277,
-       44,   44,   44,   52,  256,   46,  277,  277,  257,   44,
-       44,   44,  277,   52,   46,  277,   44,   44,   44,  258,
-
-       52,   46,  277,   44,   44,   44,  277,   52,  265,  277,
-       44,   44,   44,  277,  259,  266,   52,   44,   44,   44,
-      260,  261,   46,  277,  277,   52,   44,   44,   44,  277,
-      277,  268,   52,  262,  277,   44,   44,   44,  277,   52,
-       46,  277,  277,  264,  277,  263,   52,   44,   44,   44,
-      277,  277,   46,   52,   44,   44,   44,  277,  277,   46,
-      277,  277,   52,   44,   44,   44,  277,  277,  272,  267,
-      277,   52,   44,   44,   44,  277,  277,   46,  277,   44,
-       44,   44,  277,   52,   46,  277,  269,   44,   44,   44,
-       52,  277,   46,   44,   44,   44,  277,  271,  276,   52,
-
-      277,  277,  277,  270,  277,  277,  277,  277,   52,  277,
-      277,  277,  277,  277,  277,   52,  277,  277,  277,  277,
-      277,  277,  277,   52,  277,  273,  277,  277,  277,   52,
-      277,  277,  277,  277,  277,  277,  277,  274,  277,  277,
-      277,  277,  277,  277,  275,   36,   36,   36,   36,   36,
-       45,   45,   45,   45,   45,   63,  277,   63,   63,   63,
-       82,  277,   82,  277,   82,   84,   84,   84,   84,   84,
-       92,   92,   92,   92,   92,  107,  277,  107,  107,  107,
-      122,  122,  122,   11,  277,  277,  277,  277,  277,  277,
-      277,  277,  277,  277,  277,  277,  277,  277,  277,  277,
-
-      277,  277,  277,  277,  277,  277,  277,  277,  277,  277,
-      277,  277,  277,  277,  277,  277,  277,  277,  277,  277,
-      277,  277,  277,  277,  277,  277,  277,  277,  277,  277,
-      277,  277,  277,  277,  277,  277,  277,  277,  277,  277,
-      277,  277,  277,  277,  277,  277,  277,  277
+       12,   12,   12,   12,   12,   12,   12,   41,   42,   75,
+       42,   70,   85,   12,   12,  199,   71,   12,   42,   12,
+
+       42,   76,   12,   77,   12,   76,   12,   65,   75,   66,
+       66,   66,   12,   12,   12,   12,   39,   73,   12,   73,
+       67,   12,   74,   74,   74,   76,   12,   77,   77,   79,
+       75,   12,   12,   44,   44,   44,  175,   86,   46,   67,
+       42,   65,   42,   68,   68,   68,   69,   69,   69,   78,
+      150,  145,   80,   86,   67,  111,   47,   67,  113,   48,
+       49,   65,  218,   68,   68,   68,   50,   51,   87,   52,
+      145,  198,   53,   67,   67,   54,   67,   55,  111,  113,
+       56,   48,  113,   57,   87,   58,   59,   60,   61,   62,
+       63,   51,  112,   67,   44,   44,   44,  145,  111,   46,
+
+       44,   44,   44,  116,  112,   46,   44,   44,   44,  172,
+      174,   46,   44,   44,   44,  112,  148,   46,   44,   44,
+       44,  114,  126,   46,   44,   44,   44,  115,  172,   46,
+       52,  149,   94,   74,   74,   74,   52,  126,   89,   45,
+       91,  144,   52,   74,   74,   74,   88,   92,   52,  144,
+       44,   44,   44,  118,   52,   46,   44,   44,   44,   91,
+       52,   46,   89,   45,  144,   90,   92,   45,   44,   44,
+       44,   45,  147,   46,  117,   44,   44,   44,  143,   45,
+       46,  143,   45,   43,   45,   95,   52,  172,   44,   44,
+       44,   84,   52,   46,   82,   81,   44,   44,   44,   97,
+
+       96,   46,  143,   98,   52,  146,  173,   72,   99,   43,
+      303,   52,   44,   44,   44,  303,  303,   46,   44,   44,
+       44,  100,  303,   46,   52,   44,   44,   44,  303,  101,
+       46,  303,   52,  303,  303,  103,  303,  104,   44,   44,
+       44,  102,  303,   46,   44,   44,   44,  303,   52,   46,
+      303,  303,  303,  303,   52,  303,   69,   69,   69,  303,
+       65,   52,   66,   66,   66,  303,   91,   67,  107,  303,
+      105,  106,  303,   67,   52,  303,  303,   73,  303,   73,
+       52,  108,   74,   74,   74,   91,   67,   69,   69,   69,
+       85,   65,   67,   68,   68,   68,  303,   85,   67,  303,
+
+      109,  303,  303,  303,   67,   44,   44,   44,  303,  303,
+       46,   44,   44,   44,  303,  303,   46,   67,  303,  303,
+      303,   85,  303,   67,  303,   85,   44,   44,   44,   85,
+      303,   46,  303,   44,   44,   44,  303,   85,   46,  303,
+       85,   52,   85,  119,  303,  303,  120,   52,   44,   44,
+       44,  303,  303,   46,  303,  121,  122,  303,  303,   44,
+       44,   44,   52,  123,   46,   44,   44,   44,  303,   52,
+       46,   44,   44,   44,  303,  133,   46,  303,  124,  121,
+      303,   44,   44,   44,   52,  303,   46,  123,  303,  303,
+      303,   44,   44,   44,  303,   52,   46,  303,  303,  303,
+
+      303,   52,  124,  127,  127,  127,  303,   52,  303,  303,
+      127,  127,  127,  127,  127,  127,  128,   52,   44,   44,
+       44,  129,  303,   46,  303,  303,  303,   52,  303,  127,
+      127,  127,  127,  127,  127,  303,  130,   44,   44,   44,
+      303,  303,   46,   44,   44,   44,  303,  303,   46,  303,
+       44,   44,   44,  303,   52,   46,  303,   44,   44,   44,
+      303,  303,   46,   44,   44,   44,  303,  303,   46,  303,
+       44,   44,   44,   52,  131,   46,  303,  303,  303,   52,
+       44,   44,   44,  303,  303,   46,   52,  303,  134,  303,
+      303,  303,  132,   52,  303,   44,   44,   44,  303,   52,
+
+       46,  135,   44,   44,   44,  303,   52,   46,   44,   44,
+       44,  303,  136,   46,  303,  303,   52,   44,   44,   44,
+      137,  303,   46,  303,  303,  138,  303,   44,   44,   44,
+      303,   52,   46,  303,  303,  303,  140,  303,   52,  139,
+      303,   44,   44,   44,   52,  152,  154,  303,  303,  142,
+       44,   44,   44,   52,  141,  155,   44,   44,   44,  303,
+      303,   46,  151,   52,  303,   44,   44,   44,  303,  152,
+       46,  303,  153,  303,   44,   44,   44,   52,  303,   46,
+      303,  303,  303,  303,  160,  303,   52,  156,  156,  156,
+      303,  303,   52,  303,  156,  156,  156,  156,  156,  156,
+
+      303,   52,   44,   44,   44,  303,  303,   46,  303,  157,
+       52,  303,  303,  156,  156,  156,  156,  156,  156,   44,
+       44,   44,  303,  158,   46,   44,   44,   44,  303,  303,
+       46,   44,   44,   44,  303,  303,   46,  303,   52,   44,
+       44,   44,  303,  303,   46,  159,  303,   44,   44,   44,
+      303,  303,   46,  303,  303,   52,  303,  165,   44,   44,
+       44,   52,  303,   46,  162,  303,  303,   52,   44,   44,
+       44,  303,  303,   46,  303,   52,  163,  303,  303,  161,
+      303,  303,  164,   52,   44,   44,   44,  303,  303,   46,
+       44,   44,   44,  303,   52,   46,   44,   44,   44,  303,
+
+      303,   46,  303,  303,   52,   44,   44,   44,  303,  303,
+       46,  303,  166,   44,   44,   44,  303,  303,  179,  303,
+       52,  303,  303,  303,  303,  167,   52,  168,   44,   44,
+       44,  303,   52,   46,  303,   44,   44,   44,  303,  170,
+       46,   52,  176,  177,  303,  169,  303,  303,  303,   52,
+      171,  178,   44,   44,   44,  303,  303,   46,  303,  303,
+       44,   44,   44,  303,   52,   46,  303,   44,   44,   44,
+      303,   52,   46,  303,  303,  303,  303,  303,  303,  303,
+      303,  303,  180,  181,  181,  181,  303,  303,   52,  303,
+      181,  181,  181,  181,  181,  181,   52,   44,   44,   44,
+
+      303,  303,   46,   52,  303,  183,  303,  182,  303,  181,
+      181,  181,  181,  181,  181,   44,   44,   44,  303,  303,
+       46,  303,  303,  184,   44,   44,   44,  303,  303,   46,
+      303,  303,  303,   52,   44,   44,   44,  303,  303,   46,
+       44,   44,   44,  303,  303,  189,  303,   44,   44,   44,
+      303,   52,   46,  185,  186,  303,   44,   44,   44,  303,
+       52,   46,   44,   44,   44,  303,  187,  193,  303,  303,
+       52,  303,  303,   44,   44,   44,   52,  188,   46,   44,
+       44,   44,  303,   52,   46,   44,   44,   44,  303,  303,
+       46,  190,   52,  303,   44,   44,   44,  303,   52,   46,
+
+      303,  191,  303,  303,  197,   44,   44,   44,  303,   52,
+      200,   44,   44,   44,  192,   52,  201,  303,   44,   44,
+       44,   52,  195,   46,  303,  303,  303,  303,  194,  303,
+       52,   44,   44,   44,  303,  303,   46,   44,   44,   44,
+      196,   52,   46,   44,   44,   44,  303,   52,   46,  303,
+      303,  303,  303,  303,   52,  303,  303,  303,  303,  303,
+      202,   44,   44,   44,  303,  303,   46,   52,  303,   44,
+       44,   44,  303,   52,   46,  303,  303,  303,  303,   52,
+      303,  303,  303,  203,   45,   45,   45,  205,  303,  303,
+      204,   45,   45,   45,   45,   45,   45,   52,   44,   44,
+
+       44,  303,  303,   46,  303,   52,  303,  303,  303,  303,
+       45,   45,   45,   45,   45,   45,  303,  303,  206,  303,
+       44,   44,   44,  303,  208,   46,  303,   44,   44,   44,
+      303,  303,   46,  303,   52,   44,   44,   44,  303,  303,
+       46,  207,   44,   44,   44,  303,  303,   46,   44,   44,
+       44,  303,  303,   46,  303,  303,   52,  303,  303,   44,
+       44,   44,  209,   52,   46,   44,   44,   44,  303,  303,
+       46,   52,   44,   44,   44,  303,  303,   46,   52,  303,
+      303,  303,  210,  303,   52,   44,   44,   44,  211,  303,
+       46,   44,   44,   44,  303,   52,   46,  212,  303,  303,
+
+      303,   52,   44,   44,   44,  213,  303,   46,   52,   44,
+       44,   44,  303,  303,   46,  214,  303,  303,  303,  216,
+      303,   52,  215,  303,   44,   44,   44,   52,  303,   46,
+      303,  303,  303,  303,  217,  303,  303,  303,   52,   44,
+       44,   44,  303,  219,   46,   52,  303,  220,  303,  223,
+       44,   44,   44,  303,  303,   46,   44,   44,   44,  303,
+       52,   46,  303,   44,   44,   44,  221,  222,   46,  303,
+      303,   44,   44,   44,  303,   52,   46,   44,   44,   44,
+      303,  303,   46,   44,   44,   44,   52,  303,   46,   44,
+       44,   44,   52,  303,  233,   44,   44,   44,  225,   52,
+
+      230,   44,   44,   44,  303,  224,   46,   52,  303,   44,
+       44,   44,  303,   52,   46,   44,   44,   44,  226,   52,
+       46,   44,   44,   44,  303,   52,   46,  227,  303,  303,
+      303,   52,  228,  231,  303,  303,  229,   52,   44,   44,
+       44,  303,  303,  237,  232,   52,  303,   44,   44,   44,
+      303,   52,   46,  303,   44,   44,   44,   52,  235,   46,
+       44,   44,   44,  303,  303,   46,  234,   44,   44,   44,
+      303,  303,   46,  303,   52,  303,  303,  236,  303,   44,
+       44,   44,  303,   52,   46,  303,   44,   44,   44,  242,
+       52,   46,  303,  238,  303,  303,   52,   44,   44,   44,
+
+      240,  303,  244,   52,   44,   44,   44,  303,  303,   46,
+      303,  303,  303,  239,  303,   52,   44,   44,   44,  303,
+      303,   46,   52,   44,   44,   44,  241,  303,   46,  243,
+      303,  303,  303,   52,   44,   44,   44,  303,  303,   46,
+       52,   44,   44,   44,  248,  303,   46,  303,   44,   44,
+       44,  303,   52,   46,  303,  245,   44,   44,   44,   52,
+      303,  251,   44,   44,   44,  303,  303,   46,  303,  303,
+       52,  303,  303,  246,  303,  303,  247,   52,   44,   44,
+       44,  303,  303,   46,   52,  303,   44,   44,   44,  303,
+      303,   46,   52,  303,   44,   44,   44,  303,   52,   46,
+
+      303,  303,  249,   44,   44,   44,  303,  303,   46,  250,
+       44,   44,   44,  252,   52,   46,  303,  303,   44,   44,
+       44,  253,   52,   46,   44,   44,   44,  303,  303,   46,
+       52,  303,  303,  254,  303,  303,  303,  255,  303,   52,
+      303,  303,   44,   44,   44,  256,   52,   46,   44,   44,
+       44,  303,  303,   46,   52,  303,  303,  258,  303,  303,
+       52,  303,   44,   44,   44,  303,  257,  262,   44,   44,
+       44,  303,  303,   46,   44,   44,   44,  259,   52,  264,
+       44,   44,   44,  303,   52,   46,   44,   44,   44,  303,
+      261,   46,   44,   44,   44,  303,  260,   46,   52,  303,
+
+       44,   44,   44,  303,   52,   46,  303,  303,  303,  303,
+       52,  303,   44,   44,   44,  303,   52,   46,   44,   44,
+       44,  303,   52,   46,  263,  303,  303,  303,   52,  303,
+      265,  303,  303,   44,   44,   44,   52,  303,   46,  303,
+      303,  303,  268,  266,   44,   44,   44,  267,   52,   46,
+       44,   44,   44,  303,   52,   46,  303,   44,   44,   44,
+      303,  303,  274,  303,  303,  303,  303,  303,  269,   52,
+      303,   44,   44,   44,  271,  270,  275,   44,   44,   44,
+       52,  303,   46,   44,   44,   44,   52,  303,   46,   44,
+       44,   44,  273,   52,   46,   44,   44,   44,  303,  277,
+
+      279,  272,  303,   44,   44,   44,  303,   52,  280,   44,
+       44,   44,  303,   52,   46,  303,   44,   44,   44,   52,
+      303,   46,   44,   44,   44,   52,  303,   46,  303,  303,
+      303,   52,  303,  276,  303,  278,   44,   44,   44,   52,
+      303,  284,   44,   44,   44,   52,  303,   46,   44,   44,
+       44,  303,   52,   46,  303,   44,   44,   44,   52,  303,
+       46,  303,  281,  282,   44,   44,   44,  303,  303,   46,
+      303,  303,   52,  303,  283,   44,   44,   44,   52,  303,
+       46,  303,  303,  303,   52,   44,   44,   44,  303,  303,
+       46,   52,   44,   44,   44,  303,  303,  291,  303,  285,
+
+       52,   44,   44,   44,  286,  287,  292,   44,   44,   44,
+      303,   52,   46,   44,   44,   44,  303,  288,  294,  303,
+      303,   52,   44,   44,   44,  303,  303,   46,   52,  303,
+      303,  289,  290,   44,   44,   44,  303,   52,   46,   44,
+       44,   44,  303,   52,   46,   44,   44,   44,  303,   52,
+      298,   44,   44,   44,  303,  303,   46,  303,   52,  293,
+       44,   44,   44,  303,  303,   46,   44,   44,   44,   52,
+      303,   46,  303,  295,  303,   52,  303,  303,   44,   44,
+       44,   52,  297,  302,  303,  303,  303,   52,  303,  296,
+      303,  303,  303,  303,  303,  303,   52,  303,  303,  303,
+
+      303,  303,   52,  303,  299,  303,  303,  303,  303,  303,
+      303,  303,  303,  303,   52,  303,  303,  303,  300,  303,
+      303,  303,  303,  301,   36,   36,   36,   36,   36,   45,
+       45,   45,   45,   45,   64,  303,   64,   64,   64,   83,
+      303,   83,  303,   83,   85,   85,   85,   85,   85,   93,
+       93,   93,   93,   93,  110,  303,  110,  110,  110,  125,
+      125,  125,   11,  303,  303,  303,  303,  303,  303,  303,
+      303,  303,  303,  303,  303,  303,  303,  303,  303,  303,
+      303,  303,  303,  303,  303,  303,  303,  303,  303,  303,
+      303,  303,  303,  303,  303,  303,  303,  303,  303,  303,
+
+      303,  303,  303,  303,  303,  303,  303,  303,  303,  303,
+      303,  303,  303,  303,  303,  303,  303,  303,  303,  303,
+      303,  303,  303,  303,  303,  303,  303
     } ;
 
-static const flex_int16_t yy_chk[1849] =
+static const flex_int16_t yy_chk[2028] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -898,200 +930,220 @@ static const flex_int16_t yy_chk[1849] =
         1,    1,    1,    1,    3,    3,    3,    4,    4,    4,
         3,    9,    7,    4,    5,    5,    8,    5,    5,    5,
         5,    5,    5,    5,    5,    5,    5,   10,   13,   26,
-       13,   21,  289,    5,    5,  288,   21,    5,   37,    9,
+       13,   21,  315,    5,    5,  314,   21,    5,   37,    9,
 
        37,   27,    5,   28,    5,   32,    5,   17,   26,   17,
        17,   17,    5,    5,    7,   10,    5,   25,    8,   25,
        17,    5,   25,   25,   25,   27,    5,   28,   33,   32,
-       31,    5,    5,   15,   15,   15,  287,  286,   15,   17,
-       19,  186,   19,   19,   19,  165,   20,   20,   20,   31,
-       74,   44,   33,   19,  143,   75,   15,   20,  122,   15,
-       15,   22,  114,   22,   22,   22,   15,   15,   42,   15,
-       42,   92,   19,   74,   22,   15,   20,   15,   75,   76,
-       15,   15,   44,   15,   82,   15,   15,   15,   15,   15,
-       15,   15,   77,   22,   45,   45,   45,  110,   78,   45,
-
-       47,   47,   47,   76,   79,   47,   48,   48,   48,   81,
-       84,   48,   49,   49,   49,   77,  110,   49,   50,   50,
-       50,   78,   43,   50,   51,   51,   51,   41,   79,   51,
-       45,   39,   52,   72,   72,   72,   47,   38,   48,   52,
-       50,   84,   48,   73,   73,   73,   47,   51,   49,  109,
-       53,   53,   53,   24,   50,   53,   54,   54,   54,   50,
-       51,   54,   48,   52,  108,   49,   51,   52,   55,   55,
-       55,   52,  109,   55,  111,   56,   56,   56,  112,   52,
-       56,  113,   52,   14,   52,   52,   53,   11,  108,  137,
-        0,    0,   54,   53,   57,   57,   57,  140,  111,   57,
-
-      113,  112,   53,    0,   55,   58,   58,   58,  137,   54,
-       58,   56,   59,   59,   59,    0,  140,   59,   60,   60,
-       60,    0,   55,   60,   61,   61,   61,    0,   56,   61,
-       57,    0,    0,   57,    0,   57,    0,   62,   62,   62,
-        0,   58,   62,    0,   64,   64,   64,    0,   59,   65,
-        0,   65,   65,   65,   60,   64,    0,    0,    0,   62,
-       61,   60,   65,   58,   66,   59,   66,   61,   86,   66,
-       66,   66,    0,   62,   64,   86,    0,    0,   62,    0,
-        0,   65,   67,    0,   67,   67,   67,   68,   68,   68,
-        0,    0,    0,   62,    0,   67,    0,    0,   68,   86,
-
-       87,   87,   87,   86,    0,   87,    0,   86,   88,   88,
-       88,    0,    0,   88,   67,   86,    0,   68,   86,    0,
-       86,   86,   89,   89,   89,    0,    0,   89,    0,   90,
-       90,   90,    0,    0,   90,    0,   87,   88,   91,   91,
-       91,   87,    0,   91,   88,   93,   93,   93,    0,    0,
-       93,   95,   95,   95,    0,    0,   95,    0,   89,   90,
-        0,   88,    0,    0,    0,   90,    0,   89,   91,    0,
-       96,   96,   96,    0,   91,   96,    0,   97,   97,   97,
-        0,   93,   97,   90,    0,    0,    0,   95,    0,    0,
-        0,   95,   91,   94,   94,   94,    0,    0,    0,    0,
-
-       94,   94,   94,   94,   94,   94,   96,   98,   98,   98,
-        0,    0,   98,   97,    0,    0,    0,   98,    0,   94,
-       94,   94,   94,   94,   94,    0,   96,    0,   99,   99,
-       99,    0,   97,   99,  100,  100,  100,    0,    0,  100,
-      101,  101,  101,   98,    0,  101,  102,  102,  102,    0,
-        0,  102,  103,  103,  103,    0,    0,  103,  104,  104,
-      104,    0,    0,  104,   99,    0,  105,  105,  105,    0,
-      100,  105,    0,   99,    0,    0,  101,    0,    0,  106,
-      106,  106,  102,    0,  106,  100,    0,    0,  103,    0,
-        0,  117,  117,  117,  104,  101,  117,    0,    0,    0,
-
-        0,    0,  105,  102,  118,  118,  118,  103,    0,  118,
-        0,  120,  120,  120,    0,  106,  120,  104,  119,  119,
-      119,    0,    0,  119,    0,  105,  106,  117,  121,  121,
-      121,    0,  118,  121,  126,  126,  126,    0,    0,  126,
-      118,    0,    0,    0,  126,  117,    0,  120,  125,  125,
-      125,    0,    0,  125,  119,    0,  118,    0,    0,    0,
-        0,    0,    0,  119,  121,  124,  124,  124,    0,    0,
-      126,    0,  124,  124,  124,  124,  124,  124,  127,  127,
-      127,    0,    0,  127,  125,  128,  128,  128,    0,    0,
-      128,  124,  124,  124,  124,  124,  124,  129,  129,  129,
-
-        0,    0,  129,  130,  130,  130,  125,    0,  130,    0,
-        0,    0,    0,    0,  127,  131,  131,  131,    0,    0,
-      131,  128,    0,    0,  128,  131,  132,  132,  132,    0,
-        0,  132,    0,  129,    0,  133,  133,  133,  127,  130,
-      133,    0,  129,  134,  134,  134,  130,    0,  134,    0,
-        0,  131,  135,  135,  135,    0,    0,  135,  136,  136,
-      136,    0,  132,  136,    0,    0,    0,    0,  145,  145,
-      145,  133,    0,  145,    0,    0,  146,  146,  146,  134,
-      132,  146,  145,  145,    0,    0,  134,    0,  135,    0,
-        0,  145,  133,    0,  136,  135,  147,  147,  147,    0,
-
-        0,  147,    0,  136,  145,  151,  151,  151,    0,    0,
-      151,    0,  146,  152,  152,  152,    0,    0,  152,    0,
-        0,  153,  153,  153,    0,    0,  153,    0,  156,  156,
-      156,    0,  147,  156,    0,    0,    0,    0,    0,    0,
-        0,  151,    0,  147,  150,  150,  150,    0,    0,  152,
-      151,  150,  150,  150,  150,  150,  150,  153,    0,    0,
-      153,  154,  154,  154,  156,    0,  154,    0,    0,  152,
-      150,  150,  150,  150,  150,  150,  155,  155,  155,    0,
-        0,  155,  157,  157,  157,    0,    0,  157,  158,  158,
-      158,    0,    0,  158,  159,  159,  159,  154,    0,  159,
-
-        0,    0,    0,  154,  160,  160,  160,    0,    0,  160,
-        0,    0,  155,    0,    0,  161,  161,  161,  157,  155,
-      161,    0,    0,    0,  158,    0,  157,  162,  162,  162,
-      159,    0,  162,  167,  167,  167,  157,  162,  167,    0,
-      160,    0,  168,  168,  168,    0,  158,  168,  169,  169,
-      169,  161,    0,  169,    0,  171,  171,  171,    0,  160,
-      171,    0,    0,  162,    0,    0,  175,  175,  175,  167,
-      161,  175,    0,    0,    0,  173,  173,  173,  168,    0,
-      173,    0,    0,    0,  169,    0,    0,  174,  174,  174,
-      169,  171,  174,  177,  177,  177,    0,    0,  177,    0,
-
-        0,    0,  175,    0,    0,    0,    0,  171,  172,  172,
-      172,  173,    0,    0,    0,  172,  172,  172,  172,  172,
-      172,  175,    0,  174,    0,  173,  176,  176,  176,  177,
-      174,  176,    0,    0,  172,  172,  172,  172,  172,  172,
-      179,  179,  179,    0,    0,  179,    0,    0,  177,  180,
-      180,  180,    0,    0,  180,  181,  181,  181,    0,    0,
-      181,    0,  176,    0,  183,  183,  183,    0,  176,  183,
-      184,  184,  184,    0,    0,  184,  179,  185,  185,  185,
-        0,    0,  185,    0,    0,  180,    0,  190,  190,  190,
-        0,  181,  190,  179,    0,    0,  191,  191,  191,    0,
-
-      183,  191,    0,    0,  180,    0,  184,    0,    0,  192,
-      192,  192,  181,  185,  192,    0,    0,  184,    0,    0,
-      183,    0,    0,  190,    0,    0,  185,    0,  193,  193,
-      193,    0,  191,  193,    0,  194,  194,  194,    0,  190,
-      194,  191,  195,  195,  195,  192,    0,  195,  196,  196,
-      196,    0,  192,  196,  197,  197,  197,    0,    0,  197,
-      198,  198,  198,    0,  193,  198,    0,  199,  199,  199,
-        0,  194,  199,    0,  200,  200,  200,  194,  195,  200,
-      201,  201,  201,  193,  196,  201,  202,  202,  202,    0,
-      197,  202,    0,    0,    0,    0,  198,  195,    0,    0,
-
-        0,    0,    0,  199,  196,  199,  204,  204,  204,  197,
-      200,  204,    0,  198,    0,    0,  201,  200,  205,  205,
-      205,    0,  202,  205,    0,  206,  206,  206,    0,  202,
-      206,  207,  207,  207,    0,    0,  207,  201,  208,  208,
-      208,    0,  204,  208,  209,  209,  209,    0,  208,  209,
-      210,  210,  210,    0,  205,  210,    0,    0,  211,  211,
-      211,  206,  204,  211,  212,  212,  212,  207,    0,  212,
-      214,  214,  214,    0,  208,  214,  216,  216,  216,    0,
-      209,  216,    0,    0,  206,    0,  210,  209,    0,    0,
-      207,  215,  215,  215,  211,    0,  215,  217,  217,  217,
-
-      212,  215,  217,  218,  218,  218,  214,    0,  218,  211,
-        0,    0,  216,  220,  220,  220,    0,    0,  220,    0,
-        0,  212,    0,  214,  221,  221,  221,  215,    0,  221,
-      222,  222,  222,  217,    0,  222,    0,  216,    0,  218,
-      223,  223,  223,    0,    0,  223,  225,  225,  225,  220,
-        0,  225,  226,  226,  226,    0,  220,  226,  217,    0,
-      221,    0,    0,  227,  227,  227,  222,  221,  227,    0,
-        0,    0,  222,  228,  228,  228,  223,    0,  228,    0,
-        0,    0,  225,    0,    0,  225,    0,    0,  226,  229,
-      229,  229,    0,    0,  229,    0,  223,    0,    0,  227,
-
-        0,  230,  230,  230,    0,  226,  230,    0,    0,  228,
-        0,  232,  232,  232,    0,  228,  232,  227,  233,  233,
-      233,    0,    0,  233,    0,  229,  234,  234,  234,    0,
-        0,  234,    0,  235,  235,  235,    0,  230,  235,  236,
-      236,  236,    0,    0,  236,    0,    0,  232,    0,    0,
-      237,  237,  237,    0,  233,  237,    0,  230,  238,  238,
-      238,  232,  234,  238,    0,  239,  239,  239,  234,  235,
-      239,    0,    0,  233,    0,  236,  241,  241,  241,    0,
-        0,  241,  242,  242,  242,    0,  237,  242,    0,  235,
-        0,  237,    0,    0,  238,    0,  236,    0,  243,  243,
-
-      243,  239,    0,  243,  244,  244,  244,  239,  243,  244,
-        0,    0,  241,    0,    0,  238,    0,    0,  242,  245,
-      245,  245,    0,    0,  245,  246,  246,  246,    0,    0,
-      246,  247,  247,  247,  243,    0,  247,    0,    0,    0,
-      244,  248,  248,  248,    0,    0,  248,  249,  249,  249,
-        0,    0,  249,    0,    0,  245,  244,  252,  252,  252,
-        0,  246,  252,    0,  253,  253,  253,  247,    0,  253,
-        0,  256,  256,  256,    0,    0,  256,  248,    0,    0,
-      257,  257,  257,  249,  247,  257,    0,    0,  248,  258,
-      258,  258,    0,  252,  258,    0,  259,  259,  259,  249,
-
-      253,  259,    0,  260,  260,  260,    0,  256,  260,    0,
-      261,  261,  261,    0,  252,  261,  257,  262,  262,  262,
-      253,  256,  262,    0,    0,  258,  263,  263,  263,    0,
-        0,  263,  259,  257,    0,  264,  264,  264,    0,  260,
-      264,    0,    0,  259,    0,  258,  261,  267,  267,  267,
-        0,    0,  267,  262,  269,  269,  269,    0,    0,  269,
-        0,    0,  263,  270,  270,  270,    0,    0,  270,  262,
-        0,  264,  271,  271,  271,    0,    0,  271,    0,  273,
-      273,  273,    0,  267,  273,    0,  264,  274,  274,  274,
-      269,    0,  274,  275,  275,  275,    0,  269,  275,  270,
-
-        0,    0,    0,  267,    0,    0,    0,    0,  271,    0,
-        0,    0,    0,    0,    0,  273,    0,    0,    0,    0,
-        0,    0,    0,  274,    0,  271,    0,    0,    0,  275,
-        0,    0,    0,    0,    0,    0,    0,  273,    0,    0,
-        0,    0,    0,    0,  274,  278,  278,  278,  278,  278,
-      279,  279,  279,  279,  279,  280,    0,  280,  280,  280,
-      281,    0,  281,    0,  281,  282,  282,  282,  282,  282,
-      283,  283,  283,  283,  283,  284,    0,  284,  284,  284,
-      285,  285,  285,  277,  277,  277,  277,  277,  277,  277,
-      277,  277,  277,  277,  277,  277,  277,  277,  277,  277,
-
-      277,  277,  277,  277,  277,  277,  277,  277,  277,  277,
-      277,  277,  277,  277,  277,  277,  277,  277,  277,  277,
-      277,  277,  277,  277,  277,  277,  277,  277,  277,  277,
-      277,  277,  277,  277,  277,  277,  277,  277,  277,  277,
-      277,  277,  277,  277,  277,  277,  277,  277
+       31,    5,    5,   15,   15,   15,  313,   44,   15,   17,
+       42,   19,   42,   19,   19,   19,   20,   20,   20,   31,
+      312,  113,   33,   85,   19,   75,   15,   20,   77,   15,
+       15,   22,  198,   22,   22,   22,   15,   15,   44,   15,
+      113,  174,   15,   19,   22,   15,   20,   15,   75,   80,
+       15,   15,   77,   15,   85,   15,   15,   15,   15,   15,
+       15,   15,   76,   22,   45,   45,   45,  116,   78,   45,
+
+       47,   47,   47,   80,   79,   47,   48,   48,   48,  143,
+      149,   48,   49,   49,   49,   76,  116,   49,   50,   50,
+       50,   78,  125,   50,   51,   51,   51,   79,  143,   51,
+       45,  117,   52,   73,   73,   73,   47,   93,   48,   52,
+       50,  112,   48,   74,   74,   74,   47,   51,   49,  115,
+       53,   53,   53,   83,   50,   53,   54,   54,   54,   50,
+       51,   54,   48,   52,  112,   49,   51,   52,   55,   55,
+       55,   52,  115,   55,   82,   56,   56,   56,  111,   52,
+       56,  114,   52,   43,   52,   52,   53,  146,   57,   57,
+       57,   41,   54,   57,   39,   38,   58,   58,   58,   54,
+
+       53,   58,  111,   54,   55,  114,  146,   24,   54,   14,
+       11,   56,   59,   59,   59,    0,    0,   59,   60,   60,
+       60,   55,    0,   60,   57,   61,   61,   61,    0,   56,
+       61,    0,   58,    0,    0,   58,    0,   58,   62,   62,
+       62,   57,    0,   62,   63,   63,   63,    0,   59,   63,
+        0,    0,    0,    0,   60,    0,   65,   65,   65,    0,
+       66,   61,   66,   66,   66,    0,   63,   65,   61,    0,
+       59,   60,    0,   66,   62,    0,    0,   67,    0,   67,
+       63,   62,   67,   67,   67,   63,   65,   69,   69,   69,
+       87,   68,   66,   68,   68,   68,    0,   87,   69,    0,
+
+       63,    0,    0,    0,   68,   88,   88,   88,    0,    0,
+       88,   90,   90,   90,    0,    0,   90,   69,    0,    0,
+        0,   87,    0,   68,    0,   87,   89,   89,   89,   87,
+        0,   89,    0,   91,   91,   91,    0,   87,   91,    0,
+       87,   88,   87,   87,    0,    0,   88,   90,   92,   92,
+       92,    0,    0,   92,    0,   89,   90,    0,    0,   94,
+       94,   94,   89,   91,   94,  101,  101,  101,    0,   91,
+      101,   96,   96,   96,    0,  101,   96,    0,   92,   89,
+        0,   97,   97,   97,   92,    0,   97,   91,    0,    0,
+        0,   98,   98,   98,    0,   94,   98,    0,    0,    0,
+
+        0,  101,   92,   95,   95,   95,    0,   96,    0,    0,
+       95,   95,   95,   95,   95,   95,   96,   97,   99,   99,
+       99,   97,    0,   99,    0,    0,    0,   98,    0,   95,
+       95,   95,   95,   95,   95,    0,   98,  100,  100,  100,
+        0,    0,  100,  102,  102,  102,    0,    0,  102,    0,
+      103,  103,  103,    0,   99,  103,    0,  104,  104,  104,
+        0,    0,  104,  105,  105,  105,    0,    0,  105,    0,
+      106,  106,  106,  100,   99,  106,    0,    0,    0,  102,
+      107,  107,  107,    0,    0,  107,  103,    0,  102,    0,
+        0,    0,  100,  104,    0,  108,  108,  108,    0,  105,
+
+      108,  103,  109,  109,  109,    0,  106,  109,  120,  120,
+      120,    0,  104,  120,    0,    0,  107,  121,  121,  121,
+      105,    0,  121,    0,    0,  106,    0,  122,  122,  122,
+        0,  108,  122,    0,    0,    0,  108,    0,  109,  107,
+        0,  123,  123,  123,  120,  121,  123,    0,    0,  109,
+      124,  124,  124,  121,  108,  124,  128,  128,  128,    0,
+        0,  128,  120,  122,    0,  129,  129,  129,    0,  121,
+      129,    0,  122,    0,  131,  131,  131,  123,    0,  131,
+        0,    0,    0,    0,  131,    0,  124,  127,  127,  127,
+        0,    0,  128,    0,  127,  127,  127,  127,  127,  127,
+
+        0,  129,  130,  130,  130,    0,    0,  130,    0,  128,
+      131,    0,    0,  127,  127,  127,  127,  127,  127,  132,
+      132,  132,    0,  129,  132,  133,  133,  133,    0,    0,
+      133,  134,  134,  134,    0,    0,  134,    0,  130,  135,
+      135,  135,    0,    0,  135,  130,    0,  136,  136,  136,
+        0,    0,  136,    0,    0,  132,    0,  136,  137,  137,
+      137,  133,    0,  137,  133,    0,    0,  134,  138,  138,
+      138,    0,    0,  138,    0,  135,  134,    0,    0,  132,
+        0,    0,  135,  136,  139,  139,  139,    0,    0,  139,
+      140,  140,  140,    0,  137,  140,  141,  141,  141,    0,
+
+        0,  141,    0,    0,  138,  142,  142,  142,    0,    0,
+      142,    0,  137,  152,  152,  152,    0,    0,  152,    0,
+      139,    0,    0,    0,    0,  138,  140,  139,  151,  151,
+      151,    0,  141,  151,    0,  153,  153,  153,    0,  141,
+      153,  142,  151,  151,    0,  140,    0,    0,    0,  152,
+      142,  151,  157,  157,  157,    0,    0,  157,    0,    0,
+      158,  158,  158,    0,  151,  158,    0,  159,  159,  159,
+        0,  153,  159,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,  153,  156,  156,  156,    0,    0,  157,    0,
+      156,  156,  156,  156,  156,  156,  158,  160,  160,  160,
+
+        0,    0,  160,  159,    0,  158,    0,  157,    0,  156,
+      156,  156,  156,  156,  156,  161,  161,  161,    0,    0,
+      161,    0,    0,  159,  162,  162,  162,    0,    0,  162,
+        0,    0,    0,  160,  163,  163,  163,    0,    0,  163,
+      164,  164,  164,    0,    0,  164,    0,  165,  165,  165,
+        0,  161,  165,  160,  161,    0,  166,  166,  166,    0,
+      162,  166,  167,  167,  167,    0,  162,  167,    0,    0,
+      163,    0,    0,  168,  168,  168,  164,  163,  168,  169,
+      169,  169,    0,  165,  169,  170,  170,  170,    0,    0,
+      170,  165,  166,    0,  171,  171,  171,    0,  167,  171,
+
+        0,  165,    0,    0,  171,  176,  176,  176,    0,  168,
+      176,  177,  177,  177,  166,  169,  177,    0,  178,  178,
+      178,  170,  169,  178,    0,    0,    0,    0,  168,    0,
+      171,  180,  180,  180,    0,    0,  180,  183,  183,  183,
+      170,  176,  183,  182,  182,  182,    0,  177,  182,    0,
+        0,    0,    0,    0,  178,    0,    0,    0,    0,    0,
+      178,  184,  184,  184,    0,    0,  184,  180,    0,  186,
+      186,  186,    0,  183,  186,    0,    0,    0,    0,  182,
+        0,    0,    0,  180,  181,  181,  181,  183,    0,    0,
+      182,  181,  181,  181,  181,  181,  181,  184,  185,  185,
+
+      185,    0,    0,  185,    0,  186,    0,    0,    0,    0,
+      181,  181,  181,  181,  181,  181,    0,    0,  184,    0,
+      187,  187,  187,    0,  186,  187,    0,  188,  188,  188,
+        0,    0,  188,    0,  185,  190,  190,  190,    0,    0,
+      190,  185,  191,  191,  191,    0,    0,  191,  192,  192,
+      192,    0,    0,  192,    0,    0,  187,    0,    0,  194,
+      194,  194,  187,  188,  194,  195,  195,  195,    0,    0,
+      195,  190,  196,  196,  196,    0,    0,  196,  191,    0,
+        0,    0,  188,    0,  192,  197,  197,  197,  190,    0,
+      197,  202,  202,  202,    0,  194,  202,  191,    0,    0,
+
+        0,  195,  203,  203,  203,  192,    0,  203,  196,  204,
+      204,  204,    0,    0,  204,  194,    0,    0,    0,  196,
+        0,  197,  195,    0,  205,  205,  205,  202,    0,  205,
+        0,    0,    0,    0,  197,    0,    0,    0,  203,  206,
+      206,  206,    0,  202,  206,  204,    0,  203,    0,  206,
+      207,  207,  207,    0,    0,  207,  208,  208,  208,    0,
+      205,  208,    0,  209,  209,  209,  204,  205,  209,    0,
+        0,  210,  210,  210,    0,  206,  210,  211,  211,  211,
+        0,    0,  211,  212,  212,  212,  207,    0,  212,  215,
+      215,  215,  208,    0,  215,  213,  213,  213,  208,  209,
+
+      213,  214,  214,  214,    0,  207,  214,  210,    0,  216,
+      216,  216,    0,  211,  216,  217,  217,  217,  209,  212,
+      217,  219,  219,  219,    0,  215,  219,  210,    0,    0,
+        0,  213,  211,  213,    0,    0,  212,  214,  220,  220,
+      220,    0,    0,  220,  214,  216,    0,  221,  221,  221,
+        0,  217,  221,    0,  222,  222,  222,  219,  217,  222,
+      223,  223,  223,    0,    0,  223,  216,  224,  224,  224,
+        0,    0,  224,    0,  220,    0,    0,  219,    0,  225,
+      225,  225,    0,  221,  225,    0,  226,  226,  226,  225,
+      222,  226,    0,  221,    0,    0,  223,  227,  227,  227,
+
+      223,    0,  227,  224,  228,  228,  228,    0,    0,  228,
+        0,    0,    0,  222,    0,  225,  229,  229,  229,    0,
+        0,  229,  226,  231,  231,  231,  224,    0,  231,  226,
+        0,    0,    0,  227,  232,  232,  232,    0,    0,  232,
+      228,  234,  234,  234,  232,    0,  234,    0,  235,  235,
+      235,    0,  229,  235,    0,  228,  236,  236,  236,  231,
+        0,  236,  238,  238,  238,    0,    0,  238,    0,    0,
+      232,    0,    0,  229,    0,    0,  231,  234,  239,  239,
+      239,    0,    0,  239,  235,    0,  240,  240,  240,    0,
+        0,  240,  236,    0,  241,  241,  241,    0,  238,  241,
+
+        0,    0,  234,  242,  242,  242,    0,    0,  242,  235,
+      243,  243,  243,  238,  239,  243,    0,    0,  245,  245,
+      245,  239,  240,  245,  246,  246,  246,    0,    0,  246,
+      241,    0,    0,  240,    0,    0,    0,  241,    0,  242,
+        0,    0,  247,  247,  247,  242,  243,  247,  248,  248,
+      248,    0,    0,  248,  245,    0,    0,  245,    0,    0,
+      246,    0,  249,  249,  249,    0,  243,  249,  250,  250,
+      250,    0,    0,  250,  252,  252,  252,  246,  247,  252,
+      253,  253,  253,    0,  248,  253,  254,  254,  254,    0,
+      248,  254,  255,  255,  255,    0,  247,  255,  249,    0,
+
+      256,  256,  256,    0,  250,  256,    0,    0,    0,    0,
+      252,    0,  257,  257,  257,    0,  253,  257,  258,  258,
+      258,    0,  254,  258,  250,    0,    0,    0,  255,    0,
+      253,    0,    0,  259,  259,  259,  256,    0,  259,    0,
+        0,    0,  256,  254,  260,  260,  260,  255,  257,  260,
+      261,  261,  261,    0,  258,  261,    0,  263,  263,  263,
+        0,    0,  263,    0,    0,    0,    0,    0,  257,  259,
+        0,  265,  265,  265,  259,  258,  265,  266,  266,  266,
+      260,    0,  266,  268,  268,  268,  261,    0,  268,  267,
+      267,  267,  261,  263,  267,  269,  269,  269,    0,  267,
+
+      269,  260,    0,  270,  270,  270,    0,  265,  270,  271,
+      271,  271,    0,  266,  271,    0,  272,  272,  272,  268,
+        0,  272,  273,  273,  273,  267,    0,  273,    0,    0,
+        0,  269,    0,  266,    0,  268,  276,  276,  276,  270,
+        0,  276,  277,  277,  277,  271,    0,  277,  278,  278,
+      278,    0,  272,  278,    0,  281,  281,  281,  273,    0,
+      281,    0,  271,  272,  282,  282,  282,    0,    0,  282,
+        0,    0,  276,    0,  273,  283,  283,  283,  277,    0,
+      283,    0,    0,    0,  278,  285,  285,  285,    0,    0,
+      285,  281,  286,  286,  286,    0,    0,  286,    0,  277,
+
+      282,  287,  287,  287,  278,  281,  287,  288,  288,  288,
+        0,  283,  288,  289,  289,  289,    0,  282,  289,    0,
+        0,  285,  290,  290,  290,    0,    0,  290,  286,    0,
+        0,  283,  285,  293,  293,  293,    0,  287,  293,  295,
+      295,  295,    0,  288,  295,  296,  296,  296,    0,  289,
+      296,  297,  297,  297,    0,    0,  297,    0,  290,  288,
+      299,  299,  299,    0,    0,  299,  300,  300,  300,  293,
+        0,  300,    0,  290,    0,  295,    0,    0,  301,  301,
+      301,  296,  295,  301,    0,    0,    0,  297,    0,  293,
+        0,    0,    0,    0,    0,    0,  299,    0,    0,    0,
+
+        0,    0,  300,    0,  297,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,  301,    0,    0,    0,  299,    0,
+        0,    0,    0,  300,  304,  304,  304,  304,  304,  305,
+      305,  305,  305,  305,  306,    0,  306,  306,  306,  307,
+        0,  307,    0,  307,  308,  308,  308,  308,  308,  309,
+      309,  309,  309,  309,  310,    0,  310,  310,  310,  311,
+      311,  311,  303,  303,  303,  303,  303,  303,  303,  303,
+      303,  303,  303,  303,  303,  303,  303,  303,  303,  303,
+      303,  303,  303,  303,  303,  303,  303,  303,  303,  303,
+      303,  303,  303,  303,  303,  303,  303,  303,  303,  303,
+
+      303,  303,  303,  303,  303,  303,  303,  303,  303,  303,
+      303,  303,  303,  303,  303,  303,  303,  303,  303,  303,
+      303,  303,  303,  303,  303,  303,  303
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -1100,13 +1152,14 @@ static char *yy_last_accepting_cpos;
 extern int d2_parser__flex_debug;
 int d2_parser__flex_debug = 1;
 
-static const flex_int16_t yy_rule_linenum[51] =
+static const flex_int16_t yy_rule_linenum[54] =
     {   0,
       117,  119,  121,  126,  127,  132,  133,  134,  146,  149,
       154,  160,  169,  178,  187,  196,  205,  214,  224,  234,
-      244,  253,  262,  272,  281,  290,  299,  308,  317,  326,
-      335,  344,  354,  452,  457,  462,  467,  468,  469,  470,
-      471,  472,  474,  492,  505,  510,  514,  516,  518,  520
+      244,  253,  262,  271,  280,  289,  299,  308,  317,  326,
+      335,  345,  354,  363,  372,  382,  480,  485,  490,  495,
+      496,  497,  498,  499,  500,  502,  520,  533,  538,  542,
+      544,  546,  548
     } ;
 
 /* The intent behind this definition is that it'll catch
@@ -1151,7 +1204,7 @@ unsigned int comment_start_line = 0;
 
 // To avoid the call to exit... oops!
 #define YY_FATAL_ERROR(msg) isc::d2::D2ParserContext::fatal(msg)
-#line 1154 "d2_lexer.cc"
+#line 1207 "d2_lexer.cc"
 /* noyywrap disables automatic rewinding for the next file to parse. Since we
    always parse only a single string, there's no need to do any wraps. And
    using yywrap requires linking with -lfl, which provides the default yywrap
@@ -1177,8 +1230,8 @@ unsigned int comment_start_line = 0;
 // by moving it ahead by yyleng bytes. yyleng specifies the length of the
 // currently matched token.
 #define YY_USER_ACTION  driver.loc_.columns(yyleng);
-#line 1180 "d2_lexer.cc"
-#line 1181 "d2_lexer.cc"
+#line 1233 "d2_lexer.cc"
+#line 1234 "d2_lexer.cc"
 
 #define INITIAL 0
 #define COMMENT 1
@@ -1486,7 +1539,7 @@ YY_DECL
     }
 
 
-#line 1489 "d2_lexer.cc"
+#line 1542 "d2_lexer.cc"
 
        while ( /*CONSTCOND*/1 )                /* loops until end-of-file is reached */
                {
@@ -1515,13 +1568,13 @@ yy_match:
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                                {
                                yy_current_state = (int) yy_def[yy_current_state];
-                               if ( yy_current_state >= 278 )
+                               if ( yy_current_state >= 304 )
                                        yy_c = yy_meta[yy_c];
                                }
                        yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
                        ++yy_cp;
                        }
-               while ( yy_current_state != 277 );
+               while ( yy_current_state != 303 );
                yy_cp = (yy_last_accepting_cpos);
                yy_current_state = (yy_last_accepting_state);
 
@@ -1540,13 +1593,13 @@ do_action:      /* This label is used only to access EOF actions. */
                        {
                        if ( yy_act == 0 )
                                fprintf( stderr, "--scanner backing up\n" );
-                       else if ( yy_act < 51 )
+                       else if ( yy_act < 54 )
                                fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
                                         (long)yy_rule_linenum[yy_act], d2_parser_text );
-                       else if ( yy_act == 51 )
+                       else if ( yy_act == 54 )
                                fprintf( stderr, "--accepting default rule (\"%s\")\n",
                                         d2_parser_text );
-                       else if ( yy_act == 52 )
+                       else if ( yy_act == 55 )
                                fprintf( stderr, "--(end of buffer or a NUL)\n" );
                        else
                                fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
@@ -1799,7 +1852,43 @@ YY_RULE_SETUP
        YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 272 "d2_lexer.ll"
+#line 271 "d2_lexer.ll"
+{
+    switch(driver.ctx_) {
+    case isc::d2::D2ParserContext::TSIG_KEYS:
+        return isc::d2::D2Parser::make_ALGORITHM(driver.loc_);
+    default:
+        return isc::d2::D2Parser::make_STRING("algorithm", driver.loc_);
+    }
+}
+       YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 280 "d2_lexer.ll"
+{
+    switch(driver.ctx_) {
+    case isc::d2::D2ParserContext::TSIG_KEYS:
+        return isc::d2::D2Parser::make_DIGEST_BITS(driver.loc_);
+    default:
+        return isc::d2::D2Parser::make_STRING("digest-bits", driver.loc_);
+    }
+}
+       YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 289 "d2_lexer.ll"
+{
+    switch(driver.ctx_) {
+    case isc::d2::D2ParserContext::TSIG_KEYS:
+        return isc::d2::D2Parser::make_SECRET(driver.loc_);
+    default:
+        return isc::d2::D2Parser::make_STRING("secret", driver.loc_);
+    }
+}
+       YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 299 "d2_lexer.ll"
 {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::CONFIG:
@@ -1809,9 +1898,9 @@ YY_RULE_SETUP
     }
 }
        YY_BREAK
-case 25:
+case 28:
 YY_RULE_SETUP
-#line 281 "d2_lexer.ll"
+#line 308 "d2_lexer.ll"
 {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::LOGGING:
@@ -1821,9 +1910,9 @@ YY_RULE_SETUP
     }
 }
        YY_BREAK
-case 26:
+case 29:
 YY_RULE_SETUP
-#line 290 "d2_lexer.ll"
+#line 317 "d2_lexer.ll"
 {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::LOGGERS:
@@ -1833,9 +1922,9 @@ YY_RULE_SETUP
     }
 }
        YY_BREAK
-case 27:
+case 30:
 YY_RULE_SETUP
-#line 299 "d2_lexer.ll"
+#line 326 "d2_lexer.ll"
 {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::OUTPUT_OPTIONS:
@@ -1845,21 +1934,22 @@ YY_RULE_SETUP
     }
 }
        YY_BREAK
-case 28:
+case 31:
 YY_RULE_SETUP
-#line 308 "d2_lexer.ll"
+#line 335 "d2_lexer.ll"
 {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::LOGGERS:
+    case isc::d2::D2ParserContext::TSIG_KEYS:
         return isc::d2::D2Parser::make_NAME(driver.loc_);
     default:
         return isc::d2::D2Parser::make_STRING("name", driver.loc_);
     }
 }
        YY_BREAK
-case 29:
+case 32:
 YY_RULE_SETUP
-#line 317 "d2_lexer.ll"
+#line 345 "d2_lexer.ll"
 {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::LOGGERS:
@@ -1869,9 +1959,9 @@ YY_RULE_SETUP
     }
 }
        YY_BREAK
-case 30:
+case 33:
 YY_RULE_SETUP
-#line 326 "d2_lexer.ll"
+#line 354 "d2_lexer.ll"
 {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::LOGGERS:
@@ -1881,9 +1971,9 @@ YY_RULE_SETUP
     }
 }
        YY_BREAK
-case 31:
+case 34:
 YY_RULE_SETUP
-#line 335 "d2_lexer.ll"
+#line 363 "d2_lexer.ll"
 {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::CONFIG:
@@ -1893,9 +1983,9 @@ YY_RULE_SETUP
     }
 }
        YY_BREAK
-case 32:
+case 35:
 YY_RULE_SETUP
-#line 344 "d2_lexer.ll"
+#line 372 "d2_lexer.ll"
 {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::CONFIG:
@@ -1905,9 +1995,9 @@ YY_RULE_SETUP
     }
 }
        YY_BREAK
-case 33:
+case 36:
 YY_RULE_SETUP
-#line 354 "d2_lexer.ll"
+#line 382 "d2_lexer.ll"
 {
     // A string has been matched. It contains the actual string and single quotes.
     // We need to get those quotes out of the way and just use its content, e.g.
@@ -2006,65 +2096,65 @@ YY_RULE_SETUP
     return isc::d2::D2Parser::make_STRING(decoded, driver.loc_);
 }
        YY_BREAK
-case 34:
-/* rule 34 can match eol */
+case 37:
+/* rule 37 can match eol */
 YY_RULE_SETUP
-#line 452 "d2_lexer.ll"
+#line 480 "d2_lexer.ll"
 {
     // Bad string with a forbidden control character inside
     driver.error(driver.loc_, "Invalid control in " + std::string(yytext));
 }
        YY_BREAK
-case 35:
-/* rule 35 can match eol */
+case 38:
+/* rule 38 can match eol */
 YY_RULE_SETUP
-#line 457 "d2_lexer.ll"
+#line 485 "d2_lexer.ll"
 {
     // Bad string with a bad escape inside
     driver.error(driver.loc_, "Bad escape in " + std::string(yytext));
 }
        YY_BREAK
-case 36:
+case 39:
 YY_RULE_SETUP
-#line 462 "d2_lexer.ll"
+#line 490 "d2_lexer.ll"
 {
     // Bad string with an open escape at the end
     driver.error(driver.loc_, "Overflow escape in " + std::string(yytext));
 }
        YY_BREAK
-case 37:
+case 40:
 YY_RULE_SETUP
-#line 467 "d2_lexer.ll"
+#line 495 "d2_lexer.ll"
 { return isc::d2::D2Parser::make_LSQUARE_BRACKET(driver.loc_); }
        YY_BREAK
-case 38:
+case 41:
 YY_RULE_SETUP
-#line 468 "d2_lexer.ll"
+#line 496 "d2_lexer.ll"
 { return isc::d2::D2Parser::make_RSQUARE_BRACKET(driver.loc_); }
        YY_BREAK
-case 39:
+case 42:
 YY_RULE_SETUP
-#line 469 "d2_lexer.ll"
+#line 497 "d2_lexer.ll"
 { return isc::d2::D2Parser::make_LCURLY_BRACKET(driver.loc_); }
        YY_BREAK
-case 40:
+case 43:
 YY_RULE_SETUP
-#line 470 "d2_lexer.ll"
+#line 498 "d2_lexer.ll"
 { return isc::d2::D2Parser::make_RCURLY_BRACKET(driver.loc_); }
        YY_BREAK
-case 41:
+case 44:
 YY_RULE_SETUP
-#line 471 "d2_lexer.ll"
+#line 499 "d2_lexer.ll"
 { return isc::d2::D2Parser::make_COMMA(driver.loc_); }
        YY_BREAK
-case 42:
+case 45:
 YY_RULE_SETUP
-#line 472 "d2_lexer.ll"
+#line 500 "d2_lexer.ll"
 { return isc::d2::D2Parser::make_COLON(driver.loc_); }
        YY_BREAK
-case 43:
+case 46:
 YY_RULE_SETUP
-#line 474 "d2_lexer.ll"
+#line 502 "d2_lexer.ll"
 {
     // An integer was found.
     std::string tmp(yytext);
@@ -2083,9 +2173,9 @@ YY_RULE_SETUP
     return isc::d2::D2Parser::make_INTEGER(integer, driver.loc_);
 }
        YY_BREAK
-case 44:
+case 47:
 YY_RULE_SETUP
-#line 492 "d2_lexer.ll"
+#line 520 "d2_lexer.ll"
 {
     // A floating point was found.
     std::string tmp(yytext);
@@ -2099,43 +2189,43 @@ YY_RULE_SETUP
     return isc::d2::D2Parser::make_FLOAT(fp, driver.loc_);
 }
        YY_BREAK
-case 45:
+case 48:
 YY_RULE_SETUP
-#line 505 "d2_lexer.ll"
+#line 533 "d2_lexer.ll"
 {
     string tmp(yytext);
     return isc::d2::D2Parser::make_BOOLEAN(tmp == "true", driver.loc_);
 }
        YY_BREAK
-case 46:
+case 49:
 YY_RULE_SETUP
-#line 510 "d2_lexer.ll"
+#line 538 "d2_lexer.ll"
 {
    return isc::d2::D2Parser::make_NULL_TYPE(driver.loc_);
 }
        YY_BREAK
-case 47:
+case 50:
 YY_RULE_SETUP
-#line 514 "d2_lexer.ll"
+#line 542 "d2_lexer.ll"
 driver.error (driver.loc_, "JSON true reserved keyword is lower case only");
        YY_BREAK
-case 48:
+case 51:
 YY_RULE_SETUP
-#line 516 "d2_lexer.ll"
+#line 544 "d2_lexer.ll"
 driver.error (driver.loc_, "JSON false reserved keyword is lower case only");
        YY_BREAK
-case 49:
+case 52:
 YY_RULE_SETUP
-#line 518 "d2_lexer.ll"
+#line 546 "d2_lexer.ll"
 driver.error (driver.loc_, "JSON null reserved keyword is lower case only");
        YY_BREAK
-case 50:
+case 53:
 YY_RULE_SETUP
-#line 520 "d2_lexer.ll"
+#line 548 "d2_lexer.ll"
 driver.error (driver.loc_, "Invalid character: " + std::string(yytext));
        YY_BREAK
 case YY_STATE_EOF(INITIAL):
-#line 522 "d2_lexer.ll"
+#line 550 "d2_lexer.ll"
 {
     if (driver.states_.empty()) {
         return isc::d2::D2Parser::make_END(driver.loc_);
@@ -2159,12 +2249,12 @@ case YY_STATE_EOF(INITIAL):
     BEGIN(DIR_EXIT);
 }
        YY_BREAK
-case 51:
+case 54:
 YY_RULE_SETUP
-#line 545 "d2_lexer.ll"
+#line 573 "d2_lexer.ll"
 ECHO;
        YY_BREAK
-#line 2167 "d2_lexer.cc"
+#line 2257 "d2_lexer.cc"
 
        case YY_END_OF_BUFFER:
                {
@@ -2479,7 +2569,7 @@ static int yy_get_next_buffer (void)
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                        {
                        yy_current_state = (int) yy_def[yy_current_state];
-                       if ( yy_current_state >= 278 )
+                       if ( yy_current_state >= 304 )
                                yy_c = yy_meta[yy_c];
                        }
                yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
@@ -2512,11 +2602,11 @@ static int yy_get_next_buffer (void)
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
                {
                yy_current_state = (int) yy_def[yy_current_state];
-               if ( yy_current_state >= 278 )
+               if ( yy_current_state >= 304 )
                        yy_c = yy_meta[yy_c];
                }
        yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
-       yy_is_jam = (yy_current_state == 277);
+       yy_is_jam = (yy_current_state == 303);
 
                return yy_is_jam ? 0 : yy_current_state;
 }
@@ -3265,7 +3355,7 @@ void d2_parser_free (void * ptr )
 
 /* %ok-for-header */
 
-#line 545 "d2_lexer.ll"
+#line 573 "d2_lexer.ll"
 
 
 using namespace isc::dhcp;
index b15e27667d4c6d8fe95c565970b0a6abfdaacc3a..f932ed2252a16f2c25619d0b19bc973cb7f9b8e9 100644 (file)
@@ -267,6 +267,33 @@ ControlCharacterFill            [^"\\]|\\{JSONEscapeSequence}
     }
 }
 
+\"algorithm\" {
+    switch(driver.ctx_) {
+    case isc::d2::D2ParserContext::TSIG_KEYS:
+        return isc::d2::D2Parser::make_ALGORITHM(driver.loc_);
+    default:
+        return isc::d2::D2Parser::make_STRING("algorithm", driver.loc_);
+    }
+}
+
+\"digest-bits\" {
+    switch(driver.ctx_) {
+    case isc::d2::D2ParserContext::TSIG_KEYS:
+        return isc::d2::D2Parser::make_DIGEST_BITS(driver.loc_);
+    default:
+        return isc::d2::D2Parser::make_STRING("digest-bits", driver.loc_);
+    }
+}
+
+\"secret\" {
+    switch(driver.ctx_) {
+    case isc::d2::D2ParserContext::TSIG_KEYS:
+        return isc::d2::D2Parser::make_SECRET(driver.loc_);
+    default:
+        return isc::d2::D2Parser::make_STRING("secret", driver.loc_);
+    }
+}
+
 
 \"Logging\" {
     switch(driver.ctx_) {
@@ -307,6 +334,7 @@ ControlCharacterFill            [^"\\]|\\{JSONEscapeSequence}
 \"name\" {
     switch(driver.ctx_) {
     case isc::d2::D2ParserContext::LOGGERS:
+    case isc::d2::D2ParserContext::TSIG_KEYS:
         return isc::d2::D2Parser::make_NAME(driver.loc_);
     default:
         return isc::d2::D2Parser::make_STRING("name", driver.loc_);
index 4352b6ba991814b1035fa56d2f4b57599b11406a..3fd3917121dc518e16d4ea0120a66dca6b607596 100644 (file)
@@ -253,24 +253,24 @@ namespace isc { namespace d2 {
   {
       switch (that.type_get ())
     {
-      case 43: // value
-      case 70: // ncr_protocol_value
+      case 46: // value
+      case 73: // ncr_protocol_value
         value.move< ElementPtr > (that.value);
         break;
 
-      case 37: // "boolean"
+      case 40: // "boolean"
         value.move< bool > (that.value);
         break;
 
-      case 36: // "floating point"
+      case 39: // "floating point"
         value.move< double > (that.value);
         break;
 
-      case 35: // "integer"
+      case 38: // "integer"
         value.move< int64_t > (that.value);
         break;
 
-      case 34: // "constant string"
+      case 37: // "constant string"
         value.move< std::string > (that.value);
         break;
 
@@ -289,24 +289,24 @@ namespace isc { namespace d2 {
     state = that.state;
       switch (that.type_get ())
     {
-      case 43: // value
-      case 70: // ncr_protocol_value
+      case 46: // value
+      case 73: // ncr_protocol_value
         value.copy< ElementPtr > (that.value);
         break;
 
-      case 37: // "boolean"
+      case 40: // "boolean"
         value.copy< bool > (that.value);
         break;
 
-      case 36: // "floating point"
+      case 39: // "floating point"
         value.copy< double > (that.value);
         break;
 
-      case 35: // "integer"
+      case 38: // "integer"
         value.copy< int64_t > (that.value);
         break;
 
-      case 34: // "constant string"
+      case 37: // "constant string"
         value.copy< std::string > (that.value);
         break;
 
@@ -346,44 +346,44 @@ namespace isc { namespace d2 {
         << yysym.location << ": ";
     switch (yytype)
     {
-            case 34: // "constant string"
+            case 37: // "constant string"
 
-#line 91 "d2_parser.yy" // lalr1.cc:636
+#line 94 "d2_parser.yy" // lalr1.cc:636
         { yyoutput << yysym.value.template as< std::string > (); }
 #line 354 "d2_parser.cc" // lalr1.cc:636
         break;
 
-      case 35: // "integer"
+      case 38: // "integer"
 
-#line 91 "d2_parser.yy" // lalr1.cc:636
+#line 94 "d2_parser.yy" // lalr1.cc:636
         { yyoutput << yysym.value.template as< int64_t > (); }
 #line 361 "d2_parser.cc" // lalr1.cc:636
         break;
 
-      case 36: // "floating point"
+      case 39: // "floating point"
 
-#line 91 "d2_parser.yy" // lalr1.cc:636
+#line 94 "d2_parser.yy" // lalr1.cc:636
         { yyoutput << yysym.value.template as< double > (); }
 #line 368 "d2_parser.cc" // lalr1.cc:636
         break;
 
-      case 37: // "boolean"
+      case 40: // "boolean"
 
-#line 91 "d2_parser.yy" // lalr1.cc:636
+#line 94 "d2_parser.yy" // lalr1.cc:636
         { yyoutput << yysym.value.template as< bool > (); }
 #line 375 "d2_parser.cc" // lalr1.cc:636
         break;
 
-      case 43: // value
+      case 46: // value
 
-#line 91 "d2_parser.yy" // lalr1.cc:636
+#line 94 "d2_parser.yy" // lalr1.cc:636
         { yyoutput << yysym.value.template as< ElementPtr > (); }
 #line 382 "d2_parser.cc" // lalr1.cc:636
         break;
 
-      case 70: // ncr_protocol_value
+      case 73: // ncr_protocol_value
 
-#line 91 "d2_parser.yy" // lalr1.cc:636
+#line 94 "d2_parser.yy" // lalr1.cc:636
         { yyoutput << yysym.value.template as< ElementPtr > (); }
 #line 389 "d2_parser.cc" // lalr1.cc:636
         break;
@@ -585,24 +585,24 @@ namespace isc { namespace d2 {
          when using variants.  */
         switch (yyr1_[yyn])
     {
-      case 43: // value
-      case 70: // ncr_protocol_value
+      case 46: // value
+      case 73: // ncr_protocol_value
         yylhs.value.build< ElementPtr > ();
         break;
 
-      case 37: // "boolean"
+      case 40: // "boolean"
         yylhs.value.build< bool > ();
         break;
 
-      case 36: // "floating point"
+      case 39: // "floating point"
         yylhs.value.build< double > ();
         break;
 
-      case 35: // "integer"
+      case 38: // "integer"
         yylhs.value.build< int64_t > ();
         break;
 
-      case 34: // "constant string"
+      case 37: // "constant string"
         yylhs.value.build< std::string > ();
         break;
 
@@ -624,67 +624,67 @@ namespace isc { namespace d2 {
           switch (yyn)
             {
   case 2:
-#line 100 "d2_parser.yy" // lalr1.cc:859
+#line 103 "d2_parser.yy" // lalr1.cc:859
     { ctx.ctx_ = ctx.NO_KEYWORD; }
 #line 630 "d2_parser.cc" // lalr1.cc:859
     break;
 
   case 4:
-#line 101 "d2_parser.yy" // lalr1.cc:859
+#line 104 "d2_parser.yy" // lalr1.cc:859
     { ctx.ctx_ = ctx.CONFIG; }
 #line 636 "d2_parser.cc" // lalr1.cc:859
     break;
 
   case 6:
-#line 102 "d2_parser.yy" // lalr1.cc:859
+#line 105 "d2_parser.yy" // lalr1.cc:859
     { ctx.ctx_ = ctx.DHCPDDNS; }
 #line 642 "d2_parser.cc" // lalr1.cc:859
     break;
 
   case 8:
-#line 110 "d2_parser.yy" // lalr1.cc:859
+#line 113 "d2_parser.yy" // lalr1.cc:859
     { yylhs.value.as< ElementPtr > () = ElementPtr(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location))); }
 #line 648 "d2_parser.cc" // lalr1.cc:859
     break;
 
   case 9:
-#line 111 "d2_parser.yy" // lalr1.cc:859
+#line 114 "d2_parser.yy" // lalr1.cc:859
     { yylhs.value.as< ElementPtr > () = ElementPtr(new DoubleElement(yystack_[0].value.as< double > (), ctx.loc2pos(yystack_[0].location))); }
 #line 654 "d2_parser.cc" // lalr1.cc:859
     break;
 
   case 10:
-#line 112 "d2_parser.yy" // lalr1.cc:859
+#line 115 "d2_parser.yy" // lalr1.cc:859
     { yylhs.value.as< ElementPtr > () = ElementPtr(new BoolElement(yystack_[0].value.as< bool > (), ctx.loc2pos(yystack_[0].location))); }
 #line 660 "d2_parser.cc" // lalr1.cc:859
     break;
 
   case 11:
-#line 113 "d2_parser.yy" // lalr1.cc:859
+#line 116 "d2_parser.yy" // lalr1.cc:859
     { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location))); }
 #line 666 "d2_parser.cc" // lalr1.cc:859
     break;
 
   case 12:
-#line 114 "d2_parser.yy" // lalr1.cc:859
+#line 117 "d2_parser.yy" // lalr1.cc:859
     { yylhs.value.as< ElementPtr > () = ElementPtr(new NullElement(ctx.loc2pos(yystack_[0].location))); }
 #line 672 "d2_parser.cc" // lalr1.cc:859
     break;
 
   case 13:
-#line 115 "d2_parser.yy" // lalr1.cc:859
+#line 118 "d2_parser.yy" // lalr1.cc:859
     { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
 #line 678 "d2_parser.cc" // lalr1.cc:859
     break;
 
   case 14:
-#line 116 "d2_parser.yy" // lalr1.cc:859
+#line 119 "d2_parser.yy" // lalr1.cc:859
     { yylhs.value.as< ElementPtr > () = ctx.stack_.back(); ctx.stack_.pop_back(); }
 #line 684 "d2_parser.cc" // lalr1.cc:859
     break;
 
   case 15:
-#line 119 "d2_parser.yy" // lalr1.cc:859
+#line 122 "d2_parser.yy" // lalr1.cc:859
     {
     // Push back the JSON value on the stack
     ctx.stack_.push_back(yystack_[0].value.as< ElementPtr > ());
@@ -693,7 +693,7 @@ namespace isc { namespace d2 {
     break;
 
   case 16:
-#line 124 "d2_parser.yy" // lalr1.cc:859
+#line 127 "d2_parser.yy" // lalr1.cc:859
     {
     // This code is executed when we're about to start parsing
     // the content of the map
@@ -704,7 +704,7 @@ namespace isc { namespace d2 {
     break;
 
   case 17:
-#line 129 "d2_parser.yy" // lalr1.cc:859
+#line 132 "d2_parser.yy" // lalr1.cc:859
     {
     // map parsing completed. If we ever want to do any wrap up
     // (maybe some sanity checking), this would be the best place
@@ -714,7 +714,7 @@ namespace isc { namespace d2 {
     break;
 
   case 20:
-#line 140 "d2_parser.yy" // lalr1.cc:859
+#line 143 "d2_parser.yy" // lalr1.cc:859
     {
                   // map containing a single entry
                   ctx.stack_.back()->set(yystack_[2].value.as< std::string > (), yystack_[0].value.as< ElementPtr > ());
@@ -723,7 +723,7 @@ namespace isc { namespace d2 {
     break;
 
   case 21:
-#line 144 "d2_parser.yy" // lalr1.cc:859
+#line 147 "d2_parser.yy" // lalr1.cc:859
     {
                   // map consisting of a shorter map followed by
                   // comma and string:value
@@ -733,7 +733,7 @@ namespace isc { namespace d2 {
     break;
 
   case 22:
-#line 151 "d2_parser.yy" // lalr1.cc:859
+#line 154 "d2_parser.yy" // lalr1.cc:859
     {
     ElementPtr l(new ListElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.push_back(l);
@@ -742,7 +742,7 @@ namespace isc { namespace d2 {
     break;
 
   case 23:
-#line 154 "d2_parser.yy" // lalr1.cc:859
+#line 157 "d2_parser.yy" // lalr1.cc:859
     {
     // list parsing complete. Put any sanity checking here
 }
@@ -750,7 +750,7 @@ namespace isc { namespace d2 {
     break;
 
   case 26:
-#line 170 "d2_parser.yy" // lalr1.cc:859
+#line 173 "d2_parser.yy" // lalr1.cc:859
     {
                   // List consisting of a single element.
                   ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ());
@@ -759,7 +759,7 @@ namespace isc { namespace d2 {
     break;
 
   case 27:
-#line 174 "d2_parser.yy" // lalr1.cc:859
+#line 177 "d2_parser.yy" // lalr1.cc:859
     {
                   // List ending with , and a value.
                   ctx.stack_.back()->add(yystack_[0].value.as< ElementPtr > ());
@@ -768,7 +768,7 @@ namespace isc { namespace d2 {
     break;
 
   case 28:
-#line 185 "d2_parser.yy" // lalr1.cc:859
+#line 188 "d2_parser.yy" // lalr1.cc:859
     {
     const std::string& where = ctx.contextName();
     const std::string& keyword = yystack_[1].value.as< std::string > ();
@@ -779,7 +779,7 @@ namespace isc { namespace d2 {
     break;
 
   case 29:
-#line 195 "d2_parser.yy" // lalr1.cc:859
+#line 198 "d2_parser.yy" // lalr1.cc:859
     {
     // This code is executed when we're about to start parsing
     // the content of the map
@@ -790,7 +790,7 @@ namespace isc { namespace d2 {
     break;
 
   case 30:
-#line 200 "d2_parser.yy" // lalr1.cc:859
+#line 203 "d2_parser.yy" // lalr1.cc:859
     {
     // map parsing completed. If we ever want to do any wrap up
     // (maybe some sanity checking), this would be the best place
@@ -800,7 +800,7 @@ namespace isc { namespace d2 {
     break;
 
   case 38:
-#line 221 "d2_parser.yy" // lalr1.cc:859
+#line 224 "d2_parser.yy" // lalr1.cc:859
     {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("DhcpDdns", m);
@@ -811,7 +811,7 @@ namespace isc { namespace d2 {
     break;
 
   case 39:
-#line 226 "d2_parser.yy" // lalr1.cc:859
+#line 229 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.stack_.pop_back();
     ctx.leave();
@@ -820,7 +820,7 @@ namespace isc { namespace d2 {
     break;
 
   case 40:
-#line 231 "d2_parser.yy" // lalr1.cc:859
+#line 234 "d2_parser.yy" // lalr1.cc:859
     {
     // Parse the dhcpddns map
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
@@ -830,7 +830,7 @@ namespace isc { namespace d2 {
     break;
 
   case 41:
-#line 235 "d2_parser.yy" // lalr1.cc:859
+#line 238 "d2_parser.yy" // lalr1.cc:859
     {
     // parsing completed
 }
@@ -838,7 +838,7 @@ namespace isc { namespace d2 {
     break;
 
   case 53:
-#line 254 "d2_parser.yy" // lalr1.cc:859
+#line 257 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
@@ -846,7 +846,7 @@ namespace isc { namespace d2 {
     break;
 
   case 54:
-#line 256 "d2_parser.yy" // lalr1.cc:859
+#line 259 "d2_parser.yy" // lalr1.cc:859
     {
     ElementPtr s(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("ip-address", s);
@@ -856,7 +856,7 @@ namespace isc { namespace d2 {
     break;
 
   case 55:
-#line 262 "d2_parser.yy" // lalr1.cc:859
+#line 265 "d2_parser.yy" // lalr1.cc:859
     {
     if (yystack_[0].value.as< int64_t > () <= 0) {
         error(yystack_[0].location, "port must be greater than zero");
@@ -868,7 +868,7 @@ namespace isc { namespace d2 {
     break;
 
   case 56:
-#line 270 "d2_parser.yy" // lalr1.cc:859
+#line 273 "d2_parser.yy" // lalr1.cc:859
     {
     if (yystack_[0].value.as< int64_t > () <= 0) {
         error(yystack_[0].location, "dns-server-timeout must be greater than zero");
@@ -881,7 +881,7 @@ namespace isc { namespace d2 {
     break;
 
   case 57:
-#line 279 "d2_parser.yy" // lalr1.cc:859
+#line 282 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.enter(ctx.NCR_PROTOCOL);
 }
@@ -889,7 +889,7 @@ namespace isc { namespace d2 {
     break;
 
   case 58:
-#line 281 "d2_parser.yy" // lalr1.cc:859
+#line 284 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.stack_.back()->set("ncr-protocol", yystack_[0].value.as< ElementPtr > ());
     ctx.leave();
@@ -898,19 +898,19 @@ namespace isc { namespace d2 {
     break;
 
   case 59:
-#line 287 "d2_parser.yy" // lalr1.cc:859
+#line 290 "d2_parser.yy" // lalr1.cc:859
     { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("UDP", ctx.loc2pos(yystack_[0].location))); }
 #line 904 "d2_parser.cc" // lalr1.cc:859
     break;
 
   case 60:
-#line 288 "d2_parser.yy" // lalr1.cc:859
+#line 291 "d2_parser.yy" // lalr1.cc:859
     { yylhs.value.as< ElementPtr > () = ElementPtr(new StringElement("TCP", ctx.loc2pos(yystack_[0].location))); }
 #line 910 "d2_parser.cc" // lalr1.cc:859
     break;
 
   case 61:
-#line 291 "d2_parser.yy" // lalr1.cc:859
+#line 294 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.enter(ctx.NCR_FORMAT);
 }
@@ -918,7 +918,7 @@ namespace isc { namespace d2 {
     break;
 
   case 62:
-#line 293 "d2_parser.yy" // lalr1.cc:859
+#line 296 "d2_parser.yy" // lalr1.cc:859
     {
     ElementPtr json(new StringElement("JSON", ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("ncr-format", json);
@@ -928,7 +928,7 @@ namespace isc { namespace d2 {
     break;
 
   case 63:
-#line 299 "d2_parser.yy" // lalr1.cc:859
+#line 302 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
@@ -936,7 +936,7 @@ namespace isc { namespace d2 {
     break;
 
   case 64:
-#line 301 "d2_parser.yy" // lalr1.cc:859
+#line 304 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.stack_.back()->set("forward-ddns", yystack_[0].value.as< ElementPtr > ());
     ctx.leave();
@@ -945,7 +945,7 @@ namespace isc { namespace d2 {
     break;
 
   case 65:
-#line 306 "d2_parser.yy" // lalr1.cc:859
+#line 309 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
@@ -953,7 +953,7 @@ namespace isc { namespace d2 {
     break;
 
   case 66:
-#line 308 "d2_parser.yy" // lalr1.cc:859
+#line 311 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.stack_.back()->set("reverse-ddns", yystack_[0].value.as< ElementPtr > ());
     ctx.leave();
@@ -962,217 +962,314 @@ namespace isc { namespace d2 {
     break;
 
   case 67:
-#line 313 "d2_parser.yy" // lalr1.cc:859
+#line 318 "d2_parser.yy" // lalr1.cc:859
     {
-    ctx.enter(ctx.NO_KEYWORD);
+    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 970 "d2_parser.cc" // lalr1.cc:859
+#line 973 "d2_parser.cc" // lalr1.cc:859
     break;
 
   case 68:
-#line 315 "d2_parser.yy" // lalr1.cc:859
+#line 323 "d2_parser.yy" // lalr1.cc:859
+    {
+    ctx.stack_.pop_back();
+    ctx.leave();
+}
+#line 982 "d2_parser.cc" // lalr1.cc:859
+    break;
+
+  case 73:
+#line 336 "d2_parser.yy" // lalr1.cc:859
+    {
+    ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
+    ctx.stack_.back()->add(m);
+    ctx.stack_.push_back(m);
+}
+#line 992 "d2_parser.cc" // lalr1.cc:859
+    break;
+
+  case 74:
+#line 340 "d2_parser.yy" // lalr1.cc:859
+    {
+    ctx.stack_.pop_back();
+}
+#line 1000 "d2_parser.cc" // lalr1.cc:859
+    break;
+
+  case 82:
+#line 355 "d2_parser.yy" // lalr1.cc:859
+    {
+    ctx.enter(ctx.NO_KEYWORD);
+}
+#line 1008 "d2_parser.cc" // lalr1.cc:859
+    break;
+
+  case 83:
+#line 357 "d2_parser.yy" // lalr1.cc:859
+    {
+    if (yystack_[0].value.as< std::string > () == "") {
+        error(yystack_[1].location, "name cannot be blank");
+    } 
+    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("name", name);
+    ctx.leave();
+}
+#line 1022 "d2_parser.cc" // lalr1.cc:859
+    break;
+
+  case 84:
+#line 367 "d2_parser.yy" // lalr1.cc:859
+    {
+    ctx.enter(ctx.NO_KEYWORD);
+}
+#line 1030 "d2_parser.cc" // lalr1.cc:859
+    break;
+
+  case 85:
+#line 369 "d2_parser.yy" // lalr1.cc:859
+    {
+    if (yystack_[0].value.as< std::string > () == "") {
+        error(yystack_[1].location, "algorithm cannot be blank");
+    } 
+    ElementPtr elem(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ctx.stack_.back()->set("algorithm", elem);
+    ctx.leave();
+}
+#line 1043 "d2_parser.cc" // lalr1.cc:859
+    break;
+
+  case 86:
+#line 378 "d2_parser.yy" // lalr1.cc:859
+    {
+    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, "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 1055 "d2_parser.cc" // lalr1.cc:859
+    break;
+
+  case 87:
+#line 386 "d2_parser.yy" // lalr1.cc:859
     {
-    ctx.stack_.back()->set("tsig-keys", yystack_[0].value.as< ElementPtr > ());
+    ctx.enter(ctx.NO_KEYWORD);
+}
+#line 1063 "d2_parser.cc" // lalr1.cc:859
+    break;
+
+  case 88:
+#line 388 "d2_parser.yy" // lalr1.cc:859
+    {
+    if (yystack_[0].value.as< std::string > () == "") {
+        error(yystack_[1].location, "secret cannot be blank");
+    } 
+    ElementPtr elem(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
+    ctx.stack_.back()->set("secret", elem);
     ctx.leave();
 }
-#line 979 "d2_parser.cc" // lalr1.cc:859
+#line 1076 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 69:
-#line 320 "d2_parser.yy" // lalr1.cc:859
+  case 89:
+#line 401 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 987 "d2_parser.cc" // lalr1.cc:859
+#line 1084 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 70:
-#line 322 "d2_parser.yy" // lalr1.cc:859
+  case 90:
+#line 403 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.stack_.back()->set("Dhcp6", yystack_[0].value.as< ElementPtr > ());
     ctx.leave();
 }
-#line 996 "d2_parser.cc" // lalr1.cc:859
+#line 1093 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 71:
-#line 327 "d2_parser.yy" // lalr1.cc:859
+  case 91:
+#line 408 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1004 "d2_parser.cc" // lalr1.cc:859
+#line 1101 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 72:
-#line 329 "d2_parser.yy" // lalr1.cc:859
+  case 92:
+#line 410 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.stack_.back()->set("Dhcp4", yystack_[0].value.as< ElementPtr > ());
     ctx.leave();
 }
-#line 1013 "d2_parser.cc" // lalr1.cc:859
+#line 1110 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 73:
-#line 339 "d2_parser.yy" // lalr1.cc:859
+  case 93:
+#line 420 "d2_parser.yy" // lalr1.cc:859
     {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("Logging", m);
     ctx.stack_.push_back(m);
     ctx.enter(ctx.LOGGING);
 }
-#line 1024 "d2_parser.cc" // lalr1.cc:859
+#line 1121 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 74:
-#line 344 "d2_parser.yy" // lalr1.cc:859
+  case 94:
+#line 425 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.stack_.pop_back();
     ctx.leave();
 }
-#line 1033 "d2_parser.cc" // lalr1.cc:859
+#line 1130 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 78:
-#line 361 "d2_parser.yy" // lalr1.cc:859
+  case 98:
+#line 442 "d2_parser.yy" // lalr1.cc:859
     {
     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 1044 "d2_parser.cc" // lalr1.cc:859
+#line 1141 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 79:
-#line 366 "d2_parser.yy" // lalr1.cc:859
+  case 99:
+#line 447 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.stack_.pop_back();
     ctx.leave();
 }
-#line 1053 "d2_parser.cc" // lalr1.cc:859
+#line 1150 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 82:
-#line 378 "d2_parser.yy" // lalr1.cc:859
+  case 102:
+#line 459 "d2_parser.yy" // lalr1.cc:859
     {
     ElementPtr l(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->add(l);
     ctx.stack_.push_back(l);
 }
-#line 1063 "d2_parser.cc" // lalr1.cc:859
+#line 1160 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 83:
-#line 382 "d2_parser.yy" // lalr1.cc:859
+  case 103:
+#line 463 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.stack_.pop_back();
 }
-#line 1071 "d2_parser.cc" // lalr1.cc:859
+#line 1168 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 91:
-#line 397 "d2_parser.yy" // lalr1.cc:859
+  case 111:
+#line 478 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1079 "d2_parser.cc" // lalr1.cc:859
+#line 1176 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 92:
-#line 399 "d2_parser.yy" // lalr1.cc:859
+  case 112:
+#line 480 "d2_parser.yy" // lalr1.cc:859
     {
     ElementPtr name(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("name", name);
     ctx.leave();
 }
-#line 1089 "d2_parser.cc" // lalr1.cc:859
+#line 1186 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 93:
-#line 405 "d2_parser.yy" // lalr1.cc:859
+  case 113:
+#line 486 "d2_parser.yy" // lalr1.cc:859
     {
     ElementPtr dl(new IntElement(yystack_[0].value.as< int64_t > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("debuglevel", dl);
 }
-#line 1098 "d2_parser.cc" // lalr1.cc:859
+#line 1195 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 94:
-#line 409 "d2_parser.yy" // lalr1.cc:859
+  case 114:
+#line 490 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1106 "d2_parser.cc" // lalr1.cc:859
+#line 1203 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 95:
-#line 411 "d2_parser.yy" // lalr1.cc:859
+  case 115:
+#line 492 "d2_parser.yy" // lalr1.cc:859
     {
     ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("severity", sev);
     ctx.leave();
 }
-#line 1116 "d2_parser.cc" // lalr1.cc:859
+#line 1213 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 96:
-#line 417 "d2_parser.yy" // lalr1.cc:859
+  case 116:
+#line 498 "d2_parser.yy" // lalr1.cc:859
     {
     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 1127 "d2_parser.cc" // lalr1.cc:859
+#line 1224 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 97:
-#line 422 "d2_parser.yy" // lalr1.cc:859
+  case 117:
+#line 503 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.stack_.pop_back();
     ctx.leave();
 }
-#line 1136 "d2_parser.cc" // lalr1.cc:859
+#line 1233 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 100:
-#line 431 "d2_parser.yy" // lalr1.cc:859
+  case 120:
+#line 512 "d2_parser.yy" // lalr1.cc:859
     {
     ElementPtr m(new MapElement(ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->add(m);
     ctx.stack_.push_back(m);
 }
-#line 1146 "d2_parser.cc" // lalr1.cc:859
+#line 1243 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 101:
-#line 435 "d2_parser.yy" // lalr1.cc:859
+  case 121:
+#line 516 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.stack_.pop_back();
 }
-#line 1154 "d2_parser.cc" // lalr1.cc:859
+#line 1251 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 104:
-#line 443 "d2_parser.yy" // lalr1.cc:859
+  case 124:
+#line 524 "d2_parser.yy" // lalr1.cc:859
     {
     ctx.enter(ctx.NO_KEYWORD);
 }
-#line 1162 "d2_parser.cc" // lalr1.cc:859
+#line 1259 "d2_parser.cc" // lalr1.cc:859
     break;
 
-  case 105:
-#line 445 "d2_parser.yy" // lalr1.cc:859
+  case 125:
+#line 526 "d2_parser.yy" // lalr1.cc:859
     {
     ElementPtr sev(new StringElement(yystack_[0].value.as< std::string > (), ctx.loc2pos(yystack_[0].location)));
     ctx.stack_.back()->set("output", sev);
     ctx.leave();
 }
-#line 1172 "d2_parser.cc" // lalr1.cc:859
+#line 1269 "d2_parser.cc" // lalr1.cc:859
     break;
 
 
-#line 1176 "d2_parser.cc" // lalr1.cc:859
+#line 1273 "d2_parser.cc" // lalr1.cc:859
             default:
               break;
             }
@@ -1427,31 +1524,35 @@ namespace isc { namespace d2 {
   }
 
 
-  const signed char D2Parser::yypact_ninf_ = -62;
+  const signed char D2Parser::yypact_ninf_ = -78;
 
   const signed char D2Parser::yytable_ninf_ = -1;
 
   const signed char
   D2Parser::yypact_[] =
   {
-      25,   -62,   -62,   -62,     7,    -3,    16,    22,   -62,   -62,
-     -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,
-     -62,   -62,   -62,   -62,    -3,    -4,     1,     5,   -62,    30,
-      45,    50,    51,    57,   -62,   -62,   -62,   -62,    58,   -62,
-       0,   -62,   -62,   -62,   -62,   -62,   -62,    59,    60,   -62,
-     -62,   -62,   -62,   -62,   -62,     2,   -62,   -62,   -62,   -62,
-     -62,   -62,   -62,   -62,   -62,   -62,    -3,    -3,   -62,    27,
-      61,    62,    65,    66,   -62,     1,   -62,    67,    37,    38,
-      70,    71,    72,    76,    78,     5,   -62,   -62,   -62,    79,
-      -3,    -3,    77,    80,   -62,    52,   -62,   -62,    -2,    68,
-      -3,    -3,    -3,   -62,    -3,   -62,   -62,     5,    64,   -62,
-     -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,     6,   -62,
-      14,   -62,   -62,   -62,    81,    64,   -62,    85,   -62,    84,
-     -62,    47,   -62,    11,    84,   -62,   -62,   -62,    88,   -62,
-     -62,    39,   -62,   -62,   -62,   -62,   -62,   -62,    89,    90,
-      63,    91,    11,   -62,    69,    92,   -62,    74,   -62,   -62,
-      93,   -62,   -62,    49,   -62,    73,    93,   -62,   -62,    43,
-     -62,   -62,    95,    73,   -62,    75,   -62,   -62
+      28,   -78,   -78,   -78,     5,    -3,    12,    13,   -78,   -78,
+     -78,   -78,   -78,   -78,   -78,   -78,   -78,   -78,   -78,   -78,
+     -78,   -78,   -78,   -78,    -3,    -7,     1,     2,   -78,    27,
+      43,    54,    52,    66,   -78,   -78,   -78,   -78,    67,   -78,
+       0,   -78,   -78,   -78,   -78,   -78,   -78,    68,    69,   -78,
+     -78,   -78,   -78,   -78,   -78,     6,   -78,   -78,   -78,   -78,
+     -78,   -78,   -78,   -78,   -78,   -78,    -3,    -3,   -78,    33,
+      70,    71,    72,    75,   -78,     1,   -78,    76,    44,    45,
+      80,    81,    82,    83,    84,     2,   -78,   -78,   -78,    85,
+      -3,    -3,    86,    87,   -78,    55,   -78,   -78,    48,    77,
+      -3,    -3,    90,   -78,    -3,   -78,   -78,     2,    62,   -78,
+     -78,   -78,   -78,   -78,   -78,   -78,    89,   -78,    19,   -78,
+      23,   -78,   -78,   -78,    92,    88,   -78,   -78,    95,    62,
+     -78,    16,   -78,    89,    96,   -78,   -78,    98,   -78,   -78,
+     -78,    49,   -78,   -78,   -78,   -78,   -78,   -78,    93,    99,
+      73,   100,   102,    16,   -78,   -78,     4,   -78,    78,   -78,
+      79,    91,   -78,    18,    93,   -78,   -78,   -78,   -78,   -78,
+     -78,   103,   -78,   -78,    51,   -78,   -78,   -78,   -78,   -78,
+     -78,   104,   105,    74,   106,    18,   -78,    94,   108,   -78,
+      97,   -78,   -78,   107,   -78,   -78,    26,   -78,   101,   107,
+     -78,   -78,    53,   -78,   -78,   113,   101,   -78,   109,   -78,
+     -78
   };
 
   const unsigned char
@@ -1460,33 +1561,39 @@ namespace isc { namespace d2 {
        0,     2,     4,     6,     0,     0,     0,     0,     1,    22,
       16,    12,    11,     8,     9,    10,    15,     3,    13,    14,
       29,     5,    40,     7,    24,    18,     0,     0,    26,     0,
-      25,     0,     0,    19,    69,    71,    38,    73,     0,    37,
+      25,     0,     0,    19,    89,    91,    38,    93,     0,    37,
        0,    31,    36,    33,    35,    34,    53,     0,     0,    57,
       61,    63,    65,    67,    52,     0,    42,    44,    45,    46,
       47,    48,    49,    50,    51,    23,     0,     0,    17,     0,
        0,     0,     0,     0,    28,     0,    30,     0,     0,     0,
        0,     0,     0,     0,     0,     0,    41,    27,    20,     0,
        0,     0,     0,     0,    32,     0,    55,    56,     0,     0,
-       0,     0,     0,    43,     0,    70,    72,     0,     0,    54,
-      59,    60,    58,    62,    64,    66,    68,    21,     0,    78,
-       0,    75,    77,    39,     0,     0,    74,     0,    76,     0,
-      82,     0,    80,     0,     0,    79,    91,    96,     0,    94,
-      90,     0,    84,    86,    88,    89,    87,    81,     0,     0,
-       0,     0,     0,    83,     0,     0,    93,     0,    85,    92,
-       0,    95,   100,     0,    98,     0,     0,    97,   104,     0,
-     102,    99,     0,     0,   101,     0,   103,   105
+       0,     0,     0,    43,     0,    90,    92,     0,     0,    54,
+      59,    60,    58,    62,    64,    66,    69,    21,     0,    98,
+       0,    95,    97,    73,     0,    70,    71,    39,     0,     0,
+      94,     0,    68,     0,     0,    96,    84,     0,    87,    82,
+      81,     0,    75,    77,    78,    79,    80,    72,     0,     0,
+       0,     0,     0,     0,    74,   102,     0,   100,     0,    86,
+       0,     0,    76,     0,     0,    99,    85,    88,    83,   111,
+     116,     0,   114,   110,     0,   104,   106,   108,   109,   107,
+     101,     0,     0,     0,     0,     0,   103,     0,     0,   113,
+       0,   105,   112,     0,   115,   120,     0,   118,     0,     0,
+     117,   124,     0,   122,   119,     0,     0,   121,     0,   123,
+     125
   };
 
   const signed char
   D2Parser::yypgoto_[] =
   {
-     -62,   -62,   -62,   -62,   -62,   -23,   -62,   -62,   -62,   -62,
-     -62,   -62,   -62,   -62,   -62,   -26,   -62,   -62,   -62,    21,
-     -62,   -62,   -62,   -62,    -5,    19,   -62,   -62,   -62,   -62,
-     -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,
-     -62,   -62,   -62,   -62,   -62,   -62,   -62,   -62,   -20,   -62,
-     -62,   -62,   -28,   -62,   -62,   -42,   -62,   -62,   -62,   -62,
-     -62,   -62,   -62,   -62,   -55,   -62,   -62,   -61,   -62
+     -78,   -78,   -78,   -78,   -78,   -23,   -78,   -78,   -78,   -78,
+     -78,   -78,   -78,   -78,   -78,   -26,   -78,   -78,   -78,    46,
+     -78,   -78,   -78,   -78,    11,    34,   -78,   -78,   -78,   -78,
+     -78,   -78,   -78,   -78,   -78,   -78,   -78,   -78,   -78,   -78,
+     -78,   -78,   -78,   -13,   -78,   -78,   -31,   -78,   -78,   -78,
+     -78,   -78,   -78,   -78,   -78,   -78,   -78,   -78,   -78,   -78,
+     -78,    -6,   -78,   -78,   -78,   -40,   -78,   -78,   -60,   -78,
+     -78,   -78,   -78,   -78,   -78,   -78,   -78,   -73,   -78,   -78,
+     -77,   -78
   };
 
   const short int
@@ -1496,84 +1603,98 @@ namespace isc { namespace d2 {
       33,    19,    24,    29,    30,    54,    21,    26,    40,    41,
       42,    72,    23,    27,    55,    56,    57,    77,    58,    59,
       60,    80,   112,    61,    81,    62,    82,    63,    83,    64,
-      84,    43,    70,    44,    71,    45,    73,   120,   121,   122,
-     124,   131,   132,   133,   141,   142,   143,   148,   144,   145,
-     151,   146,   149,   163,   164,   165,   169,   170,   172
+      84,   124,   125,   126,   131,   141,   142,   143,   152,   144,
+     149,   145,   146,   151,    43,    70,    44,    71,    45,    73,
+     120,   121,   122,   128,   156,   157,   163,   174,   175,   176,
+     181,   177,   178,   184,   179,   182,   196,   197,   198,   202,
+     203,   205
   };
 
   const unsigned char
   D2Parser::yytable_[] =
   {
-      39,    28,     9,    75,    10,    85,    11,     8,    76,    85,
-      86,    34,    35,    36,   123,   110,   111,   125,    46,    47,
-      48,    49,   126,    20,    50,    37,    51,    52,    53,    22,
-      31,    12,    13,    14,    15,    38,    65,   136,   137,    38,
-     138,   139,   152,    87,    88,    38,   173,   153,    66,    39,
-     134,   174,   166,   135,    67,   167,     1,     2,     3,    68,
-      69,    89,    74,    78,    79,    90,    91,   105,   106,    92,
-      93,    95,    96,    97,    98,    99,   100,   114,   115,   116,
-     101,   117,   102,   104,   107,   127,   109,   108,   113,   119,
-     129,   130,   150,   154,   155,   157,    94,   160,   156,   175,
-     162,   168,   118,   159,   103,   128,   147,   140,   161,   177,
-     158,   171,   176,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,   140
+      39,    28,     9,    75,    10,     8,    11,   164,    76,    85,
+     165,    34,    35,    36,    86,    46,    47,    48,    49,    20,
+      22,    50,    85,    51,    52,    53,   129,   127,    37,   199,
+      31,   130,   200,    65,    12,    13,    14,    15,    38,    38,
+     136,   137,   138,    87,    88,   139,    66,   169,   170,    39,
+     171,   172,   153,    38,   185,    38,   206,   154,    67,   186,
+      68,   207,     1,     2,     3,   110,   111,   105,   106,    69,
+      89,    74,    78,    79,    90,    91,    92,   114,   115,    93,
+      95,   117,    96,    97,    98,    99,   100,   101,   102,   104,
+     119,   133,   109,   107,   108,   116,   123,   113,   132,   134,
+     155,   148,   150,   158,   160,   140,   161,   183,   187,   188,
+     190,   159,   189,   193,   195,   166,   167,   208,   118,   103,
+     147,    94,   162,   135,   180,   191,   204,   140,   168,   209,
+       0,   192,   201,     0,   194,     0,     0,   173,     0,     0,
+       0,     0,     0,     0,     0,     0,   210,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   173
   };
 
   const short int
   D2Parser::yycheck_[] =
   {
-      26,    24,     5,     3,     7,     3,     9,     0,     8,     3,
-       8,    10,    11,    12,     8,    17,    18,     3,    13,    14,
-      15,    16,     8,     7,    19,    24,    21,    22,    23,     7,
-      34,    34,    35,    36,    37,    34,     6,    26,    27,    34,
-      29,    30,     3,    66,    67,    34,     3,     8,     3,    75,
-       3,     8,     3,     6,     4,     6,    31,    32,    33,     8,
-       3,    34,     4,     4,     4,     4,     4,    90,    91,     4,
-       4,     4,    35,    35,     4,     4,     4,   100,   101,   102,
-       4,   104,     4,     4,     7,     4,    34,     7,    20,    25,
-       5,     7,     4,     4,     4,     4,    75,     5,    35,     4,
-       7,    28,   107,    34,    85,   125,   134,   133,    34,    34,
-     152,   166,   173,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   152
+      26,    24,     5,     3,     7,     0,     9,     3,     8,     3,
+       6,    10,    11,    12,     8,    13,    14,    15,    16,     7,
+       7,    19,     3,    21,    22,    23,     3,     8,    27,     3,
+      37,     8,     6,     6,    37,    38,    39,    40,    37,    37,
+      24,    25,    26,    66,    67,    29,     3,    29,    30,    75,
+      32,    33,     3,    37,     3,    37,     3,     8,     4,     8,
+       8,     8,    34,    35,    36,    17,    18,    90,    91,     3,
+      37,     4,     4,     4,     4,     4,     4,   100,   101,     4,
+       4,   104,    38,    38,     4,     4,     4,     4,     4,     4,
+      28,     3,    37,     7,     7,     5,     7,    20,     6,     4,
+       7,     5,     4,     4,     4,   131,     4,     4,     4,     4,
+       4,    38,    38,     5,     7,    37,    37,     4,   107,    85,
+     133,    75,   153,   129,   164,   185,   199,   153,    37,   206,
+      -1,    37,    31,    -1,    37,    -1,    -1,   163,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    37,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   185
   };
 
   const unsigned char
   D2Parser::yystos_[] =
   {
-       0,    31,    32,    33,    39,    40,    41,    42,     0,     5,
-       7,     9,    34,    35,    36,    37,    43,    44,    45,    49,
-       7,    54,     7,    60,    50,    46,    55,    61,    43,    51,
-      52,    34,    47,    48,    10,    11,    12,    24,    34,    53,
-      56,    57,    58,    79,    81,    83,    13,    14,    15,    16,
-      19,    21,    22,    23,    53,    62,    63,    64,    66,    67,
-      68,    71,    73,    75,    77,     6,     3,     4,     8,     3,
-      80,    82,    59,    84,     4,     3,     8,    65,     4,     4,
-      69,    72,    74,    76,    78,     3,     8,    43,    43,    34,
-       4,     4,     4,     4,    57,     4,    35,    35,     4,     4,
-       4,     4,     4,    63,     4,    43,    43,     7,     7,    34,
-      17,    18,    70,    20,    43,    43,    43,    43,    62,    25,
-      85,    86,    87,     8,    88,     3,     8,     4,    86,     5,
-       7,    89,    90,    91,     3,     6,    26,    27,    29,    30,
-      53,    92,    93,    94,    96,    97,    99,    90,    95,   100,
-       4,    98,     3,     8,     4,     4,    35,     4,    93,    34,
-       5,    34,     7,   101,   102,   103,     3,     6,    28,   104,
-     105,   102,   106,     3,     8,     4,   105,    34
+       0,    34,    35,    36,    42,    43,    44,    45,     0,     5,
+       7,     9,    37,    38,    39,    40,    46,    47,    48,    52,
+       7,    57,     7,    63,    53,    49,    58,    64,    46,    54,
+      55,    37,    50,    51,    10,    11,    12,    27,    37,    56,
+      59,    60,    61,    95,    97,    99,    13,    14,    15,    16,
+      19,    21,    22,    23,    56,    65,    66,    67,    69,    70,
+      71,    74,    76,    78,    80,     6,     3,     4,     8,     3,
+      96,    98,    62,   100,     4,     3,     8,    68,     4,     4,
+      72,    75,    77,    79,    81,     3,     8,    46,    46,    37,
+       4,     4,     4,     4,    60,     4,    38,    38,     4,     4,
+       4,     4,     4,    66,     4,    46,    46,     7,     7,    37,
+      17,    18,    73,    20,    46,    46,     5,    46,    65,    28,
+     101,   102,   103,     7,    82,    83,    84,     8,   104,     3,
+       8,    85,     6,     3,     4,   102,    24,    25,    26,    29,
+      56,    86,    87,    88,    90,    92,    93,    84,     5,    91,
+       4,    94,    89,     3,     8,     7,   105,   106,     4,    38,
+       4,     4,    87,   107,     3,     6,    37,    37,    37,    29,
+      30,    32,    33,    56,   108,   109,   110,   112,   113,   115,
+     106,   111,   116,     4,   114,     3,     8,     4,     4,    38,
+       4,   109,    37,     5,    37,     7,   117,   118,   119,     3,
+       6,    31,   120,   121,   118,   122,     3,     8,     4,   121,
+      37
   };
 
   const unsigned char
   D2Parser::yyr1_[] =
   {
-       0,    38,    40,    39,    41,    39,    42,    39,    43,    43,
-      43,    43,    43,    43,    43,    44,    46,    45,    47,    47,
-      48,    48,    50,    49,    51,    51,    52,    52,    53,    55,
-      54,    56,    56,    57,    57,    57,    57,    57,    59,    58,
-      61,    60,    62,    62,    63,    63,    63,    63,    63,    63,
-      63,    63,    63,    65,    64,    66,    67,    69,    68,    70,
-      70,    72,    71,    74,    73,    76,    75,    78,    77,    80,
-      79,    82,    81,    84,    83,    85,    85,    86,    88,    87,
-      89,    89,    91,    90,    92,    92,    93,    93,    93,    93,
-      93,    95,    94,    96,    98,    97,   100,    99,   101,   101,
-     103,   102,   104,   104,   106,   105
+       0,    41,    43,    42,    44,    42,    45,    42,    46,    46,
+      46,    46,    46,    46,    46,    47,    49,    48,    50,    50,
+      51,    51,    53,    52,    54,    54,    55,    55,    56,    58,
+      57,    59,    59,    60,    60,    60,    60,    60,    62,    61,
+      64,    63,    65,    65,    66,    66,    66,    66,    66,    66,
+      66,    66,    66,    68,    67,    69,    70,    72,    71,    73,
+      73,    75,    74,    77,    76,    79,    78,    81,    80,    82,
+      82,    83,    83,    85,    84,    86,    86,    87,    87,    87,
+      87,    87,    89,    88,    91,    90,    92,    94,    93,    96,
+      95,    98,    97,   100,    99,   101,   101,   102,   104,   103,
+     105,   105,   107,   106,   108,   108,   109,   109,   109,   109,
+     109,   111,   110,   112,   114,   113,   116,   115,   117,   117,
+     119,   118,   120,   120,   122,   121
   };
 
   const unsigned char
@@ -1585,7 +1706,9 @@ namespace isc { namespace d2 {
        4,     1,     3,     1,     1,     1,     1,     1,     0,     6,
        0,     4,     1,     3,     1,     1,     1,     1,     1,     1,
        1,     1,     1,     0,     4,     3,     3,     0,     4,     1,
-       1,     0,     4,     0,     4,     0,     4,     0,     4,     0,
+       1,     0,     4,     0,     4,     0,     4,     0,     6,     0,
+       1,     1,     3,     0,     4,     1,     3,     1,     1,     1,
+       1,     1,     0,     4,     0,     4,     3,     0,     4,     0,
        4,     0,     4,     0,     6,     1,     3,     1,     0,     6,
        1,     3,     0,     4,     1,     3,     1,     1,     1,     1,
        1,     0,     4,     3,     0,     4,     0,     6,     1,     3,
@@ -1603,42 +1726,48 @@ namespace isc { namespace d2 {
   "\"]\"", "\"{\"", "\"}\"", "\"null\"", "\"Dhcp6\"", "\"Dhcp4\"",
   "\"DhcpDdns\"", "\"ip-address\"", "\"port\"", "\"dns-server-timeout\"",
   "\"ncr-protocol\"", "\"UDP\"", "\"TCP\"", "\"ncr-format\"", "\"JSON\"",
-  "\"forward-ddns\"", "\"reverse-ddns\"", "\"tsig-keys\"", "\"Logging\"",
-  "\"loggers\"", "\"name\"", "\"output_options\"", "\"output\"",
-  "\"debuglevel\"", "\"severity\"", "TOPLEVEL_JSON", "TOPLEVEL_DHCPDDNS",
-  "SUB_DHCPDDNS", "\"constant string\"", "\"integer\"",
-  "\"floating point\"", "\"boolean\"", "$accept", "start", "$@1", "$@2",
-  "$@3", "value", "sub_json", "map2", "$@4", "map_content",
-  "not_empty_map", "list_generic", "$@5", "list_content", "not_empty_list",
+  "\"forward-ddns\"", "\"reverse-ddns\"", "\"tsig-keys\"", "\"algorithm\"",
+  "\"digest-bits\"", "\"secret\"", "\"Logging\"", "\"loggers\"",
+  "\"name\"", "\"output_options\"", "\"output\"", "\"debuglevel\"",
+  "\"severity\"", "TOPLEVEL_JSON", "TOPLEVEL_DHCPDDNS", "SUB_DHCPDDNS",
+  "\"constant string\"", "\"integer\"", "\"floating point\"",
+  "\"boolean\"", "$accept", "start", "$@1", "$@2", "$@3", "value",
+  "sub_json", "map2", "$@4", "map_content", "not_empty_map",
+  "list_generic", "$@5", "list_content", "not_empty_list",
   "unknown_map_entry", "syntax_map", "$@6", "global_objects",
   "global_object", "dhcpddns_object", "$@7", "sub_dhcpddns", "$@8",
   "dhcpddns_params", "dhcpddns_param", "ip_address", "$@9", "port",
   "dns_server_timeout", "ncr_protocol", "$@10", "ncr_protocol_value",
   "ncr_format", "$@11", "forward_ddns", "$@12", "reverse_ddns", "$@13",
-  "tsig_keys", "$@14", "dhcp6_json_object", "$@15", "dhcp4_json_object",
-  "$@16", "logging_object", "$@17", "logging_params", "logging_param",
-  "loggers", "$@18", "loggers_entries", "logger_entry", "$@19",
-  "logger_params", "logger_param", "name", "$@20", "debuglevel",
-  "severity", "$@21", "output_options_list", "$@22",
-  "output_options_list_content", "output_entry", "$@23", "output_params",
-  "output_param", "$@24", YY_NULLPTR
+  "tsig_keys", "$@14", "tsig_keys_list", "not_empty_tsig_keys_list",
+  "tsig_key", "$@15", "tsig_key_params", "tsig_key_param", "tsig_key_name",
+  "$@16", "tsig_key_algorithm", "$@17", "tsig_key_digest_bits",
+  "tsig_key_secret", "$@18", "dhcp6_json_object", "$@19",
+  "dhcp4_json_object", "$@20", "logging_object", "$@21", "logging_params",
+  "logging_param", "loggers", "$@22", "loggers_entries", "logger_entry",
+  "$@23", "logger_params", "logger_param", "name", "$@24", "debuglevel",
+  "severity", "$@25", "output_options_list", "$@26",
+  "output_options_list_content", "output_entry", "$@27", "output_params",
+  "output_param", "$@28", YY_NULLPTR
   };
 
 #if D2_PARSER_DEBUG
   const unsigned short int
   D2Parser::yyrline_[] =
   {
-       0,   100,   100,   100,   101,   101,   102,   102,   110,   111,
-     112,   113,   114,   115,   116,   119,   124,   124,   136,   137,
-     140,   144,   151,   151,   166,   167,   170,   174,   185,   195,
-     195,   207,   208,   212,   213,   214,   215,   216,   221,   221,
-     231,   231,   239,   240,   243,   244,   245,   246,   247,   248,
-     249,   250,   251,   254,   254,   262,   270,   279,   279,   287,
-     288,   291,   291,   299,   299,   306,   306,   313,   313,   320,
-     320,   327,   327,   339,   339,   352,   353,   357,   361,   361,
-     373,   374,   378,   378,   386,   387,   390,   391,   392,   393,
-     394,   397,   397,   405,   409,   409,   417,   417,   427,   428,
-     431,   431,   439,   440,   443,   443
+       0,   103,   103,   103,   104,   104,   105,   105,   113,   114,
+     115,   116,   117,   118,   119,   122,   127,   127,   139,   140,
+     143,   147,   154,   154,   169,   170,   173,   177,   188,   198,
+     198,   210,   211,   215,   216,   217,   218,   219,   224,   224,
+     234,   234,   242,   243,   246,   247,   248,   249,   250,   251,
+     252,   253,   254,   257,   257,   265,   273,   282,   282,   290,
+     291,   294,   294,   302,   302,   309,   309,   318,   318,   328,
+     329,   332,   333,   336,   336,   344,   345,   348,   349,   350,
+     351,   352,   355,   355,   367,   367,   378,   386,   386,   401,
+     401,   408,   408,   420,   420,   433,   434,   438,   442,   442,
+     454,   455,   459,   459,   467,   468,   471,   472,   473,   474,
+     475,   478,   478,   486,   490,   490,   498,   498,   508,   509,
+     512,   512,   520,   521,   524,   524
   };
 
   // Print the state stack on the debug stream.
@@ -1673,8 +1802,8 @@ namespace isc { namespace d2 {
 
 #line 14 "d2_parser.yy" // lalr1.cc:1167
 } } // isc::d2
-#line 1677 "d2_parser.cc" // lalr1.cc:1167
-#line 451 "d2_parser.yy" // lalr1.cc:1168
+#line 1806 "d2_parser.cc" // lalr1.cc:1167
+#line 532 "d2_parser.yy" // lalr1.cc:1168
 
 
 void
index dcac797a3c2b4457c447cd8e86b1514824e9815f..267c352ee1ff52c3d924f2695ff7493747046456 100644 (file)
@@ -363,20 +363,23 @@ namespace isc { namespace d2 {
         TOKEN_FORWARD_DDNS = 276,
         TOKEN_REVERSE_DDNS = 277,
         TOKEN_TSIG_KEYS = 278,
-        TOKEN_LOGGING = 279,
-        TOKEN_LOGGERS = 280,
-        TOKEN_NAME = 281,
-        TOKEN_OUTPUT_OPTIONS = 282,
-        TOKEN_OUTPUT = 283,
-        TOKEN_DEBUGLEVEL = 284,
-        TOKEN_SEVERITY = 285,
-        TOKEN_TOPLEVEL_JSON = 286,
-        TOKEN_TOPLEVEL_DHCPDDNS = 287,
-        TOKEN_SUB_DHCPDDNS = 288,
-        TOKEN_STRING = 289,
-        TOKEN_INTEGER = 290,
-        TOKEN_FLOAT = 291,
-        TOKEN_BOOLEAN = 292
+        TOKEN_ALGORITHM = 279,
+        TOKEN_DIGEST_BITS = 280,
+        TOKEN_SECRET = 281,
+        TOKEN_LOGGING = 282,
+        TOKEN_LOGGERS = 283,
+        TOKEN_NAME = 284,
+        TOKEN_OUTPUT_OPTIONS = 285,
+        TOKEN_OUTPUT = 286,
+        TOKEN_DEBUGLEVEL = 287,
+        TOKEN_SEVERITY = 288,
+        TOKEN_TOPLEVEL_JSON = 289,
+        TOKEN_TOPLEVEL_DHCPDDNS = 290,
+        TOKEN_SUB_DHCPDDNS = 291,
+        TOKEN_STRING = 292,
+        TOKEN_INTEGER = 293,
+        TOKEN_FLOAT = 294,
+        TOKEN_BOOLEAN = 295
       };
     };
 
@@ -579,6 +582,18 @@ namespace isc { namespace d2 {
     symbol_type
     make_TSIG_KEYS (const location_type& l);
 
+    static inline
+    symbol_type
+    make_ALGORITHM (const location_type& l);
+
+    static inline
+    symbol_type
+    make_DIGEST_BITS (const location_type& l);
+
+    static inline
+    symbol_type
+    make_SECRET (const location_type& l);
+
     static inline
     symbol_type
     make_LOGGING (const location_type& l);
@@ -840,12 +855,12 @@ namespace isc { namespace d2 {
     enum
     {
       yyeof_ = 0,
-      yylast_ = 126,     ///< Last index in yytable_.
-      yynnts_ = 69,  ///< Number of nonterminal symbols.
+      yylast_ = 159,     ///< Last index in yytable_.
+      yynnts_ = 82,  ///< Number of nonterminal symbols.
       yyfinal_ = 8, ///< Termination state number.
       yyterror_ = 1,
       yyerrcode_ = 256,
-      yyntokens_ = 38  ///< Number of tokens.
+      yyntokens_ = 41  ///< Number of tokens.
     };
 
 
@@ -891,9 +906,9 @@ namespace isc { namespace d2 {
        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35,    36,    37
+      35,    36,    37,    38,    39,    40
     };
-    const unsigned int user_token_number_max_ = 292;
+    const unsigned int user_token_number_max_ = 295;
     const token_number_type undef_token_ = 2;
 
     if (static_cast<int>(t) <= yyeof_)
@@ -926,24 +941,24 @@ namespace isc { namespace d2 {
   {
       switch (other.type_get ())
     {
-      case 43: // value
-      case 70: // ncr_protocol_value
+      case 46: // value
+      case 73: // ncr_protocol_value
         value.copy< ElementPtr > (other.value);
         break;
 
-      case 37: // "boolean"
+      case 40: // "boolean"
         value.copy< bool > (other.value);
         break;
 
-      case 36: // "floating point"
+      case 39: // "floating point"
         value.copy< double > (other.value);
         break;
 
-      case 35: // "integer"
+      case 38: // "integer"
         value.copy< int64_t > (other.value);
         break;
 
-      case 34: // "constant string"
+      case 37: // "constant string"
         value.copy< std::string > (other.value);
         break;
 
@@ -964,24 +979,24 @@ namespace isc { namespace d2 {
     (void) v;
       switch (this->type_get ())
     {
-      case 43: // value
-      case 70: // ncr_protocol_value
+      case 46: // value
+      case 73: // ncr_protocol_value
         value.copy< ElementPtr > (v);
         break;
 
-      case 37: // "boolean"
+      case 40: // "boolean"
         value.copy< bool > (v);
         break;
 
-      case 36: // "floating point"
+      case 39: // "floating point"
         value.copy< double > (v);
         break;
 
-      case 35: // "integer"
+      case 38: // "integer"
         value.copy< int64_t > (v);
         break;
 
-      case 34: // "constant string"
+      case 37: // "constant string"
         value.copy< std::string > (v);
         break;
 
@@ -1061,24 +1076,24 @@ namespace isc { namespace d2 {
     // Type destructor.
     switch (yytype)
     {
-      case 43: // value
-      case 70: // ncr_protocol_value
+      case 46: // value
+      case 73: // ncr_protocol_value
         value.template destroy< ElementPtr > ();
         break;
 
-      case 37: // "boolean"
+      case 40: // "boolean"
         value.template destroy< bool > ();
         break;
 
-      case 36: // "floating point"
+      case 39: // "floating point"
         value.template destroy< double > ();
         break;
 
-      case 35: // "integer"
+      case 38: // "integer"
         value.template destroy< int64_t > ();
         break;
 
-      case 34: // "constant string"
+      case 37: // "constant string"
         value.template destroy< std::string > ();
         break;
 
@@ -1105,24 +1120,24 @@ namespace isc { namespace d2 {
     super_type::move(s);
       switch (this->type_get ())
     {
-      case 43: // value
-      case 70: // ncr_protocol_value
+      case 46: // value
+      case 73: // ncr_protocol_value
         value.move< ElementPtr > (s.value);
         break;
 
-      case 37: // "boolean"
+      case 40: // "boolean"
         value.move< bool > (s.value);
         break;
 
-      case 36: // "floating point"
+      case 39: // "floating point"
         value.move< double > (s.value);
         break;
 
-      case 35: // "integer"
+      case 38: // "integer"
         value.move< int64_t > (s.value);
         break;
 
-      case 34: // "constant string"
+      case 37: // "constant string"
         value.move< std::string > (s.value);
         break;
 
@@ -1184,7 +1199,8 @@ namespace isc { namespace d2 {
        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
-     285,   286,   287,   288,   289,   290,   291,   292
+     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
+     295
     };
     return static_cast<token_type> (yytoken_number_[type]);
   }
@@ -1321,6 +1337,24 @@ namespace isc { namespace d2 {
     return symbol_type (token::TOKEN_TSIG_KEYS, l);
   }
 
+  D2Parser::symbol_type
+  D2Parser::make_ALGORITHM (const location_type& l)
+  {
+    return symbol_type (token::TOKEN_ALGORITHM, l);
+  }
+
+  D2Parser::symbol_type
+  D2Parser::make_DIGEST_BITS (const location_type& l)
+  {
+    return symbol_type (token::TOKEN_DIGEST_BITS, l);
+  }
+
+  D2Parser::symbol_type
+  D2Parser::make_SECRET (const location_type& l)
+  {
+    return symbol_type (token::TOKEN_SECRET, l);
+  }
+
   D2Parser::symbol_type
   D2Parser::make_LOGGING (const location_type& l)
   {
@@ -1408,7 +1442,7 @@ namespace isc { namespace d2 {
 
 #line 14 "d2_parser.yy" // lalr1.cc:392
 } } // isc::d2
-#line 1412 "d2_parser.h" // lalr1.cc:392
+#line 1446 "d2_parser.h" // lalr1.cc:392
 
 
 
index 7b6cce7cee554f21e3241a53806ce1620cd012cc..eddc47ccfa8189864c540cb2b0f3d817257d9164 100644 (file)
@@ -64,6 +64,9 @@ using namespace std;
   FORWARD_DDNS "forward-ddns"
   REVERSE_DDNS "reverse-ddns"
   TSIG_KEYS "tsig-keys"
+  ALGORITHM "algorithm"
+  DIGEST_BITS "digest-bits"
+  SECRET "secret"
 
   LOGGING "Logging"
   LOGGERS "loggers"
@@ -310,13 +313,91 @@ reverse_ddns : REVERSE_DDNS {
     ctx.leave();
 };
 
-tsig_keys : TSIG_KEYS {
+// --- tsig-keys ----------------------------------------
+// "tsig-keys" : [ ... ]
+tsig_keys: TSIG_KEYS {
+    ElementPtr l(new ListElement(ctx.loc2pos(@1)));
+    ctx.stack_.back()->set("tsig-keys", l);
+    ctx.stack_.push_back(l);
+    ctx.enter(ctx.TSIG_KEYS);
+} COLON LSQUARE_BRACKET tsig_keys_list RSQUARE_BRACKET {
+    ctx.stack_.pop_back();
+    ctx.leave();
+};
+
+tsig_keys_list: %empty
+              | not_empty_tsig_keys_list
+              ;
+
+not_empty_tsig_keys_list: tsig_key
+                        | not_empty_tsig_keys_list COMMA tsig_key
+                        ;
+
+tsig_key: LCURLY_BRACKET {
+    ElementPtr m(new MapElement(ctx.loc2pos(@1)));
+    ctx.stack_.back()->add(m);
+    ctx.stack_.push_back(m);
+} tsig_key_params RCURLY_BRACKET {
+    ctx.stack_.pop_back();
+};
+
+tsig_key_params: tsig_key_param 
+               | tsig_key_params COMMA tsig_key_param
+               ;
+
+tsig_key_param: tsig_key_name
+              | tsig_key_algorithm
+              | tsig_key_digest_bits
+              | tsig_key_secret
+              | unknown_map_entry
+              ;
+
+tsig_key_name: NAME {
     ctx.enter(ctx.NO_KEYWORD);
-} COLON value {
-    ctx.stack_.back()->set("tsig-keys", $4);
+} COLON STRING {
+    if ($4 == "") {
+        error(@3, "name cannot be blank");
+    } 
+    ElementPtr elem(new StringElement($4, ctx.loc2pos(@4)));
+    ElementPtr name(new StringElement($4, ctx.loc2pos(@4)));
+    ctx.stack_.back()->set("name", name);
     ctx.leave();
 };
 
+tsig_key_algorithm: ALGORITHM {
+    ctx.enter(ctx.NO_KEYWORD);
+} COLON STRING {
+    if ($4 == "") {
+        error(@3, "algorithm cannot be blank");
+    } 
+    ElementPtr elem(new StringElement($4, ctx.loc2pos(@4)));
+    ctx.stack_.back()->set("algorithm", elem);
+    ctx.leave();
+};
+
+tsig_key_digest_bits: DIGEST_BITS COLON INTEGER {
+    if ($3 < 0 || ($3 > 0  && ($3 % 8 != 0))) {
+        error(@3, "digest-bits must either be zero or a positive, multiple of eight");
+    } 
+    ElementPtr elem(new IntElement($3, ctx.loc2pos(@3)));
+    ctx.stack_.back()->set("digest-bits", elem);
+};
+
+tsig_key_secret: SECRET {
+    ctx.enter(ctx.NO_KEYWORD);
+} COLON STRING {
+    if ($4 == "") {
+        error(@3, "secret cannot be blank");
+    } 
+    ElementPtr elem(new StringElement($4, ctx.loc2pos(@4)));
+    ctx.stack_.back()->set("secret", elem);
+    ctx.leave();
+};
+
+
+// --- end of tsig-keys ---------------------------------
+
+
 dhcp6_json_object: DHCP6 {
     ctx.enter(ctx.NO_KEYWORD);
 } COLON value {
index 6ab6d61988e048fb0474863b06043595e2fa4bf3..9d0faf0bc48ae62dc42568de8e800c92a07b921b 100644 (file)
@@ -123,6 +123,8 @@ D2ParserContext::contextName()
         return ("toplevel");
     case DHCPDDNS:
         return ("DhcpDdns");
+    case TSIG_KEYS:
+        return ("tsig-keys");
     case LOGGING:
         return ("Logging");
     case LOGGERS:
index 63bd55dda89a1c5187158eeccf59de07f8ced7db..dbb720b38597b16114a0463215c2c26e917bca5e 100644 (file)
@@ -156,6 +156,18 @@ public:
         ///< Used while parsing content of DhcpDdns.
         DHCPDDNS,
 
+        ///< Used while parsing content of tsig-keys
+        TSIG_KEYS,
+
+        ///< Used while parsing content of DhcpDdns/tsig-keys/algorithm
+        ALGORITHM,
+
+        ///< Used while parsing content of DhcpDdns/tsig-keys/digest-bits
+        DIGEST_BITS,
+
+        ///< Used while parsing content of DhcpDdns/tsig-keys/secret
+        SECRET,
+
         ///< Used while parsing content of Logging
         LOGGING,
 
@@ -165,10 +177,10 @@ public:
         /// Used while parsing Logging/loggers/output_options structures.
         OUTPUT_OPTIONS,
 
-        /// Used while parsing Dhcp6/dhcp-ddns/ncr-protocol
+        /// Used while parsing DhcpDdns/ncr-protocol
         NCR_PROTOCOL,
 
-        /// Used while parsing Dhcp6/dhcp-ddns/ncr-format
+        /// Used while parsing DhcpDdns/ncr-format
         NCR_FORMAT
 
     } ParserContext;
index 55d28b73f310c0e9757c92740c4c5adbb198d05c..e100e9e92ce57b090ccdcb20068d9e1d08696c25 100644 (file)
@@ -266,27 +266,33 @@ public:
 
     /// @brief Constructor
     TSIGKeyInfoTest() {
-        reset();
     }
 
     /// @brief Destructor
     ~TSIGKeyInfoTest() {
     }
 
-    /// @brief Wipe out the current storage and parser and replace
-    /// them with new ones.
-    void reset() {
-        keys_.reset(new TSIGKeyInfoMap());
-        parser_.reset(new TSIGKeyInfoParser("test", keys_));
+    /// @brief Pointer to the current parser instance.
+    TSIGKeyInfoParser parser_;
+};
+
+/// @brief Test fixture class for testing DnsServerInfo parsing.
+class TSIGKeyInfoListTest : public ConfigParseTest {
+public:
+
+    /// @brief Constructor
+    TSIGKeyInfoListTest() {
     }
 
-    /// @brief Storage for "committing" keys.
-    TSIGKeyInfoMapPtr keys_;
+    /// @brief Destructor
+    ~TSIGKeyInfoListTest() {
+    }
 
     /// @brief Pointer to the current parser instance.
-    isc::dhcp::ParserPtr parser_;
+    TSIGKeyInfoListParser parser_;
 };
 
+
 /// @brief Test fixture class for testing DnsServerInfo parsing.
 class DnsServerInfoTest : public ConfigParseTest {
 public:
@@ -574,7 +580,7 @@ TEST_F(TSIGKeyInfoTest, invalidEntry) {
     ASSERT_TRUE(fromJSON(config));
 
     // Verify that build fails on blank name.
-    EXPECT_THROW(parser_->build(config_set_), D2CfgError);
+    EXPECT_THROW(parser_.parse(config_set_), D2CfgError);
 
     // Config with a blank algorithm entry.
     config = "{"
@@ -586,7 +592,7 @@ TEST_F(TSIGKeyInfoTest, invalidEntry) {
     ASSERT_TRUE(fromJSON(config));
 
     // Verify that build fails on blank algorithm.
-    EXPECT_THROW(parser_->build(config_set_), D2CfgError);
+    EXPECT_THROW(parser_.parse(config_set_), D2CfgError);
 
     // Config with an invalid algorithm entry.
     config = "{"
@@ -598,7 +604,7 @@ TEST_F(TSIGKeyInfoTest, invalidEntry) {
     ASSERT_TRUE(fromJSON(config));
 
     // Verify that build fails on blank algorithm.
-    EXPECT_THROW(parser_->build(config_set_), D2CfgError);
+    EXPECT_THROW(parser_.parse(config_set_), D2CfgError);
 
     // Config with a blank secret entry.
     config = "{"
@@ -610,7 +616,7 @@ TEST_F(TSIGKeyInfoTest, invalidEntry) {
     ASSERT_TRUE(fromJSON(config));
 
     // Verify that build fails blank secret
-    EXPECT_THROW(parser_->build(config_set_), D2CfgError);
+    EXPECT_THROW(parser_.parse(config_set_), D2CfgError);
 
     // Config with an invalid secret entry.
     config = "{"
@@ -622,7 +628,7 @@ TEST_F(TSIGKeyInfoTest, invalidEntry) {
     ASSERT_TRUE(fromJSON(config));
 
     // Verify that build fails an invalid secret
-    EXPECT_THROW(parser_->build(config_set_), D2CfgError);
+    EXPECT_THROW(parser_.parse(config_set_), D2CfgError);
 }
 
 /// @brief Verifies that TSIGKeyInfo parsing creates a proper TSIGKeyInfo
@@ -639,17 +645,9 @@ TEST_F(TSIGKeyInfoTest, validEntry) {
 
     // Verify that it builds and commits without throwing.
     //ASSERT_NO_THROW(parser_->build(config_set_));
-    (parser_->build(config_set_));
-    ASSERT_NO_THROW(parser_->commit());
-
-    // Verify the correct number of keys are present
-    int count =  keys_->size();
-    EXPECT_EQ(1, count);
-
-    // Find the key and retrieve it.
-    TSIGKeyInfoMap::iterator gotit = keys_->find("d2_key_one");
-    ASSERT_TRUE(gotit != keys_->end());
-    TSIGKeyInfoPtr& key = gotit->second;
+    TSIGKeyInfoPtr key;
+    ASSERT_NO_THROW(key = parser_.parse(config_set_));
+    ASSERT_TRUE(key);
 
     // Verify the key contents.
     EXPECT_TRUE(checkKey(key, "d2_key_one", "HMAC-MD5",
@@ -658,7 +656,7 @@ TEST_F(TSIGKeyInfoTest, validEntry) {
 
 /// @brief Verifies that attempting to parse an invalid list of TSIGKeyInfo
 /// entries is detected.
-TEST_F(TSIGKeyInfoTest, invalidTSIGKeyList) {
+TEST_F(TSIGKeyInfoListTest, invalidTSIGKeyList) {
     // Construct a list of keys with an invalid key entry.
     std::string config = "["
 
@@ -681,20 +679,15 @@ TEST_F(TSIGKeyInfoTest, invalidTSIGKeyList) {
 
     ASSERT_TRUE(fromJSON(config));
 
-    // Create the list parser.
-    isc::dhcp::ParserPtr parser;
-    ASSERT_NO_THROW(parser.reset(new TSIGKeyInfoListParser("test", keys_)));
-
-    // Verify that the list builds without errors.
-    EXPECT_THROW(parser->build(config_set_), D2CfgError);
+    // Verify that the list builds with errors.
+    EXPECT_THROW(parser_.parse(config_set_), D2CfgError);
 }
 
 /// @brief Verifies that attempting to parse an invalid list of TSIGKeyInfo
 /// entries is detected.
-TEST_F(TSIGKeyInfoTest, duplicateTSIGKey) {
+TEST_F(TSIGKeyInfoListTest, duplicateTSIGKey) {
     // Construct a list of keys with an invalid key entry.
     std::string config = "["
-
                          " { \"name\": \"key1\" , "
                          "   \"algorithm\": \"HMAC-MD5\" ,"
                          " \"digest-bits\": 120 , "
@@ -713,17 +706,13 @@ TEST_F(TSIGKeyInfoTest, duplicateTSIGKey) {
 
     ASSERT_TRUE(fromJSON(config));
 
-    // Create the list parser.
-    isc::dhcp::ParserPtr parser;
-    ASSERT_NO_THROW(parser.reset(new TSIGKeyInfoListParser("test", keys_)));
-
     // Verify that the list builds without errors.
-    EXPECT_THROW(parser->build(config_set_), D2CfgError);
+    EXPECT_THROW(parser_.parse(config_set_), D2CfgError);
 }
 
 /// @brief Verifies a valid list of TSIG Keys parses correctly.
 /// Also verifies that all of the supported algorithm names work.
-TEST_F(TSIGKeyInfoTest, validTSIGKeyList) {
+TEST_F(TSIGKeyInfoListTest, validTSIGKeyList) {
     // Construct a valid list of keys.
     std::string config = "["
 
@@ -760,22 +749,17 @@ TEST_F(TSIGKeyInfoTest, validTSIGKeyList) {
                          " ]";
 
     ASSERT_TRUE(fromJSON(config));
-
-    // Verify that the list builds and commits without errors.
-    // Create the list parser.
-    isc::dhcp::ParserPtr parser;
-    ASSERT_NO_THROW(parser.reset(new TSIGKeyInfoListParser("test", keys_)));
-    ASSERT_NO_THROW(parser->build(config_set_));
-    ASSERT_NO_THROW(parser->commit());
+    TSIGKeyInfoMapPtr keys;
+    ASSERT_NO_THROW(keys = parser_.parse(config_set_));
 
     std::string ref_secret = "dGhpcyBrZXkgd2lsbCBtYXRjaA==";
     // Verify the correct number of keys are present
-    int count =  keys_->size();
+    int count =  keys->size();
     ASSERT_EQ(6, count);
 
     // Find the 1st key and retrieve it.
-    TSIGKeyInfoMap::iterator gotit = keys_->find("key1");
-    ASSERT_TRUE(gotit != keys_->end());
+    TSIGKeyInfoMap::iterator gotit = keys->find("key1");
+    ASSERT_TRUE(gotit != keys->end());
     TSIGKeyInfoPtr& key = gotit->second;
 
     // Verify the key contents.
@@ -783,8 +767,8 @@ TEST_F(TSIGKeyInfoTest, validTSIGKeyList) {
                          ref_secret, 80));
 
     // Find the 2nd key and retrieve it.
-    gotit = keys_->find("key2");
-    ASSERT_TRUE(gotit != keys_->end());
+    gotit = keys->find("key2");
+    ASSERT_TRUE(gotit != keys->end());
     key = gotit->second;
 
     // Verify the key contents.
@@ -792,8 +776,8 @@ TEST_F(TSIGKeyInfoTest, validTSIGKeyList) {
                          ref_secret, 80));
 
     // Find the 3rd key and retrieve it.
-    gotit = keys_->find("key3");
-    ASSERT_TRUE(gotit != keys_->end());
+    gotit = keys->find("key3");
+    ASSERT_TRUE(gotit != keys->end());
     key = gotit->second;
 
     // Verify the key contents.
@@ -801,8 +785,8 @@ TEST_F(TSIGKeyInfoTest, validTSIGKeyList) {
                          ref_secret, 128));
 
     // Find the 4th key and retrieve it.
-    gotit = keys_->find("key4");
-    ASSERT_TRUE(gotit != keys_->end());
+    gotit = keys->find("key4");
+    ASSERT_TRUE(gotit != keys->end());
     key = gotit->second;
 
     // Verify the key contents.
@@ -810,8 +794,8 @@ TEST_F(TSIGKeyInfoTest, validTSIGKeyList) {
                          ref_secret, 112));
 
     // Find the 5th key and retrieve it.
-    gotit = keys_->find("key5");
-    ASSERT_TRUE(gotit != keys_->end());
+    gotit = keys->find("key5");
+    ASSERT_TRUE(gotit != keys->end());
     key = gotit->second;
 
     // Verify the key contents.
@@ -819,8 +803,8 @@ TEST_F(TSIGKeyInfoTest, validTSIGKeyList) {
                          ref_secret, 192));
 
     // Find the 6th key and retrieve it.
-    gotit = keys_->find("key6");
-    ASSERT_TRUE(gotit != keys_->end());
+    gotit = keys->find("key6");
+    ASSERT_TRUE(gotit != keys->end());
     key = gotit->second;
 
     // Verify the key contents.
index 7e3b5b03f6c994d600ccf7b519c54658b8dc22a0..4cc5077ba1a0f63804b970c2364a63556b5b4a2f 100644 (file)
 #-----
 ,{
 "description" : "D2.tsig-keys, blank key name",
-"logic-error" : true,
+"syntax-error" : "<string>:1.95: name cannot be blank",
 "data" :
     {
     "forward-ddns" : {},
 #----- D2.tsig-keys, algorithm tests
 
 ,{
-"description" : "D2.tsig-keys, all valid algorthms",
+"description" : "D2.tsig-keys, all valid algorithms",
 "data" :
     {
     "forward-ddns" : {},
 #-----
 ,{
 "description" : "D2.tsig-keys, blank algorithm",
-"logic-error" : true,
+"syntax-error" : "<string>:1.75: algorithm cannot be blank",
 "data" :
     {
     "forward-ddns" : {},
 
 #----- D2.tsig-keys, digest-bits tests
 ,{
-"description" : "D2.tsig-keys, all valid algorthms",
+"description" : "D2.tsig-keys, all valid algorthims",
 "data" :
     {
     "forward-ddns" : {},
 #-----
 ,{
 "description" : "D2.tsig-keys, invalid digest-bits",
-"logic-error" : true,
+"syntax-error" : "<string>:1.104-105: digest-bits must either be zero or a positive, multiple of eight",
 "data" :
     {
     "forward-ddns" : {},
             "algorithm" : "HMAC-MD5",
             "digest-bits" : 84,
             "secret" : "LSWXnfkKZjdPJI5QxlpnfQ=="
-            },
+            }
         ]
     }
 }
 #-----
 ,{
 "description" : "D2.tsig-keys, blank secret",
-"logic-error" : true,
+"syntax-error" : "<string>:1.118: secret cannot be blank",
 "data" :
     {
     "forward-ddns" : {},