|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r73329 - trunk/tools/quickbook/src
From: dnljms_at_[hidden]
Date: 2011-07-24 09:36:46
Author: danieljames
Date: 2011-07-24 09:36:45 EDT (Sun, 24 Jul 2011)
New Revision: 73329
URL: http://svn.boost.org/trac/boost/changeset/73329
Log:
Quickbook: Remove use of if_p/else_p.
Darwin-4.2 seems to have problems with it in release mode.
Text files modified:
trunk/tools/quickbook/src/block_element_grammar.cpp | 12 +++---------
trunk/tools/quickbook/src/main_grammar.cpp | 13 +++++--------
trunk/tools/quickbook/src/phrase_element_grammar.cpp | 40 ++++++++++++++++++++--------------------
3 files changed, 28 insertions(+), 37 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-24 09:36:45 EDT (Sun, 24 Jul 2011)
@@ -45,7 +45,7 @@
local.element_id =
!( ':'
- >> ( cl::if_p(qbk_since(105u)) [space]
+ >> ( !(cl::eps_p(qbk_since(105u)) >> space)
>> (+(cl::alnum_p | '_')) [actions.values.entry(ph::arg1, ph::arg2, general_tags::element_id)]
| cl::eps_p [actions.element_id_warning]
)
@@ -53,16 +53,10 @@
;
local.element_id_1_5 =
- cl::if_p(qbk_since(105u)) [
- local.element_id
- ]
- ;
+ !(cl::eps_p(qbk_since(105u)) >> local.element_id);
local.element_id_1_6 =
- cl::if_p(qbk_since(106u)) [
- local.element_id
- ]
- ;
+ !(cl::eps_p(qbk_since(106u)) >> local.element_id);
elements.add
("section", element_info(element_info::block, &local.begin_section, block_tags::begin_section))
Modified: trunk/tools/quickbook/src/main_grammar.cpp
==============================================================================
--- trunk/tools/quickbook/src/main_grammar.cpp (original)
+++ trunk/tools/quickbook/src/main_grammar.cpp 2011-07-24 09:36:45 EDT (Sun, 24 Jul 2011)
@@ -145,9 +145,7 @@
actions.scoped_context(element_info::in_block)
[ local.blocks
>> *( local.element
- >> cl::if_p(local.is_block)
- [ !(+eol >> local.blocks)
- ]
+ >> !(cl::eps_p(local.is_block) >> +eol >> local.blocks)
| local.paragraph_separator >> local.blocks
| common
| cl::space_p [actions.space_char]
@@ -281,11 +279,10 @@
;
local.template_args =
- cl::if_p(qbk_since(105u)) [
- local.template_args_1_5
- ].else_p [
- local.template_args_1_4
- ]
+ cl::eps_p(qbk_since(105u))
+ >> local.template_args_1_5
+ | cl::eps_p(qbk_before(105u))
+ >> local.template_args_1_4
;
local.template_args_1_4 = local.template_arg_1_4 >> *(".." >> local.template_arg_1_4);
Modified: trunk/tools/quickbook/src/phrase_element_grammar.cpp
==============================================================================
--- trunk/tools/quickbook/src/phrase_element_grammar.cpp (original)
+++ trunk/tools/quickbook/src/phrase_element_grammar.cpp 2011-07-24 09:36:45 EDT (Sun, 24 Jul 2011)
@@ -51,28 +51,28 @@
;
local.image =
- blank
- >> cl::if_p(qbk_since(105u)) [
- (+(
- *cl::space_p
- >> +(cl::anychar_p - (cl::space_p | phrase_end | '['))
- )) [actions.values.entry(ph::arg1, ph::arg2)]
- >> hard_space
- >> *actions.values.list()
- [ '['
- >> (*(cl::alnum_p | '_'))
- [actions.values.entry(ph::arg1, ph::arg2)]
- >> space
- >> (*(cl::anychar_p - (phrase_end | '[')))
- [actions.values.entry(ph::arg1, ph::arg2)]
- >> ']'
- >> space
- ]
- ].else_p [
- (*(cl::anychar_p - phrase_end))
- [actions.values.entry(ph::arg1, ph::arg2)]
+ cl::eps_p(qbk_since(105u))
+ >> blank
+ >> (+(
+ *cl::space_p
+ >> +(cl::anychar_p - (cl::space_p | phrase_end | '['))
+ )) [actions.values.entry(ph::arg1, ph::arg2)]
+ >> hard_space
+ >> *actions.values.list()
+ [ '['
+ >> (*(cl::alnum_p | '_'))
+ [actions.values.entry(ph::arg1, ph::arg2)]
+ >> space
+ >> (*(cl::anychar_p - (phrase_end | '[')))
+ [actions.values.entry(ph::arg1, ph::arg2)]
+ >> ']'
+ >> space
]
>> cl::eps_p(']')
+ | cl::eps_p(qbk_before(105u))
+ >> blank
+ >> (*(cl::anychar_p - phrase_end)) [actions.values.entry(ph::arg1, ph::arg2)]
+ >> cl::eps_p(']')
;
elements.add
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