Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75351 - in branches/quickbook-dev/tools/quickbook: src test
From: dnljms_at_[hidden]
Date: 2011-11-06 17:19:55


Author: danieljames
Date: 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
New Revision: 75351
URL: http://svn.boost.org/trac/boost/changeset/75351

Log:
Quickbook: Better punctuation support for various elements.
Added:
   branches/quickbook-dev/tools/quickbook/test/table-1_6.gold
      - copied, changed from r75350, /branches/quickbook-dev/tools/quickbook/test/table-1_5.gold
   branches/quickbook-dev/tools/quickbook/test/table-1_6.quickbook
      - copied, changed from r75350, /branches/quickbook-dev/tools/quickbook/test/table-1_5.quickbook
   branches/quickbook-dev/tools/quickbook/test/unmatched_element-1_5.gold (contents, props changed)
   branches/quickbook-dev/tools/quickbook/test/unmatched_element-1_5.quickbook (contents, props changed)
   branches/quickbook-dev/tools/quickbook/test/unmatched_element-1_6.gold (contents, props changed)
   branches/quickbook-dev/tools/quickbook/test/unmatched_element-1_6.quickbook (contents, props changed)
Removed:
   branches/quickbook-dev/tools/quickbook/test/template_lookup1-1_5-fail.quickbook
Text files modified:
   branches/quickbook-dev/tools/quickbook/src/actions.cpp | 15 +++++++---
   branches/quickbook-dev/tools/quickbook/src/actions.hpp | 10 +++++-
   branches/quickbook-dev/tools/quickbook/src/block_element_grammar.cpp | 24 +++++++++++++---
   branches/quickbook-dev/tools/quickbook/src/doc_info_grammar.cpp | 19 ------------
   branches/quickbook-dev/tools/quickbook/src/grammar.cpp | 2
   branches/quickbook-dev/tools/quickbook/src/grammar.hpp | 2
   branches/quickbook-dev/tools/quickbook/src/grammar_impl.hpp | 2 +
   branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp | 47 +++++++++++++++++++++++++++-----
   branches/quickbook-dev/tools/quickbook/test/Jamfile.v2 | 4 ++
   branches/quickbook-dev/tools/quickbook/test/macro-1_5.gold | 6 ++++
   branches/quickbook-dev/tools/quickbook/test/macro-1_5.quickbook | 8 ++++
   branches/quickbook-dev/tools/quickbook/test/macro-1_6.gold | 3 ++
   branches/quickbook-dev/tools/quickbook/test/macro-1_6.quickbook | 5 +++
   branches/quickbook-dev/tools/quickbook/test/table-1_3.gold | 33 +++++++++++-----------
   branches/quickbook-dev/tools/quickbook/test/table-1_3.quickbook | 2
   branches/quickbook-dev/tools/quickbook/test/table-1_5.gold | 41 ++++++++++++++--------------
   branches/quickbook-dev/tools/quickbook/test/table-1_5.quickbook | 2
   branches/quickbook-dev/tools/quickbook/test/table-1_6.gold | 57 ++++++++++++++++++++++-----------------
   branches/quickbook-dev/tools/quickbook/test/table-1_6.quickbook | 20 +++++--------
   branches/quickbook-dev/tools/quickbook/test/templates-1_5.gold | 3 ++
   branches/quickbook-dev/tools/quickbook/test/templates-1_5.quickbook | 7 ++++
   21 files changed, 194 insertions(+), 118 deletions(-)

Modified: branches/quickbook-dev/tools/quickbook/src/actions.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/actions.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/actions.cpp 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -1110,7 +1110,7 @@
             bool r = cl::parse(first, last,
                     content.get_tag() == template_tags::block ?
                         actions.grammar().block :
- actions.grammar().simple_phrase
+ actions.grammar().template_phrase
                 ).full;
 
             boost::swap(actions.current_file, saved_current_file);
@@ -1488,7 +1488,7 @@
         if(values.check(general_tags::element_id))
             element_id = values.consume().get_quickbook();
 
- std::string title = values.consume(table_tags::title).get_quickbook();
+ value title = values.consume(table_tags::title);
         bool has_title = !title.empty();
         
         std::string table_id;
