Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71990 - in sandbox/tools/auto_index: doc doc/html doc/html/autoindex doc/html/autoindex/tut doc/html/autoindex/tut/configure src
From: john_at_[hidden]
Date: 2011-05-16 13:35:59


Author: johnmaddock
Date: 2011-05-16 13:35:58 EDT (Mon, 16 May 2011)
New Revision: 71990
URL: http://svn.boost.org/trac/boost/changeset/71990

Log:
Tweak scanners used for functions. Update docs to match.
Text files modified:
   sandbox/tools/auto_index/doc/auto_index.qbk | 2 +-
   sandbox/tools/auto_index/doc/html/autoindex/comm_ref.html | 5 ++---
   sandbox/tools/auto_index/doc/html/autoindex/script_ref.html | 18 +++++++++---------
   sandbox/tools/auto_index/doc/html/autoindex/tut/configure.html | 2 +-
   sandbox/tools/auto_index/doc/html/autoindex/tut/configure/optional.html | 2 +-
   sandbox/tools/auto_index/doc/html/autoindex/tut/refine.html | 2 +-
   sandbox/tools/auto_index/doc/html/index.html | 5 ++---
   sandbox/tools/auto_index/src/auto_index.cpp | 2 +-
   sandbox/tools/auto_index/src/file_scanning.cpp | 4 ++--
   9 files changed, 20 insertions(+), 22 deletions(-)

