Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72986 - in trunk/tools/auto_index: doc doc/html doc/html/boost_autoindex src
From: john_at_[hidden]
Date: 2011-07-09 13:05:36


Author: johnmaddock
Date: 2011-07-09 13:05:35 EDT (Sat, 09 Jul 2011)
New Revision: 72986
URL: http://svn.boost.org/trac/boost/changeset/72986

Log:
Fix bad regular expression used for function name scanning.
Text files modified:
   trunk/tools/auto_index/doc/auto_index.qbk | 2 +-
   trunk/tools/auto_index/doc/html/boost_autoindex/script_ref.html | 2 +-
   trunk/tools/auto_index/doc/html/index.html | 4 ++--
   trunk/tools/auto_index/src/file_scanning.cpp | 2 +-
   4 files changed, 5 insertions(+), 5 deletions(-)

Modified: trunk/tools/auto_index/doc/auto_index.qbk
==============================================================================
--- trunk/tools/auto_index/doc/auto_index.qbk (original)
+++ trunk/tools/auto_index/doc/auto_index.qbk 2011-07-09 13:05:35 EDT (Sat, 09 Jul 2011)
@@ -965,7 +965,7 @@
    !define-scanner class_name "^[[:space:]]*(template[[:space:]]*<[^;:{]+>[[:space:]]*)?(class|struct)[[:space:]]*(\<\w+\>([[:blank:]]*\([^)]*\))?[[:space:]]*)*(\<\w*\>)[[:space:]]*(<[^;:{]+>)?[[:space:]]*(\{|:[^;\{()]*\{)" "(?:class|struct)[^;{]+\\<\5\\>[^;{]+\\{" \5
    !define-scanner typedef_name "typedef[^;{}#]+?(\w+)\s*;" "typedef[^;]+\\<\1\\>\\s*;" "\1"
    !define-scanner "macro_name" "^\s*#\s*define\s+(\w+)" "\\<\1\\>" "\1"
