[phoenix][spirit] Is is possible to use phoenix v3 and spirit in parallel?

Hi, I have a program that uses Phoenix and Spirit. Spirit uses indirectly Phoenix2. With some effort I modified the part that use Phoenix to phoenix3 but now when I want to put all together it complains. The obivous warnings are: usr/include/boost/phoenix/version.hpp:16:1: warning: "BOOST_PHOENIX_VERSION" redefined usr/include/boost/phoenix/core/limits.hpp:23:1: warning: "PHOENIX_LIMIT" redefined and the most serious is: usr/include/boost/phoenix/core/limits.hpp:112:5: error: #error "BOOST_PROTO_MAX_LOGICAL_ARITY < BOOST_PHOENIX_COMPOSITE_LIMIT" The question is how can I use Phoenix3 and Spirit in the same code (in parallel). thank you, Alfredo

On 4/4/2011 3:41 PM, alfC wrote:
Hi, I have a program that uses Phoenix and Spirit. Spirit uses indirectly Phoenix2. With some effort I modified the part that use Phoenix to phoenix3 but now when I want to put all together it complains.
The obivous warnings are: usr/include/boost/phoenix/version.hpp:16:1: warning: "BOOST_PHOENIX_VERSION" redefined usr/include/boost/phoenix/core/limits.hpp:23:1: warning: "PHOENIX_LIMIT" redefined
and the most serious is: usr/include/boost/phoenix/core/limits.hpp:112:5: error: #error "BOOST_PROTO_MAX_LOGICAL_ARITY< BOOST_PHOENIX_COMPOSITE_LIMIT"
The question is how can I use Phoenix3 and Spirit in the same code (in parallel).
thank you, Alfredo
The trunk version of Spirit allows Phoenix V3. There are some #define's to enable the functionality ... which I don't recall off the top of my head. michael -- ---------------------------------- Michael Caisse Object Modeling Designs www.objectmodelingdesigns.com

On 4/4/2011 4:31 PM, Michael Caisse wrote:
On 4/4/2011 3:41 PM, alfC wrote:
Hi, I have a program that uses Phoenix and Spirit. Spirit uses indirectly Phoenix2. With some effort I modified the part that use Phoenix to phoenix3 but now when I want to put all together it complains.
The question is how can I use Phoenix3 and Spirit in the same code (in parallel).
thank you, Alfredo
The trunk version of Spirit allows Phoenix V3. There are some #define's to enable the functionality ... which I don't recall off the top of my head.
michael
Alfredo - Taking a look at the testing Jamfile it looks like the following will do it: : <define>BOOST_SPIRIT_USE_PHOENIX_V3=1 <define>BOOST_PROTO_MAX_ARITY=11 <define>BOOST_PROTO_MAX_LOGICAL_ARITY=11 <define>BOOST_MPL_LIMIT_METAFUNCTION_ARITY=12 michael -- ---------------------------------- Michael Caisse Object Modeling Designs www.objectmodelingdesigns.com

On Apr 4, 4:39 pm, Michael Caisse
Taking a look at the testing Jamfile it looks like the following will do it:
: <define>BOOST_SPIRIT_USE_PHOENIX_V3=1 <define>BOOST_PROTO_MAX_ARITY=11 <define>BOOST_PROTO_MAX_LOGICAL_ARITY=11 <define>BOOST_MPL_LIMIT_METAFUNCTION_ARITY=12
that helped in some cases, in other cases I had to add something like #define BOOST_PHOENIX_COMPOSITE_LIMIT 9 to avoid boost/phoenix/core/limits.hpp:118:5: error: #error "BOOST_RESULT_OF_NUM_ARGS < BOOST_PHOENIX_COMPOSITE_LIMIT + 1" but I still have problems, for example: In file included from /usr/include/boost/mpl/arithmetic.hpp:23, from /usr/include/boost/units/static_rational.hpp:16, from /usr/include/boost/units/ heterogeneous_system.hpp:34, from /usr/include/boost/units/detail/ conversion_impl.hpp:20, from /usr/include/boost/units/conversion.hpp:17, from /usr/include/boost/units/quantity.hpp:29, from /usr/include/boost/units/systems/si.hpp:19, from ./document.cpp:15: /usr/include/boost/mpl/multiplies.hpp:38: error: wrong number of template arguments (12, should be 5)

On Sat, Apr 16, 2011 at 1:13 AM, alfC
On Apr 4, 4:39 pm, Michael Caisse
wrote: Taking a look at the testing Jamfile it looks like the following will do it:
: <define>BOOST_SPIRIT_USE_PHOENIX_V3=1 <define>BOOST_PROTO_MAX_ARITY=11 <define>BOOST_PROTO_MAX_LOGICAL_ARITY=11 <define>BOOST_MPL_LIMIT_METAFUNCTION_ARITY=12
that helped in some cases, in other cases I had to add something like #define BOOST_PHOENIX_COMPOSITE_LIMIT 9 to avoid boost/phoenix/core/limits.hpp:118:5: error: #error "BOOST_RESULT_OF_NUM_ARGS < BOOST_PHOENIX_COMPOSITE_LIMIT + 1"
but I still have problems, for example: In file included from /usr/include/boost/mpl/arithmetic.hpp:23, from /usr/include/boost/units/static_rational.hpp:16, from /usr/include/boost/units/ heterogeneous_system.hpp:34, from /usr/include/boost/units/detail/ conversion_impl.hpp:20, from /usr/include/boost/units/conversion.hpp:17, from /usr/include/boost/units/quantity.hpp:29, from /usr/include/boost/units/systems/si.hpp:19, from ./document.cpp:15: /usr/include/boost/mpl/multiplies.hpp:38: error: wrong number of template arguments (12, should be 5)
Yeah ... the preprocessor limits ... the best is to include boost/phoenix/core/limits.hpp before anything else ... sadly it sometimes depends on the include order ...
participants (3)
-
alfC
-
Michael Caisse
-
Thomas Heller