Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59299 - branches/quickbook-1.5-spirit2
From: daniel_james_at_[hidden]
Date: 2010-01-27 17:01:45


Author: danieljames
Date: 2010-01-27 17:01:44 EST (Wed, 27 Jan 2010)
New Revision: 59299
URL: http://svn.boost.org/trac/boost/changeset/59299

Log:
Clean up the phrase grammar a little.
Text files modified:
   branches/quickbook-1.5-spirit2/phrase.cpp | 38 +++++++++++++++++---------------------
   1 files changed, 17 insertions(+), 21 deletions(-)

Modified: branches/quickbook-1.5-spirit2/phrase.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/phrase.cpp (original)
+++ branches/quickbook-1.5-spirit2/phrase.cpp 2010-01-27 17:01:44 EST (Wed, 27 Jan 2010)
@@ -98,7 +98,7 @@
         bool& no_eols;
 
         qi::rule<iterator>
- space, blank, comment, phrase, phrase_markup,
+ space, blank, comment, phrase_markup,
                         phrase_end,
                         escape, common,
                         hard_space, eol, inline_code, simple_format,
@@ -113,7 +113,7 @@
         qi::rule<iterator, std::string()> template_arg_1_4, template_arg_1_5;
         qi::rule<iterator, std::vector<std::string>() > template_args;
 
- qi::rule<iterator, std::string()> phrase_attr;
+ qi::rule<iterator, std::string()> phrase;
         
         qi::rule<iterator, quickbook::break_()> break_, escape_break;
 
@@ -300,22 +300,17 @@
             ;
 
         phrase =
- *( common
- | comment
- | (qi::char_ - phrase_end) [actions.plain_char]
- )
- ;
-
- phrase_attr =
- qi::eps [actions.phrase_push]
- >> ( phrase
- | qi::eps
- ) [actions.phrase_pop]
+ qi::eps [actions.phrase_push]
+ >> *( common
+ | comment
+ | (qi::char_ - phrase_end) [actions.plain_char]
+ )
+ >> qi::eps [actions.phrase_pop]
             ;
 
         phrase_markup =
- '['
- >> ( cond_phrase
+ ( '['
+ >> ( cond_phrase
                 | image
                 | url
                 | link
@@ -325,8 +320,9 @@
                 | footnote
                 | template_
                 | break_
- ) [actions.process]
+ )
>> ']'
+ ) [actions.process]
             ;
 
         break_ =
@@ -360,7 +356,7 @@
                 '?'
>> blank
>> macro_identifier
- >> -phrase_attr
+ >> -phrase
             ;
 
         image =
@@ -429,7 +425,7 @@
>> hard_space
>> *(qi::char_ - (']' | qi::space))
>> ( &qi::lit(']')
- | (hard_space >> phrase_attr)
+ | (hard_space >> phrase)
                 )
             ;
 
@@ -438,7 +434,7 @@
>> qi::attr(markup(url_pre_, url_post_))
>> *(qi::char_ - (']' | qi::space))
>> ( &qi::lit(']')
- | (hard_space >> phrase_attr)
+ | (hard_space >> phrase)
                 )
             ;
 
@@ -452,7 +448,7 @@
             ("~", markup(replaceable_pre_, replaceable_post_))
             ;
 
- formatted = format_symbol >> blank >> phrase_attr;
+ formatted = format_symbol >> blank >> phrase;
 
         source_mode.add
             ("c++", quickbook::source_mode("c++"))
@@ -464,7 +460,7 @@
                 "footnote"
>> qi::attr(markup(footnote_pre_, footnote_post_))
>> blank
- >> phrase_attr
+ >> phrase
             ;
 
          position = qi::raw[qi::eps] [get_position];


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