Modified: sandbox/tools/auto_index/doc/auto_index.qbk
==============================================================================
--- sandbox/tools/auto_index/doc/auto_index.qbk (original)
+++ sandbox/tools/auto_index/doc/auto_index.qbk 2011-05-16 13:35:58 EDT (Mon, 16 May 2011)
@@ -877,7 +877,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+(\w+)\s*\([^\)]*\)\s*[;{]" "\\<\\w+\\>\\s+\\<\1\\>\\s*\\([^;{]*\\)\\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: sandbox/tools/auto_index/doc/html/autoindex/comm_ref.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/autoindex/comm_ref.html (original)
+++ sandbox/tools/auto_index/doc/html/autoindex/comm_ref.html 2011-05-16 13:35:58 EDT (Mon, 16 May 2011)
@@ -7,13 +7,12 @@
 <link rel="home" href="../index.html" title="AutoIndex">
 <link rel="up" href="../index.html" title="AutoIndex">
 <link rel="prev" href="xml.html" title="XML Handling">
-<link rel="next" href="../index/s07.html" title="Index">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="xml.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../index/s07.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="xml.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
 </div>
 <div class="section" lang="en">
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
@@ -82,7 +81,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="xml.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="../index/s07.html"><img src="../images/next.png" alt="Next"></a>
+<a accesskey="p" href="xml.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
 </div>
 </body>
 </html>

Modified: sandbox/tools/auto_index/doc/html/autoindex/script_ref.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/autoindex/script_ref.html (original)
+++ sandbox/tools/auto_index/doc/html/autoindex/script_ref.html 2011-05-16 13:35:58 EDT (Mon, 16 May 2011)
@@ -23,7 +23,7 @@
       The following elements can occur in a script:
     </p>
 <a name="autoindex.script_ref.comments_and_blank_lines"></a><h5>
-<a name="id1047561"></a>
+<a name="id1005489"></a>
       <a class="link" href="script_ref.html#autoindex.script_ref.comments_and_blank_lines">Comments and
       blank lines</a>
     </h5>
@@ -32,7 +32,7 @@
       comments onto the end of a line!).
     </p>
 <a name="autoindex.script_ref.inclusion_of_index_terms"></a><h5>
-<a name="id1047584"></a>
+<a name="id1005510"></a>
       <a class="link" href="script_ref.html#autoindex.script_ref.inclusion_of_index_terms">Inclusion of
       Index terms</a>
     </h5>
@@ -207,7 +207,7 @@
 </dl>
 </div>
 <a name="autoindex.script_ref.source_file_scanning"></a><h5>
-<a name="id1048595"></a>
+<a name="id1006005"></a>
       <a class="link" href="script_ref.html#autoindex.script_ref.source_file_scanning">Source File Scanning</a>
     </h5>
 <pre class="programlisting"><span class="special">!</span><span class="identifier">scan</span> <span class="identifier">source</span><span class="special">-</span><span class="identifier">file</span><span class="special">-</span><span class="identifier">name</span>
@@ -236,7 +236,7 @@
       </p></td></tr>
 </table></div>
 <a name="autoindex.script_ref.directory_and_source_file_scanning"></a><h5>
-<a name="id1048671"></a>
+<a name="id1006083"></a>
       <a class="link" href="script_ref.html#autoindex.script_ref.directory_and_source_file_scanning">Directory
       and Source File Scanning</a>
     </h5>
@@ -265,7 +265,7 @@
 </dl>
 </div>
 <a name="autoindex.script_ref.excluding_terms"></a><h5>
-<a name="id1048796"></a>
+<a name="id1006208"></a>
       <a class="link" href="script_ref.html#autoindex.script_ref.excluding_terms">Excluding Terms</a>
     </h5>
 <pre class="programlisting"><span class="special">!</span><span class="identifier">exclude</span> <span class="identifier">term</span><span class="special">-</span><span class="identifier">list</span>
@@ -278,7 +278,7 @@
       of things to index.
     </p>
 <a name="autoindex.script_ref.rewriting_section_names"></a><h5>
-<a name="id1048851"></a>
+<a name="id1006263"></a>
       <a class="link" href="script_ref.html#autoindex.script_ref.rewriting_section_names">Rewriting Section
       Names</a>
     </h5>
@@ -325,7 +325,7 @@
       all index entries - thus preventing lots of entries under "The" etc!
     </p>
 <a name="autoindex.script_ref.defining_or_changing_the_file_scanners"></a><h5>
-<a name="id1049005"></a>
+<a name="id1006415"></a>
       <a class="link" href="script_ref.html#autoindex.script_ref.defining_or_changing_the_file_scanners">Defining
       or Changing the File Scanners</a>
     </h5>
@@ -396,7 +396,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+(\w+)\s*\([^\)]*\)\s*[;{]"</span> <span class="string">"\\&lt;\\w+\\&gt;\\s+\\&lt;\1\\&gt;\\s*\\([^;{]*\\)\\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
@@ -428,7 +428,7 @@
       scanner may find in the documentation.
     </p>
 <a name="autoindex.script_ref.debugging_scanning"></a><h5>
-<a name="id1049507"></a>
+<a name="id1006918"></a>
       <a class="link" href="script_ref.html#autoindex.script_ref.debugging_scanning">Debugging scanning</a>
     </h5>
 <p>

Modified: sandbox/tools/auto_index/doc/html/autoindex/tut/configure.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/autoindex/tut/configure.html (original)
+++ sandbox/tools/auto_index/doc/html/autoindex/tut/configure.html 2011-05-16 13:35:58 EDT (Mon, 16 May 2011)
@@ -78,7 +78,7 @@
         &lt;auto-index-prefix&gt;../../..
 
         # Tell Quickbook that it should enable indexing.
- &lt;quickbook-define&gt; ;
+ &lt;quickbook-define&gt;enable_index ;
       
     ;
 </pre>

Modified: sandbox/tools/auto_index/doc/html/autoindex/tut/configure/optional.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/autoindex/tut/configure/optional.html (original)
+++ sandbox/tools/auto_index/doc/html/autoindex/tut/configure/optional.html 2011-05-16 13:35:58 EDT (Mon, 16 May 2011)
@@ -47,7 +47,7 @@
            ... other auto-index options here...
 
         # And tell Quickbook that it should enable indexing.
- &lt;quickbook-define&gt;
+ &lt;quickbook-define&gt;enable_index
     ;
   }
   else

Modified: sandbox/tools/auto_index/doc/html/autoindex/tut/refine.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/autoindex/tut/refine.html (original)
+++ sandbox/tools/auto_index/doc/html/autoindex/tut/refine.html 2011-05-16 13:35:58 EDT (Mon, 16 May 2011)
@@ -52,7 +52,7 @@
         </p></td></tr>
 </table></div>
 <a name="autoindex.tut.refine.restricting_which_sections_are_indexed_for_a_particular_term"></a><h5>
-<a name="id1047500"></a>
+<a name="id1005426"></a>
         <a class="link" href="refine.html#autoindex.tut.refine.restricting_which_sections_are_indexed_for_a_particular_term">Restricting
         which Sections are indexed for a particular term</a>
       </h5>

Modified: sandbox/tools/auto_index/doc/html/index.html
==============================================================================
--- sandbox/tools/auto_index/doc/html/index.html (original)
+++ sandbox/tools/auto_index/doc/html/index.html 2011-05-16 13:35:58 EDT (Mon, 16 May 2011)
@@ -21,7 +21,7 @@
 </h3></div></div></div>
 <div><p class="copyright">Copyright &#169; 2008 , 2011 John Maddock</p></div>
 <div><div class="legalnotice">
-<a name="id1037475"></a><p>
+<a name="id995360"></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>
@@ -58,12 +58,11 @@
 <dt><span class="section">Understanding The AutoIndex Workflow</span></dt>
 <dt><span class="section">XML Handling</span></dt>
 <dt><span class="section">Command Line Reference</span></dt>
-<dt><span class="section">Index</span></dt>
 </dl>
 </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: March 01, 2011 at 12:14:41 GMT</small></p></td>
+<td align="left"><p><small>Last revised: May 16, 2011 at 17:34:45 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: sandbox/tools/auto_index/src/auto_index.cpp
==============================================================================
--- sandbox/tools/auto_index/src/auto_index.cpp (original)
+++ sandbox/tools/auto_index/src/auto_index.cpp 2011-05-16 13:35:58 EDT (Mon, 16 May 2011)
@@ -601,7 +601,7 @@
    }
 
    std::ifstream is(infile.c_str());
- if(!is.good())
+ if((0 == is.peek()) || !is.good())
    {
       std::cerr << "Unable to open XML data file " << argv[1] << std::endl;
       return 1;

Modified: sandbox/tools/auto_index/src/file_scanning.cpp
==============================================================================
--- sandbox/tools/auto_index/src/file_scanning.cpp (original)
+++ sandbox/tools/auto_index/src/file_scanning.cpp 2011-05-16 13:35:58 EDT (Mon, 16 May 2011)
@@ -81,8 +81,8 @@
    {
       add_file_scanner(
          "function_name", // Index type
- "\\w+\\s+(\\w+)\\s*\\([^\\)]*\\)\\s*[;{]", // scanner regex
- "\\\\<\\\\w+\\\\>\\\\s+\\\\<\\1\\\\>\\\\s*\\\\([^;{]*\\\\)\\\\s*[;{]", // Format string to create indexing 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.
          "" // Filter regex for filenames.


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