]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5017] Doc updated, doxygen warnings removed.
authorTomek Mrugalski <tomasz@isc.org>
Thu, 15 Dec 2016 15:53:35 +0000 (16:53 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Thu, 15 Dec 2016 15:53:35 +0000 (16:53 +0100)
doc/guide/config.xml
src/bin/dhcp4/dhcp4.dox
src/bin/dhcp4/parser_context.h
src/bin/dhcp4/parser_context_decl.h
src/bin/dhcp6/parser_context_decl.h

index d2f81f48d9fbaf524130e03f60625ebe1211ceb7..645ee9c9e5f017e704b5f08e38d11bfb76c62ea9 100644 (file)
       <itemizedlist>
         <listitem>
           <simpara>shell comments: any text after the hash (#)
-          character is ignored. Dhcp6 allows # in any column, while
-          Dhcp4 and Ddns require hash to be in the first
-          column.</simpara>
+          character is ignored. Both Dhcp4 and Dhcp6 allow # in any column,
+          while Ddns requires hash to be in the first column.</simpara>
         </listitem>
         <listitem>
           <simpara>C comments: any text after the double slashes (//)
-          character is ignored. We're in a process of
-          migrating the configuation parsers and currently only Dhcp6
-          supports this feature.</simpara>
+          character is ignored. Both Dhcp4 and Dhcp6 supports this
+          feature.</simpara>
         </listitem>
         <listitem>
           <simpara>Multiline comments: any text between /* and */ is
-          ignored. This commenting can span multiple lines. We're in a
-          process of migrating the configuation parsers and currently
-          only Dhcp6 supports this feature.</simpara>
+          ignored. This commenting can span multiple lines. Both Dhcp4 and
+          Dhcp6 supports this feature.</simpara>
         </listitem>
         <listitem>
           <simpara>File inclusion: JSON files can include other JSON
           files. This can be done by using &lt;?include
-          "file.json"?&gt;. We're in a process of migrating the
-          configuation parsers and currently only Dhcp6 supports this
+          "file.json"?&gt;. Both Dhcp4 and Dhcp6 supports this
           feature.</simpara>
         </listitem>
       </itemizedlist>
index 24fe44c5eac74bd772769bc6bb128a2ae5d3a714..17fba6eb40be3e3815de422557a5fbb5e2d02608 100644 (file)
@@ -41,6 +41,43 @@ all configuration parsers. All DHCPv4 parsers deriving from this class
 directly have their entire implementation in the
 src/bin/dhcp4/json_config_parser.cc.
 
+@section dhcpv4ConfigParserBison Configuration Parser for DHCPv4 (bison)
+
+If you are here only to learn absolute minimum about the new parser, here's how you
+use it:
+
+@code
+ // The following code:
+ json = isc::data::Element::fromJSONFile(file_name, true);
+
+ // can be replaced with this:
+ Parser4Context parser;
+ json = parser.parseFile(file_name, Parser4Context::PARSER_DHCP4);
+@endcode
+
+For an introduction, rationale and issues the new parser tries to address,
+see @ref dhcpv6ConfigParserBison.
+
+The code change for 5017 introduces flex/bison based parser. It is
+essentially defined in two files: dhcp4_lexer.ll, which defines
+regular expressions that are used on the input (be it a file or a
+string in memory). In essence, this code is being called repeatedly
+and each time it returns a token. This repeats until either the
+parsing is complete or syntax error is encountered. For detailed
+discussion, how they operate see @ref dhcpv6ConfigParserBison.
+
+@section dhcpv4ConfigSubParser Parsing Partial Configuration in DHCPv4
+
+See @ref dhcpv6ConfigSubParser.
+
+@section dhcp4ParserIncludes Config File Includes
+
+See @ref dhcp6ParserIncludes.
+
+@section dhcp4ParserConflicts Avoiding syntactical conflicts in parsers
+
+See @ref dhcp6ParserConflicts.
+
 @section dhcpv4ConfigInherit DHCPv4 configuration inheritance
 
 One notable useful feature of DHCP configuration is its parameter inheritance.
index 14e4015613597aefb98c8f862c7a7f4eab4ce75c..b340bfda28f72557a817942152806eb834cfa2df 100644 (file)
@@ -95,14 +95,14 @@ public:
     /// @brief Method called before scanning starts on a string.
     ///
     /// @param str string to be parsed
-    /// @param parser_type specifies expected content
+    /// @param type specifies expected content
     void scanStringBegin(const std::string& str, ParserType type);
 
     /// @brief Method called before scanning starts on a file.
     ///
     /// @param f stdio FILE pointer
     /// @param filename file to be parsed
-    /// @param parser_type specifies expected content
+    /// @param type specifies expected content
     void scanFileBegin(FILE* f, const std::string& filename, ParserType type);
 
     /// @brief Method called after the last tokens are scanned.
index 367f1634925a642f09c8bb24fc14546f7b85e9a2..039a790f8cd5eb9d3d8ebdd73dde69c67597634c 100644 (file)
@@ -4,10 +4,10 @@
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-#ifndef PARSER6_CONTEXT_DECL_H
-#define PARSER6_CONTEXT_DECL_H
+#ifndef PARSER4_CONTEXT_DECL_H
+#define PARSER4_CONTEXT_DECL_H
 
-/// @file parser_context_decl.h Forward declaration of the ParserContext class
+/// @file dhcp4/parser_context_decl.h Forward declaration of the ParserContext class
 
 namespace isc {
 namespace dhcp {
index c98444fdb253c52b7f38aebcea54509c3e0633f4..f84686364a52184e2ff5541330cc2df654f5687f 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef PARSER6_CONTEXT_DECL_H
 #define PARSER6_CONTEXT_DECL_H
 
-/// @file parser_context_decl.h Forward declaration of the ParserContext class
+/// @file dhcp6/parser_context_decl.h Forward declaration of the ParserContext class
 
 namespace isc {
 namespace dhcp {