@@ -1498,7 +1498,7 @@
         }
         else if (has_title) {
             if (actions.ids.compatibility_version() >= 105) {
- table_id = actions.ids.add_id(detail::make_identifier(title), id_category::generated);
+ table_id = actions.ids.add_id(detail::make_identifier(title.get_quickbook()), id_category::generated);
             }
             else {
                 table_id = actions.ids.add_id("t", id_category::numbered);
@@ -1524,7 +1524,12 @@
                 actions.out << " id=\"" << table_id << "\"";
             actions.out << ">\n";
             actions.out << "<title>";
- detail::print_string(title, actions.out.get());
+ if (qbk_version_n < 106u) {
+ detail::print_string(title.get_quickbook(), actions.out.get());
+ }
+ else {
+ actions.out << title.get_boostbook();
+ }
             actions.out << "</title>";
         }
         else
@@ -1977,7 +1982,7 @@
             actions.phrase.swap(value);
         }
 
- actions.values.builder.insert(bbk_value(value, value::default_tag));
+ actions.values.builder.insert(bbk_value(value, tag));
     }
     
     bool scoped_output_push::start()

Modified: branches/quickbook-dev/tools/quickbook/src/actions.hpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/actions.hpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/actions.hpp 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -301,12 +301,18 @@
 
     struct to_value_action
     {
- to_value_action(quickbook::actions& actions)
- : actions(actions) {}
+ to_value_action(quickbook::actions& actions, int tag = value::default_tag)
+ : actions(actions)
+ , tag(tag)
+ {}
 
         void operator()(parse_iterator first, parse_iterator last) const;
 
+ to_value_action operator()(int tag)
+ { return to_value_action(actions, tag); }
+
         quickbook::actions& actions;
+ int tag;
     };
 
     struct scoped_output_push : scoped_action_base

Modified: branches/quickbook-dev/tools/quickbook/src/block_element_grammar.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/block_element_grammar.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/block_element_grammar.cpp 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -28,7 +28,7 @@
     {
         cl::rule<scanner>
                         heading, inner_block, inner_phrase, def_macro,
- table, table_row, variablelist,
+ table, table_title, table_row, variablelist,
                         varlistentry, varlistterm, list, cell,
                         preformatted, begin_section, end_section,
                         xinclude, include,
@@ -171,8 +171,7 @@
 
         local.variablelist =
                 (cl::eps_p(*cl::blank_p >> cl::eol_p) | space)
- >> (*(cl::anychar_p - eol)) [actions.values.entry(ph::arg1, ph::arg2, table_tags::title)]
- >> (+eol)
+ >> local.table_title
>> *local.varlistentry
             ;
 
@@ -213,8 +212,7 @@
                 local.same_line
>> local.element_id_1_5
>> local.same_line
- >> (*(cl::anychar_p - eol)) [actions.values.entry(ph::arg1, ph::arg2, table_tags::title)]
- >> (+eol)
+ >> local.table_title
>> *local.table_row
             ;
 
@@ -234,6 +232,22 @@
             )
             ;
 
+ local.table_title =
+ cl::eps_p(qbk_before(106))
+ >> (*(cl::anychar_p - eol)) [actions.values.entry(ph::arg1, ph::arg2, table_tags::title)]
+ >> (+eol)
+ | cl::eps_p(qbk_since(106))
+ >> actions.scoped_output()
+ [
+ (*(escape
+ | line_comment
+ | (cl::anychar_p - (*(line_comment | cl::blank_p) >> (cl::eol_p | '[' | ']')))
+ [actions.plain_char]
+ )) [actions.docinfo_value(ph::arg1, ph::arg2, table_tags::title)]
+ ]
+ >> (*eol)
+ ;
+
         elements.add
             ("ordered_list", element_info(element_info::nested_block, &local.list, block_tags::ordered_list, 106))
             ("itemized_list", element_info(element_info::nested_block, &local.list, block_tags::itemized_list, 106))

Modified: branches/quickbook-dev/tools/quickbook/src/doc_info_grammar.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/doc_info_grammar.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/doc_info_grammar.cpp 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -245,23 +245,6 @@
 
         local.attribute_rules[doc_info_attributes::compatibility_mode] = &local.doc_compatibility_mode;
 
- local.char_ =
- cl::str_p("\\n") [actions.break_]
- | "\\ " // ignore an escaped space
- | '\\' >> cl::punct_p [actions.plain_char]
- | "\\u" >> cl::repeat_p(4)
- [cl::chset<>("0-9a-fA-F")]
- [actions.escape_unicode]
- | "\\U" >> cl::repeat_p(8)
- [cl::chset<>("0-9a-fA-F")]
- [actions.escape_unicode]
- | ("'''" >> !eol)
- >> actions.values.save()
- [ (*(cl::anychar_p - "'''"))
- [actions.values.entry(ph::arg1, ph::arg2, phrase_tags::escape)]
- >> cl::str_p("'''") [actions.element]
- ]
- | cl::anychar_p [actions.plain_char]
- ;
+ local.char_ = escape | cl::anychar_p[actions.plain_char];
     }
 }