- !define-scanner "function_name" "\w+(?:\s*<[^>]>)?[\s&*]+?(\w+)\s*(?:BOOST_[[:upper:]_]+\s*)\([^\)]*\)\s*[;{]" "\\<\\w+\\>(?:\\s+<[^>]*>)?[\\s&*]+\\<\1\\>\\s*\\([^;{]*\\)" "\1"
+ !define-scanner "function_name" "\w+(?:\s*<[^>]>)?[\s&*]+?(\w+)\s*(?:BOOST_[[:upper:]_]+\s*)?\([^\)]*\)\s*[;{]" "\\<\\w+\\>(?:\\s+<[^>]*>)?[\\s&*]+\\<\1\\>\\s*\\([^;{]*\\)" "\1"
 
 Note that these defaults are not installed if you have provided your own versions with these ['type] names. In this case if
 you want the default scanners to be in effect as well as your own, you should include the above in your script file.

Modified: trunk/tools/auto_index/doc/html/boost_autoindex/script_ref.html
==============================================================================
--- trunk/tools/auto_index/doc/html/boost_autoindex/script_ref.html (original)
+++ trunk/tools/auto_index/doc/html/boost_autoindex/script_ref.html 2011-07-09 13:05:35 EDT (Sat, 09 Jul 2011)
@@ -449,7 +449,7 @@
 <pre class="programlisting"><span class="special">!</span><span class="identifier">define</span><span class="special">-</span><span class="identifier">scanner</span> <span class="identifier">class_name</span> <span class="string">"^[[:space:]]*(template[[:space:]]*&lt;[^;:{]+&gt;[[:space:]]*)?(class|struct)[[:space:]]*(\&lt;\w+\&gt;([[:blank:]]*\([^)]*\))?[[:space:]]*)*(\&lt;\w*\&gt;)[[:space:]]*(&lt;[^;:{]+&gt;)?[[:space:]]*(\{|:[^;\{()]*\{)"</span> <span class="string">"(?:class|struct)[^;{]+\\&lt;\5\\&gt;[^;{]+\\{"</span> <span class="special">\</span><span class="number">5</span>
 <span class="special">!</span><span class="identifier">define</span><span class="special">-</span><span class="identifier">scanner</span> <span class="identifier">typedef_name</span> <span class="string">"typedef[^;{}#]+?(\w+)\s*;"</span> <span class="string">"typedef[^;]+\\&lt;\1\\&gt;\\s*;"</span> <span class="string">"\1"</span>
 <span class="special">!</span><span class="identifier">define</span><span class="special">-</span><span class="identifier">scanner</span> <span class="string">"macro_name"</span> <span class="string">"^\s*#\s*define\s+(\w+)"</span> <span class="string">"\\&lt;\1\\&gt;"</span> <span class="string">"\1"</span>
-<span class="special">!</span><span class="identifier">define</span><span class="special">-</span><span class="identifier">scanner</span> <span class="string">"function_name"</span> <span class="string">"\w+(?:\s*&lt;[^&gt;]&gt;)?[\s&amp;*]+?(\w+)\s*(?:BOOST_[[:upper:]_]+\s*)\([^\)]*\)\s*[;{]"</span> <span class="string">"\\&lt;\\w+\\&gt;(?:\\s+&lt;[^&gt;]*&gt;)?[\\s&amp;*]+\\&lt;\1\\&gt;\\s*\\([^;{]*\\)"</span> <span class="string">"\1"</span>
+<span class="special">!</span><span class="identifier">define</span><span class="special">-</span><span class="identifier">scanner</span> <span class="string">"function_name"</span> <span class="string">"\w+(?:\s*&lt;[^&gt;]&gt;)?[\s&amp;*]+?(\w+)\s*(?:BOOST_[[:upper:]_]+\s*)?\([^\)]*\)\s*[;{]"</span> <span class="string">"\\&lt;\\w+\\&gt;(?:\\s+&lt;[^&gt;]*&gt;)?[\\s&amp;*]+\\&lt;\1\\&gt;\\s*\\([^;{]*\\)"</span> <span class="string">"\1"</span>
 </pre>
 <p>
       Note that these defaults are not installed if you have provided your own versions

Modified: trunk/tools/auto_index/doc/html/index.html
==============================================================================
--- trunk/tools/auto_index/doc/html/index.html (original)
+++ trunk/tools/auto_index/doc/html/index.html 2011-07-09 13:05:35 EDT (Sat, 09 Jul 2011)
@@ -28,7 +28,7 @@
 </h3></div></div></div>
 <div><p class="copyright">Copyright &#169; 2008, 2011 John Maddock</p></div>
 <div><div class="legalnotice">
-<a name="id1009628"></a><p>
+<a name="id1024920"></a><p>
         Distributed under the Boost Software License, Version 1.0. (See accompanying
         file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
       </p>
@@ -73,7 +73,7 @@
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: July 08, 2011 at 10:13:00 GMT</small></p></td>
+<td align="left"><p><small>Last revised: July 09, 2011 at 16:32:16 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: trunk/tools/auto_index/src/file_scanning.cpp
==============================================================================
--- trunk/tools/auto_index/src/file_scanning.cpp (original)
+++ trunk/tools/auto_index/src/file_scanning.cpp 2011-07-09 13:05:35 EDT (Sat, 09 Jul 2011)
@@ -81,7 +81,7 @@
    {
       add_file_scanner(
          "function_name", // Index type
- "\\w+(?:\\s*<[^>]>)?[\\s&*]+?(\\w+)\\s*(?:BOOST_[[:upper:]_]+\\s*)\\([^\\)]*\\)\\s*[;{]", // scanner regex
+ "\\w+(?:\\s*<[^>]>)?[\\s&*]+?(\\w+)\\s*(?:BOOST_[[:upper:]_]+\\s*)?\\([^\\)]*\\)\\s*[;{]", // scanner regex
          "\\\\<\\\\w+\\\\>(?:\\\\s+<[^>]*>)?[\\\\s&*]+\\\\<\\1\\\\>\\\\s*\\\\([^;{]*\\\\)", // Format string to create indexing regex.
          "\\1", // Format string to create index term.
          "", // Filter regex for section id's.


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk