Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73418 - in trunk/tools/quickbook: src test
From: dnljms_at_[hidden]
Date: 2011-07-28 18:34:33


Author: danieljames
Date: 2011-07-28 18:34:32 EDT (Thu, 28 Jul 2011)
New Revision: 73418
URL: http://svn.boost.org/trac/boost/changeset/73418

Log:
Quickbook: Simplify table a bit more.

Was crashing on darwin 4.0 in release mode.
Added:
   trunk/tools/quickbook/test/table_1_3.xml
      - copied, changed from r73407, /trunk/tools/quickbook/test/table_1_5.gold
Text files modified:
   trunk/tools/quickbook/src/block_element_grammar.cpp | 2
   trunk/tools/quickbook/test/table_1_3.gold | 115 ++++++++++++++++++++++++++++++++++++++++
   trunk/tools/quickbook/test/table_1_3.quickbook | 32 +++++++++++
   trunk/tools/quickbook/test/table_1_3.xml | 112 +++++++++++++++++++++++---------------
   trunk/tools/quickbook/test/table_1_5.gold | 115 ++++++++++++++++++++++++++++++++++++++++
   trunk/tools/quickbook/test/table_1_5.quickbook | 32 +++++++++++
   6 files changed, 363 insertions(+), 45 deletions(-)

Modified: trunk/tools/quickbook/src/block_element_grammar.cpp
==============================================================================
--- trunk/tools/quickbook/src/block_element_grammar.cpp (original)
+++ trunk/tools/quickbook/src/block_element_grammar.cpp 2011-07-28 18:34:32 EDT (Thu, 28 Jul 2011)
@@ -203,7 +203,7 @@
             ("table", element_info(element_info::nested_block, &local.table, block_tags::table))
             ;
 
- local.same_line = (cl::eps_p(*cl::blank_p >> cl::eol_p) | space);
+ local.same_line = *cl::blank_p >> !(comment >> space);
 
         local.table =
                 local.same_line

Modified: trunk/tools/quickbook/test/table_1_3.gold
==============================================================================
--- trunk/tools/quickbook/test/table_1_3.gold (original)
+++ trunk/tools/quickbook/test/table_1_3.gold 2011-07-28 18:34:32 EDT (Thu, 28 Jul 2011)
@@ -47,6 +47,121 @@
       </tbody>
     </tgroup>
   </informaltable>
+ <table frame="all" id="table_1_3.t1">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_1_3.t2">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_1_3.t3">
+ <title>Title [/ ] containing a comment</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_1_3.t4">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_1_3.t5">
+ <title>[[Title]]</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
   <section id="table_1_3.section1">
     <title><link linkend="table_1_3.section1">Section 1</link></title>
     <table frame="all" id="table_1_3.section1.t0">

Modified: trunk/tools/quickbook/test/table_1_3.quickbook
==============================================================================
--- trunk/tools/quickbook/test/table_1_3.quickbook (original)
+++ trunk/tools/quickbook/test/table_1_3.quickbook 2011-07-28 18:34:32 EDT (Thu, 28 Jul 2011)
@@ -13,6 +13,38 @@
     [[cell]]
 ]
 
