From b89f00d31028ba9325ee30cc6309fc964eac8a0a Mon Sep 17 00:00:00 2001 From: Viacheslav Demydiuk Date: Thu, 14 Nov 2024 14:16:28 +0200 Subject: [PATCH] Added missed boost headers files --- .../boost/bimap/detail/debug/static_error.hpp | 35 ++ .../boost/predef/architecture/x86/32.h | 93 +++ .../boost/predef/architecture/x86/64.h | 56 ++ .../boost/predef/hardware/simd/x86/versions.h | 135 +++++ .../boost/preprocessor/debug/assert.hpp | 44 ++ .../boost/preprocessor/debug/error.hpp | 33 ++ .../include/boost/preprocessor/debug/line.hpp | 35 ++ .../spirit/home/classic/debug/debug_node.hpp | 319 ++++++++++ .../home/classic/debug/impl/parser_names.ipp | 555 ++++++++++++++++++ .../spirit/home/classic/debug/minimal.hpp | 81 +++ .../home/classic/debug/parser_names.hpp | 254 ++++++++ .../spirit/home/classic/debug/typeof.hpp | 37 ++ 12 files changed, 1677 insertions(+) create mode 100755 thirdparty/include/boost/bimap/detail/debug/static_error.hpp create mode 100755 thirdparty/include/boost/predef/architecture/x86/32.h create mode 100755 thirdparty/include/boost/predef/architecture/x86/64.h create mode 100755 thirdparty/include/boost/predef/hardware/simd/x86/versions.h create mode 100755 thirdparty/include/boost/preprocessor/debug/assert.hpp create mode 100755 thirdparty/include/boost/preprocessor/debug/error.hpp create mode 100755 thirdparty/include/boost/preprocessor/debug/line.hpp create mode 100755 thirdparty/include/boost/spirit/home/classic/debug/debug_node.hpp create mode 100755 thirdparty/include/boost/spirit/home/classic/debug/impl/parser_names.ipp create mode 100755 thirdparty/include/boost/spirit/home/classic/debug/minimal.hpp create mode 100755 thirdparty/include/boost/spirit/home/classic/debug/parser_names.hpp create mode 100755 thirdparty/include/boost/spirit/home/classic/debug/typeof.hpp diff --git a/thirdparty/include/boost/bimap/detail/debug/static_error.hpp b/thirdparty/include/boost/bimap/detail/debug/static_error.hpp new file mode 100755 index 00000000..4e5cb263 --- /dev/null +++ b/thirdparty/include/boost/bimap/detail/debug/static_error.hpp @@ -0,0 +1,35 @@ +// Boost.Bimap +// +// Copyright (c) 2006-2007 Matias Capeletto +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +/// \file detail/debug/static_error.hpp +/// \brief Formatted compile time error + +#ifndef BOOST_BIMAP_DETAIL_DEBUG_STATIC_ERROR_HPP +#define BOOST_BIMAP_DETAIL_DEBUG_STATIC_ERROR_HPP + +#if defined(_MSC_VER) +#pragma once +#endif + +#include + +#include +#include + +// Easier way to call BOOST_MPL_ASSERT_MSG in class scope to generate +// a static error. +/*===========================================================================*/ +#define BOOST_BIMAP_STATIC_ERROR(MESSAGE,VARIABLES) \ + BOOST_MPL_ASSERT_MSG(false, \ + BOOST_PP_CAT(BIMAP_STATIC_ERROR__,MESSAGE), \ + VARIABLES) +/*===========================================================================*/ + + + +#endif // BOOST_BIMAP_DETAIL_DEBUG_STATIC_ERROR_HPP diff --git a/thirdparty/include/boost/predef/architecture/x86/32.h b/thirdparty/include/boost/predef/architecture/x86/32.h new file mode 100755 index 00000000..b20fed9d --- /dev/null +++ b/thirdparty/include/boost/predef/architecture/x86/32.h @@ -0,0 +1,93 @@ +/* +Copyright Rene Rivera 2008-2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_X86_32_H +#define BOOST_PREDEF_ARCHITECTURE_X86_32_H + +#include +#include + +/* tag::reference[] += `BOOST_ARCH_X86_32` + +http://en.wikipedia.org/wiki/X86[Intel x86] architecture: +If available versions [3-6] are specifically detected. + +[options="header"] +|=== +| {predef_symbol} | {predef_version} + +| `i386` | {predef_detection} +| `+__i386__+` | {predef_detection} +| `+__i486__+` | {predef_detection} +| `+__i586__+` | {predef_detection} +| `+__i686__+` | {predef_detection} +| `+__i386+` | {predef_detection} +| `+_M_IX86+` | {predef_detection} +| `+_X86_+` | {predef_detection} +| `+__THW_INTEL__+` | {predef_detection} +| `+__I86__+` | {predef_detection} +| `+__INTEL__+` | {predef_detection} + +| `+__I86__+` | V.0.0 +| `+_M_IX86+` | V.0.0 +| `+__i686__+` | 6.0.0 +| `+__i586__+` | 5.0.0 +| `+__i486__+` | 4.0.0 +| `+__i386__+` | 3.0.0 +|=== +*/ // end::reference[] + +#define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(i386) || defined(__i386__) || \ + defined(__i486__) || defined(__i586__) || \ + defined(__i686__) || defined(__i386) || \ + defined(_M_IX86) || defined(_X86_) || \ + defined(__THW_INTEL__) || defined(__I86__) || \ + defined(__INTEL__) +# undef BOOST_ARCH_X86_32 +# if !defined(BOOST_ARCH_X86_32) && defined(__I86__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(__I86__,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(_M_IX86) +# define BOOST_ARCH_X86_32 BOOST_PREDEF_MAKE_10_VV00(_M_IX86) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i686__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(6,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i586__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(5,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i486__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(4,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) && defined(__i386__) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER(3,0,0) +# endif +# if !defined(BOOST_ARCH_X86_32) +# define BOOST_ARCH_X86_32 BOOST_VERSION_NUMBER_AVAILABLE +# endif +#endif + +#if BOOST_ARCH_X86_32 +# define BOOST_ARCH_X86_32_AVAILABLE +#endif + +#if BOOST_ARCH_X86_32 +# undef BOOST_ARCH_WORD_BITS_32 +# define BOOST_ARCH_WORD_BITS_32 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#define BOOST_ARCH_X86_32_NAME "Intel x86-32" + +#include + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86_32,BOOST_ARCH_X86_32_NAME) diff --git a/thirdparty/include/boost/predef/architecture/x86/64.h b/thirdparty/include/boost/predef/architecture/x86/64.h new file mode 100755 index 00000000..6f59722b --- /dev/null +++ b/thirdparty/include/boost/predef/architecture/x86/64.h @@ -0,0 +1,56 @@ +/* +Copyright Rene Rivera 2008-2021 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_ARCHITECTURE_X86_64_H +#define BOOST_PREDEF_ARCHITECTURE_X86_64_H + +#include +#include + +/* tag::reference[] += `BOOST_ARCH_X86_64` + +https://en.wikipedia.org/wiki/X86-64[X86-64] architecture. + +[options="header"] +|=== +| {predef_symbol} | {predef_version} + +| `+__x86_64+` | {predef_detection} +| `+__x86_64__+` | {predef_detection} +| `+__amd64__+` | {predef_detection} +| `+__amd64+` | {predef_detection} +| `+_M_X64+` | {predef_detection} +|=== +*/ // end::reference[] + +#define BOOST_ARCH_X86_64 BOOST_VERSION_NUMBER_NOT_AVAILABLE + +#if defined(__x86_64) || defined(__x86_64__) || \ + defined(__amd64__) || defined(__amd64) || \ + defined(_M_X64) +# undef BOOST_ARCH_X86_64 +# define BOOST_ARCH_X86_64 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#if BOOST_ARCH_X86_64 +# define BOOST_ARCH_X86_64_AVAILABLE +#endif + +#if BOOST_ARCH_X86_64 +# undef BOOST_ARCH_WORD_BITS_64 +# define BOOST_ARCH_WORD_BITS_64 BOOST_VERSION_NUMBER_AVAILABLE +#endif + +#define BOOST_ARCH_X86_64_NAME "Intel x86-64" + +#include + +#endif + +#include +BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_X86_64,BOOST_ARCH_X86_64_NAME) diff --git a/thirdparty/include/boost/predef/hardware/simd/x86/versions.h b/thirdparty/include/boost/predef/hardware/simd/x86/versions.h new file mode 100755 index 00000000..ef5b002d --- /dev/null +++ b/thirdparty/include/boost/predef/hardware/simd/x86/versions.h @@ -0,0 +1,135 @@ +/* +Copyright Charly Chevalier 2015 +Copyright Joel Falcou 2015 +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ + +#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_VERSIONS_H +#define BOOST_PREDEF_HARDWARE_SIMD_X86_VERSIONS_H + +#include + +/* tag::reference[] += `BOOST_HW_SIMD_X86_*_VERSION` + +Those defines represent x86 SIMD extensions versions. + +NOTE: You *MUST* compare them with the predef `BOOST_HW_SIMD_X86`. +*/ // end::reference[] + +// --------------------------------- + +/* tag::reference[] += `BOOST_HW_SIMD_X86_MMX_VERSION` + +The https://en.wikipedia.org/wiki/MMX_(instruction_set)[MMX] x86 extension +version number. + +Version number is: *0.99.0*. +*/ // end::reference[] +#define BOOST_HW_SIMD_X86_MMX_VERSION BOOST_VERSION_NUMBER(0, 99, 0) + +/* tag::reference[] += `BOOST_HW_SIMD_X86_SSE_VERSION` + +The https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions[SSE] x86 extension +version number. + +Version number is: *1.0.0*. +*/ // end::reference[] +#define BOOST_HW_SIMD_X86_SSE_VERSION BOOST_VERSION_NUMBER(1, 0, 0) + +/* tag::reference[] += `BOOST_HW_SIMD_X86_SSE2_VERSION` + +The https://en.wikipedia.org/wiki/SSE2[SSE2] x86 extension version number. + +Version number is: *2.0.0*. +*/ // end::reference[] +#define BOOST_HW_SIMD_X86_SSE2_VERSION BOOST_VERSION_NUMBER(2, 0, 0) + +/* tag::reference[] += `BOOST_HW_SIMD_X86_SSE3_VERSION` + +The https://en.wikipedia.org/wiki/SSE3[SSE3] x86 extension version number. + +Version number is: *3.0.0*. +*/ // end::reference[] +#define BOOST_HW_SIMD_X86_SSE3_VERSION BOOST_VERSION_NUMBER(3, 0, 0) + +/* tag::reference[] += `BOOST_HW_SIMD_X86_SSSE3_VERSION` + +The https://en.wikipedia.org/wiki/SSSE3[SSSE3] x86 extension version number. + +Version number is: *3.1.0*. +*/ // end::reference[] +#define BOOST_HW_SIMD_X86_SSSE3_VERSION BOOST_VERSION_NUMBER(3, 1, 0) + +/* tag::reference[] += `BOOST_HW_SIMD_X86_SSE4_1_VERSION` + +The https://en.wikipedia.org/wiki/SSE4#SSE4.1[SSE4_1] x86 extension version +number. + +Version number is: *4.1.0*. +*/ // end::reference[] +#define BOOST_HW_SIMD_X86_SSE4_1_VERSION BOOST_VERSION_NUMBER(4, 1, 0) + +/* tag::reference[] += `BOOST_HW_SIMD_X86_SSE4_2_VERSION` + +The https://en.wikipedia.org/wiki/SSE4##SSE4.2[SSE4_2] x86 extension version +number. + +Version number is: *4.2.0*. +*/ // end::reference[] +#define BOOST_HW_SIMD_X86_SSE4_2_VERSION BOOST_VERSION_NUMBER(4, 2, 0) + +/* tag::reference[] += `BOOST_HW_SIMD_X86_AVX_VERSION` + +The https://en.wikipedia.org/wiki/Advanced_Vector_Extensions[AVX] x86 +extension version number. + +Version number is: *5.0.0*. +*/ // end::reference[] +#define BOOST_HW_SIMD_X86_AVX_VERSION BOOST_VERSION_NUMBER(5, 0, 0) + +/* tag::reference[] += `BOOST_HW_SIMD_X86_FMA3_VERSION` + +The https://en.wikipedia.org/wiki/FMA_instruction_set[FMA3] x86 extension +version number. + +Version number is: *5.2.0*. +*/ // end::reference[] +#define BOOST_HW_SIMD_X86_FMA3_VERSION BOOST_VERSION_NUMBER(5, 2, 0) + +/* tag::reference[] += `BOOST_HW_SIMD_X86_AVX2_VERSION` + +The https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#Advanced_Vector_Extensions_2[AVX2] +x86 extension version number. + +Version number is: *5.3.0*. +*/ // end::reference[] +#define BOOST_HW_SIMD_X86_AVX2_VERSION BOOST_VERSION_NUMBER(5, 3, 0) + +/* tag::reference[] += `BOOST_HW_SIMD_X86_MIC_VERSION` + +The https://en.wikipedia.org/wiki/Xeon_Phi[MIC] (Xeon Phi) x86 extension +version number. + +Version number is: *9.0.0*. +*/ // end::reference[] +#define BOOST_HW_SIMD_X86_MIC_VERSION BOOST_VERSION_NUMBER(9, 0, 0) + +/* tag::reference[] + +*/ // end::reference[] + +#endif diff --git a/thirdparty/include/boost/preprocessor/debug/assert.hpp b/thirdparty/include/boost/preprocessor/debug/assert.hpp new file mode 100755 index 00000000..3380c702 --- /dev/null +++ b/thirdparty/include/boost/preprocessor/debug/assert.hpp @@ -0,0 +1,44 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_DEBUG_ASSERT_HPP +# define BOOST_PREPROCESSOR_DEBUG_ASSERT_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_ASSERT */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ASSERT BOOST_PP_ASSERT_D +# else +# define BOOST_PP_ASSERT(cond) BOOST_PP_ASSERT_D(cond) +# endif +# +# define BOOST_PP_ASSERT_D(cond) BOOST_PP_IIF(BOOST_PP_NOT(cond), BOOST_PP_ASSERT_ERROR, BOOST_PP_TUPLE_EAT_1)(...) +# define BOOST_PP_ASSERT_ERROR(x, y, z) +# +# /* BOOST_PP_ASSERT_MSG */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ASSERT_MSG BOOST_PP_ASSERT_MSG_D +# else +# define BOOST_PP_ASSERT_MSG(cond, msg) BOOST_PP_ASSERT_MSG_D(cond, msg) +# endif +# +# define BOOST_PP_ASSERT_MSG_D(cond, msg) BOOST_PP_EXPR_IIF(BOOST_PP_NOT(cond), msg) +# +# endif diff --git a/thirdparty/include/boost/preprocessor/debug/error.hpp b/thirdparty/include/boost/preprocessor/debug/error.hpp new file mode 100755 index 00000000..c8ae5e75 --- /dev/null +++ b/thirdparty/include/boost/preprocessor/debug/error.hpp @@ -0,0 +1,33 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_DEBUG_ERROR_HPP +# define BOOST_PREPROCESSOR_DEBUG_ERROR_HPP +# +# include +# include +# +# /* BOOST_PP_ERROR */ +# +# if BOOST_PP_CONFIG_ERRORS +# define BOOST_PP_ERROR(code) BOOST_PP_CAT(BOOST_PP_ERROR_, code) +# endif +# +# define BOOST_PP_ERROR_0x0000 BOOST_PP_ERROR(0x0000, BOOST_PP_INDEX_OUT_OF_BOUNDS) +# define BOOST_PP_ERROR_0x0001 BOOST_PP_ERROR(0x0001, BOOST_PP_WHILE_OVERFLOW) +# define BOOST_PP_ERROR_0x0002 BOOST_PP_ERROR(0x0002, BOOST_PP_FOR_OVERFLOW) +# define BOOST_PP_ERROR_0x0003 BOOST_PP_ERROR(0x0003, BOOST_PP_REPEAT_OVERFLOW) +# define BOOST_PP_ERROR_0x0004 BOOST_PP_ERROR(0x0004, BOOST_PP_LIST_FOLD_OVERFLOW) +# define BOOST_PP_ERROR_0x0005 BOOST_PP_ERROR(0x0005, BOOST_PP_SEQ_FOLD_OVERFLOW) +# define BOOST_PP_ERROR_0x0006 BOOST_PP_ERROR(0x0006, BOOST_PP_ARITHMETIC_OVERFLOW) +# define BOOST_PP_ERROR_0x0007 BOOST_PP_ERROR(0x0007, BOOST_PP_DIVISION_BY_ZERO) +# +# endif diff --git a/thirdparty/include/boost/preprocessor/debug/line.hpp b/thirdparty/include/boost/preprocessor/debug/line.hpp new file mode 100755 index 00000000..4dd1013c --- /dev/null +++ b/thirdparty/include/boost/preprocessor/debug/line.hpp @@ -0,0 +1,35 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_DEBUG_LINE_HPP +# define BOOST_PREPROCESSOR_DEBUG_LINE_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_LINE */ +# +# if BOOST_PP_CONFIG_EXTENDED_LINE_INFO +# define BOOST_PP_LINE(line, file) line BOOST_PP_CAT(BOOST_PP_LINE_, BOOST_PP_IS_ITERATING)(file) +# define BOOST_PP_LINE_BOOST_PP_IS_ITERATING(file) #file +# define BOOST_PP_LINE_1(file) BOOST_PP_STRINGIZE(file BOOST_PP_CAT(BOOST_PP_LINE_I_, BOOST_PP_ITERATION_DEPTH())()) +# define BOOST_PP_LINE_I_1() [BOOST_PP_FRAME_ITERATION(1)] +# define BOOST_PP_LINE_I_2() BOOST_PP_LINE_I_1()[BOOST_PP_FRAME_ITERATION(2)] +# define BOOST_PP_LINE_I_3() BOOST_PP_LINE_I_2()[BOOST_PP_FRAME_ITERATION(3)] +# define BOOST_PP_LINE_I_4() BOOST_PP_LINE_I_3()[BOOST_PP_FRAME_ITERATION(4)] +# define BOOST_PP_LINE_I_5() BOOST_PP_LINE_I_4()[BOOST_PP_FRAME_ITERATION(5)] +# else +# define BOOST_PP_LINE(line, file) line __FILE__ +# endif +# +# endif diff --git a/thirdparty/include/boost/spirit/home/classic/debug/debug_node.hpp b/thirdparty/include/boost/spirit/home/classic/debug/debug_node.hpp new file mode 100755 index 00000000..adc1f91f --- /dev/null +++ b/thirdparty/include/boost/spirit/home/classic/debug/debug_node.hpp @@ -0,0 +1,319 @@ +/*============================================================================= + Copyright (c) 2001-2003 Joel de Guzman + Copyright (c) 2002-2003 Hartmut Kaiser + Copyright (c) 2003 Gustavo Guerra + http://spirit.sourceforge.net/ + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_DEBUG_NODE_HPP) +#define BOOST_SPIRIT_DEBUG_NODE_HPP + +#if !defined(BOOST_SPIRIT_DEBUG_MAIN_HPP) +#error "You must include boost/spirit/debug.hpp, not boost/spirit/debug/debug_node.hpp" +#endif + +#if defined(BOOST_SPIRIT_DEBUG) + +#include + +#include +#include +#include +#include +#include // for iscntrl_ + +namespace boost { namespace spirit { + +BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN + +/////////////////////////////////////////////////////////////////////////////// +// +// Debug helper classes for rules, which ensure maximum non-intrusiveness of +// the Spirit debug support +// +/////////////////////////////////////////////////////////////////////////////// + +namespace impl { + + struct token_printer_aux_for_chars + { + template + static void print(std::ostream& o, CharT c) + { + if (c == static_cast('\a')) + o << "\\a"; + + else if (c == static_cast('\b')) + o << "\\b"; + + else if (c == static_cast('\f')) + o << "\\f"; + + else if (c == static_cast('\n')) + o << "\\n"; + + else if (c == static_cast('\r')) + o << "\\r"; + + else if (c == static_cast('\t')) + o << "\\t"; + + else if (c == static_cast('\v')) + o << "\\v"; + + else if (iscntrl_(c)) + o << "\\" << static_cast(c); + + else + o << static_cast(c); + } + }; + + // for token types where the comparison with char constants wouldn't work + struct token_printer_aux_for_other_types + { + template + static void print(std::ostream& o, CharT c) + { + o << c; + } + }; + + template + struct token_printer_aux + : mpl::if_< + mpl::and_< + is_convertible, + is_convertible >, + token_printer_aux_for_chars, + token_printer_aux_for_other_types + >::type + { + }; + + template + inline void token_printer(std::ostream& o, CharT c) + { + #if !defined(BOOST_SPIRIT_DEBUG_TOKEN_PRINTER) + + token_printer_aux::print(o, c); + + #else + + BOOST_SPIRIT_DEBUG_TOKEN_PRINTER(o, c); + + #endif + } + +/////////////////////////////////////////////////////////////////////////////// +// +// Dump infos about the parsing state of a rule +// +/////////////////////////////////////////////////////////////////////////////// + +#if BOOST_SPIRIT_DEBUG_FLAGS & BOOST_SPIRIT_DEBUG_FLAGS_NODES + template + inline void + print_node_info(bool hit, int level, bool close, std::string const& name, + IteratorT first, IteratorT last) + { + if (!name.empty()) + { + for (int i = 0; i < level; ++i) + BOOST_SPIRIT_DEBUG_OUT << " "; + if (close) + { + if (hit) + BOOST_SPIRIT_DEBUG_OUT << "/"; + else + BOOST_SPIRIT_DEBUG_OUT << "#"; + } + BOOST_SPIRIT_DEBUG_OUT << name << ":\t\""; + IteratorT iter = first; + IteratorT ilast = last; + for (int j = 0; j < BOOST_SPIRIT_DEBUG_PRINT_SOME; ++j) + { + if (iter == ilast) + break; + + token_printer(BOOST_SPIRIT_DEBUG_OUT, *iter); + ++iter; + } + BOOST_SPIRIT_DEBUG_OUT << "\"\n"; + } + } +#endif // BOOST_SPIRIT_DEBUG_FLAGS & BOOST_SPIRIT_DEBUG_FLAGS_NODES + +#if BOOST_SPIRIT_DEBUG_FLAGS & BOOST_SPIRIT_DEBUG_FLAGS_CLOSURES + template + inline ResultT & + print_closure_info(ResultT &hit, int level, std::string const& name) + { + if (!name.empty()) + { + for (int i = 0; i < level-1; ++i) + BOOST_SPIRIT_DEBUG_OUT << " "; + + // for now, print out the return value only + BOOST_SPIRIT_DEBUG_OUT << "^" << name << ":\t"; + if (hit.has_valid_attribute()) + BOOST_SPIRIT_DEBUG_OUT << hit.value(); + else + BOOST_SPIRIT_DEBUG_OUT << "undefined attribute"; + BOOST_SPIRIT_DEBUG_OUT << "\n"; + } + return hit; + } +#endif // BOOST_SPIRIT_DEBUG_FLAGS & BOOST_SPIRIT_DEBUG_FLAGS_CLOSURES + +} + +/////////////////////////////////////////////////////////////////////////////// +// +// Implementation note: The parser_context_linker, parser_scanner_linker and +// closure_context_linker classes are wrapped by a PP constant to allow +// redefinition of this classes outside of Spirit +// +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_SPIRIT_PARSER_CONTEXT_LINKER_DEFINED) +#define BOOST_SPIRIT_PARSER_CONTEXT_LINKER_DEFINED + + /////////////////////////////////////////////////////////////////////////// + // + // parser_context_linker is a debug wrapper for the ContextT template + // parameter of the rule<>, subrule<> and the grammar<> classes + // + /////////////////////////////////////////////////////////////////////////// + template + struct parser_context_linker : public ContextT + { + typedef ContextT base_t; + + template + parser_context_linker(ParserT const& p) + : ContextT(p) {} + + template + void pre_parse(ParserT const& p, ScannerT &scan) + { + this->base_t::pre_parse(p, scan); + +#if BOOST_SPIRIT_DEBUG_FLAGS & BOOST_SPIRIT_DEBUG_FLAGS_NODES + if (trace_parser(p.derived())) { + impl::print_node_info( + false, + scan.get_level(), + false, + parser_name(p.derived()), + scan.first, + scan.last); + } + scan.get_level()++; +#endif // BOOST_SPIRIT_DEBUG_FLAGS & BOOST_SPIRIT_DEBUG_FLAGS_NODES + } + + template + ResultT& post_parse(ResultT& hit, ParserT const& p, ScannerT &scan) + { +#if BOOST_SPIRIT_DEBUG_FLAGS & BOOST_SPIRIT_DEBUG_FLAGS_NODES + --scan.get_level(); + if (trace_parser(p.derived())) { + impl::print_node_info( + hit, + scan.get_level(), + true, + parser_name(p.derived()), + scan.first, + scan.last); + } +#endif // BOOST_SPIRIT_DEBUG_FLAGS & BOOST_SPIRIT_DEBUG_FLAGS_NODES + + return this->base_t::post_parse(hit, p, scan); + } + }; + +#endif // !defined(BOOST_SPIRIT_PARSER_CONTEXT_LINKER_DEFINED) + +#if !defined(BOOST_SPIRIT_PARSER_SCANNER_LINKER_DEFINED) +#define BOOST_SPIRIT_PARSER_SCANNER_LINKER_DEFINED + +/////////////////////////////////////////////////////////////////////////////// +// This class is to avoid linker problems and to ensure a real singleton +// 'level' variable + struct debug_support + { + int& get_level() + { + static int level = 0; + return level; + } + }; + + template + struct parser_scanner_linker : public ScannerT + { + parser_scanner_linker(ScannerT const &scan_) : ScannerT(scan_) + {} + + int &get_level() + { return debug.get_level(); } + + private: debug_support debug; + }; + +#endif // !defined(BOOST_SPIRIT_PARSER_SCANNER_LINKER_DEFINED) + +#if !defined(BOOST_SPIRIT_CLOSURE_CONTEXT_LINKER_DEFINED) +#define BOOST_SPIRIT_CLOSURE_CONTEXT_LINKER_DEFINED + + /////////////////////////////////////////////////////////////////////////// + // + // closure_context_linker is a debug wrapper for the closure template + // parameter of the rule<>, subrule<> and grammar classes + // + /////////////////////////////////////////////////////////////////////////// + + template + struct closure_context_linker : public parser_context_linker + { + typedef parser_context_linker base_t; + + template + closure_context_linker(ParserT const& p) + : parser_context_linker(p) {} + + template + void pre_parse(ParserT const& p, ScannerT &scan) + { this->base_t::pre_parse(p, scan); } + + template + ResultT& + post_parse(ResultT& hit, ParserT const& p, ScannerT &scan) + { +#if BOOST_SPIRIT_DEBUG_FLAGS & BOOST_SPIRIT_DEBUG_FLAGS_CLOSURES + if (hit && trace_parser(p.derived())) { + // for now, print out the return value only + return impl::print_closure_info( + this->base_t::post_parse(hit, p, scan), + scan.get_level(), + parser_name(p.derived()) + ); + } +#endif // BOOST_SPIRIT_DEBUG_FLAGS & BOOST_SPIRIT_DEBUG_FLAGS_CLOSURES + + return this->base_t::post_parse(hit, p, scan); + } + }; + +#endif // !defined(BOOST_SPIRIT_CLOSURE_CONTEXT_LINKER_DEFINED) + +BOOST_SPIRIT_CLASSIC_NAMESPACE_END + +}} // namespace BOOST_SPIRIT_CLASSIC_NS + +#endif // defined(BOOST_SPIRIT_DEBUG) + +#endif // !defined(BOOST_SPIRIT_DEBUG_NODE_HPP) + diff --git a/thirdparty/include/boost/spirit/home/classic/debug/impl/parser_names.ipp b/thirdparty/include/boost/spirit/home/classic/debug/impl/parser_names.ipp new file mode 100755 index 00000000..85cecae5 --- /dev/null +++ b/thirdparty/include/boost/spirit/home/classic/debug/impl/parser_names.ipp @@ -0,0 +1,555 @@ +/*============================================================================= + Copyright (c) 2001-2003 Joel de Guzman + Copyright (c) 2002-2003 Hartmut Kaiser + http://spirit.sourceforge.net/ + + Use, modification and distribution is subject to the Boost Software + License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_PARSER_NAMES_IPP) +#define BOOST_SPIRIT_PARSER_NAMES_IPP + +#if defined(BOOST_SPIRIT_DEBUG) + +#include +#include +#include + +#include +#ifdef BOOST_NO_STRINGSTREAM +#include +#define BOOST_SPIRIT_SSTREAM std::strstream +std::string BOOST_SPIRIT_GETSTRING(std::strstream& ss) +{ + ss << ends; + std::string rval = ss.str(); + ss.freeze(false); + return rval; +} +#else +#include +#define BOOST_SPIRIT_GETSTRING(ss) ss.str() +#define BOOST_SPIRIT_SSTREAM std::stringstream +#endif + +namespace boost { namespace spirit { + +BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN + +/////////////////////////////////////////////////////////////////////////////// +// from actions.hpp + template + inline std::string + parser_name(action const& p) + { + return std::string("action") + + std::string("[") + + parser_name(p.subject()) + + std::string("]"); + } + +/////////////////////////////////////////////////////////////////////////////// +// from directives.hpp + template + inline std::string + parser_name(contiguous const& p) + { + return std::string("contiguous") + + std::string("[") + + parser_name(p.subject()) + + std::string("]"); + } + + template + inline std::string + parser_name(inhibit_case const& p) + { + return std::string("inhibit_case") + + std::string("[") + + parser_name(p.subject()) + + std::string("]"); + } + + template + inline std::string + parser_name(longest_alternative const& p) + { + return std::string("longest_alternative") + + std::string("[") + + parser_name(p.left()) + std::string(", ") + parser_name(p.right()) + + std::string("]"); + } + + template + inline std::string + parser_name(shortest_alternative const& p) + { + return std::string("shortest_alternative") + + std::string("[") + + parser_name(p.left()) + std::string(", ") + parser_name(p.right()) + + std::string("]"); + } + +/////////////////////////////////////////////////////////////////////////////// +// from numerics.hpp + template + inline std::string + parser_name(uint_parser const& /*p*/) + { + BOOST_SPIRIT_SSTREAM stream; + stream << Radix << ", " << MinDigits << ", " << MaxDigits; + return std::string("uint_parser<") + + BOOST_SPIRIT_GETSTRING(stream) + + std::string(">"); + } + + template + inline std::string + parser_name(int_parser const& /*p*/) + { + BOOST_SPIRIT_SSTREAM stream; + stream << Radix << ", " << MinDigits << ", " << MaxDigits; + return std::string("int_parser<") + + BOOST_SPIRIT_GETSTRING(stream) + + std::string(">"); + } + + template + inline std::string + parser_name(real_parser const& /*p*/) + { + return std::string("real_parser"); + } + +/////////////////////////////////////////////////////////////////////////////// +// from operators.hpp + template + inline std::string + parser_name(sequence const& p) + { + return std::string("sequence") + + std::string("[") + + parser_name(p.left()) + std::string(", ") + parser_name(p.right()) + + std::string("]"); + } + + template + inline std::string + parser_name(sequential_or const& p) + { + return std::string("sequential_or") + + std::string("[") + + parser_name(p.left()) + std::string(", ") + parser_name(p.right()) + + std::string("]"); + } + + template + inline std::string + parser_name(alternative const& p) + { + return std::string("alternative") + + std::string("[") + + parser_name(p.left()) + std::string(", ") + parser_name(p.right()) + + std::string("]"); + } + + template + inline std::string + parser_name(intersection const& p) + { + return std::string("intersection") + + std::string("[") + + parser_name(p.left()) + std::string(", ") + parser_name(p.right()) + + std::string("]"); + } + + template + inline std::string + parser_name(difference const& p) + { + return std::string("difference") + + std::string("[") + + parser_name(p.left()) + std::string(", ") + parser_name(p.right()) + + std::string("]"); + } + + template + inline std::string + parser_name(exclusive_or const& p) + { + return std::string("exclusive_or") + + std::string("[") + + parser_name(p.left()) + std::string(", ") + parser_name(p.right()) + + std::string("]"); + } + + template + inline std::string + parser_name(optional const& p) + { + return std::string("optional") + + std::string("[") + + parser_name(p.subject()) + + std::string("]"); + } + + template + inline std::string + parser_name(kleene_star const& p) + { + return std::string("kleene_star") + + std::string("[") + + parser_name(p.subject()) + + std::string("]"); + } + + template + inline std::string + parser_name(positive const& p) + { + return std::string("positive") + + std::string("[") + + parser_name(p.subject()) + + std::string("]"); + } + +/////////////////////////////////////////////////////////////////////////////// +// from parser.hpp + template + inline std::string + parser_name(parser const& /*p*/) + { + return std::string("parser"); + } + +/////////////////////////////////////////////////////////////////////////////// +// from primitives.hpp + template + inline std::string + parser_name(char_parser const &/*p*/) + { + return std::string("char_parser"); + } + + template + inline std::string + parser_name(chlit const &p) + { + return std::string("chlit(\'") + + std::string(1, p.ch) + + std::string("\')"); + } + + template + inline std::string + parser_name(range const &p) + { + return std::string("range(") + + std::string(1, p.first) + std::string(", ") + std::string(1, p.last) + + std::string(")"); + } + + template + inline std::string + parser_name(chseq const &p) + { + return std::string("chseq(\"") + + std::string(p.first, p.last) + + std::string("\")"); + } + + template + inline std::string + parser_name(strlit const &p) + { + return std::string("strlit(\"") + + std::string(p.seq.first, p.seq.last) + + std::string("\")"); + } + + inline std::string + parser_name(nothing_parser const&) + { + return std::string("nothing"); + } + + inline std::string + parser_name(epsilon_parser const&) + { + return std::string("epsilon"); + } + + inline std::string + parser_name(anychar_parser const&) + { + return std::string("anychar"); + } + + inline std::string + parser_name(alnum_parser const&) + { + return std::string("alnum"); + } + + inline std::string + parser_name(alpha_parser const&) + { + return std::string("alpha"); + } + + inline std::string + parser_name(cntrl_parser const&) + { + return std::string("cntrl"); + } + + inline std::string + parser_name(digit_parser const&) + { + return std::string("digit"); + } + + inline std::string + parser_name(graph_parser const&) + { + return std::string("graph"); + } + + inline std::string + parser_name(lower_parser const&) + { + return std::string("lower"); + } + + inline std::string + parser_name(print_parser const&) + { + return std::string("print"); + } + + inline std::string + parser_name(punct_parser const&) + { + return std::string("punct"); + } + + inline std::string + parser_name(blank_parser const&) + { + return std::string("blank"); + } + + inline std::string + parser_name(space_parser const&) + { + return std::string("space"); + } + + inline std::string + parser_name(upper_parser const&) + { + return std::string("upper"); + } + + inline std::string + parser_name(xdigit_parser const&) + { + return std::string("xdigit"); + } + + inline std::string + parser_name(eol_parser const&) + { + return std::string("eol"); + } + + inline std::string + parser_name(end_parser const&) + { + return std::string("end"); + } + +/////////////////////////////////////////////////////////////////////////////// +// from rule.hpp + namespace impl { + struct node_registry + { + typedef std::pair rule_info; + typedef std::map rule_infos; + + std::string find_node(void const *r) + { + rule_infos::const_iterator cit = infos.find(r); + if (cit != infos.end()) + return (*cit).second.first; + return std::string(""); + } + + bool trace_node(void const *r) + { + rule_infos::const_iterator cit = infos.find(r); + if (cit != infos.end()) + return (*cit).second.second; + return BOOST_SPIRIT_DEBUG_TRACENODE; + } + + bool register_node(void const *r, char const *name_to_register, + bool trace_node) + { + if (infos.find(r) != infos.end()) + return false; + + return infos.insert(rule_infos::value_type(r, + rule_info(std::string(name_to_register), trace_node)) + ).second; + } + + bool unregister_node(void const *r) + { + if (infos.find(r) == infos.end()) + return false; + return (1 == infos.erase(r)); + } + + private: + rule_infos infos; + }; + + inline node_registry & + get_node_registry() + { + static node_registry node_infos; + return node_infos; + } + } // namespace impl + + template< + typename DerivedT, typename EmbedT, + typename T0, typename T1, typename T2 + > + inline std::string + parser_name(impl::rule_base const& p) + { + return std::string("rule_base") + + std::string("(") + + impl::get_node_registry().find_node(&p) + + std::string(")"); + } + + template + inline std::string + parser_name(rule const& p) + { + return std::string("rule") + + std::string("(") + + impl::get_node_registry().find_node(&p) + + std::string(")"); + } + +/////////////////////////////////////////////////////////////////////////////// +// from subrule.hpp + template + inline std::string + parser_name(subrule_list const &p) + { + return std::string("subrule_list") + + std::string("(") + + impl::get_node_registry().find_node(&p) + + std::string(")"); + } + + template + inline std::string + parser_name(subrule_parser const &p) + { + return std::string("subrule_parser") + + std::string("(") + + impl::get_node_registry().find_node(&p) + + std::string(")"); + } + + template + inline std::string + parser_name(subrule const &p) + { + BOOST_SPIRIT_SSTREAM stream; + stream << ID; + return std::string("subrule<") + + BOOST_SPIRIT_GETSTRING(stream) + + std::string(">(") + + impl::get_node_registry().find_node(&p) + + std::string(")"); + } + +/////////////////////////////////////////////////////////////////////////////// +// from grammar.hpp + template + inline std::string + parser_name(grammar const& p) + { + return std::string("grammar") + + std::string("(") + + impl::get_node_registry().find_node(&p) + + std::string(")"); + } + +/////////////////////////////////////////////////////////////////////////////// +// decide, if a node is to be traced or not + template< + typename DerivedT, typename EmbedT, + typename T0, typename T1, typename T2 + > + inline bool + trace_parser(impl::rule_base + const& p) + { + return impl::get_node_registry().trace_node(&p); + } + + template + inline bool + trace_parser(rule const& p) + { + return impl::get_node_registry().trace_node(&p); + } + + template + inline bool + trace_parser(grammar const& p) + { + return impl::get_node_registry().trace_node(&p); + } + + template + inline bool + trace_parser(impl::entry_grammar const& p) + { + return impl::get_node_registry().trace_node(&p); + } + + template + bool + trace_parser(subrule const& p) + { + return impl::get_node_registry().trace_node(&p); + } + + template + bool + trace_parser(init_closure_parser const& p) + { + return impl::get_node_registry().trace_node(&p); + } + +/////////////////////////////////////////////////////////////////////////////// +BOOST_SPIRIT_CLASSIC_NAMESPACE_END + +}} // namespace boost::spirit + +#undef BOOST_SPIRIT_SSTREAM +#undef BOOST_SPIRIT_GETSTRING + +#endif // defined(BOOST_SPIRIT_DEBUG) + +#endif // !defined(BOOST_SPIRIT_PARSER_NAMES_IPP) diff --git a/thirdparty/include/boost/spirit/home/classic/debug/minimal.hpp b/thirdparty/include/boost/spirit/home/classic/debug/minimal.hpp new file mode 100755 index 00000000..0cb42644 --- /dev/null +++ b/thirdparty/include/boost/spirit/home/classic/debug/minimal.hpp @@ -0,0 +1,81 @@ +/*============================================================================= + Copyright (c) 2001-2003 Joel de Guzman + Copyright (c) 2002-2003 Hartmut Kaiser + http://spirit.sourceforge.net/ + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_MINIMAL_DEBUG_HPP) +#define BOOST_SPIRIT_MINIMAL_DEBUG_HPP + +#if !defined(BOOST_SPIRIT_DEBUG_MAIN_HPP) +#error "You must include boost/spirit/debug.hpp, not boost/spirit/debug/minimal.hpp" +#endif +/////////////////////////////////////////////////////////////////////////////// +// +// Minimum debugging tools support +// +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_SPIRIT_DEBUG_OUT) +#define BOOST_SPIRIT_DEBUG_OUT std::cout +#endif + +/////////////////////////////////////////////////////////////////////////// +// +// BOOST_SPIRIT_DEBUG_FLAGS controls the level of diagnostics printed +// +/////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_SPIRIT_DEBUG_FLAGS_NONE) +#define BOOST_SPIRIT_DEBUG_FLAGS_NONE 0x0000 // no diagnostics at all +#endif + +#if !defined(BOOST_SPIRIT_DEBUG_FLAGS_MAX) +#define BOOST_SPIRIT_DEBUG_FLAGS_MAX 0xFFFF // print maximal diagnostics +#endif + +#if !defined(BOOST_SPIRIT_DEBUG_FLAGS) +#define BOOST_SPIRIT_DEBUG_FLAGS BOOST_SPIRIT_DEBUG_FLAGS_MAX +#endif + +#if !defined(BOOST_SPIRIT_DEBUG_PRINT_SOME) +#define BOOST_SPIRIT_DEBUG_PRINT_SOME 20 +#endif + +#if !defined(BOOST_SPIRIT_DEBUG_RULE) +#define BOOST_SPIRIT_DEBUG_RULE(r) +#endif // !defined(BOOST_SPIRIT_DEBUG_RULE) + +#if !defined(BOOST_SPIRIT_DEBUG_NODE) +#define BOOST_SPIRIT_DEBUG_NODE(r) +#endif // !defined(BOOST_SPIRIT_DEBUG_NODE) + +#if !defined(BOOST_SPIRIT_DEBUG_GRAMMAR) +#define BOOST_SPIRIT_DEBUG_GRAMMAR(r) +#endif // !defined(BOOST_SPIRIT_DEBUG_GRAMMAR) + +#if !defined(BOOST_SPIRIT_DEBUG_TRACE_RULE) +#define BOOST_SPIRIT_DEBUG_TRACE_RULE(r, t) +#endif // !defined(BOOST_SPIRIT_DEBUG_TRACE_RULE) + +#if !defined(BOOST_SPIRIT_DEBUG_TRACE_NODE) +#define BOOST_SPIRIT_DEBUG_TRACE_NODE(r, t) +#endif // !defined(BOOST_SPIRIT_DEBUG_TRACE_NODE) + +#if !defined(BOOST_SPIRIT_DEBUG_TRACE_GRAMMAR) +#define BOOST_SPIRIT_DEBUG_TRACE_GRAMMAR(r, t) +#endif // !defined(BOOST_SPIRIT_DEBUG_TRACE_GRAMMAR) + +#if !defined(BOOST_SPIRIT_DEBUG_TRACE_RULE_NAME) +#define BOOST_SPIRIT_DEBUG_TRACE_RULE_NAME(r, n, t) +#endif // !defined(BOOST_SPIRIT_DEBUG_TRACE_RULE_NAME) + +#if !defined(BOOST_SPIRIT_DEBUG_TRACE_NODE_NAME) +#define BOOST_SPIRIT_DEBUG_TRACE_NODE_NAME(r, n, t) +#endif // !defined(BOOST_SPIRIT_DEBUG_TRACE_NODE_NAME) + +#if !defined(BOOST_SPIRIT_DEBUG_TRACE_GRAMMAR_NAME) +#define BOOST_SPIRIT_DEBUG_TRACE_GRAMMAR_NAME(r, n, t) +#endif // !defined(BOOST_SPIRIT_DEBUG_TRACE_GRAMMAR_NAME) + +#endif // !defined(BOOST_SPIRIT_MINIMAL_DEBUG_HPP) diff --git a/thirdparty/include/boost/spirit/home/classic/debug/parser_names.hpp b/thirdparty/include/boost/spirit/home/classic/debug/parser_names.hpp new file mode 100755 index 00000000..edd17cc0 --- /dev/null +++ b/thirdparty/include/boost/spirit/home/classic/debug/parser_names.hpp @@ -0,0 +1,254 @@ +/*============================================================================= + Copyright (c) 2001-2003 Joel de Guzman + Copyright (c) 2002-2003 Hartmut Kaiser + http://spirit.sourceforge.net/ + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_PARSER_NAMES_HPP) +#define BOOST_SPIRIT_PARSER_NAMES_HPP + +#if defined(BOOST_SPIRIT_DEBUG) + +////////////////////////////////// +#include +#include + +namespace boost { namespace spirit { + +BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN + +/////////////////////////////////////////////////////////////////////////////// +// +// Declaration of helper functions, which return the name of a concrete +// parser instance. The functions are specialized on the parser types. The +// functions declared in this file are for the predefined parser types from +// the Spirit core library only, so additional functions might be provided as +// needed. +// +/////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// from actions.hpp + template + std::string + parser_name(action const& p); + +/////////////////////////////////////////////////////////////////////////////// +// from directives.hpp + template + std::string + parser_name(contiguous const& p); + + template + std::string + parser_name(inhibit_case const& p); + + template + std::string + parser_name(longest_alternative const& p); + + template + std::string + parser_name(shortest_alternative const& p); + +/////////////////////////////////////////////////////////////////////////////// +// from grammar.hpp + template + std::string + parser_name(grammar const& p); + +/////////////////////////////////////////////////////////////////////////////// +// from numerics.hpp + template + std::string + parser_name(uint_parser const& p); + + template + std::string + parser_name(int_parser const& p); + + template + std::string + parser_name(real_parser const& p); + +/////////////////////////////////////////////////////////////////////////////// +// from operators.hpp + template + std::string + parser_name(sequence const& p); + + template + std::string + parser_name(sequential_or const& p); + + template + std::string + parser_name(alternative const& p); + + template + std::string + parser_name(intersection const& p); + + template + std::string + parser_name(difference const& p); + + template + std::string + parser_name(exclusive_or const& p); + + template + std::string + parser_name(optional const& p); + + template + std::string + parser_name(kleene_star const& p); + + template + std::string + parser_name(positive const& p); + +/////////////////////////////////////////////////////////////////////////////// +// from parser.hpp + template + std::string + parser_name(parser const& p); + +/////////////////////////////////////////////////////////////////////////////// +// from primitives.hpp + template + std::string + parser_name(char_parser const &p); + + template + std::string + parser_name(chlit const &p); + + template + std::string + parser_name(range const &p); + + template + std::string + parser_name(chseq const &p); + + template + std::string + parser_name(strlit const &p); + + std::string + parser_name(nothing_parser const &p); + + std::string + parser_name(epsilon_parser const &p); + + std::string + parser_name(anychar_parser const &p); + + std::string + parser_name(alnum_parser const &p); + + std::string + parser_name(alpha_parser const &p); + + std::string + parser_name(cntrl_parser const &p); + + std::string + parser_name(digit_parser const &p); + + std::string + parser_name(graph_parser const &p); + + std::string + parser_name(lower_parser const &p); + + std::string + parser_name(print_parser const &p); + + std::string + parser_name(punct_parser const &p); + + std::string + parser_name(blank_parser const &p); + + std::string + parser_name(space_parser const &p); + + std::string + parser_name(upper_parser const &p); + + std::string + parser_name(xdigit_parser const &p); + + std::string + parser_name(eol_parser const &p); + + std::string + parser_name(end_parser const &p); + +/////////////////////////////////////////////////////////////////////////////// +// from rule.hpp + template + std::string + parser_name(rule const& p); + +/////////////////////////////////////////////////////////////////////////////// +// from subrule.hpp + template + std::string + parser_name(subrule_list const &p); + + template + std::string + parser_name(subrule_parser const &p); + + template + std::string + parser_name(subrule const &p); + +/////////////////////////////////////////////////////////////////////////////// +// from chset.hpp + +/////////////////////////////////////////////////////////////////////////////// +// +// Decide, if a node is to be traced or not +// +/////////////////////////////////////////////////////////////////////////////// + template< + typename DerivedT, typename EmbedT, + typename T0, typename T1, typename T2 + > + bool + trace_parser(impl::rule_base + const& p); + + template + bool + trace_parser(grammar const& p); + + template + bool + trace_parser(subrule const& p); + + template + struct init_closure_parser; + + template + bool + trace_parser(init_closure_parser const& p); + +/////////////////////////////////////////////////////////////////////////////// +BOOST_SPIRIT_CLASSIC_NAMESPACE_END + +}} // namespace BOOST_SPIRIT_CLASSIC_NS + +////////////////////////////////// +#include + +#endif // defined(BOOST_SPIRIT_DEBUG) + +#endif // !defined(BOOST_SPIRIT_PARSER_NAMES_HPP) diff --git a/thirdparty/include/boost/spirit/home/classic/debug/typeof.hpp b/thirdparty/include/boost/spirit/home/classic/debug/typeof.hpp new file mode 100755 index 00000000..c764d318 --- /dev/null +++ b/thirdparty/include/boost/spirit/home/classic/debug/typeof.hpp @@ -0,0 +1,37 @@ +/*============================================================================= + Copyright (c) 2006 Tobias Schwinger + http://spirit.sourceforge.net/ + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ +#if !defined(BOOST_SPIRIT_DEBUG_TYPEOF_HPP) +#define BOOST_SPIRIT_DEBUG_TYPEOF_HPP + +#include + +#include +#include + +namespace boost { namespace spirit { + +BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN + + // debug_node.hpp + template struct parser_context_linker; + template struct scanner_context_linker; + template struct closure_context_linker; + +BOOST_SPIRIT_CLASSIC_NAMESPACE_END + +}} // namespace BOOST_SPIRIT_CLASSIC_NS + +#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() + +// debug_node.hpp +BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::parser_context_linker,1) +BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::scanner_context_linker,1) +BOOST_TYPEOF_REGISTER_TEMPLATE(BOOST_SPIRIT_CLASSIC_NS::closure_context_linker,1) + +#endif +