|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59552 - branches/quickbook-1.5-spirit2
From: daniel_james_at_[hidden]
Date: 2010-02-07 04:07:43
Author: danieljames
Date: 2010-02-07 04:07:39 EST (Sun, 07 Feb 2010)
New Revision: 59552
URL: http://svn.boost.org/trac/boost/changeset/59552
Log:
Inline some unnecessary rules.
Text files modified:
branches/quickbook-1.5-spirit2/block.cpp | 22 +++++-----------------
1 files changed, 5 insertions(+), 17 deletions(-)
Modified: branches/quickbook-1.5-spirit2/block.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/block.cpp (original)
+++ branches/quickbook-1.5-spirit2/block.cpp 2010-02-07 04:07:39 EST (Sun, 07 Feb 2010)
@@ -158,13 +158,10 @@
qi::rule<iterator, std::string()> phrase_attr;
qi::rule<iterator> phrase_end;
qi::rule<iterator> comment, dummy_block;
- qi::rule<iterator, boost::optional<std::string>()> element_id_1_5;
qi::rule<iterator, boost::optional<std::string>()> element_id;
qi::rule<iterator, std::string()> element_id_part;
qi::rule<iterator, std::string()> macro_identifier;
qi::rule<iterator, std::string()> template_id;
- qi::rule<iterator, std::string()> identifier;
- qi::rule<iterator, std::string()> punctuation_identifier;
qi::rule<iterator> hard_space, space, blank, eol;
qi::rule<iterator, file_position()> position;
qi::rule<iterator> error;
@@ -280,7 +277,7 @@
table =
"table"
>> (&(*qi::blank >> qi::eol) | hard_space)
- >> element_id_1_5
+ >> ((qi::eps(qbk_since(105u)) >> element_id) | qi::eps)
>> (&(*qi::blank >> qi::eol) | space)
>> *(qi::char_ - eol)
>> +eol
@@ -531,11 +528,9 @@
// Identifiers
- element_id_1_5 = (qi::eps(qbk_since(105u)) >> element_id) | qi::eps;
-
element_id =
( ':'
- >> -(qi::eps(qbk_since(105u)) >> space)
+ >> -(qi::eps(qbk_since(105u)) >> space)
>> (
element_id_part
| qi::omit[
@@ -552,16 +547,9 @@
+(qi::char_ - (qi::space | ']'))
;
- template_id =
- identifier | punctuation_identifier
- ;
-
- identifier =
- (qi::alpha | '_') >> *(qi::alnum | '_')
- ;
-
- punctuation_identifier =
- qi::repeat(1)[qi::punct - qi::char_("[]")]
+ template_id
+ = (qi::alpha | '_') >> *(qi::alnum | '_')
+ | qi::repeat(1)[qi::punct - qi::char_("[]")]
;
// Used after an identifier that must not be immediately
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