+[table [/ Comment?] Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment] Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table Title [/ ] containing a comment
+ [[Heading]]
+ [[cell]]
+]
+
+[/ These two might be considered to be a bug. ]
+
+[table [/ Multi line
+comment]
+ Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment]
+ [[Title]]
+ [[Heading]]
+ [[cell]]
+]
+
 [section:section1 Section 1]
 
 [table A & B

Copied: trunk/tools/quickbook/test/table_1_3.xml (from r73407, /trunk/tools/quickbook/test/table_1_5.gold)
==============================================================================
--- /trunk/tools/quickbook/test/table_1_5.gold (original)
+++ trunk/tools/quickbook/test/table_1_3.xml 2011-07-28 18:34:32 EDT (Thu, 28 Jul 2011)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
-<article id="table_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
- <title>Table 1.5</title>
- <table frame="all" id="table_1_5.table1">
- <title>Table 1</title>
+<article id="table_1_3" last-revision="$Date: 2011/07/28 22:16:53 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Table 1.3</title>
+ <table frame="all">
+ <title>Table 2</title>
     <tgroup cols="1">
       <thead>
         <row>
@@ -25,8 +25,30 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_5.table_2">
- <title>Table 2</title>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all">
+ <title>Title</title>
     <tgroup cols="1">
       <thead>
         <row>
@@ -48,7 +70,8 @@
       </tbody>
     </tgroup>
   </table>
- <informaltable frame="all">
+ <table frame="all">
+ <title>Title</title>
     <tgroup cols="1">
       <thead>
         <row>
@@ -69,8 +92,9 @@
         </row>
       </tbody>
     </tgroup>
- </informaltable>
- <informaltable frame="all" id="table_1_5.table4">
+ </table>
+ <table frame="all">
+ <title>Title [/ ] containing a comment</title>
     <tgroup cols="1">
       <thead>
         <row>
@@ -91,9 +115,9 @@
         </row>
       </tbody>
     </tgroup>
- </informaltable>
- <table frame="all" id="table_1_5._table5_">
- <title>-table5-</title>
+ </table>
+ <table frame="all">
+ <title>Title</title>
     <tgroup cols="1">
       <thead>
         <row>
@@ -115,32 +139,32 @@
       </tbody>
     </tgroup>
   </table>
- <section id="table_1_5.section1">
- <title><link linkend="table_1_5.section1">Section 1</link></title>
- <table frame="all" id="table_1_5.section1.table1">
- <title>Table 1</title>
- <tgroup cols="1">
- <thead>
- <row>
- <entry>
- <para>
- Heading
- </para>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
- <para>
- cell
- </para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </table>
- <table frame="all" id="table_1_5.section1.a___b">
+ <table frame="all">
+ <title>[[Title]]</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <section id="table_1_3.section1">
+ <title><link linkend="table_1_3.section1">Section 1</link></title>
+ <table frame="all">
       <title>A &amp; B</title>
       <tgroup cols="2">
         <thead>
@@ -173,14 +197,14 @@
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_5.section1.empty_table">
+ <table frame="all">
       <title>Empty Table</title>
       <tgroup cols="0">
         <tbody>
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_5.section1.table_with_an_empty_cell">
+ <table frame="all">
       <title>Table with an empty cell</title>
       <tgroup cols="1">
         <tbody>
@@ -194,7 +218,7 @@
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_5.section1.indentation">
+ <table frame="all">
       <title>Indentation</title>
       <tgroup cols="2">
         <thead>
@@ -233,7 +257,7 @@
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_5.section1.nested_tables">
+ <table frame="all">
       <title>Nested Tables</title>
       <tgroup cols="1">
         <thead>
@@ -253,7 +277,7 @@
         <tbody>
           <row>
             <entry>
- <table frame="all" id="table_1_5.section1.inner_table">
+ <table frame="all">
                 <title>Inner Table</title>
                 <tgroup cols="2">
                   <thead>
@@ -299,7 +323,7 @@
       </tgroup>
     </table>
     <anchor id="id1"/>
- <table frame="all" id="table_1_5.section1.table_with_anchors">
+ <table frame="all">
       <title>Table with anchors</title>
       <tgroup cols="1">
         <thead>

Modified: trunk/tools/quickbook/test/table_1_5.gold
==============================================================================
--- trunk/tools/quickbook/test/table_1_5.gold (original)
+++ trunk/tools/quickbook/test/table_1_5.gold 2011-07-28 18:34:32 EDT (Thu, 28 Jul 2011)
@@ -115,6 +115,121 @@
       </tbody>
     </tgroup>
   </table>
+ <table frame="all" id="table_1_5.title">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_1_5.title0">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_1_5.title_______containing_a_comment">
+ <title>Title [/ ] containing a comment</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_1_5.title1">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_1_5.__title__">
+ <title>[[Title]]</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
   <section id="table_1_5.section1">
     <title><link linkend="table_1_5.section1">Section 1</link></title>
     <table frame="all" id="table_1_5.section1.table1">

Modified: trunk/tools/quickbook/test/table_1_5.quickbook
==============================================================================
--- trunk/tools/quickbook/test/table_1_5.quickbook (original)
+++ trunk/tools/quickbook/test/table_1_5.quickbook 2011-07-28 18:34:32 EDT (Thu, 28 Jul 2011)
@@ -28,6 +28,38 @@
     [[cell]]
 ]
 
+[table [/ Comment?] Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment] Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table Title [/ ] containing a comment
+ [[Heading]]
+ [[cell]]
+]
+
+[/ These two might be considered to be a bug. ]
+
+[table [/ Multi line
+comment]
+ Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment]
+ [[Title]]
+ [[Heading]]
+ [[cell]]
+]
+
 [section:section1 Section 1]
 
 [table:table1 Table 1


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