Added boost header
This commit is contained in:
319
test/external/boost/spirit/home/classic/debug/debug_node.hpp
vendored
Normal file
319
test/external/boost/spirit/home/classic/debug/debug_node.hpp
vendored
Normal file
@@ -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 <string>
|
||||
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/spirit/home/classic/namespace.hpp>
|
||||
#include <boost/spirit/home/classic/core/primitives/primitives.hpp> // 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<typename CharT>
|
||||
static void print(std::ostream& o, CharT c)
|
||||
{
|
||||
if (c == static_cast<CharT>('\a'))
|
||||
o << "\\a";
|
||||
|
||||
else if (c == static_cast<CharT>('\b'))
|
||||
o << "\\b";
|
||||
|
||||
else if (c == static_cast<CharT>('\f'))
|
||||
o << "\\f";
|
||||
|
||||
else if (c == static_cast<CharT>('\n'))
|
||||
o << "\\n";
|
||||
|
||||
else if (c == static_cast<CharT>('\r'))
|
||||
o << "\\r";
|
||||
|
||||
else if (c == static_cast<CharT>('\t'))
|
||||
o << "\\t";
|
||||
|
||||
else if (c == static_cast<CharT>('\v'))
|
||||
o << "\\v";
|
||||
|
||||
else if (iscntrl_(c))
|
||||
o << "\\" << static_cast<int>(c);
|
||||
|
||||
else
|
||||
o << static_cast<char>(c);
|
||||
}
|
||||
};
|
||||
|
||||
// for token types where the comparison with char constants wouldn't work
|
||||
struct token_printer_aux_for_other_types
|
||||
{
|
||||
template<typename CharT>
|
||||
static void print(std::ostream& o, CharT c)
|
||||
{
|
||||
o << c;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename CharT>
|
||||
struct token_printer_aux
|
||||
: mpl::if_<
|
||||
mpl::and_<
|
||||
is_convertible<CharT, char>,
|
||||
is_convertible<char, CharT> >,
|
||||
token_printer_aux_for_chars,
|
||||
token_printer_aux_for_other_types
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
template<typename CharT>
|
||||
inline void token_printer(std::ostream& o, CharT c)
|
||||
{
|
||||
#if !defined(BOOST_SPIRIT_DEBUG_TOKEN_PRINTER)
|
||||
|
||||
token_printer_aux<CharT>::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 <typename IteratorT>
|
||||
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 <typename ResultT>
|
||||
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<typename ContextT>
|
||||
struct parser_context_linker : public ContextT
|
||||
{
|
||||
typedef ContextT base_t;
|
||||
|
||||
template <typename ParserT>
|
||||
parser_context_linker(ParserT const& p)
|
||||
: ContextT(p) {}
|
||||
|
||||
template <typename ParserT, typename ScannerT>
|
||||
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 <typename ResultT, typename ParserT, typename ScannerT>
|
||||
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<typename ScannerT>
|
||||
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<typename ContextT>
|
||||
struct closure_context_linker : public parser_context_linker<ContextT>
|
||||
{
|
||||
typedef parser_context_linker<ContextT> base_t;
|
||||
|
||||
template <typename ParserT>
|
||||
closure_context_linker(ParserT const& p)
|
||||
: parser_context_linker<ContextT>(p) {}
|
||||
|
||||
template <typename ParserT, typename ScannerT>
|
||||
void pre_parse(ParserT const& p, ScannerT &scan)
|
||||
{ this->base_t::pre_parse(p, scan); }
|
||||
|
||||
template <typename ResultT, typename ParserT, typename ScannerT>
|
||||
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)
|
||||
|
||||
555
test/external/boost/spirit/home/classic/debug/impl/parser_names.ipp
vendored
Normal file
555
test/external/boost/spirit/home/classic/debug/impl/parser_names.ipp
vendored
Normal file
@@ -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 <string>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#ifdef BOOST_NO_STRINGSTREAM
|
||||
#include <strstream>
|
||||
#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 <sstream>
|
||||
#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 <typename ParserT, typename ActionT>
|
||||
inline std::string
|
||||
parser_name(action<ParserT, ActionT> const& p)
|
||||
{
|
||||
return std::string("action")
|
||||
+ std::string("[")
|
||||
+ parser_name(p.subject())
|
||||
+ std::string("]");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// from directives.hpp
|
||||
template <typename ParserT>
|
||||
inline std::string
|
||||
parser_name(contiguous<ParserT> const& p)
|
||||
{
|
||||
return std::string("contiguous")
|
||||
+ std::string("[")
|
||||
+ parser_name(p.subject())
|
||||
+ std::string("]");
|
||||
}
|
||||
|
||||
template <typename ParserT>
|
||||
inline std::string
|
||||
parser_name(inhibit_case<ParserT> const& p)
|
||||
{
|
||||
return std::string("inhibit_case")
|
||||
+ std::string("[")
|
||||
+ parser_name(p.subject())
|
||||
+ std::string("]");
|
||||
}
|
||||
|
||||
template <typename A, typename B>
|
||||
inline std::string
|
||||
parser_name(longest_alternative<A, B> const& p)
|
||||
{
|
||||
return std::string("longest_alternative")
|
||||
+ std::string("[")
|
||||
+ parser_name(p.left()) + std::string(", ") + parser_name(p.right())
|
||||
+ std::string("]");
|
||||
}
|
||||
|
||||
template <typename A, typename B>
|
||||
inline std::string
|
||||
parser_name(shortest_alternative<A, B> 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 <typename T, int Radix, unsigned MinDigits, int MaxDigits>
|
||||
inline std::string
|
||||
parser_name(uint_parser<T, Radix, MinDigits, MaxDigits> const& p)
|
||||
{
|
||||
BOOST_SPIRIT_SSTREAM stream;
|
||||
stream << Radix << ", " << MinDigits << ", " << MaxDigits;
|
||||
return std::string("uint_parser<")
|
||||
+ BOOST_SPIRIT_GETSTRING(stream)
|
||||
+ std::string(">");
|
||||
}
|
||||
|
||||
template <typename T, int Radix, unsigned MinDigits, int MaxDigits>
|
||||
inline std::string
|
||||
parser_name(int_parser<T, Radix, MinDigits, MaxDigits> const& p)
|
||||
{
|
||||
BOOST_SPIRIT_SSTREAM stream;
|
||||
stream << Radix << ", " << MinDigits << ", " << MaxDigits;
|
||||
return std::string("int_parser<")
|
||||
+ BOOST_SPIRIT_GETSTRING(stream)
|
||||
+ std::string(">");
|
||||
}
|
||||
|
||||
template <typename T, typename RealPoliciesT>
|
||||
inline std::string
|
||||
parser_name(real_parser<T, RealPoliciesT> const& p)
|
||||
{
|
||||
return std::string("real_parser");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// from operators.hpp
|
||||
template <typename A, typename B>
|
||||
inline std::string
|
||||
parser_name(sequence<A, B> const& p)
|
||||
{
|
||||
return std::string("sequence")
|
||||
+ std::string("[")
|
||||
+ parser_name(p.left()) + std::string(", ") + parser_name(p.right())
|
||||
+ std::string("]");
|
||||
}
|
||||
|
||||
template <typename A, typename B>
|
||||
inline std::string
|
||||
parser_name(sequential_or<A, B> const& p)
|
||||
{
|
||||
return std::string("sequential_or")
|
||||
+ std::string("[")
|
||||
+ parser_name(p.left()) + std::string(", ") + parser_name(p.right())
|
||||
+ std::string("]");
|
||||
}
|
||||
|
||||
template <typename A, typename B>
|
||||
inline std::string
|
||||
parser_name(alternative<A, B> const& p)
|
||||
{
|
||||
return std::string("alternative")
|
||||
+ std::string("[")
|
||||
+ parser_name(p.left()) + std::string(", ") + parser_name(p.right())
|
||||
+ std::string("]");
|
||||
}
|
||||
|
||||
template <typename A, typename B>
|
||||
inline std::string
|
||||
parser_name(intersection<A, B> const& p)
|
||||
{
|
||||
return std::string("intersection")
|
||||
+ std::string("[")
|
||||
+ parser_name(p.left()) + std::string(", ") + parser_name(p.right())
|
||||
+ std::string("]");
|
||||
}
|
||||
|
||||
template <typename A, typename B>
|
||||
inline std::string
|
||||
parser_name(difference<A, B> const& p)
|
||||
{
|
||||
return std::string("difference")
|
||||
+ std::string("[")
|
||||
+ parser_name(p.left()) + std::string(", ") + parser_name(p.right())
|
||||
+ std::string("]");
|
||||
}
|
||||
|
||||
template <typename A, typename B>
|
||||
inline std::string
|
||||
parser_name(exclusive_or<A, B> const& p)
|
||||
{
|
||||
return std::string("exclusive_or")
|
||||
+ std::string("[")
|
||||
+ parser_name(p.left()) + std::string(", ") + parser_name(p.right())
|
||||
+ std::string("]");
|
||||
}
|
||||
|
||||
template <typename S>
|
||||
inline std::string
|
||||
parser_name(optional<S> const& p)
|
||||
{
|
||||
return std::string("optional")
|
||||
+ std::string("[")
|
||||
+ parser_name(p.subject())
|
||||
+ std::string("]");
|
||||
}
|
||||
|
||||
template <typename S>
|
||||
inline std::string
|
||||
parser_name(kleene_star<S> const& p)
|
||||
{
|
||||
return std::string("kleene_star")
|
||||
+ std::string("[")
|
||||
+ parser_name(p.subject())
|
||||
+ std::string("]");
|
||||
}
|
||||
|
||||
template <typename S>
|
||||
inline std::string
|
||||
parser_name(positive<S> const& p)
|
||||
{
|
||||
return std::string("positive")
|
||||
+ std::string("[")
|
||||
+ parser_name(p.subject())
|
||||
+ std::string("]");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// from parser.hpp
|
||||
template <typename DerivedT>
|
||||
inline std::string
|
||||
parser_name(parser<DerivedT> const& p)
|
||||
{
|
||||
return std::string("parser");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// from primitives.hpp
|
||||
template <typename DerivedT>
|
||||
inline std::string
|
||||
parser_name(char_parser<DerivedT> const &p)
|
||||
{
|
||||
return std::string("char_parser");
|
||||
}
|
||||
|
||||
template <typename CharT>
|
||||
inline std::string
|
||||
parser_name(chlit<CharT> const &p)
|
||||
{
|
||||
return std::string("chlit(\'")
|
||||
+ std::string(1, p.ch)
|
||||
+ std::string("\')");
|
||||
}
|
||||
|
||||
template <typename CharT>
|
||||
inline std::string
|
||||
parser_name(range<CharT> const &p)
|
||||
{
|
||||
return std::string("range(")
|
||||
+ std::string(1, p.first) + std::string(", ") + std::string(1, p.last)
|
||||
+ std::string(")");
|
||||
}
|
||||
|
||||
template <typename IteratorT>
|
||||
inline std::string
|
||||
parser_name(chseq<IteratorT> const &p)
|
||||
{
|
||||
return std::string("chseq(\"")
|
||||
+ std::string(p.first, p.last)
|
||||
+ std::string("\")");
|
||||
}
|
||||
|
||||
template <typename IteratorT>
|
||||
inline std::string
|
||||
parser_name(strlit<IteratorT> 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<std::string, bool> rule_info;
|
||||
typedef std::map<void const *, rule_info> 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("<unknown>");
|
||||
}
|
||||
|
||||
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<DerivedT, EmbedT, T0, T1, T2> const& p)
|
||||
{
|
||||
return std::string("rule_base")
|
||||
+ std::string("(")
|
||||
+ impl::get_node_registry().find_node(&p)
|
||||
+ std::string(")");
|
||||
}
|
||||
|
||||
template<typename T0, typename T1, typename T2>
|
||||
inline std::string
|
||||
parser_name(rule<T0, T1, T2> const& p)
|
||||
{
|
||||
return std::string("rule")
|
||||
+ std::string("(")
|
||||
+ impl::get_node_registry().find_node(&p)
|
||||
+ std::string(")");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// from subrule.hpp
|
||||
template <typename FirstT, typename RestT>
|
||||
inline std::string
|
||||
parser_name(subrule_list<FirstT, RestT> const &p)
|
||||
{
|
||||
return std::string("subrule_list")
|
||||
+ std::string("(")
|
||||
+ impl::get_node_registry().find_node(&p)
|
||||
+ std::string(")");
|
||||
}
|
||||
|
||||
template <int ID, typename DefT, typename ContextT>
|
||||
inline std::string
|
||||
parser_name(subrule_parser<ID, DefT, ContextT> const &p)
|
||||
{
|
||||
return std::string("subrule_parser")
|
||||
+ std::string("(")
|
||||
+ impl::get_node_registry().find_node(&p)
|
||||
+ std::string(")");
|
||||
}
|
||||
|
||||
template <int ID, typename ContextT>
|
||||
inline std::string
|
||||
parser_name(subrule<ID, ContextT> 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 <typename DerivedT, typename ContextT>
|
||||
inline std::string
|
||||
parser_name(grammar<DerivedT, ContextT> 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<DerivedT, EmbedT, T0, T1, T2>
|
||||
const& p)
|
||||
{
|
||||
return impl::get_node_registry().trace_node(&p);
|
||||
}
|
||||
|
||||
template<typename T0, typename T1, typename T2>
|
||||
inline bool
|
||||
trace_parser(rule<T0, T1, T2> const& p)
|
||||
{
|
||||
return impl::get_node_registry().trace_node(&p);
|
||||
}
|
||||
|
||||
template <typename DerivedT, typename ContextT>
|
||||
inline bool
|
||||
trace_parser(grammar<DerivedT, ContextT> const& p)
|
||||
{
|
||||
return impl::get_node_registry().trace_node(&p);
|
||||
}
|
||||
|
||||
template <typename DerivedT, int N, typename ContextT>
|
||||
inline bool
|
||||
trace_parser(impl::entry_grammar<DerivedT, N, ContextT> const& p)
|
||||
{
|
||||
return impl::get_node_registry().trace_node(&p);
|
||||
}
|
||||
|
||||
template <int ID, typename ContextT>
|
||||
bool
|
||||
trace_parser(subrule<ID, ContextT> const& p)
|
||||
{
|
||||
return impl::get_node_registry().trace_node(&p);
|
||||
}
|
||||
|
||||
template <typename ParserT, typename ActorTupleT>
|
||||
bool
|
||||
trace_parser(init_closure_parser<ParserT, ActorTupleT> 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)
|
||||
81
test/external/boost/spirit/home/classic/debug/minimal.hpp
vendored
Normal file
81
test/external/boost/spirit/home/classic/debug/minimal.hpp
vendored
Normal file
@@ -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)
|
||||
254
test/external/boost/spirit/home/classic/debug/parser_names.hpp
vendored
Normal file
254
test/external/boost/spirit/home/classic/debug/parser_names.hpp
vendored
Normal file
@@ -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 <boost/spirit/home/classic/namespace.hpp>
|
||||
#include <boost/spirit/home/classic/core.hpp>
|
||||
|
||||
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 <typename ParserT, typename ActionT>
|
||||
std::string
|
||||
parser_name(action<ParserT, ActionT> const& p);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// from directives.hpp
|
||||
template <typename ParserT>
|
||||
std::string
|
||||
parser_name(contiguous<ParserT> const& p);
|
||||
|
||||
template <typename ParserT>
|
||||
std::string
|
||||
parser_name(inhibit_case<ParserT> const& p);
|
||||
|
||||
template <typename A, typename B>
|
||||
std::string
|
||||
parser_name(longest_alternative<A, B> const& p);
|
||||
|
||||
template <typename A, typename B>
|
||||
std::string
|
||||
parser_name(shortest_alternative<A, B> const& p);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// from grammar.hpp
|
||||
template <typename DerivedT, typename ContextT>
|
||||
std::string
|
||||
parser_name(grammar<DerivedT, ContextT> const& p);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// from numerics.hpp
|
||||
template <typename T, int Radix, unsigned MinDigits, int MaxDigits>
|
||||
std::string
|
||||
parser_name(uint_parser<T, Radix, MinDigits, MaxDigits> const& p);
|
||||
|
||||
template <typename T, int Radix, unsigned MinDigits, int MaxDigits>
|
||||
std::string
|
||||
parser_name(int_parser<T, Radix, MinDigits, MaxDigits> const& p);
|
||||
|
||||
template <typename T, typename RealPoliciesT>
|
||||
std::string
|
||||
parser_name(real_parser<T, RealPoliciesT> const& p);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// from operators.hpp
|
||||
template <typename A, typename B>
|
||||
std::string
|
||||
parser_name(sequence<A, B> const& p);
|
||||
|
||||
template <typename A, typename B>
|
||||
std::string
|
||||
parser_name(sequential_or<A, B> const& p);
|
||||
|
||||
template <typename A, typename B>
|
||||
std::string
|
||||
parser_name(alternative<A, B> const& p);
|
||||
|
||||
template <typename A, typename B>
|
||||
std::string
|
||||
parser_name(intersection<A, B> const& p);
|
||||
|
||||
template <typename A, typename B>
|
||||
std::string
|
||||
parser_name(difference<A, B> const& p);
|
||||
|
||||
template <typename A, typename B>
|
||||
std::string
|
||||
parser_name(exclusive_or<A, B> const& p);
|
||||
|
||||
template <typename S>
|
||||
std::string
|
||||
parser_name(optional<S> const& p);
|
||||
|
||||
template <typename S>
|
||||
std::string
|
||||
parser_name(kleene_star<S> const& p);
|
||||
|
||||
template <typename S>
|
||||
std::string
|
||||
parser_name(positive<S> const& p);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// from parser.hpp
|
||||
template <typename DerivedT>
|
||||
std::string
|
||||
parser_name(parser<DerivedT> const& p);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// from primitives.hpp
|
||||
template <typename DerivedT>
|
||||
std::string
|
||||
parser_name(char_parser<DerivedT> const &p);
|
||||
|
||||
template <typename CharT>
|
||||
std::string
|
||||
parser_name(chlit<CharT> const &p);
|
||||
|
||||
template <typename CharT>
|
||||
std::string
|
||||
parser_name(range<CharT> const &p);
|
||||
|
||||
template <typename IteratorT>
|
||||
std::string
|
||||
parser_name(chseq<IteratorT> const &p);
|
||||
|
||||
template <typename IteratorT>
|
||||
std::string
|
||||
parser_name(strlit<IteratorT> 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<typename T0, typename T1, typename T2>
|
||||
std::string
|
||||
parser_name(rule<T0, T1, T2> const& p);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// from subrule.hpp
|
||||
template <typename FirstT, typename RestT>
|
||||
std::string
|
||||
parser_name(subrule_list<FirstT, RestT> const &p);
|
||||
|
||||
template <int ID, typename DefT, typename ContextT>
|
||||
std::string
|
||||
parser_name(subrule_parser<ID, DefT, ContextT> const &p);
|
||||
|
||||
template <int ID, typename ContextT>
|
||||
std::string
|
||||
parser_name(subrule<ID, ContextT> 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<DerivedT, EmbedT, T0, T1, T2>
|
||||
const& p);
|
||||
|
||||
template <typename DerivedT, typename ContextT>
|
||||
bool
|
||||
trace_parser(grammar<DerivedT, ContextT> const& p);
|
||||
|
||||
template <int ID, typename ContextT>
|
||||
bool
|
||||
trace_parser(subrule<ID, ContextT> const& p);
|
||||
|
||||
template <typename ParserT, typename ActorTupleT>
|
||||
struct init_closure_parser;
|
||||
|
||||
template <typename ParserT, typename ActorTupleT>
|
||||
bool
|
||||
trace_parser(init_closure_parser<ParserT, ActorTupleT> const& p);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
|
||||
|
||||
}} // namespace BOOST_SPIRIT_CLASSIC_NS
|
||||
|
||||
//////////////////////////////////
|
||||
#include <boost/spirit/home/classic/debug/impl/parser_names.ipp>
|
||||
|
||||
#endif // defined(BOOST_SPIRIT_DEBUG)
|
||||
|
||||
#endif // !defined(BOOST_SPIRIT_PARSER_NAMES_HPP)
|
||||
37
test/external/boost/spirit/home/classic/debug/typeof.hpp
vendored
Normal file
37
test/external/boost/spirit/home/classic/debug/typeof.hpp
vendored
Normal file
@@ -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 <boost/typeof/typeof.hpp>
|
||||
|
||||
#include <boost/spirit/home/classic/namespace.hpp>
|
||||
#include <boost/spirit/home/classic/core/typeof.hpp>
|
||||
|
||||
namespace boost { namespace spirit {
|
||||
|
||||
BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
|
||||
|
||||
// debug_node.hpp
|
||||
template<typename ContextT> struct parser_context_linker;
|
||||
template<typename ScannerT> struct scanner_context_linker;
|
||||
template<typename ContextT> 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
|
||||
|
||||
Reference in New Issue
Block a user