sl@0: /*============================================================================= sl@0: Boost.Wave: A Standard compliant C++ preprocessor library sl@0: sl@0: Global application configuration sl@0: sl@0: http://www.boost.org/ sl@0: sl@0: Copyright (c) 2001-2007 Hartmut Kaiser. Distributed under the Boost sl@0: Software License, Version 1.0. (See accompanying file sl@0: LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) sl@0: =============================================================================*/ sl@0: sl@0: #if !defined(WAVE_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED) sl@0: #define WAVE_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Define the maximal include nesting depth allowed. If this value isn't sl@0: // defined it defaults to 1024 sl@0: // sl@0: // To define a new initial include nesting define the following constant sl@0: // before including this file. sl@0: // sl@0: #if !defined(BOOST_WAVE_MAX_INCLUDE_LEVEL_DEPTH) sl@0: #define BOOST_WAVE_MAX_INCLUDE_LEVEL_DEPTH 1024 sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Decide, whether to support variadics and placemarkers sl@0: // sl@0: // To implement support variadics and placemarkers define the following to sl@0: // something not equal to zero. sl@0: // sl@0: #if !defined(BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS) sl@0: #define BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS 1 sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Decide, whether to implement a #warning directive as an extension to the sl@0: // C++ Standard (same as #error, but emits a warning, not an error) sl@0: // sl@0: // To disable the implementation of #warning directives, define the following sl@0: // constant as zero before including this file. sl@0: // sl@0: #if !defined(BOOST_WAVE_SUPPORT_WARNING_DIRECTIVE) sl@0: #define BOOST_WAVE_SUPPORT_WARNING_DIRECTIVE 1 sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Decide, whether to implement #pragma once sl@0: // sl@0: // To disable the implementation of #pragma once, define the following sl@0: // constant as zero before including this file. sl@0: // sl@0: #if !defined(BOOST_WAVE_SUPPORT_PRAGMA_ONCE) sl@0: #define BOOST_WAVE_SUPPORT_PRAGMA_ONCE 1 sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Decide, whether to implement #pragma message("") sl@0: // sl@0: // To disable the implementation of #pragma message(""), define the following sl@0: // constant as zero before including this file. sl@0: // sl@0: #if !defined(BOOST_WAVE_SUPPORT_PRAGMA_MESSAGE) sl@0: #define BOOST_WAVE_SUPPORT_PRAGMA_MESSAGE 1 sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Decide, whether to implement #include_next sl@0: // Please note, that this is an extension to the C++ Standard. sl@0: // sl@0: // To disable the implementation of #include_next, define the following sl@0: // constant as zero before including this file. sl@0: // sl@0: #if !defined(BOOST_WAVE_SUPPORT_INCLUDE_NEXT) sl@0: #define BOOST_WAVE_SUPPORT_INCLUDE_NEXT 1 sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Undefine the following, to enable some MS specific language extensions: sl@0: // __int8, __int16, __int32, __int64, __based, __declspec, __cdecl, sl@0: // __fastcall, __stdcall, __try, __except, __finally, __leave, __inline, sl@0: // __asm, #region, #endregion sl@0: // sl@0: // Note: By default this is enabled for Windows based systems, otherwise it's sl@0: // disabled. sl@0: #if !defined(BOOST_WAVE_SUPPORT_MS_EXTENSIONS) sl@0: #if defined(BOOST_WINDOWS) sl@0: #define BOOST_WAVE_SUPPORT_MS_EXTENSIONS 1 sl@0: #else sl@0: #define BOOST_WAVE_SUPPORT_MS_EXTENSIONS 0 sl@0: #endif sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Allow the message body of the #error and #warning directives to be sl@0: // preprocessed before the diagnostic is issued. sl@0: // sl@0: // To disable preprocessing of the body of #error and #warning directives, sl@0: // define the following constant as zero before including this file. sl@0: // sl@0: #if !defined(BOOST_WAVE_PREPROCESS_ERROR_MESSAGE_BODY) sl@0: #define BOOST_WAVE_PREPROCESS_ERROR_MESSAGE_BODY 1 sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Allow the #pragma directives to be returned to the caller (optionally after sl@0: // preprocessing the body) sl@0: // sl@0: // To disable the library to emit unknown #pragma directives, define the sl@0: // following constant as zero before including this file. sl@0: // sl@0: #if !defined(BOOST_WAVE_EMIT_PRAGMA_DIRECTIVES) sl@0: #define BOOST_WAVE_EMIT_PRAGMA_DIRECTIVES 1 sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Allow the body of a #pragma directive to be preprocessed before the sl@0: // directive is returned to the caller. sl@0: // sl@0: // To disable the preprocessing of the body of #pragma directives, define the sl@0: // following constant as zero before including this file. sl@0: // sl@0: #if !defined(BOOST_WAVE_PREPROCESS_PRAGMA_BODY) sl@0: #define BOOST_WAVE_PREPROCESS_PRAGMA_BODY 1 sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Allow to define macros with the command line syntax (-DMACRO(x)=definition) sl@0: // sl@0: // To disable the the possibility to define macros based on the command line sl@0: // syntax, define the following constant as zero before including this file. sl@0: // sl@0: #if !defined(BOOST_WAVE_ENABLE_COMMANDLINE_MACROS) sl@0: #define BOOST_WAVE_ENABLE_COMMANDLINE_MACROS 1 sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Define the pragma keyword to be used by the library to recognize its own sl@0: // pragma's. If nothing else is defined, then 'wave' will be used as the sl@0: // default keyword, i.e. the library recognizes all sl@0: // sl@0: // #pragma wave option [(argument)] sl@0: // sl@0: // and dispatches the handling to the interpret_pragma() preprocessing hook sl@0: // function (see file: preprocessing_hooks.hpp). The arguments part of the sl@0: // pragma is optional. sl@0: // The BOOST_WAVE_PRAGMA_KEYWORD constant needs to be defined to sl@0: // resolve as a string literal value. sl@0: #if !defined(BOOST_WAVE_PRAGMA_KEYWORD) sl@0: #define BOOST_WAVE_PRAGMA_KEYWORD "wave" sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Define the string type to be used to store the token values and the file sl@0: // names inside a file_position template class sl@0: // sl@0: #if !defined(BOOST_WAVE_STRINGTYPE) sl@0: sl@0: #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || \ sl@0: BOOST_WORKAROUND(__MWERKS__, < 0x3200) || \ sl@0: (defined(__DECCXX) && defined(__alpha)) || \ sl@0: defined(BOOST_WAVE_STRINGTYPE_USE_STDSTRING) sl@0: sl@0: // VC7 isn't able to compile the flex_string class, fall back to std::string sl@0: // CW up to 8.3 chokes as well *sigh* sl@0: // Tru64/CXX has linker problems when using flex_string sl@0: #define BOOST_WAVE_STRINGTYPE std::string sl@0: #if !defined(BOOST_WAVE_STRINGTYPE_USE_STDSTRING) sl@0: #define BOOST_WAVE_STRINGTYPE_USE_STDSTRING 1 sl@0: #endif sl@0: sl@0: #else sl@0: // use the following, if you have a fast std::allocator sl@0: #define BOOST_WAVE_STRINGTYPE boost::wave::util::flex_string< \ sl@0: char, std::char_traits, std::allocator, \ sl@0: boost::wave::util::CowString \ sl@0: > \ sl@0: > \ sl@0: /**/ sl@0: sl@0: /* #define BOOST_WAVE_STRINGTYPE boost::wave::util::flex_string< \ sl@0: char, std::char_traits, boost::fast_pool_allocator, \ sl@0: boost::wave::util::CowString \ sl@0: > \ sl@0: > \ sl@0: > \ sl@0: */ /**/ sl@0: sl@0: // This include is needed for the flex_string class used in the sl@0: // BOOST_WAVE_STRINGTYPE above. sl@0: #include sl@0: sl@0: // This include is needed for the boost::fast_allocator class used in the sl@0: // BOOST_WAVE_STRINGTYPE above. sl@0: // Configure Boost.Pool thread support (for now: no thread support at all) sl@0: //#define BOOST_NO_MT sl@0: //#include sl@0: sl@0: // Use the following, if you want to incorporate Maxim Yegorushkin's sl@0: // const_string library (http://sourceforge.net/projects/conststring/), which sl@0: // may be even faster, than using the flex_string class from above sl@0: //#define BOOST_WAVE_STRINGTYPE boost::const_string sl@0: // sl@0: //#include sl@0: //#include sl@0: //#include sl@0: sl@0: #endif // BOOST_WORKAROUND(_MSC_VER, <= 1300) sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // The following definition forces the Spirit tree code to use list's instead sl@0: // of vectors, which may be more efficient on some platforms sl@0: // #define BOOST_SPIRIT_USE_LIST_FOR_TREES sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // The following definition forces the Spirit tree code to use boost pool sl@0: // allocators in stead of the std::allocator for the vector/list's. sl@0: // #define BOOST_SPIRIT_USE_BOOST_ALLOCATOR_FOR_TREES sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Uncomment the following, if you need debug output, the sl@0: // BOOST_SPIRIT_DEBUG_FLAGS_CPP constants below help to fine control the sl@0: // amount of the generated debug output. sl@0: //#define BOOST_SPIRIT_DEBUG sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Debug flags for the Wave library, possible flags specified below. sl@0: // sl@0: // Note: These flags take effect only if the BOOST_SPIRIT_DEBUG constant sl@0: // above is defined as well. sl@0: #define BOOST_SPIRIT_DEBUG_FLAGS_CPP_GRAMMAR 0x0001 sl@0: #define BOOST_SPIRIT_DEBUG_FLAGS_TIME_CONVERSION 0x0002 sl@0: #define BOOST_SPIRIT_DEBUG_FLAGS_CPP_EXPR_GRAMMAR 0x0004 sl@0: #define BOOST_SPIRIT_DEBUG_FLAGS_INTLIT_GRAMMAR 0x0008 sl@0: #define BOOST_SPIRIT_DEBUG_FLAGS_CHLIT_GRAMMAR 0x0010 sl@0: #define BOOST_SPIRIT_DEBUG_FLAGS_DEFINED_GRAMMAR 0x0020 sl@0: #define BOOST_SPIRIT_DEBUG_FLAGS_PREDEF_MACROS_GRAMMAR 0x0040 sl@0: sl@0: #if !defined(BOOST_SPIRIT_DEBUG_FLAGS_CPP) sl@0: #define BOOST_SPIRIT_DEBUG_FLAGS_CPP 0 // default is no debugging sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // sl@0: // For all recognized preprocessor statements the output parse trees sl@0: // formatted as xml are printed. The formatted parse trees are streamed to the sl@0: // std::ostream defined by the WAVE_DUMP_PARSE_TREE_OUT constant. sl@0: // sl@0: // To enable the output of these parse trees, define the following constant sl@0: // as zero something not equal to zero before including this file. sl@0: // sl@0: #if !defined(BOOST_WAVE_DUMP_PARSE_TREE) sl@0: #define BOOST_WAVE_DUMP_PARSE_TREE 0 sl@0: #endif sl@0: #if BOOST_WAVE_DUMP_PARSE_TREE != 0 && !defined(BOOST_WAVE_DUMP_PARSE_TREE_OUT) sl@0: #define BOOST_WAVE_DUMP_PARSE_TREE_OUT std::cerr sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // sl@0: // For all #if and #elif directives the preprocessed expressions are printed. sl@0: // These expressions are streamed to the std::ostream defined by the sl@0: // BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT constant. sl@0: // sl@0: // To enable the output of the preprocessed expressions, define the following sl@0: // constant as something not equal to zero before including this file. sl@0: // sl@0: #if !defined(BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS) sl@0: #define BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS 0 sl@0: #endif sl@0: #if BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS != 0 && \ sl@0: !defined(BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT) sl@0: #define BOOST_WAVE_DUMP_CONDITIONAL_EXPRESSIONS_OUT std::cerr sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Decide, whether to use the separate compilation model for the instantiation sl@0: // of the C++ lexer objects. sl@0: // sl@0: // If this is defined, you should explicitly instantiate the C++ lexer sl@0: // template with the correct parameters in a separate compilation unit of sl@0: // your program (see the file instantiate_re2c_lexer.cpp). sl@0: // sl@0: // To use the lexer inclusion model, define the following constant as sl@0: // something not equal to zero before including this file. sl@0: // sl@0: #if !defined(BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION) sl@0: #define BOOST_WAVE_SEPARATE_LEXER_INSTANTIATION 1 sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Decide, whether to use the separate compilation model for the instantiation sl@0: // of the grammar objects. sl@0: // sl@0: // If this is defined, you should explicitly instantiate the grammar sl@0: // templates with the correct parameters in a separate compilation unit of sl@0: // your program (see the files instantiate_cpp_grammar.cpp et.al.). sl@0: // sl@0: // To use the grammar inclusion model, define the following constant as sl@0: // something not equal to zero before including this file. sl@0: // sl@0: #if !defined(BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION) sl@0: #define BOOST_WAVE_SEPARATE_GRAMMAR_INSTANTIATION 1 sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Decide whether to use a strict C++ lexer. sl@0: // sl@0: // If this is defined to something != 0, then the C++ lexers recognize the sl@0: // strict C99/C++ basic source character set. If it is not defined or defined sl@0: // to zero, the C++ lexers recognize the '$' character as part of identifiers. sl@0: // sl@0: // The default is to recognize the '$' character as part of identifiers. sl@0: // sl@0: #if !defined(BOOST_WAVE_USE_STRICT_LEXER) sl@0: #define BOOST_WAVE_USE_STRICT_LEXER 0 sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Decide, whether the serialization of the wave::context class should be sl@0: // supported sl@0: // sl@0: // If this is defined to something not equal to zero the generated code will sl@0: // expose routines allowing to store and reload the internal state of the sl@0: // wave::context object. sl@0: // sl@0: // To enable the availability of the serialization functionality, define the sl@0: // following constant as something not equal to zero before including this file. sl@0: // sl@0: #if !defined(BOOST_WAVE_SERIALIZATION) sl@0: #define BOOST_WAVE_SERIALIZATION 0 sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // configure Boost.Pool thread support (for now: no thread support at all) sl@0: #if !defined(BOOST_NO_MT) sl@0: #define BOOST_NO_MT sl@0: #endif // !defined(BOOST_NO_MT) sl@0: sl@0: //#if !defined(BOOST_DISABLE_THREADS) sl@0: //#define BOOST_DISABLE_THREADS sl@0: //#endif // !defined(BOOST_DISABLE_THREADS) sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Wave needs at least 4 parameters for phoenix actors sl@0: #if !defined(PHOENIX_LIMIT) sl@0: #define PHOENIX_LIMIT 6 sl@0: #endif sl@0: #if PHOENIX_LIMIT < 6 sl@0: #error "Boost.Wave: the constant PHOENIX_LIMIT must be at least defined to 4" \ sl@0: " to compile the library." sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Set up dll import/export options sl@0: #if defined(BOOST_HAS_DECLSPEC) && \ sl@0: (defined(BOOST_WAVE_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && \ sl@0: !defined(BOOST_WAVE_STATIC_LINK) sl@0: sl@0: #if defined(BOOST_WAVE_SOURCE) sl@0: #define BOOST_WAVE_DECL __declspec(dllexport) sl@0: #define BOOST_WAVE_BUILD_DLL sl@0: #else sl@0: #define BOOST_WAVE_DECL __declspec(dllimport) sl@0: #endif sl@0: sl@0: #endif // building a shared library sl@0: sl@0: #ifndef BOOST_WAVE_DECL sl@0: #define BOOST_WAVE_DECL sl@0: #endif sl@0: sl@0: /////////////////////////////////////////////////////////////////////////////// sl@0: // Auto library naming sl@0: #if BOOST_VERSION >= 103100 sl@0: // auto link features work beginning from Boost V1.31.0 sl@0: #if !defined(BOOST_WAVE_SOURCE) && !defined(BOOST_ALL_NO_LIB) && \ sl@0: !defined(BOOST_WAVE_NO_LIB) sl@0: sl@0: #define BOOST_LIB_NAME boost_wave sl@0: sl@0: // tell the auto-link code to select a dll when required: sl@0: #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_WAVE_DYN_LINK) sl@0: #define BOOST_DYN_LINK sl@0: #endif sl@0: sl@0: #include sl@0: sl@0: #endif // auto-linking disabled sl@0: #endif // BOOST_VERSION sl@0: sl@0: #endif // !defined(WAVE_CONFIG_HPP_F143F90A_A63F_4B27_AC41_9CA4F14F538D_INCLUDED)