Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67328 - trunk/tools/quickbook/src
From: dnljms_at_[hidden]
Date: 2010-12-19 08:30:07


Author: danieljames
Date: 2010-12-19 08:30:06 EST (Sun, 19 Dec 2010)
New Revision: 67328
URL: http://svn.boost.org/trac/boost/changeset/67328

Log:
Use the same symbol tables for parsing block tags and checking for the end of paragraphs.
Text files modified:
   trunk/tools/quickbook/src/block_grammar.cpp | 20 +++++++++-----------
   1 files changed, 9 insertions(+), 11 deletions(-)

Modified: trunk/tools/quickbook/src/block_grammar.cpp
==============================================================================
--- trunk/tools/quickbook/src/block_grammar.cpp (original)
+++ trunk/tools/quickbook/src/block_grammar.cpp 2010-12-19 08:30:06 EST (Sun, 19 Dec 2010)
@@ -41,7 +41,6 @@
                         inside_paragraph,
                         element_id, element_id_1_5, element_id_1_6;
 
- cl::symbols<> paragraph_end_markups;
         cl::rule<scanner> block_keyword_rule;
     };
 
@@ -122,6 +121,8 @@
                 )
             ;
 
+ // If you update this, make sure local.paragraph_end matches it,
+ // without the actions.
         local.block_markup_start
             = '[' >> local.space
>> ( block_keyword_rules [detail::assign_rule(local.block_keyword_rule)]
@@ -482,16 +483,13 @@
>> +local.eol
             ;
 
- local.paragraph_end_markups =
- "section", "endsect", "heading",
- "h1", "h2", "h3", "h4", "h5", "h6",
- "blurb", "pre", "def", "table", "include", "xinclude",
- "variablelist", "import", "template", "warning", "caution",
- "important", "note", "tip", ":"
- ;
-
- local.paragraph_end =
- '[' >> local.space >> local.paragraph_end_markups >> local.hard_space
+ // Note: Not using local.block_markup_start here as it would change
+ // block_keyword_rule.
+ local.paragraph_end
+ = '[' >> local.space
+ >> ( block_keyword_rules >> (cl::eps_p - (cl::alnum_p | '_'))
+ | block_symbol_rules
+ )
             | local.eol >> *cl::blank_p >> cl::eol_p
             ;
 


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