Chris@16: /*============================================================================= Chris@16: Copyright (c) 2001-2007 Joel de Guzman Chris@16: Chris@16: Distributed under the Boost Software License, Version 1.0. (See accompanying Chris@16: file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: ==============================================================================*/ Chris@16: #ifndef BOOST_PHOENIX_CORE_LIMITS_HPP Chris@16: #define BOOST_PHOENIX_CORE_LIMITS_HPP Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: Chris@16: #if defined(BOOST_PHOENIX_LIMIT) Chris@101: # if !defined( BOOST_PROTO_MAX_ARITY ) Chris@101: # define BOOST_PROTO_MAX_ARITY BOOST_PHOENIX_LIMIT Chris@101: # elif (BOOST_PROTO_MAX_ARITY < BOOST_PHOENIX_LIMIT) Chris@101: # error "BOOST_PROTO_MAX_ARITY is set too low" Chris@101: # endif Chris@16: #include Chris@16: #else Chris@16: #include Chris@16: #define BOOST_PHOENIX_LIMIT BOOST_PROTO_MAX_ARITY Chris@16: #endif Chris@16: Chris@101: #if !defined(PHOENIX_LIMIT) Chris@16: #define PHOENIX_LIMIT BOOST_PHOENIX_LIMIT Chris@101: #endif Chris@16: Chris@16: #define BOOST_PHOENIX_LIMIT_STR BOOST_PP_STRINGIZE(BOOST_PHOENIX_PP_ROUND_UP(BOOST_PHOENIX_LIMIT)) Chris@16: Chris@16: #if !defined(BOOST_PHOENIX_ARG_LIMIT) Chris@16: # define BOOST_PHOENIX_ARG_LIMIT BOOST_PHOENIX_PP_ROUND_UP(BOOST_PHOENIX_LIMIT) Chris@16: #elif (BOOST_PHOENIX_ARG_LIMIT < 5) Chris@16: # error "BOOST_PHOENIX_ARG_LIMIT is set too low" Chris@16: #elif BOOST_PHOENIX_ARG_LIMIT != BOOST_PHOENIX_PP_ROUND_UP(BOOST_PHOENIX_LIMIT) && !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES) Chris@16: # define BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES Chris@16: #endif Chris@16: Chris@16: #if !defined(BOOST_PHOENIX_ACTOR_LIMIT) Chris@16: # define BOOST_PHOENIX_ACTOR_LIMIT BOOST_PHOENIX_PP_ROUND_UP(BOOST_PHOENIX_LIMIT) Chris@16: #elif (BOOST_PHOENIX_ACTOR_LIMIT > BOOST_PHOENIX_ARG_LIMIT) Chris@16: # error "BOOST_PHOENIX_ACTOR_LIMIT > BOOST_PHOENIX_ARG_LIMIT" Chris@16: #elif (BOOST_PHOENIX_ACTOR_LIMIT < 3) Chris@16: # error "BOOST_PHOENIX_ACTOR_LIMIT is set too low" Chris@16: #elif BOOST_PHOENIX_ACTOR_LIMIT != BOOST_PHOENIX_PP_ROUND_UP(BOOST_PHOENIX_LIMIT) && !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES) Chris@16: # define BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES Chris@16: #endif Chris@16: Chris@16: #if !defined(BOOST_PHOENIX_PERFECT_FORWARD_LIMIT) Chris@16: # define BOOST_PHOENIX_PERFECT_FORWARD_LIMIT 3 Chris@16: #elif (BOOST_PHOENIX_PERFECT_FORWARD_LIMIT > BOOST_PHOENIX_ACTOR_LIMIT) Chris@16: # error "BOOST_PHOENIX_PERFECT_FORWARD_LIMIT > BOOST_PHOENIX_ACTOR_LIMIT" Chris@16: #elif (BOOST_PHOENIX_PERFECT_FORWARD_LIMIT < 3) Chris@16: # error "BOOST_PHOENIX_PERFECT_FORWARD_LIMIT is set too low" Chris@16: #elif BOOST_PHOENIX_PERFECT_FORWARD_LIMIT != 3 && !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES) Chris@16: # define BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES Chris@16: #endif Chris@16: Chris@16: #if !defined(BOOST_PHOENIX_COMPOSITE_LIMIT) Chris@16: # define BOOST_PHOENIX_COMPOSITE_LIMIT BOOST_PHOENIX_PP_ROUND_UP(BOOST_PHOENIX_LIMIT) Chris@16: #elif (BOOST_PHOENIX_COMPOSITE_LIMIT < 5) Chris@16: # error "BOOST_PHOENIX_COMPOSITE_LIMIT is set too low" Chris@16: #elif BOOST_PHOENIX_COMPOSITE_LIMIT != BOOST_PHOENIX_PP_ROUND_UP(BOOST_PHOENIX_LIMIT) && !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES) Chris@16: # define BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES Chris@16: #endif Chris@16: Chris@16: #if !defined(BOOST_PHOENIX_MEMBER_LIMIT) Chris@16: # define BOOST_PHOENIX_MEMBER_LIMIT BOOST_PP_DEC(BOOST_PHOENIX_COMPOSITE_LIMIT) Chris@16: #elif (BOOST_PHOENIX_MEMBER_LIMIT > BOOST_PHOENIX_COMPOSITE_LIMIT) Chris@16: # error "BOOST_PHOENIX_MEMBER_LIMIT > BOOST_PHOENIX_COMPOSITE_LIMIT" Chris@16: #elif (BOOST_PHOENIX_MEMBER_LIMIT < 3) Chris@16: # error "BOOST_PHOENIX_MEMBER_LIMIT is set too low" Chris@16: #elif BOOST_PHOENIX_MEMBER_LIMIT != BOOST_PHOENIX_PP_ROUND_UP(BOOST_PHOENIX_LIMIT) && !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES) Chris@16: # define BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES Chris@16: #endif Chris@16: Chris@16: #if !defined(BOOST_PHOENIX_CATCH_LIMIT) Chris@16: # define BOOST_PHOENIX_CATCH_LIMIT BOOST_PHOENIX_COMPOSITE_LIMIT Chris@16: #elif (BOOST_PHOENIX_CATCH_LIMIT < 1) Chris@16: # error "BOOST_PHOENIX_CATCH_LIMIT is set too low" Chris@16: #elif BOOST_PHOENIX_CATCH_LIMIT != BOOST_PHOENIX_PP_ROUND_UP(BOOST_PHOENIX_LIMIT) && !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES) Chris@16: # define BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES Chris@16: #endif Chris@16: Chris@16: #if !defined(BOOST_PHOENIX_DYNAMIC_LIMIT) Chris@16: # define BOOST_PHOENIX_DYNAMIC_LIMIT BOOST_PHOENIX_PP_ROUND_UP(BOOST_PHOENIX_LIMIT) Chris@16: #elif (BOOST_PHOENIX_DYNAMIC_LIMIT < 1) Chris@16: # error "BOOST_PHOENIX_DYNAMIC_LIMIT is set too low" Chris@16: #elif BOOST_PHOENIX_DYNAMIC_LIMIT != BOOST_PHOENIX_PP_ROUND_UP(BOOST_PHOENIX_LIMIT) && !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES) Chris@16: # define BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES Chris@16: #endif Chris@16: Chris@16: #if !defined(BOOST_PHOENIX_LOCAL_LIMIT) Chris@16: # define BOOST_PHOENIX_LOCAL_LIMIT BOOST_PHOENIX_PP_ROUND_UP(BOOST_PHOENIX_LIMIT) Chris@16: #elif (BOOST_PHOENIX_LOCAL_LIMIT < 3) Chris@16: # error "BOOST_PHOENIX_LOCAL_LIMIT is set too low" Chris@16: #elif BOOST_PHOENIX_LOCAL_LIMIT != BOOST_PHOENIX_PP_ROUND_UP(BOOST_PHOENIX_LIMIT) && !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES) Chris@16: # define BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES Chris@16: #endif Chris@16: Chris@16: #endif