Modified: branches/quickbook-dev/tools/quickbook/src/grammar.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/grammar.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/grammar.cpp 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -16,7 +16,7 @@
    quickbook_grammar::quickbook_grammar(quickbook::actions& a)
         : impl_(new impl(a))
         , command_line_macro(impl_->command_line, "command_line_macro")
- , simple_phrase(impl_->simple_phrase, "simple_phrase")
+ , template_phrase(impl_->template_phrase, "template_phrase")
         , phrase(impl_->phrase_start, "phrase")
         , block(impl_->block_start, "block")
         , block_skip_initial_spaces(impl_->block_skip_initial_spaces, "block")

Modified: branches/quickbook-dev/tools/quickbook/src/grammar.hpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/grammar.hpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/grammar.hpp 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -54,7 +54,7 @@
 
     public:
         grammar command_line_macro;
- grammar simple_phrase;
+ grammar template_phrase;
         grammar phrase;
         grammar block;
         grammar block_skip_initial_spaces;

Modified: branches/quickbook-dev/tools/quickbook/src/grammar_impl.hpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/grammar_impl.hpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/grammar_impl.hpp 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -70,10 +70,12 @@
         cl::rule<scanner> phrase_start;
         cl::rule<scanner> block_skip_initial_spaces;
         cl::rule<scanner> simple_phrase;
+ cl::rule<scanner> template_phrase;
         cl::rule<scanner> phrase;
         cl::rule<scanner> extended_phrase;
         cl::rule<scanner> inside_paragraph;
         cl::rule<scanner> command_line;
+ cl::rule<scanner> escape;
 
         // Miscellaneous stuff
         cl::rule<scanner> hard_space;

Modified: branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -102,7 +102,6 @@
                         blocks, paragraph_separator,
                         code, code_line, blank_line, hr,
                         list, list_item,
- escape,
                         inline_code,
                         template_,
                         code_block, macro,
@@ -113,7 +112,7 @@
                         template_inner_arg_1_5, brackets_1_5,
                         break_,
                         command_line_macro_identifier, command_line_phrase,
- dummy_block, line_dummy_block
+ dummy_block, line_dummy_block, mismatched_square_bracket
                         ;
 
         struct simple_markup_closure
@@ -175,6 +174,7 @@
 
         phrase_start =
             (*( local.common(element_info::in_phrase)
+ | local.mismatched_square_bracket
             | cl::anychar_p [actions.plain_char]
             )) [actions.phrase_end]
             ;
@@ -188,6 +188,7 @@
                                                 [local.top_level.parse_blocks = true]
                 | local.paragraph_separator [local.top_level.parse_blocks = true]
                 | ( local.common(element_info::in_phrase)
+ | local.mismatched_square_bracket
                     | cl::space_p [actions.space_char]
                     | cl::anychar_p [actions.plain_char]
                     ) [local.top_level.parse_blocks = false]
