Added check for trailing semicolon to rst parser; fixed few documentation build warnings
authorAndrey Kamaev <no@email>
Tue, 29 May 2012 10:57:25 +0000 (10:57 +0000)
committerAndrey Kamaev <no@email>
Tue, 29 May 2012 10:57:25 +0000 (10:57 +0000)
modules/core/doc/utility_and_system_functions_and_macros.rst
modules/features2d/doc/common_interfaces_of_descriptor_matchers.rst
modules/gpu/doc/introduction.rst
modules/gpu/doc/video.rst
modules/gpu/include/opencv2/gpu/gpu.hpp
modules/java/rst_parser.py

index 6433495..30577c4 100644 (file)
@@ -277,7 +277,7 @@ Returns a text string formatted using the ``printf``\ -like expression.
     :param fmt: ``printf`` -compatible formatting specifiers.
 
 The function acts like ``sprintf``  but forms and returns an STL string. It can be used to form an error message in the
-:ocv:func:`Exception` constructor.
+:ocv:class:`Exception` constructor.
 
 
 
index 1694388..9564ae9 100644 (file)
@@ -260,7 +260,7 @@ BFMatcher
 -----------------
 .. ocv:class::BFMatcher : public DescriptorMatcher
 
-Brute-force descriptor matcher. For each descriptor in the first set, this matcher finds the closest descriptor in the second set by trying each one. This descriptor matcher supports masking permissible matches of descriptor sets. ::
+Brute-force descriptor matcher. For each descriptor in the first set, this matcher finds the closest descriptor in the second set by trying each one. This descriptor matcher supports masking permissible matches of descriptor sets.
 
 
 BFMatcher::BFMatcher
index 2e7ee3d..ec562b8 100644 (file)
@@ -32,7 +32,7 @@ By default, the OpenCV GPU module includes:
     PTX code for compute capabilities 1.1 and 1.3 (controlled by ``CUDA_ARCH_PTX``     in ``CMake``)
 
 This means that for devices with CC 1.3 and 2.0 binary images are ready to run. For all newer platforms, the PTX code for 1.3 is JIT'ed to a binary image. For devices with CC 1.1 and 1.2, the PTX for 1.1 is JIT'ed. For devices with CC 1.0, no code is available and the functions throw
-:ocv:func:`Exception`. For platforms where JIT compilation is performed first, the run is slow.
+:ocv:class:`Exception`. For platforms where JIT compilation is performed first, the run is slow.
 
 On a GPU with CC 1.0, you can still compile the GPU module and most of the functions will run flawlessly. To achieve this, add "1.0" to the list of binaries, for example, ``CUDA_ARCH_BIN="1.0 1.3 2.0"`` . The functions that cannot be run on CC 1.0 GPUs throw an exception.
 
index 9bde6bc..40194c3 100644 (file)
@@ -637,7 +637,7 @@ The method throws :ocv:class:`Exception` if video reader wasn't initialized.
 \r
 \r
 gpu::VideoReader_GPU::dumpFormat\r
-----------------------------\r
+--------------------------------\r
 Dump information about video file format to specified stream.\r
 \r
 .. ocv:function:: void gpu::VideoReader_GPU::dumpFormat(std::ostream& st)\r
@@ -688,7 +688,7 @@ Starts processing.
 \r
 .. ocv:function:: virtual void gpu::VideoReader_GPU::VideoSource::start() = 0\r
 \r
-Implementation must create own thread with video processing and call periodic :ocv:func:`gpu::VideoReader_GPU::VideoSource::parseVideoData` .\r
+Implementation must create own thread with video processing and call periodic ocv:func:`gpu::VideoReader_GPU::VideoSource::parseVideoData` .\r
 \r
 \r
 \r
@@ -720,7 +720,7 @@ gpu::VideoReader_GPU::VideoSource::parseVideoData
 -------------------------------------------------\r
 Parse next video frame. Implementation must call this method after new frame was grabbed.\r
 \r
-.. ocv:function:: bool gpu::VideoReader_GPU::VideoSource::parseVideoData(const unsigned char* data, size_t size, bool endOfStream = false)\r
+.. ocv:function:: bool gpu::VideoReader_GPU::VideoSource::parseVideoData(const uchar* data, size_t size, bool endOfStream = false)\r
 \r
     :param data: Pointer to frame data. Can be ``NULL`` if ``endOfStream`` if ``true`` .\r
 \r
index e411094..391c1f7 100644 (file)
@@ -2079,7 +2079,7 @@ public:
         void setVideoParser(detail::VideoParser* videoParser) { videoParser_ = videoParser; }\r
 \r
     protected:\r
-        bool parseVideoData(const unsigned char* data, size_t size, bool endOfStream = false);\r
+        bool parseVideoData(const uchar* data, size_t size, bool endOfStream = false);\r
 \r
     private:\r
         VideoSource(const VideoSource&);\r
index 861c192..8503a8b 100644 (file)
@@ -16,7 +16,7 @@ params_blacklist = {
 }
 
 ERROR_001_SECTIONFAILURE      = 1
-ERROR_002_HDRWHITESPACE       = 2
+WARNING_002_HDRWHITESPACE     = 2
 ERROR_003_PARENTHESES         = 3
 WARNING_004_TABS              = 4
 ERROR_005_REDEFENITIONPARAM   = 5
@@ -25,6 +25,7 @@ WARNING_007_UNDOCUMENTEDPARAM = 7
 WARNING_008_MISSINGPARAM      = 8
 WARNING_009_HDRMISMATCH       = 9
 ERROR_010_NOMODULE            = 10
+ERROR_011_EOLEXPECTED         = 11
 
 params_mapping = {
     "composeRT" : {
@@ -142,7 +143,7 @@ class RstParser(object):
         #if section_name.find(" ") >= 0 and section_name.find("::operator") < 0:
         if section_name.find(" ") >= 0 and not bool(re.match(r"(\w+::)*operator\s*(\w+|>>|<<|\(\)|->|\+\+|--|=|==|\+=|-=)", section_name)):
             if show_errors:
-                print "RST parser error E%03d:  SKIPPED: \"%s\" File: %s:%s" % (ERROR_002_HDRWHITESPACE, section_name, file_name, lineno)
+                print "RST parser warning W%03d:  SKIPPED: \"%s\" File: %s:%s" % (WARNING_002_HDRWHITESPACE, section_name, file_name, lineno)
             self.sections_skipped += 1
             return
 
@@ -356,6 +357,9 @@ class RstParser(object):
         return section_name
 
     def add_new_fdecl(self, func, decl):
+        if decl.fdecl.endswith(";"):
+            print >> sys.stderr, "RST parser error E%03d: unexpected semicolon at the end of declaration in \"%s\" at %s:%s" \
+                        % (ERROR_011_EOLEXPECTED, func["name"], func["file"], func["line"])
         decls =  func.get("decls",[])
         if (decl.lang == "C++" or decl.lang == "C"):
             rst_decl = self.cpp_parser.parse_func_decl_no_wrap(decl.fdecl)