@@ -274,6 +275,7 @@
             actions.values.save()
             [
                 *( local.common(element_info::in_phrase)
+ | local.mismatched_square_bracket
                 | (cl::anychar_p -
                         ( cl::eol_p >> *cl::blank_p
>> (cl::ch_p('*') | '#' | cl::eol_p)
@@ -292,10 +294,23 @@
             | local.code_block
             | local.inline_code
             | local.simple_markup
- | local.escape
+ | escape
             | comment
+ | cl::eps_p(qbk_since(106u))
+ >> ( cl::ch_p('[') [actions.plain_char]
+ >> simple_phrase
+ >> ( cl::ch_p(']') [actions.plain_char]
+ | cl::eps_p [actions.error("Missing close bracket")]
+ )
+ )
             ;
 
+ local.mismatched_square_bracket =
+ cl::eps_p(qbk_since(106u))
+ >> cl::ch_p(']') [actions.plain_char]
+ >> cl::eps_p [actions.error("Mismatched close bracket")]
+ ;
+
         local.macro =
             // must not be followed by alpha or underscore
             cl::eps_p(actions.macro
@@ -484,7 +499,7 @@
             ] [actions.paragraph]
             ;
 
- local.escape =
+ escape =
                 cl::str_p("\\n") [actions.break_]
             | cl::str_p("\\ ") // ignore an escaped space
             | '\\' >> cl::punct_p [actions.plain_char]
@@ -514,6 +529,16 @@
             ]
             ;
 
+ template_phrase =
+ actions.values.save()
+ [
+ *( local.common(element_info::in_phrase)
+ | local.mismatched_square_bracket
+ | cl::anychar_p [actions.plain_char]
+ )
+ ]
+ ;
+
         //
         // Command line
         //
@@ -534,14 +559,17 @@
             ;
 
         local.command_line_macro_identifier =
- +(cl::anychar_p - (cl::space_p | ']' | '='))
+ cl::eps_p(qbk_since(106u))
+ >> +(cl::anychar_p - (cl::space_p | '[' | '\\' | ']' | '='))
+ | +(cl::anychar_p - (cl::space_p | ']' | '='))
             ;
 
 
         local.command_line_phrase =
             actions.values.save()
             [ *( local.common(element_info::in_phrase)
- | (cl::anychar_p - ']') [actions.plain_char]
+ | local.mismatched_square_bracket
+ | cl::anychar_p [actions.plain_char]
                 )
             ]
             ;
@@ -589,9 +617,12 @@
             '[' >> *(local.line_dummy_block | (cl::anychar_p - (cl::eol_p | ']'))) >> ']'
             ;
 
+ // TODO: Prevent an old macro from being used in a 1.6 file.
         macro_identifier =
- +(cl::anychar_p - (cl::space_p | ']'))
+ cl::eps_p(qbk_since(106u))
+ >> +(cl::anychar_p - (cl::space_p | '[' | '\\' | ']'))
+ | cl::eps_p(qbk_before(106u))
+ >> +(cl::anychar_p - (cl::space_p | ']'))
             ;
-
     }
 }

Modified: branches/quickbook-dev/tools/quickbook/test/Jamfile.v2
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/Jamfile.v2 (original)
+++ branches/quickbook-dev/tools/quickbook/test/Jamfile.v2 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -71,10 +71,10 @@
     [ quickbook-test simple_markup-1_5 ]
     [ quickbook-test table-1_3 ]
     [ quickbook-test table-1_5 ]
+ [ quickbook-test table-1_6 ]
     [ quickbook-error-test template_arguments1-1_1-fail ]
     [ quickbook-error-test template_arguments2-1_1-fail ]
     [ quickbook-error-test template_arguments3-1_1-fail ]
- [ quickbook-error-test template_lookup1-1_5-fail ]
     [ quickbook-test template_section-1_5 ]
     [ quickbook-error-test template_section1-1_5-fail ]
     [ quickbook-error-test template_section2-1_5-fail ]
@@ -83,6 +83,8 @@
     [ quickbook-test templates-1_4 ]
     [ quickbook-test templates-1_5 ]
     [ quickbook-test unicode_escape-1_5 ]
+ [ quickbook-test unmatched_element-1_5 ]
+ [ quickbook-test unmatched_element-1_6 ]
     [ quickbook-error-test utf16be_bom-1_5-fail ]
     [ quickbook-error-test utf16le_bom-1_5-fail ]
     [ quickbook-test utf8-1_5 ]

Modified: branches/quickbook-dev/tools/quickbook/test/macro-1_5.gold
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/macro-1_5.gold (original)
+++ branches/quickbook-dev/tools/quickbook/test/macro-1_5.gold 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -17,4 +17,10 @@
   <para>
     1
   </para>
+ <para>
+ 1
+ </para>
+ <para>
+ 1 2
+ </para>
 </article>

Modified: branches/quickbook-dev/tools/quickbook/test/macro-1_5.quickbook
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/macro-1_5.quickbook (original)
+++ branches/quickbook-dev/tools/quickbook/test/macro-1_5.quickbook 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -21,8 +21,14 @@
 __foo__
 
 [template foo2[]
-[def __foo__ 2]
+[def __foo__ 3]
 __foo__
 ]
 
 [foo2]
+__foo__
+
+[def __crazy[macro__ 1]
+[def __crazy\macro__ 2]
+__crazy[macro__
+__crazy\macro__
\ No newline at end of file

Modified: branches/quickbook-dev/tools/quickbook/test/macro-1_6.gold
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/macro-1_6.gold (original)
+++ branches/quickbook-dev/tools/quickbook/test/macro-1_6.gold 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -20,4 +20,7 @@
   <para>
     2
   </para>
+ <para>
+ [1] \m2
+ </para>
 </article>

Modified: branches/quickbook-dev/tools/quickbook/test/macro-1_6.quickbook
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/macro-1_6.quickbook (original)
+++ branches/quickbook-dev/tools/quickbook/test/macro-1_6.quickbook 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -27,3 +27,8 @@
 
 [foo2]
 __foo__
+
+[def __crazy[1]]
+[def __crazy2\m2]
+__crazy
+__crazy2
\ No newline at end of file

Modified: branches/quickbook-dev/tools/quickbook/test/table-1_3.gold
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/table-1_3.gold (original)
+++ branches/quickbook-dev/tools/quickbook/test/table-1_3.gold 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -1,8 +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_3" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+<article id="table_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
   <title>Table 1.3</title>
- <table frame="all" id="table_1_3.t0">
+ <table frame="all" id="table_tests.t0">
     <title>Table 2</title>
     <tgroup cols="1">
       <thead>
@@ -47,7 +48,7 @@
       </tbody>
     </tgroup>
   </informaltable>
- <table frame="all" id="table_1_3.t1">
+ <table frame="all" id="table_tests.t1">
     <title>Title</title>
     <tgroup cols="1">
       <thead>
@@ -70,7 +71,7 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_3.t2">
+ <table frame="all" id="table_tests.t2">
     <title>Title</title>
     <tgroup cols="1">
       <thead>
@@ -93,7 +94,7 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_3.t3">
+ <table frame="all" id="table_tests.t3">
     <title>Title [/ ] containing a comment</title>
     <tgroup cols="1">
       <thead>
@@ -116,7 +117,7 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_3.t4">
+ <table frame="all" id="table_tests.t4">
     <title>Title</title>
     <tgroup cols="1">
       <thead>
@@ -139,7 +140,7 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_3.t5">
+ <table frame="all" id="table_tests.t5">
     <title>[[Title]]</title>
     <tgroup cols="1">
       <thead>
@@ -162,9 +163,9 @@
       </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">
+ <section id="table_tests.section1">
+ <title><link linkend="table_tests.section1">Section 1</link></title>
+ <table frame="all" id="table_tests.section1.t0">
       <title>A &amp; B</title>
       <tgroup cols="2">
         <thead>
@@ -197,14 +198,14 @@
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_3.section1.t1">
+ <table frame="all" id="table_tests.section1.t1">
       <title>Empty Table</title>
       <tgroup cols="0">
         <tbody>
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_3.section1.t2">
+ <table frame="all" id="table_tests.section1.t2">
       <title>Table with an empty cell</title>
       <tgroup cols="1">
         <tbody>
@@ -218,7 +219,7 @@
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_3.section1.t3">
+ <table frame="all" id="table_tests.section1.t3">
       <title>Indentation</title>
       <tgroup cols="2">
         <thead>
@@ -257,7 +258,7 @@
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_3.section1.t4">
+ <table frame="all" id="table_tests.section1.t4">
       <title>Nested Tables</title>
       <tgroup cols="1">
         <thead>
@@ -277,7 +278,7 @@
         <tbody>
           <row>
             <entry>
- <table frame="all" id="table_1_3.section1.t5">
+ <table frame="all" id="table_tests.section1.t5">
                 <title>Inner Table</title>
                 <tgroup cols="2">
                   <thead>
@@ -323,7 +324,7 @@
       </tgroup>
     </table>
     <anchor id="id1"/>
- <table frame="all" id="table_1_3.section1.t6">
+ <table frame="all" id="table_tests.section1.t6">
       <title>Table with anchors</title>
       <tgroup cols="1">
         <thead>

Modified: branches/quickbook-dev/tools/quickbook/test/table-1_3.quickbook
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/table-1_3.quickbook (original)
+++ branches/quickbook-dev/tools/quickbook/test/table-1_3.quickbook 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -1,6 +1,6 @@
 [article Table 1.3
     [quickbook 1.3]
- [id table_1_3]
+ [id table_tests]
 ]
 
 [table Table 2

Modified: branches/quickbook-dev/tools/quickbook/test/table-1_5.gold
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/table-1_5.gold (original)
+++ branches/quickbook-dev/tools/quickbook/test/table-1_5.gold 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -1,8 +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">
+<article id="table_tests" 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">
+ <table frame="all" id="table_tests.table1">
     <title>Table 1</title>
     <tgroup cols="1">
       <thead>
@@ -25,7 +26,7 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_5.table_2">
+ <table frame="all" id="table_tests.table_2">
     <title>Table 2</title>
     <tgroup cols="1">
       <thead>
@@ -70,7 +71,7 @@
       </tbody>
     </tgroup>
   </informaltable>
- <informaltable frame="all" id="table_1_5.table4">
+ <informaltable frame="all" id="table_tests.table4">
     <tgroup cols="1">
       <thead>
         <row>
@@ -92,7 +93,7 @@
       </tbody>
     </tgroup>
   </informaltable>
- <table frame="all" id="table_1_5._table5_">
+ <table frame="all" id="table_tests._table5_">
     <title>-table5-</title>
     <tgroup cols="1">
       <thead>
@@ -115,7 +116,7 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_5.title">
+ <table frame="all" id="table_tests.title">
     <title>Title</title>
     <tgroup cols="1">
       <thead>
@@ -138,7 +139,7 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_5.title0">
+ <table frame="all" id="table_tests.title0">
     <title>Title</title>
     <tgroup cols="1">
       <thead>
@@ -161,7 +162,7 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_5.title_______containing_a_comment">
+ <table frame="all" id="table_tests.title_______containing_a_comment">
     <title>Title [/ ] containing a comment</title>
     <tgroup cols="1">
       <thead>
@@ -184,7 +185,7 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_5.title1">
+ <table frame="all" id="table_tests.title1">
     <title>Title</title>
     <tgroup cols="1">
       <thead>
@@ -207,7 +208,7 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_5.__title__">
+ <table frame="all" id="table_tests.__title__">
     <title>[[Title]]</title>
     <tgroup cols="1">
       <thead>
@@ -230,9 +231,9 @@
       </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">
+ <section id="table_tests.section1">
+ <title><link linkend="table_tests.section1">Section 1</link></title>
+ <table frame="all" id="table_tests.section1.table1">
       <title>Table 1</title>
       <tgroup cols="1">
         <thead>
@@ -255,7 +256,7 @@
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_5.section1.a___b">
+ <table frame="all" id="table_tests.section1.a___b">
       <title>A &amp; B</title>
       <tgroup cols="2">
         <thead>
@@ -288,14 +289,14 @@
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_5.section1.empty_table">
+ <table frame="all" id="table_tests.section1.empty_table">
       <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" id="table_tests.section1.table_with_an_empty_cell">
       <title>Table with an empty cell</title>
       <tgroup cols="1">
         <tbody>
@@ -309,7 +310,7 @@
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_5.section1.indentation">
+ <table frame="all" id="table_tests.section1.indentation">
       <title>Indentation</title>
       <tgroup cols="2">
         <thead>
@@ -348,7 +349,7 @@
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_5.section1.nested_tables">
+ <table frame="all" id="table_tests.section1.nested_tables">
       <title>Nested Tables</title>
       <tgroup cols="1">
         <thead>
@@ -368,7 +369,7 @@
         <tbody>
           <row>
             <entry>
- <table frame="all" id="table_1_5.section1.inner_table">
+ <table frame="all" id="table_tests.section1.inner_table">
                 <title>Inner Table</title>
                 <tgroup cols="2">
                   <thead>
@@ -414,7 +415,7 @@
       </tgroup>
     </table>
     <anchor id="id1"/>
- <table frame="all" id="table_1_5.section1.table_with_anchors">
+ <table frame="all" id="table_tests.section1.table_with_anchors">
       <title>Table with anchors</title>
       <tgroup cols="1">
         <thead>

Modified: branches/quickbook-dev/tools/quickbook/test/table-1_5.quickbook
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/table-1_5.quickbook (original)
+++ branches/quickbook-dev/tools/quickbook/test/table-1_5.quickbook 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -1,6 +1,6 @@
 [article Table 1.5
     [quickbook 1.5]
- [id table_1_5]
+ [id table_tests]
 ]
 
 [table:table1 Table 1

Copied: branches/quickbook-dev/tools/quickbook/test/table-1_6.gold (from r75350, /branches/quickbook-dev/tools/quickbook/test/table-1_5.gold)
==============================================================================
--- /branches/quickbook-dev/tools/quickbook/test/table-1_5.gold (original)
+++ branches/quickbook-dev/tools/quickbook/test/table-1_6.gold 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -1,8 +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">
+<article id="table_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Table 1.6</title>
+ <table frame="all" id="table_tests.table1">
     <title>Table 1</title>
     <tgroup cols="1">
       <thead>
@@ -25,7 +26,7 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_5.table_2">
+ <table frame="all" id="table_tests.table_2">
     <title>Table 2</title>
     <tgroup cols="1">
       <thead>
@@ -70,7 +71,7 @@
       </tbody>
     </tgroup>
   </informaltable>
- <informaltable frame="all" id="table_1_5.table4">
+ <informaltable frame="all" id="table_tests.table4">
     <tgroup cols="1">
       <thead>
         <row>
@@ -92,7 +93,7 @@
       </tbody>
     </tgroup>
   </informaltable>
- <table frame="all" id="table_1_5._table5_">
+ <table frame="all" id="table_tests.table5">
     <title>-table5-</title>
     <tgroup cols="1">
       <thead>
@@ -115,7 +116,7 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_5.title">
+ <table frame="all" id="table_tests.title">
     <title>Title</title>
     <tgroup cols="1">
       <thead>
@@ -138,7 +139,7 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_5.title0">
+ <table frame="all" id="table_tests.title0">
     <title>Title</title>
     <tgroup cols="1">
       <thead>
@@ -161,8 +162,8 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_5.title_______containing_a_comment">
- <title>Title [/ ] containing a comment</title>
+ <table frame="all" id="table_tests.title_containing_a_comment">
+ <title>Title containing a comment</title>
     <tgroup cols="1">
       <thead>
         <row>
@@ -184,7 +185,7 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_5.title1">
+ <table frame="all" id="table_tests.title1">
     <title>Title</title>
     <tgroup cols="1">
       <thead>
@@ -207,8 +208,7 @@
       </tbody>
     </tgroup>
   </table>
- <table frame="all" id="table_1_5.__title__">
- <title>[[Title]]</title>
+ <informaltable frame="all">
     <tgroup cols="1">
       <thead>
         <row>
@@ -223,16 +223,23 @@
         <row>
           <entry>
             <para>
- cell
+ Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 2
             </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">
+ </informaltable>
+ <section id="table_tests.section1">
+ <title><link linkend="table_tests.section1">Section 1</link></title>
+ <table frame="all" id="table_tests.section1.table1">
       <title>Table 1</title>
       <tgroup cols="1">
         <thead>
@@ -255,7 +262,7 @@
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_5.section1.a___b">
+ <table frame="all" id="table_tests.section1.a_b">
       <title>A &amp; B</title>
       <tgroup cols="2">
         <thead>
@@ -288,14 +295,14 @@
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_5.section1.empty_table">
+ <table frame="all" id="table_tests.section1.empty_table">
       <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" id="table_tests.section1.table_with_an_empty_cell">
       <title>Table with an empty cell</title>
       <tgroup cols="1">
         <tbody>
@@ -309,7 +316,7 @@
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_5.section1.indentation">
+ <table frame="all" id="table_tests.section1.indentation">
       <title>Indentation</title>
       <tgroup cols="2">
         <thead>
@@ -348,7 +355,7 @@
         </tbody>
       </tgroup>
     </table>
- <table frame="all" id="table_1_5.section1.nested_tables">
+ <table frame="all" id="table_tests.section1.nested_tables">
       <title>Nested Tables</title>
       <tgroup cols="1">
         <thead>
@@ -368,7 +375,7 @@
         <tbody>
           <row>
             <entry>
- <table frame="all" id="table_1_5.section1.inner_table">
+ <table frame="all" id="table_tests.section1.inner_table">
                 <title>Inner Table</title>
                 <tgroup cols="2">
                   <thead>
@@ -414,7 +421,7 @@
       </tgroup>
     </table>
     <anchor id="id1"/>
- <table frame="all" id="table_1_5.section1.table_with_anchors">
+ <table frame="all" id="table_tests.section1.table_with_anchors">
       <title>Table with anchors</title>
       <tgroup cols="1">
         <thead>

Copied: branches/quickbook-dev/tools/quickbook/test/table-1_6.quickbook (from r75350, /branches/quickbook-dev/tools/quickbook/test/table-1_5.quickbook)
==============================================================================
--- /branches/quickbook-dev/tools/quickbook/test/table-1_5.quickbook (original)
+++ branches/quickbook-dev/tools/quickbook/test/table-1_6.quickbook 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -1,12 +1,9 @@
-[article Table 1.5
- [quickbook 1.5]
- [id table_1_5]
+[article Table 1.6
+ [quickbook 1.6]
+ [id table_tests]
 ]
 
-[table:table1 Table 1
- [[Heading]]
- [[cell]]
-]
+[table:table1 Table 1 [[Heading]][[cell]]]
 
 [table Table 2
     [[Heading]]
@@ -44,7 +41,7 @@
     [[cell]]
 ]
 
-[/ These two might be considered to be a bug. ]
+[/ This one might be considered to be a bug. ]
 
 [table [/ Multi line
 comment]
@@ -55,9 +52,9 @@
 
 [table [/ Multi line
 comment]
- [[Title]]
     [[Heading]]
- [[cell]]
+ [[Cell 1]]
+ [[Cell 2]]
 ]
 
 [section:section1 Section 1]
@@ -72,8 +69,7 @@
     [[a][b]]
 ]
 
-[table Empty Table
-]
+[table Empty Table]
 
 [table Table with an empty cell
 [[x]]]

Deleted: branches/quickbook-dev/tools/quickbook/test/template_lookup1-1_5-fail.quickbook
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/template_lookup1-1_5-fail.quickbook 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
+++ (empty file)
@@ -1,7 +0,0 @@
-[article Fail Template Lookup 1
- [quickbook 1.5]
-]
-
-[template test1[] [a]]
-[template test2[a] [test1]]
-[test2 1]
\ No newline at end of file

Modified: branches/quickbook-dev/tools/quickbook/test/templates-1_5.gold
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/templates-1_5.gold (original)
+++ branches/quickbook-dev/tools/quickbook/test/templates-1_5.gold 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -7,6 +7,9 @@
     static scoping
   </para>
   <para>
+ [a]
+ </para>
+ <para>
     new
   </para>
   <para>

Modified: branches/quickbook-dev/tools/quickbook/test/templates-1_5.quickbook
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/templates-1_5.quickbook (original)
+++ branches/quickbook-dev/tools/quickbook/test/templates-1_5.quickbook 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -9,6 +9,11 @@
 [template foo2[x] [foo1]]
 [foo2 dynamic scoping]
 
+[/ This should be '[a]' because [a] isn't matched. ]
+[template test1[] [a]]
+[template test2[a] [test1]]
+[test2 1]
+
 [/ In 1.5 template arguments are scoped at the point they are defined]
 
 [template y new]
@@ -56,4 +61,4 @@
 [phrase]
 [block]
 [`phrase]
-[`block]
\ No newline at end of file
+[`block]

Added: branches/quickbook-dev/tools/quickbook/test/unmatched_element-1_5.gold
==============================================================================
--- (empty file)
+++ branches/quickbook-dev/tools/quickbook/test/unmatched_element-1_5.gold 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -0,0 +1,12 @@
+<?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="unmatched_elements" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Unmatched elements</title>
+ <para>
+ <emphasis role="bold">[non-element</emphasis>]
+ </para>
+ <para>
+ [non-element]
+ </para>
+</article>

Added: branches/quickbook-dev/tools/quickbook/test/unmatched_element-1_5.quickbook
==============================================================================
--- (empty file)
+++ branches/quickbook-dev/tools/quickbook/test/unmatched_element-1_5.quickbook 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -0,0 +1,12 @@
+[article Unmatched elements
+[quickbook 1.5]
+]
+
+[template identity[x]
+
+[x]
+]
+
+[* [non-element]]
+
+[identity [non-element]]
\ No newline at end of file

Added: branches/quickbook-dev/tools/quickbook/test/unmatched_element-1_6.gold
==============================================================================
--- (empty file)
+++ branches/quickbook-dev/tools/quickbook/test/unmatched_element-1_6.gold 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -0,0 +1,12 @@
+<?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="unmatched_elements" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Unmatched elements</title>
+ <para>
+ <emphasis role="bold">[non-element]</emphasis>
+ </para>
+ <para>
+ [non-element]
+ </para>
+</article>

Added: branches/quickbook-dev/tools/quickbook/test/unmatched_element-1_6.quickbook
==============================================================================
--- (empty file)
+++ branches/quickbook-dev/tools/quickbook/test/unmatched_element-1_6.quickbook 2011-11-06 17:19:53 EST (Sun, 06 Nov 2011)
@@ -0,0 +1,12 @@
+[article Unmatched elements
+[quickbook 1.6]
+]
+
+[template identity[x]
+
+[x]
+]
+
+[* [non-element]]
+
+[identity [non-element]]
\ No newline at end of file


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