diff options
author | Kevin Smith <git@kismith.co.uk> | 2013-01-12 18:41:34 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2013-01-13 10:36:26 (GMT) |
commit | f3bc816af1b0d61452de973963e453bf3b3f95a2 (patch) | |
tree | e895f8afa3580e6cff6f5ad2017d45bf147a17c2 /3rdParty/Boost/src/boost/spirit/home | |
parent | 188fc285c6555eadd3c9d50ab8a94adcade78d89 (diff) | |
download | swift-contrib-f3bc816af1b0d61452de973963e453bf3b3f95a2.zip swift-contrib-f3bc816af1b0d61452de973963e453bf3b3f95a2.tar.bz2 |
Adding in the spirit Boost stuff
Change-Id: I4f127ce61667243b64081b0aa309028d5077045f
Diffstat (limited to '3rdParty/Boost/src/boost/spirit/home')
189 files changed, 36937 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/boost/spirit/home/lex.hpp b/3rdParty/Boost/src/boost/spirit/home/lex.hpp new file mode 100644 index 0000000..5d95f5b --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex.hpp @@ -0,0 +1,18 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEXER_MARCH_22_2007_0929PM) +#define BOOST_SPIRIT_LEXER_MARCH_22_2007_0929PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/lex/lexer.hpp> +#include <boost/spirit/home/lex/qi.hpp> +#include <boost/spirit/home/lex/tokenize_and_parse.hpp> +#include <boost/spirit/home/lex/tokenize_and_parse_attr.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/argument.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/argument.hpp new file mode 100644 index 0000000..edfee0b --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/argument.hpp @@ -0,0 +1,362 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2010 Bryce Lelbach +// Copyright (c) 2011 Thomas Heller +// +// 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_LEX_ARGUMENT_JUNE_07_2009_1106AM) +#define BOOST_SPIRIT_LEX_ARGUMENT_JUNE_07_2009_1106AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/include/phoenix_core.hpp> +#include <boost/spirit/include/phoenix_operator.hpp> +#include <boost/spirit/home/support/string_traits.hpp> +#include <boost/spirit/home/lex/argument_phoenix.hpp> +#include <boost/fusion/include/at.hpp> +#include <boost/mpl/at.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/remove_const.hpp> +#include <boost/type_traits/remove_reference.hpp> + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { namespace lex +{ + /////////////////////////////////////////////////////////////////////////// + // The state_getter is a Phoenix actor used to access the name of the + // current lexer state by calling get_state_name() on the context (which + // is the 5th parameter to any lexer semantic actions). + // + // This Phoenix actor is invoked whenever the placeholder '_state' is used + // as a rvalue inside a lexer semantic action: + // + // lex::token_def<> identifier = "[a-zA-Z_][a-zA-Z0-9_]*"; + // this->self = identifier [ std::cout << _state ]; + // + // The example shows how to print the lexer state after matching a token + // 'identifier'. + struct state_getter + { + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result + { + typedef + typename remove_reference< + typename remove_const< + typename mpl::at_c<typename Env::args_type, 4>::type + >::type + >::type + context_type; + + typedef typename context_type::state_name_type type; + }; + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + return fusion::at_c<4>(env.args()).get_state_name(); + } + }; + + /////////////////////////////////////////////////////////////////////////// + // The state_setter is a Phoenix actor used to change the name of the + // current lexer state by calling set_state_name() on the context (which + // is the 5th parameter to any lexer semantic actions). + // + // This Phoenix actor is invoked whenever the placeholder '_state' is used + // as a lvalue inside a lexer semantic action: + // + // lex::token_def<> identifier = "[a-zA-Z_][a-zA-Z0-9_]*"; + // this->self = identifier [ _state = "SOME_LEXER_STATE" ]; + // + // The example shows how to change the lexer state after matching a token + // 'identifier'. + template <typename Actor> + struct state_setter + { + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result + { + typedef void type; + }; + + template <typename Env> + void eval(Env const& env) const + { + typedef + typename remove_reference< + typename remove_const< + typename mpl::at_c<typename Env::args_type, 4>::type + >::type + >::type + context_type; + + typedef typename context_type::state_name_type string; + + fusion::at_c<4>(env.args()).set_state_name( + traits::get_c_string(actor_.eval(env))); + } + + state_setter(Actor const& actor) + : actor_(actor) {} + + // see explanation for this constructor at the end of this file +#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 + state_setter(phoenix::actor<state_getter>, Actor const& actor) + : actor_(actor) {} +#endif + + Actor actor_; + }; + + /////////////////////////////////////////////////////////////////////////// + // The value_getter is used to create the _val placeholder, which is a + // Phoenix actor used to access the value of the current token. + // + // This Phoenix actor is invoked whenever the placeholder '_val' is used + // as a rvalue inside a lexer semantic action: + // + // lex::token_def<> identifier = "[a-zA-Z_][a-zA-Z0-9_]*"; + // this->self = identifier [ std::cout << _val ]; + // + // The example shows how to use _val to print the identifier name (which + // is the initial token value). + struct value_getter + { + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result + { + typedef + typename remove_reference< + typename remove_const< + typename mpl::at_c<typename Env::args_type, 4>::type + >::type + >::type + context_type; + + typedef typename context_type::get_value_type type; + }; + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + return fusion::at_c<4>(env.args()).get_value(); + } + }; + + /////////////////////////////////////////////////////////////////////////// + // The value_setter is a Phoenix actor used to change the name of the + // current lexer state by calling set_state_name() on the context (which + // is the 5th parameter to any lexer semantic actions). + // + // This Phoenix actor is invoked whenever the placeholder '_val' is used + // as a lvalue inside a lexer semantic action: + // + // lex::token_def<> identifier = "[a-zA-Z_][a-zA-Z0-9_]*"; + // this->self = identifier [ _val = "identifier" ]; + // + // The example shows how to change the token value after matching a token + // 'identifier'. + template <typename Actor> + struct value_setter + { + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result + { + typedef void type; + }; + + template <typename Env> + void eval(Env const& env) const + { + fusion::at_c<4>(env.args()).set_value(actor_.eval(env)); + } + + value_setter(Actor const& actor) + : actor_(actor) {} + +#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 + // see explanation for this constructor at the end of this file + value_setter(phoenix::actor<value_getter>, Actor const& actor) + : actor_(actor) {} +#endif + + Actor actor_; + }; + + /////////////////////////////////////////////////////////////////////////// + // The eoi_getter is used to create the _eoi placeholder, which is a + // Phoenix actor used to access the end of input iterator pointing to the + // end of the underlying input sequence. + // + // This actor is invoked whenever the placeholder '_eoi' is used in a + // lexer semantic action: + // + // lex::token_def<> identifier = "[a-zA-Z_][a-zA-Z0-9_]*"; + // this->self = identifier + // [ std::cout << construct_<std::string>(_end, _eoi) ]; + // + // The example shows how to use _eoi to print all remaining input after + // matching a token 'identifier'. + struct eoi_getter + { + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result + { + typedef + typename remove_reference< + typename remove_const< + typename mpl::at_c<typename Env::args_type, 4>::type + >::type + >::type + context_type; + + typedef typename context_type::base_iterator_type const& type; + }; + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + return fusion::at_c<4>(env.args()).get_eoi(); + } + }; + + /////////////////////////////////////////////////////////////////////////// + // '_start' and '_end' may be used to access the start and the end of + // the matched sequence of the current token + typedef phoenix::arg_names::_1_type _start_type; + typedef phoenix::arg_names::_2_type _end_type; +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + _start_type const _start = _start_type(); + _end_type const _end = _end_type(); +#endif + + // We are reusing the placeholder '_pass' to access and change the pass + // status of the current match (see support/argument.hpp for its + // definition). + // typedef phoenix::arg_names::_3_type _pass_type; + using boost::spirit::_pass_type; +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + using boost::spirit::_pass; +#endif + + // '_tokenid' may be used to access and change the tokenid of the current + // token + typedef phoenix::arg_names::_4_type _tokenid_type; +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + _tokenid_type const _tokenid = _tokenid_type(); +#endif + + typedef phoenix::actor<value_context> _val_type; + typedef phoenix::actor<state_context> _state_type; + typedef phoenix::actor<eoi_getter> _eoi_type; +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + // '_val' may be used to access and change the token value of the current + // token + _val_type const _val = _val_type(); + // _state may be used to access and change the name of the current lexer + // state + _state_type const _state = _state_type(); + // '_eoi' may be used to access the end of input iterator of the input + // stream used by the lexer to match tokens from + _eoi_type const _eoi = _eoi_type(); +#endif +}}} + +/////////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 +namespace boost { namespace phoenix +{ + /////////////////////////////////////////////////////////////////////////// + // The specialization of as_actor_base<> below is needed to convert all + // occurrences of _state in places where it's used as a rvalue into the + // proper Phoenix actor (spirit::state_getter) accessing the lexer state. + template<> + struct as_actor_base<actor<spirit::lex::state_context> > + { + typedef spirit::lex::state_getter type; + + static spirit::lex::state_getter + convert(actor<spirit::lex::state_context>) + { + return spirit::lex::state_getter(); + } + }; + + /////////////////////////////////////////////////////////////////////////// + // The specialization of as_composite<> below is needed to convert all + // assignments to _state (places where it's used as a lvalue) into the + // proper Phoenix actor (spirit::state_setter) allowing to change the + // lexer state. + template <typename RHS> + struct as_composite<assign_eval, actor<spirit::lex::state_context>, RHS> + { + // For an assignment to _state (a spirit::state_context actor), this + // specialization makes Phoenix's compose() function construct a + // spirit::state_setter actor from 1. the LHS, a spirit::state_getter + // actor (due to the specialization of as_actor_base<> above), + // and 2. the RHS actor. + // This is why spirit::state_setter needs a constructor which takes + // a dummy spirit::state_getter as its first argument in addition + // to its real, second argument (the RHS actor). + typedef spirit::lex::state_setter<typename as_actor<RHS>::type> type; + }; + + /////////////////////////////////////////////////////////////////////////// + // The specialization of as_actor_base<> below is needed to convert all + // occurrences of _val in places where it's used as a rvalue into the + // proper Phoenix actor (spirit::value_getter) accessing the token value. + template<> + struct as_actor_base<actor<spirit::lex::value_context> > + { + typedef spirit::lex::value_getter type; + + static spirit::lex::value_getter + convert(actor<spirit::lex::value_context>) + { + return spirit::lex::value_getter(); + } + }; + + /////////////////////////////////////////////////////////////////////////// + // The specialization of as_composite<> below is needed to convert all + // assignments to _val (places where it's used as a lvalue) into the + // proper Phoenix actor (spirit::value_setter) allowing to change the + // token value. + template <typename RHS> + struct as_composite<assign_eval, actor<spirit::lex::value_context>, RHS> + { + // For an assignment to _val (a spirit::value_context actor), this + // specialization makes Phoenix's compose() function construct a + // spirit::value_setter actor from 1. the LHS, a spirit::value_getter + // actor (due to the specialization of as_actor_base<> above), + // and 2. the RHS actor. + // This is why spirit::value_setter needs a constructor which takes + // a dummy spirit::value_getter as its first argument in addition + // to its real, second argument (the RHS actor). + typedef spirit::lex::value_setter<typename as_actor<RHS>::type> type; + }; +}} +#endif + +#undef SPIRIT_DECLARE_ARG +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/argument_phoenix.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/argument_phoenix.hpp new file mode 100644 index 0000000..da24503 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/argument_phoenix.hpp @@ -0,0 +1,251 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2011 Thomas Heller +// +// 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_LEX_ARGUMENT_PHEONIX_MARCH_25_2011_1841PM) +#define BOOST_SPIRIT_LEX_ARGUMENT_PHEONIX_MARCH_25_2011_1841PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/include/phoenix_core.hpp> + +namespace boost { namespace spirit { namespace lex +{ + /////////////////////////////////////////////////////////////////////////// + // The value_context is used as a noop Phoenix actor to create the + // placeholder '_val' (see below). It is a noop actor because it is used + // as a placeholder only, while it is being converted either to a + // value_getter (if used as a rvalue) or to a value_setter (if used as a + // lvalue). The conversion is achieved by specializing and overloading a + // couple of the Phoenix templates from the Phoenix expression composition + // engine (see the end of this file). + struct value_context + { + typedef mpl::true_ no_nullary; + + typedef unused_type result_type; + + template <typename Env> + struct result + { + typedef unused_type type; + }; + + template <typename Env> + unused_type + eval(Env const& env) const + { + return unused; + } + }; + + // forward declarations + struct value_getter; + template <typename> struct value_setter; + + /////////////////////////////////////////////////////////////////////////// + // The state_context is used as a noop Phoenix actor to create the + // placeholder '_state' (see below). It is a noop actor because it is used + // as a placeholder only, while it is being converted either to a + // state_getter (if used as a rvalue) or to a state_setter (if used as a + // lvalue). The conversion is achieved by specializing and overloading a + // couple of the Phoenix templates from the Phoenix expression composition + // engine (see the end of this file). + struct state_context + { + typedef mpl::true_ no_nullary; + + typedef unused_type result_type; + + template <typename Env> + struct result + { + typedef unused_type type; + }; + + template <typename Env> + unused_type + eval(Env const& env) const + { + return unused; + } + }; + + // forward declarations + struct state_getter; + template <typename> struct state_setter; + struct eoi_getter; +}}} + +/////////////////////////////////////////////////////////////////////////////// +#ifdef BOOST_SPIRIT_USE_PHOENIX_V3 + +BOOST_PHOENIX_DEFINE_EXPRESSION( + (boost)(spirit)(lex)(value_setter) + , (boost::phoenix::meta_grammar) +) + +BOOST_PHOENIX_DEFINE_EXPRESSION( + (boost)(spirit)(lex)(state_setter) + , (boost::phoenix::meta_grammar) +) + +namespace boost { namespace phoenix +{ + namespace result_of + { + template <> + struct is_nullary<custom_terminal<boost::spirit::lex::value_context> > + : mpl::false_ + {}; + } + + template <typename Dummy> + struct is_custom_terminal<boost::spirit::lex::value_context, Dummy>: mpl::true_ {}; + + template <typename Dummy> + struct custom_terminal<boost::spirit::lex::value_context, Dummy> + : proto::call< + v2_eval( + proto::make<boost::spirit::lex::value_getter()> + , proto::call<functional::env(proto::_state)> + ) + > + {}; + + template <typename Dummy> + struct is_nullary::when<spirit::lex::rule::value_setter, Dummy> + : proto::make<mpl::false_()> + {}; + + template <typename Dummy> + struct default_actions::when<spirit::lex::rule::value_setter, Dummy> + : proto::call< + v2_eval( + proto::make< + spirit::lex::value_setter<proto::_child0>( + proto::_child0 + ) + > + , _env + ) + > + {}; + + template <> + struct actor<spirit::lex::value_context> + : boost::phoenix::actor<proto::terminal<spirit::lex::value_context>::type> + { + typedef boost::phoenix::actor< + proto::terminal<spirit::lex::value_context>::type + > base_type; + + actor(base_type const & base = base_type()) + : base_type(base) + {} + + template <typename Expr> + typename spirit::lex::expression::value_setter< + typename phoenix::as_actor<Expr>::type>::type const + operator=(Expr const & expr) const + { + return + spirit::lex::expression::value_setter< + typename phoenix::as_actor<Expr>::type + >::make(phoenix::as_actor<Expr>::convert(expr)); + } + }; + + namespace result_of + { + template <> + struct is_nullary<custom_terminal<boost::spirit::lex::state_context> > + : mpl::false_ + {}; + } + + template <typename Dummy> + struct is_custom_terminal<boost::spirit::lex::state_context, Dummy>: mpl::true_ {}; + + template <typename Dummy> + struct custom_terminal<boost::spirit::lex::state_context, Dummy> + : proto::call< + v2_eval( + proto::make<boost::spirit::lex::state_getter()> + , proto::call<functional::env(proto::_state)> + ) + > + {}; + + template <typename Dummy> + struct is_nullary::when<spirit::lex::rule::state_setter, Dummy> + : proto::make<mpl::false_()> + {}; + + template <typename Dummy> + struct default_actions::when<spirit::lex::rule::state_setter, Dummy> + : proto::call< + v2_eval( + proto::make< + spirit::lex::state_setter<proto::_child0>( + proto::_child0 + ) + > + , _env + ) + > + {}; + + template <> + struct actor<spirit::lex::state_context> + : boost::phoenix::actor<proto::terminal<spirit::lex::state_context>::type> + { + typedef boost::phoenix::actor< + proto::terminal<spirit::lex::state_context>::type + > base_type; + + actor(base_type const & base = base_type()) + : base_type(base) + {} + + template <typename Expr> + typename spirit::lex::expression::state_setter< + typename phoenix::as_actor<Expr>::type>::type const + operator=(Expr const & expr) const + { + return + spirit::lex::expression::state_setter< + typename phoenix::as_actor<Expr>::type + >::make(phoenix::as_actor<Expr>::convert(expr)); + } + }; + + namespace result_of + { + template <> + struct is_nullary<custom_terminal<boost::spirit::lex::eoi_getter> > + : mpl::false_ + {}; + } + + template <typename Dummy> + struct is_custom_terminal<boost::spirit::lex::eoi_getter, Dummy>: mpl::true_ {}; + + template <typename Dummy> + struct custom_terminal<boost::spirit::lex::eoi_getter, Dummy> + : proto::call< + v2_eval( + proto::make<boost::spirit::lex::eoi_getter()> + , proto::call<functional::env(proto::_state)> + ) + > + {}; +}} + +#endif // BOOST_SPIRIT_USE_PHOENIX_V3 + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/detail/sequence_function.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/detail/sequence_function.hpp new file mode 100644 index 0000000..0f52da8 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/detail/sequence_function.hpp @@ -0,0 +1,63 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_SEQUENCE_FUNCTION_FEB_28_2007_0249PM) +#define BOOST_SPIRIT_LEX_SEQUENCE_FUNCTION_FEB_28_2007_0249PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/lex/domain.hpp> +#include <boost/spirit/home/support/unused.hpp> + +namespace boost { namespace spirit { namespace lex { namespace detail +{ + template <typename LexerDef, typename String> + struct sequence_collect_function + { + sequence_collect_function(LexerDef& def_, String const& state_ + , String const& targetstate_) + : def(def_), state(state_), targetstate(targetstate_) {} + + template <typename Component> + bool operator()(Component const& component) const + { + component.collect(def, state, targetstate); + return false; // execute for all sequence elements + } + + LexerDef& def; + String const& state; + String const& targetstate; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + sequence_collect_function& operator= (sequence_collect_function const&); + }; + + template <typename LexerDef> + struct sequence_add_actions_function + { + sequence_add_actions_function(LexerDef& def_) + : def(def_) {} + + template <typename Component> + bool operator()(Component const& component) const + { + component.add_actions(def); + return false; // execute for all sequence elements + } + + LexerDef& def; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + sequence_add_actions_function& operator= (sequence_add_actions_function const&); + }; + +}}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/domain.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/domain.hpp new file mode 100644 index 0000000..e5aec86 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/domain.hpp @@ -0,0 +1,31 @@ +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_DOMAIN_MAR_13_2007_0140PM) +#define BOOST_SPIRIT_LEX_DOMAIN_MAR_13_2007_0140PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/unused.hpp> +#include <boost/spirit/home/support/meta_compiler.hpp> +#include <boost/spirit/home/support/info.hpp> + +namespace boost { namespace spirit { namespace lex +{ + // lex's domain + struct domain {}; + + // bring in some of spirit parts into spirit::lex + using spirit::unused; + using spirit::unused_type; + using spirit::compile; + using spirit::info; + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer.hpp new file mode 100644 index 0000000..535ec28 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer.hpp @@ -0,0 +1,21 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEXER_MAR_22_2007_1008PM) +#define BOOST_SPIRIT_LEXER_MAR_22_2007_1008PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/lex/lexer/terminals.hpp> +#include <boost/spirit/home/lex/lexer/token_def.hpp> +#include <boost/spirit/home/lex/lexer/char_token_def.hpp> +#include <boost/spirit/home/lex/lexer/string_token_def.hpp> +#include <boost/spirit/home/lex/lexer/sequence.hpp> +#include <boost/spirit/home/lex/lexer/action.hpp> +#include <boost/spirit/home/lex/lexer/lexer.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/action.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/action.hpp new file mode 100644 index 0000000..8de0c87 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/action.hpp @@ -0,0 +1,97 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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(SPIRIT_LEX_ACTION_NOV_18_2007_0743PM) +#define SPIRIT_LEX_ACTION_NOV_18_2007_0743PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/lex/meta_compiler.hpp> +#include <boost/spirit/home/lex/lexer_type.hpp> +#include <boost/spirit/home/lex/argument.hpp> +#include <boost/spirit/home/lex/lexer/support_functions.hpp> +#include <boost/mpl/if.hpp> +#include <boost/type_traits/remove_const.hpp> +#include <boost/type_traits/is_same.hpp> + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { namespace lex +{ + /////////////////////////////////////////////////////////////////////////// + template <typename Subject, typename Action> + struct action : unary_lexer<action<Subject, Action> > + { + action(Subject const& subject, Action f) + : subject(subject), f(f) {} + + template <typename LexerDef, typename String> + void collect(LexerDef& lexdef, String const& state + , String const& targetstate) const + { + // collect the token definition information for the token_def + // this action is attached to + subject.collect(lexdef, state, targetstate); + } + + template <typename LexerDef> + void add_actions(LexerDef& lexdef) const + { + // call to add all actions attached further down the hierarchy + subject.add_actions(lexdef); + + // retrieve the id of the associated token_def and register the + // given semantic action with the lexer instance + lexdef.add_action(subject.unique_id(), subject.state(), f); + } + + Subject subject; + Action f; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + action& operator= (action const&); + }; + +}}} + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit +{ + /////////////////////////////////////////////////////////////////////////// + // Karma action meta-compiler + template <> + struct make_component<lex::domain, tag::action> + { + template <typename Sig> + struct result; + + template <typename This, typename Elements, typename Modifiers> + struct result<This(Elements, Modifiers)> + { + typedef typename + remove_const<typename Elements::car_type>::type + subject_type; + + typedef typename + remove_const<typename Elements::cdr_type::car_type>::type + action_type; + + typedef lex::action<subject_type, action_type> type; + }; + + template <typename Elements> + typename result<make_component(Elements, unused_type)>::type + operator()(Elements const& elements, unused_type) const + { + typename result<make_component(Elements, unused_type)>::type + result(elements.car, elements.cdr.car); + return result; + } + }; +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/char_token_def.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/char_token_def.hpp new file mode 100644 index 0000000..aaba2e1 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/char_token_def.hpp @@ -0,0 +1,242 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_CHAR_TOKEN_DEF_MAR_28_2007_0626PM) +#define BOOST_SPIRIT_LEX_CHAR_TOKEN_DEF_MAR_28_2007_0626PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/common_terminals.hpp> +#include <boost/spirit/home/support/string_traits.hpp> +#include <boost/spirit/home/lex/domain.hpp> +#include <boost/spirit/home/lex/lexer_type.hpp> +#include <boost/spirit/home/lex/meta_compiler.hpp> + +namespace boost { namespace spirit +{ + /////////////////////////////////////////////////////////////////////////// + // Enablers + /////////////////////////////////////////////////////////////////////////// + + // enables 'x' + template <> + struct use_terminal<lex::domain, char> + : mpl::true_ {}; + + // enables "x" + template <> + struct use_terminal<lex::domain, char[2]> + : mpl::true_ {}; + + // enables wchar_t + template <> + struct use_terminal<lex::domain, wchar_t> + : mpl::true_ {}; + + // enables L"x" + template <> + struct use_terminal<lex::domain, wchar_t[2]> + : mpl::true_ {}; + + // enables char_('x'), char_("x") + template <typename CharEncoding, typename A0> + struct use_terminal<lex::domain + , terminal_ex< + tag::char_code<tag::char_, CharEncoding> + , fusion::vector1<A0> > > + : mpl::true_ {}; + + // enables char_('x', ID), char_("x", ID) + template <typename CharEncoding, typename A0, typename A1> + struct use_terminal<lex::domain + , terminal_ex< + tag::char_code<tag::char_, CharEncoding> + , fusion::vector2<A0, A1> > > + : mpl::true_ {}; +}} + +namespace boost { namespace spirit { namespace lex +{ + // use char_ from standard character set by default +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + using spirit::standard::char_; +#endif + using spirit::standard::char_type; + + /////////////////////////////////////////////////////////////////////////// + // + // char_token_def + // represents a single character token definition + // + /////////////////////////////////////////////////////////////////////////// + template <typename CharEncoding = char_encoding::standard + , typename IdType = std::size_t> + struct char_token_def + : primitive_lexer<char_token_def<CharEncoding, IdType> > + { + typedef typename CharEncoding::char_type char_type; + + char_token_def(char_type ch, IdType const& id) + : ch(ch), id_(id), unique_id_(std::size_t(~0)) + , token_state_(std::size_t(~0)) + {} + + template <typename LexerDef, typename String> + void collect(LexerDef& lexdef, String const& state + , String const& targetstate) const + { + std::size_t state_id = lexdef.add_state(state.c_str()); + + // If the following assertion fires you are probably trying to use + // a single char_token_def instance in more than one lexer state. + // This is not possible. Please create a separate token_def instance + // from the same regular expression for each lexer state it needs + // to be associated with. + BOOST_ASSERT( + (std::size_t(~0) == token_state_ || state_id == token_state_) && + "Can't use single char_token_def with more than one lexer state"); + + char_type const* target = targetstate.empty() ? 0 : targetstate.c_str(); + if (target) + lexdef.add_state(target); + + token_state_ = state_id; + unique_id_ = lexdef.add_token (state.c_str(), ch, id_, target); + } + + template <typename LexerDef> + void add_actions(LexerDef&) const {} + + IdType id() const { return id_; } + std::size_t unique_id() const { return unique_id_; } + std::size_t state() const { return token_state_; } + + char_type ch; + mutable IdType id_; + mutable std::size_t unique_id_; + mutable std::size_t token_state_; + }; + + /////////////////////////////////////////////////////////////////////////// + // Lexer generators: make_xxx function (objects) + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + template <typename CharEncoding> + struct basic_literal + { + typedef char_token_def<CharEncoding> result_type; + + template <typename Char> + result_type operator()(Char ch, unused_type) const + { + return result_type(ch, ch); + } + + template <typename Char> + result_type operator()(Char const* str, unused_type) const + { + return result_type(str[0], str[0]); + } + }; + } + + // literals: 'x', "x" + template <typename Modifiers> + struct make_primitive<char, Modifiers> + : detail::basic_literal<char_encoding::standard> {}; + + template <typename Modifiers> + struct make_primitive<char const(&)[2], Modifiers> + : detail::basic_literal<char_encoding::standard> {}; + + // literals: L'x', L"x" + template <typename Modifiers> + struct make_primitive<wchar_t, Modifiers> + : detail::basic_literal<char_encoding::standard_wide> {}; + + template <typename Modifiers> + struct make_primitive<wchar_t const(&)[2], Modifiers> + : detail::basic_literal<char_encoding::standard_wide> {}; + + // handle char_('x') + template <typename CharEncoding, typename Modifiers, typename A0> + struct make_primitive< + terminal_ex< + tag::char_code<tag::char_, CharEncoding> + , fusion::vector1<A0> + > + , Modifiers> + { + typedef char_token_def<CharEncoding> result_type; + + template <typename Terminal> + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args), fusion::at_c<0>(term.args)); + } + }; + + // handle char_("x") + template <typename CharEncoding, typename Modifiers, typename Char> + struct make_primitive< + terminal_ex< + tag::char_code<tag::char_, CharEncoding> + , fusion::vector1<Char(&)[2]> // single char strings + > + , Modifiers> + { + typedef char_token_def<CharEncoding> result_type; + + template <typename Terminal> + result_type operator()(Terminal const& term, unused_type) const + { + Char ch = fusion::at_c<0>(term.args)[0]; + return result_type(ch, ch); + } + }; + + // handle char_('x', ID) + template <typename CharEncoding, typename Modifiers, typename A0, typename A1> + struct make_primitive< + terminal_ex< + tag::char_code<tag::char_, CharEncoding> + , fusion::vector2<A0, A1> + > + , Modifiers> + { + typedef char_token_def<CharEncoding> result_type; + + template <typename Terminal> + result_type operator()(Terminal const& term, unused_type) const + { + return result_type( + fusion::at_c<0>(term.args), fusion::at_c<1>(term.args)); + } + }; + + // handle char_("x", ID) + template <typename CharEncoding, typename Modifiers, typename Char, typename A1> + struct make_primitive< + terminal_ex< + tag::char_code<tag::char_, CharEncoding> + , fusion::vector2<Char(&)[2], A1> // single char strings + > + , Modifiers> + { + typedef char_token_def<CharEncoding> result_type; + + template <typename Terminal> + result_type operator()(Terminal const& term, unused_type) const + { + return result_type( + fusion::at_c<0>(term.args)[0], fusion::at_c<1>(term.args)); + } + }; +}}} // namespace boost::spirit::lex + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexer.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexer.hpp new file mode 100644 index 0000000..93412ce --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexer.hpp @@ -0,0 +1,405 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_LEXER_MAR_13_2007_0145PM) +#define BOOST_SPIRIT_LEX_LEXER_MAR_13_2007_0145PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/info.hpp> +#include <boost/spirit/home/qi/skip_over.hpp> +#include <boost/spirit/home/qi/parser.hpp> +#include <boost/spirit/home/qi/detail/assign_to.hpp> +#include <boost/spirit/home/lex/reference.hpp> +#include <boost/spirit/home/lex/meta_compiler.hpp> +#include <boost/spirit/home/lex/lexer_type.hpp> +#include <boost/spirit/home/lex/lexer/token_def.hpp> +#include <boost/assert.hpp> +#include <boost/noncopyable.hpp> +#include <boost/detail/iterator.hpp> +#include <boost/fusion/include/vector.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/range/iterator_range.hpp> +#include <string> + +namespace boost { namespace spirit { namespace lex +{ + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + /////////////////////////////////////////////////////////////////////// + template <typename LexerDef> + struct lexer_def_ + : proto::extends< + typename proto::terminal< + lex::reference<lexer_def_<LexerDef> const> + >::type + , lexer_def_<LexerDef> > + , qi::parser<lexer_def_<LexerDef> > + , lex::lexer_type<lexer_def_<LexerDef> > + { + private: + // avoid warnings about using 'this' in constructor + lexer_def_& this_() { return *this; } + + typedef typename LexerDef::char_type char_type; + typedef typename LexerDef::string_type string_type; + typedef typename LexerDef::id_type id_type; + + typedef lex::reference<lexer_def_ const> reference_; + typedef typename proto::terminal<reference_>::type terminal_type; + typedef proto::extends<terminal_type, lexer_def_> proto_base_type; + + reference_ alias() const + { + return reference_(*this); + } + + public: + // Qi interface: metafunction calculating parser attribute type + template <typename Context, typename Iterator> + struct attribute + { + // the return value of a token set contains the matched token + // id, and the corresponding pair of iterators + typedef typename Iterator::base_iterator_type iterator_type; + typedef + fusion::vector2<id_type, iterator_range<iterator_type> > + type; + }; + + // Qi interface: parse functionality + template <typename Iterator, typename Context + , typename Skipper, typename Attribute> + bool parse(Iterator& first, Iterator const& last + , Context& /*context*/, Skipper const& skipper + , Attribute& attr) const + { + qi::skip_over(first, last, skipper); // always do a pre-skip + + if (first != last) { + typedef typename + boost::detail::iterator_traits<Iterator>::value_type + token_type; + + token_type const& t = *first; + if (token_is_valid(t) && t.state() == first.get_state()) { + // any of the token definitions matched + spirit::traits::assign_to(t, attr); + ++first; + return true; + } + } + return false; + } + + // Qi interface: 'what' functionality + template <typename Context> + info what(Context& /*context*/) const + { + return info("lexer"); + } + + private: + // allow to use the lexer.self.add("regex1", id1)("regex2", id2); + // syntax + struct adder + { + adder(lexer_def_& def_) + : def(def_) {} + + // Add a token definition based on a single character as given + // by the first parameter, the second parameter allows to + // specify the token id to use for the new token. If no token + // id is given the character code is used. + adder const& operator()(char_type c + , id_type token_id = id_type()) const + { + if (id_type() == token_id) + token_id = static_cast<id_type>(c); + def.def.add_token (def.state.c_str(), c, token_id + , def.targetstate.empty() ? 0 : def.targetstate.c_str()); + return *this; + } + + // Add a token definition based on a character sequence as + // given by the first parameter, the second parameter allows to + // specify the token id to use for the new token. If no token + // id is given this function will generate a unique id to be + // used as the token's id. + adder const& operator()(string_type const& s + , id_type token_id = id_type()) const + { + if (id_type() == token_id) + token_id = def.def.get_next_id(); + def.def.add_token (def.state.c_str(), s, token_id + , def.targetstate.empty() ? 0 : def.targetstate.c_str()); + return *this; + } + + template <typename Attribute> + adder const& operator()( + token_def<Attribute, char_type, id_type>& tokdef + , id_type token_id = id_type()) const + { + // make sure we have a token id + if (id_type() == token_id) { + if (id_type() == tokdef.id()) { + token_id = def.def.get_next_id(); + tokdef.id(token_id); + } + else { + token_id = tokdef.id(); + } + } + else { + // the following assertion makes sure that the token_def + // instance has not been assigned a different id earlier + BOOST_ASSERT(id_type() == tokdef.id() + || token_id == tokdef.id()); + tokdef.id(token_id); + } + + def.define(tokdef); + return *this; + } + +// template <typename F> +// adder const& operator()(char_type c, id_type token_id, F act) const +// { +// if (id_type() == token_id) +// token_id = def.def.get_next_id(); +// std::size_t unique_id = +// def.def.add_token (def.state.c_str(), s, token_id); +// def.def.add_action(unique_id, def.state.c_str(), act); +// return *this; +// } + + lexer_def_& def; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + adder& operator= (adder const&); + }; + friend struct adder; + + // allow to use lexer.self.add_pattern("pattern1", "regex1")(...); + // syntax + struct pattern_adder + { + pattern_adder(lexer_def_& def_) + : def(def_) {} + + pattern_adder const& operator()(string_type const& p + , string_type const& s) const + { + def.def.add_pattern (def.state.c_str(), p, s); + return *this; + } + + lexer_def_& def; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + pattern_adder& operator= (pattern_adder const&); + }; + friend struct pattern_adder; + + private: + // Helper function to invoke the necessary 2 step compilation + // process on token definition expressions + template <typename TokenExpr> + void compile2pass(TokenExpr const& expr) + { + expr.collect(def, state, targetstate); + expr.add_actions(def); + } + + public: + /////////////////////////////////////////////////////////////////// + template <typename Expr> + void define(Expr const& expr) + { + compile2pass(compile<lex::domain>(expr)); + } + + lexer_def_(LexerDef& def_, string_type const& state_ + , string_type const& targetstate_ = string_type()) + : proto_base_type(terminal_type::make(alias())) + , add(this_()), add_pattern(this_()), def(def_) + , state(state_), targetstate(targetstate_) + {} + + // allow to switch states + lexer_def_ operator()(char_type const* state) const + { + return lexer_def_(def, state); + } + lexer_def_ operator()(char_type const* state + , char_type const* targetstate) const + { + return lexer_def_(def, state, targetstate); + } + lexer_def_ operator()(string_type const& state + , string_type const& targetstate = string_type()) const + { + return lexer_def_(def, state, targetstate); + } + + // allow to assign a token definition expression + template <typename Expr> + lexer_def_& operator= (Expr const& xpr) + { + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then the expression (expr) is not a valid spirit lex + // expression. + BOOST_SPIRIT_ASSERT_MATCH(lex::domain, Expr); + + def.clear(state.c_str()); + define(xpr); + return *this; + } + + // explicitly tell the lexer that the given state will be defined + // (useful in conjunction with "*") + std::size_t add_state(char_type const* state = 0) + { + return def.add_state(state ? state : def.initial_state().c_str()); + } + + adder add; + pattern_adder add_pattern; + + private: + LexerDef& def; + string_type state; + string_type targetstate; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + lexer_def_& operator= (lexer_def_ const&); + }; + +#if defined(BOOST_NO_RVALUE_REFERENCES) + // allow to assign a token definition expression + template <typename LexerDef, typename Expr> + inline lexer_def_<LexerDef>& + operator+= (lexer_def_<LexerDef>& lexdef, Expr& xpr) + { + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then the expression (expr) is not a valid spirit lex + // expression. + BOOST_SPIRIT_ASSERT_MATCH(lex::domain, Expr); + + lexdef.define(xpr); + return lexdef; + } +#else + // allow to assign a token definition expression + template <typename LexerDef, typename Expr> + inline lexer_def_<LexerDef>& + operator+= (lexer_def_<LexerDef>& lexdef, Expr&& xpr) + { + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then the expression (expr) is not a valid spirit lex + // expression. + BOOST_SPIRIT_ASSERT_MATCH(lex::domain, Expr); + + lexdef.define(xpr); + return lexdef; + } +#endif + + template <typename LexerDef, typename Expr> + inline lexer_def_<LexerDef>& + operator+= (lexer_def_<LexerDef>& lexdef, Expr const& xpr) + { + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then the expression (expr) is not a valid spirit lex + // expression. + BOOST_SPIRIT_ASSERT_MATCH(lex::domain, Expr); + + lexdef.define(xpr); + return lexdef; + } + } + + /////////////////////////////////////////////////////////////////////////// + // The match_flags flags are used to influence different matching + // modes of the lexer + struct match_flags + { + enum enum_type + { + match_default = 0, // no flags + match_not_dot_newline = 1, // the regex '.' doesn't match newlines + match_icase = 2 // all matching operations are case insensitive + }; + }; + + /////////////////////////////////////////////////////////////////////////// + // This represents a lexer object + /////////////////////////////////////////////////////////////////////////// + + /////////////////////////////////////////////////////////////////////////// + // This is the first token id automatically assigned by the library + // if needed + enum tokenids + { + min_token_id = 0x10000 + }; + + template <typename Lexer> + class lexer : public Lexer + { + private: + // avoid warnings about using 'this' in constructor + lexer& this_() { return *this; } + + std::size_t next_token_id; // has to be an integral type + + public: + typedef Lexer lexer_type; + typedef typename Lexer::id_type id_type; + typedef typename Lexer::char_type char_type; + typedef typename Lexer::iterator_type iterator_type; + typedef lexer base_type; + + typedef detail::lexer_def_<lexer> lexer_def; + typedef std::basic_string<char_type> string_type; + + lexer(unsigned int flags = match_flags::match_default + , id_type first_id = id_type(min_token_id)) + : lexer_type(flags) + , next_token_id(first_id) + , self(this_(), lexer_type::initial_state()) + {} + + // access iterator interface + template <typename Iterator> + iterator_type begin(Iterator& first, Iterator const& last + , char_type const* initial_state = 0) const + { return this->lexer_type::begin(first, last, initial_state); } + iterator_type end() const + { return this->lexer_type::end(); } + + std::size_t map_state(char_type const* state) + { return this->lexer_type::add_state(state); } + + // create a unique token id + id_type get_next_id() { return id_type(next_token_id++); } + + lexer_def self; // allow for easy token definition + }; + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/functor.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/functor.hpp new file mode 100644 index 0000000..79e5f07 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/functor.hpp @@ -0,0 +1,300 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_LEXER_FUNCTOR_NOV_18_2007_1112PM) +#define BOOST_SPIRIT_LEX_LEXER_FUNCTOR_NOV_18_2007_1112PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/mpl/bool.hpp> +#include <boost/detail/iterator.hpp> +#include <boost/detail/workaround.hpp> +#include <boost/spirit/home/lex/lexer/pass_flags.hpp> +#include <boost/assert.hpp> + +#if 0 != __COMO_VERSION__ || !BOOST_WORKAROUND(BOOST_MSVC, <= 1310) +#define BOOST_SPIRIT_STATIC_EOF 1 +#define BOOST_SPIRIT_EOF_PREFIX static +#else +#define BOOST_SPIRIT_EOF_PREFIX +#endif + +namespace boost { namespace spirit { namespace lex { namespace lexertl +{ + /////////////////////////////////////////////////////////////////////////// + // + // functor is a template usable as the functor object for the + // multi_pass iterator allowing to wrap a lexertl based dfa into a + // iterator based interface. + // + // Token: the type of the tokens produced by this functor + // this needs to expose a constructor with the following + // prototype: + // + // Token(std::size_t id, std::size_t state, + // Iterator start, Iterator end) + // + // where 'id' is the token id, state is the lexer state, + // this token has been matched in, and 'first' and 'end' + // mark the start and the end of the token with respect + // to the underlying character stream. + // FunctorData: + // this is expected to encapsulate the shared part of the + // functor (see lex/lexer/lexertl/functor_data.hpp for an + // example and documentation). + // Iterator: the type of the underlying iterator + // SupportsActors: + // this is expected to be a mpl::bool_, if mpl::true_ the + // functor invokes functors which (optionally) have + // been attached to the token definitions. + // SupportState: + // this is expected to be a mpl::bool_, if mpl::true_ the + // functor supports different lexer states, + // otherwise no lexer state is supported. + // + /////////////////////////////////////////////////////////////////////////// + template <typename Token + , template <typename, typename, typename, typename> class FunctorData + , typename Iterator = typename Token::iterator_type + , typename SupportsActors = mpl::false_ + , typename SupportsState = typename Token::has_state> + class functor + { + public: + typedef typename + boost::detail::iterator_traits<Iterator>::value_type + char_type; + + private: + // Needed by compilers not implementing the resolution to DR45. For + // reference, see + // http://www.open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#45. + typedef typename Token::token_value_type token_value_type; + friend class FunctorData<Iterator, SupportsActors, SupportsState + , token_value_type>; + + // Helper template allowing to assign a value on exit + template <typename T> + struct assign_on_exit + { + assign_on_exit(T& dst, T const& src) + : dst_(dst), src_(src) {} + + ~assign_on_exit() + { + dst_ = src_; + } + + T& dst_; + T const& src_; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + assign_on_exit& operator= (assign_on_exit const&); + }; + + public: + functor() +#if defined(__PGI) + : eof() +#endif + {} + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1310) + // somehow VC7.1 needs this (meaningless) assignment operator + functor& operator=(functor const& rhs) + { + return *this; + } +#endif + + /////////////////////////////////////////////////////////////////////// + // interface to the iterator_policies::split_functor_input policy + typedef Token result_type; + typedef functor unique; + typedef FunctorData<Iterator, SupportsActors, SupportsState + , token_value_type> shared; + + BOOST_SPIRIT_EOF_PREFIX result_type const eof; + + /////////////////////////////////////////////////////////////////////// + typedef Iterator iterator_type; + typedef typename shared::semantic_actions_type semantic_actions_type; + typedef typename shared::next_token_functor next_token_functor; + typedef typename shared::get_state_name_type get_state_name_type; + + // this is needed to wrap the semantic actions in a proper way + typedef typename shared::wrap_action_type wrap_action_type; + + /////////////////////////////////////////////////////////////////////// + template <typename MultiPass> + static result_type& get_next(MultiPass& mp, result_type& result) + { + typedef typename result_type::id_type id_type; + + shared& data = mp.shared()->ftor; + for(;;) + { + if (data.get_first() == data.get_last()) +#if defined(BOOST_SPIRIT_STATIC_EOF) + return result = eof; +#else + return result = mp.ftor.eof; +#endif + + data.reset_value(); + Iterator end = data.get_first(); + std::size_t unique_id = boost::lexer::npos; + bool prev_bol = false; + + // lexer matching might change state + std::size_t state = data.get_state(); + std::size_t id = data.next(end, unique_id, prev_bol); + + if (boost::lexer::npos == id) { // no match +#if defined(BOOST_SPIRIT_LEXERTL_DEBUG) + std::string next; + Iterator it = data.get_first(); + for (std::size_t i = 0; i < 10 && it != data.get_last(); ++it, ++i) + next += *it; + + std::cerr << "Not matched, in state: " << state + << ", lookahead: >" << next << "<" << std::endl; +#endif + return result = result_type(0); + } + else if (0 == id) { // EOF reached +#if defined(BOOST_SPIRIT_STATIC_EOF) + return result = eof; +#else + return result = mp.ftor.eof; +#endif + } + +#if defined(BOOST_SPIRIT_LEXERTL_DEBUG) + { + std::string next; + Iterator it = end; + for (std::size_t i = 0; i < 10 && it != data.get_last(); ++it, ++i) + next += *it; + + std::cerr << "Matched: " << id << ", in state: " + << state << ", string: >" + << std::basic_string<char_type>(data.get_first(), end) << "<" + << ", lookahead: >" << next << "<" << std::endl; + if (data.get_state() != state) { + std::cerr << "Switched to state: " + << data.get_state() << std::endl; + } + } +#endif + // account for a possibly pending lex::more(), i.e. moving + // data.first_ back to the start of the previously matched token. + bool adjusted = data.adjust_start(); + + // set the end of the matched input sequence in the token data + data.set_end(end); + + // invoke attached semantic actions, if defined, might change + // state, id, data.first_, and/or end + BOOST_SCOPED_ENUM(pass_flags) pass = + data.invoke_actions(state, id, unique_id, end); + + if (data.has_value()) { + // return matched token using the token value as set before + // using data.set_value(), advancing 'data.first_' past the + // matched sequence + assign_on_exit<Iterator> on_exit(data.get_first(), end); + return result = result_type(id_type(id), state, data.get_value()); + } + else if (pass_flags::pass_normal == pass) { + // return matched token, advancing 'data.first_' past the + // matched sequence + assign_on_exit<Iterator> on_exit(data.get_first(), end); + return result = result_type(id_type(id), state, data.get_first(), end); + } + else if (pass_flags::pass_fail == pass) { +#if defined(BOOST_SPIRIT_LEXERTL_DEBUG) + std::cerr << "Matching forced to fail" << std::endl; +#endif + // if the data.first_ got adjusted above, revert this adjustment + if (adjusted) + data.revert_adjust_start(); + + // one of the semantic actions signaled no-match + data.reset_bol(prev_bol); + if (state != data.get_state()) + continue; // retry matching if state has changed + + // if the state is unchanged repeating the match wouldn't + // move the input forward, causing an infinite loop + return result = result_type(0); + } + +#if defined(BOOST_SPIRIT_LEXERTL_DEBUG) + std::cerr << "Token ignored, continuing matching" << std::endl; +#endif + // if this token needs to be ignored, just repeat the matching, + // while starting right after the current match + data.get_first() = end; + } + } + + // set_state are propagated up to the iterator interface, allowing to + // manipulate the current lexer state through any of the exposed + // iterators. + template <typename MultiPass> + static std::size_t set_state(MultiPass& mp, std::size_t state) + { + std::size_t oldstate = mp.shared()->ftor.get_state(); + mp.shared()->ftor.set_state(state); + +#if defined(BOOST_SPIRIT_LEXERTL_DEBUG) + std::cerr << "Switching state from: " << oldstate + << " to: " << state + << std::endl; +#endif + return oldstate; + } + + template <typename MultiPass> + static std::size_t get_state(MultiPass& mp) + { + return mp.shared()->ftor.get_state(); + } + + template <typename MultiPass> + static std::size_t + map_state(MultiPass const& mp, char_type const* statename) + { + return mp.shared()->ftor.get_state_id(statename); + } + + // we don't need this, but it must be there + template <typename MultiPass> + static void destroy(MultiPass const&) {} + }; + +#if defined(BOOST_SPIRIT_STATIC_EOF) + /////////////////////////////////////////////////////////////////////////// + // eof token + /////////////////////////////////////////////////////////////////////////// + template <typename Token + , template <typename, typename, typename, typename> class FunctorData + , typename Iterator, typename SupportsActors, typename SupportsState> + typename functor<Token, FunctorData, Iterator, SupportsActors, SupportsState>::result_type const + functor<Token, FunctorData, Iterator, SupportsActors, SupportsState>::eof = + typename functor<Token, FunctorData, Iterator, SupportsActors + , SupportsState>::result_type(); +#endif + +}}}} + +#undef BOOST_SPIRIT_EOF_PREFIX +#undef BOOST_SPIRIT_STATIC_EOF + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/functor_data.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/functor_data.hpp new file mode 100644 index 0000000..207b374 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/functor_data.hpp @@ -0,0 +1,552 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_LEXER_FUNCTOR_DATA_JUN_10_2009_0954AM) +#define BOOST_SPIRIT_LEX_LEXER_FUNCTOR_DATA_JUN_10_2009_0954AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/qi/detail/assign_to.hpp> +#include <boost/spirit/home/support/detail/lexer/generator.hpp> +#include <boost/spirit/home/support/detail/lexer/rules.hpp> +#include <boost/spirit/home/support/detail/lexer/state_machine.hpp> +#include <boost/spirit/home/lex/lexer/lexertl/iterator_tokenizer.hpp> +#include <boost/spirit/home/lex/lexer/lexertl/semantic_action_data.hpp> +#include <boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/optional.hpp> + +namespace boost { namespace spirit { namespace lex { namespace lexertl +{ + namespace detail + { + /////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename HasActors, typename HasState + , typename TokenValue> + class data; // no default specialization + + /////////////////////////////////////////////////////////////////////// + // neither supports state, nor actors + template <typename Iterator, typename TokenValue> + class data<Iterator, mpl::false_, mpl::false_, TokenValue> + { + protected: + typedef typename + boost::detail::iterator_traits<Iterator>::value_type + char_type; + + public: + typedef Iterator base_iterator_type; + typedef iterator_range<Iterator> token_value_type; + typedef token_value_type get_value_type; + typedef std::size_t state_type; + typedef char_type const* state_name_type; + typedef unused_type semantic_actions_type; + typedef detail::wrap_action<unused_type, Iterator, data, std::size_t> + wrap_action_type; + + typedef unused_type next_token_functor; + typedef unused_type get_state_name_type; + + // initialize the shared data + template <typename IterData> + data (IterData const& data_, Iterator& first, Iterator const& last) + : first_(first), last_(last) + , state_machine_(data_.state_machine_) + , rules_(data_.rules_) + , bol_(data_.state_machine_.data()._seen_BOL_assertion) {} + + // The following functions are used by the implementation of the + // placeholder '_state'. + template <typename Char> + void set_state_name (Char const*) + { +// some (random) versions of gcc instantiate this function even if it's not +// needed leading to false static asserts +#if !defined(__GNUC__) + // If you see a compile time assertion below you're probably + // using a token type not supporting lexer states (the 3rd + // template parameter of the token is mpl::false_), but your + // code uses state changes anyways. + BOOST_STATIC_ASSERT(false); +#endif + } + char_type const* get_state_name() const { return rules_.initial(); } + std::size_t get_state_id (char_type const*) const + { + return 0; + } + + // The function get_eoi() is used by the implementation of the + // placeholder '_eoi'. + Iterator const& get_eoi() const { return last_; } + + // The function less() is used by the implementation of the support + // function lex::less(). Its functionality is equivalent to flex' + // function yyless(): it returns an iterator positioned to the + // nth input character beyond the current start iterator (i.e. by + // assigning the return value to the placeholder '_end' it is + // possible to return all but the first n characters of the current + // token back to the input stream. + // + // This function does nothing as long as no semantic actions are + // used. + Iterator const& less(Iterator const& it, int) + { + // The following assertion fires most likely because you are + // using lexer semantic actions without using the actor_lexer + // as the base class for your token definition class. + BOOST_ASSERT(false && + "Are you using lexer semantic actions without using the " + "actor_lexer base?"); + return it; + } + + // The function more() is used by the implementation of the support + // function lex::more(). Its functionality is equivalent to flex' + // function yymore(): it tells the lexer that the next time it + // matches a rule, the corresponding token should be appended onto + // the current token value rather than replacing it. + // + // These functions do nothing as long as no semantic actions are + // used. + void more() + { + // The following assertion fires most likely because you are + // using lexer semantic actions without using the actor_lexer + // as the base class for your token definition class. + BOOST_ASSERT(false && + "Are you using lexer semantic actions without using the " + "actor_lexer base?"); + } + bool adjust_start() { return false; } + void revert_adjust_start() {} + + // The function lookahead() is used by the implementation of the + // support function lex::lookahead. It can be used to implement + // lookahead for lexer engines not supporting constructs like flex' + // a/b (match a, but only when followed by b): + // + // This function does nothing as long as no semantic actions are + // used. + bool lookahead(std::size_t, std::size_t /*state*/ = std::size_t(~0)) + { + // The following assertion fires most likely because you are + // using lexer semantic actions without using the actor_lexer + // as the base class for your token definition class. + BOOST_ASSERT(false && + "Are you using lexer semantic actions without using the " + "actor_lexer base?"); + return false; + } + + // the functions next, invoke_actions, and get_state are used by + // the functor implementation below + + // The function next() tries to match the next token from the + // underlying input sequence. + std::size_t next(Iterator& end, std::size_t& unique_id, bool& prev_bol) + { + prev_bol = bol_; + + typedef basic_iterator_tokeniser<Iterator> tokenizer; + return tokenizer::next(state_machine_, bol_, end, last_ + , unique_id); + } + + // nothing to invoke, so this is empty + BOOST_SCOPED_ENUM(pass_flags) invoke_actions(std::size_t + , std::size_t, std::size_t, Iterator const&) + { + return pass_flags::pass_normal; // always accept + } + + std::size_t get_state() const { return 0; } + void set_state(std::size_t) {} + + void set_end(Iterator const& it) {} + + Iterator& get_first() { return first_; } + Iterator const& get_first() const { return first_; } + Iterator const& get_last() const { return last_; } + + iterator_range<Iterator> get_value() const + { + return iterator_range<Iterator>(first_, last_); + } + bool has_value() const { return false; } + void reset_value() {} + + void reset_bol(bool bol) { bol_ = bol; } + + protected: + Iterator& first_; + Iterator last_; + + boost::lexer::basic_state_machine<char_type> const& state_machine_; + boost::lexer::basic_rules<char_type> const& rules_; + + bool bol_; // helper storing whether last character was \n + + private: + // silence MSVC warning C4512: assignment operator could not be generated + data& operator= (data const&); + }; + + /////////////////////////////////////////////////////////////////////// + // doesn't support lexer semantic actions, but supports state + template <typename Iterator, typename TokenValue> + class data<Iterator, mpl::false_, mpl::true_, TokenValue> + : public data<Iterator, mpl::false_, mpl::false_, TokenValue> + { + protected: + typedef data<Iterator, mpl::false_, mpl::false_, TokenValue> base_type; + typedef typename base_type::char_type char_type; + + public: + typedef Iterator base_iterator_type; + typedef iterator_range<Iterator> token_value_type; + typedef token_value_type get_value_type; + typedef typename base_type::state_type state_type; + typedef typename base_type::state_name_type state_name_type; + typedef typename base_type::semantic_actions_type + semantic_actions_type; + + // initialize the shared data + template <typename IterData> + data (IterData const& data_, Iterator& first, Iterator const& last) + : base_type(data_, first, last) + , state_(0) {} + + // The following functions are used by the implementation of the + // placeholder '_state'. + void set_state_name (char_type const* new_state) + { + std::size_t state_id = this->rules_.state(new_state); + + // If the following assertion fires you've probably been using + // a lexer state name which was not defined in your token + // definition. + BOOST_ASSERT(state_id != boost::lexer::npos); + + if (state_id != boost::lexer::npos) + state_ = state_id; + } + char_type const* get_state_name() const + { + return this->rules_.state(state_); + } + std::size_t get_state_id (char_type const* state) const + { + return this->rules_.state(state); + } + + // the functions next() and get_state() are used by the functor + // implementation below + + // The function next() tries to match the next token from the + // underlying input sequence. + std::size_t next(Iterator& end, std::size_t& unique_id, bool& prev_bol) + { + prev_bol = this->bol_; + + typedef basic_iterator_tokeniser<Iterator> tokenizer; + return tokenizer::next(this->state_machine_, state_, + this->bol_, end, this->get_eoi(), unique_id); + } + + std::size_t& get_state() { return state_; } + void set_state(std::size_t state) { state_ = state; } + + protected: + std::size_t state_; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + data& operator= (data const&); + }; + + /////////////////////////////////////////////////////////////////////// + // does support lexer semantic actions, may support state + template <typename Iterator, typename HasState, typename TokenValue> + class data<Iterator, mpl::true_, HasState, TokenValue> + : public data<Iterator, mpl::false_, HasState, TokenValue> + { + public: + typedef semantic_actions<Iterator, HasState, data> + semantic_actions_type; + + protected: + typedef data<Iterator, mpl::false_, HasState, TokenValue> base_type; + typedef typename base_type::char_type char_type; + typedef typename semantic_actions_type::functor_wrapper_type + functor_wrapper_type; + + public: + typedef Iterator base_iterator_type; + typedef TokenValue token_value_type; + typedef TokenValue const& get_value_type; + typedef typename base_type::state_type state_type; + typedef typename base_type::state_name_type state_name_type; + + typedef detail::wrap_action<functor_wrapper_type + , Iterator, data, std::size_t> wrap_action_type; + + template <typename IterData> + data (IterData const& data_, Iterator& first, Iterator const& last) + : base_type(data_, first, last) + , actions_(data_.actions_), hold_() + , value_(iterator_range<Iterator>(first, last)) + , has_value_(false), has_hold_(false) {} + + // invoke attached semantic actions, if defined + BOOST_SCOPED_ENUM(pass_flags) invoke_actions(std::size_t state + , std::size_t& id, std::size_t unique_id, Iterator& end) + { + return actions_.invoke_actions(state, id, unique_id, end, *this); + } + + // The function less() is used by the implementation of the support + // function lex::less(). Its functionality is equivalent to flex' + // function yyless(): it returns an iterator positioned to the + // nth input character beyond the current start iterator (i.e. by + // assigning the return value to the placeholder '_end' it is + // possible to return all but the first n characters of the current + // token back to the input stream). + Iterator const& less(Iterator& it, int n) + { + it = this->get_first(); + std::advance(it, n); + return it; + } + + // The function more() is used by the implementation of the support + // function lex::more(). Its functionality is equivalent to flex' + // function yymore(): it tells the lexer that the next time it + // matches a rule, the corresponding token should be appended onto + // the current token value rather than replacing it. + void more() + { + hold_ = this->get_first(); + has_hold_ = true; + } + + // The function lookahead() is used by the implementation of the + // support function lex::lookahead. It can be used to implement + // lookahead for lexer engines not supporting constructs like flex' + // a/b (match a, but only when followed by b) + bool lookahead(std::size_t id, std::size_t state = std::size_t(~0)) + { + Iterator end = end_; + std::size_t unique_id = boost::lexer::npos; + bool bol = this->bol_; + + if (std::size_t(~0) == state) + state = this->state_; + + typedef basic_iterator_tokeniser<Iterator> tokenizer; + return id == tokenizer::next(this->state_machine_, state, + bol, end, this->get_eoi(), unique_id); + } + + // The adjust_start() and revert_adjust_start() are helper + // functions needed to implement the functionality required for + // lex::more(). It is called from the functor body below. + bool adjust_start() + { + if (!has_hold_) + return false; + + std::swap(this->get_first(), hold_); + has_hold_ = false; + return true; + } + void revert_adjust_start() + { + // this will be called only if adjust_start above returned true + std::swap(this->get_first(), hold_); + has_hold_ = true; + } + + TokenValue const& get_value() const + { + if (!has_value_) { + value_ = iterator_range<Iterator>(this->get_first(), end_); + has_value_ = true; + } + return value_; + } + template <typename Value> + void set_value(Value const& val) + { + value_ = val; + has_value_ = true; + } + void set_end(Iterator const& it) + { + end_ = it; + } + bool has_value() const { return has_value_; } + void reset_value() { has_value_ = false; } + + protected: + semantic_actions_type const& actions_; + Iterator hold_; // iterator needed to support lex::more() + Iterator end_; // iterator pointing to end of matched token + mutable TokenValue value_; // token value to use + mutable bool has_value_; // 'true' if value_ is valid + bool has_hold_; // 'true' if hold_ is valid + + private: + // silence MSVC warning C4512: assignment operator could not be generated + data& operator= (data const&); + }; + + /////////////////////////////////////////////////////////////////////// + // does support lexer semantic actions, may support state, is used for + // position_token exposing exactly one type + template <typename Iterator, typename HasState, typename TokenValue> + class data<Iterator, mpl::true_, HasState, boost::optional<TokenValue> > + : public data<Iterator, mpl::false_, HasState, TokenValue> + { + public: + typedef semantic_actions<Iterator, HasState, data> + semantic_actions_type; + + protected: + typedef data<Iterator, mpl::false_, HasState, TokenValue> base_type; + typedef typename base_type::char_type char_type; + typedef typename semantic_actions_type::functor_wrapper_type + functor_wrapper_type; + + public: + typedef Iterator base_iterator_type; + typedef boost::optional<TokenValue> token_value_type; + typedef boost::optional<TokenValue> const& get_value_type; + typedef typename base_type::state_type state_type; + typedef typename base_type::state_name_type state_name_type; + + typedef detail::wrap_action<functor_wrapper_type + , Iterator, data, std::size_t> wrap_action_type; + + template <typename IterData> + data (IterData const& data_, Iterator& first, Iterator const& last) + : base_type(data_, first, last) + , actions_(data_.actions_), hold_() + , has_value_(false), has_hold_(false) + { + spirit::traits::assign_to(first, last, value_); + has_value_ = true; + } + + // invoke attached semantic actions, if defined + BOOST_SCOPED_ENUM(pass_flags) invoke_actions(std::size_t state + , std::size_t& id, std::size_t unique_id, Iterator& end) + { + return actions_.invoke_actions(state, id, unique_id, end, *this); + } + + // The function less() is used by the implementation of the support + // function lex::less(). Its functionality is equivalent to flex' + // function yyless(): it returns an iterator positioned to the + // nth input character beyond the current start iterator (i.e. by + // assigning the return value to the placeholder '_end' it is + // possible to return all but the first n characters of the current + // token back to the input stream). + Iterator const& less(Iterator& it, int n) + { + it = this->get_first(); + std::advance(it, n); + return it; + } + + // The function more() is used by the implementation of the support + // function lex::more(). Its functionality is equivalent to flex' + // function yymore(): it tells the lexer that the next time it + // matches a rule, the corresponding token should be appended onto + // the current token value rather than replacing it. + void more() + { + hold_ = this->get_first(); + has_hold_ = true; + } + + // The function lookahead() is used by the implementation of the + // support function lex::lookahead. It can be used to implement + // lookahead for lexer engines not supporting constructs like flex' + // a/b (match a, but only when followed by b) + bool lookahead(std::size_t id, std::size_t state = std::size_t(~0)) + { + Iterator end = end_; + std::size_t unique_id = boost::lexer::npos; + bool bol = this->bol_; + + if (std::size_t(~0) == state) + state = this->state_; + + typedef basic_iterator_tokeniser<Iterator> tokenizer; + return id == tokenizer::next(this->state_machine_, state, + bol, end, this->get_eoi(), unique_id); + } + + // The adjust_start() and revert_adjust_start() are helper + // functions needed to implement the functionality required for + // lex::more(). It is called from the functor body below. + bool adjust_start() + { + if (!has_hold_) + return false; + + std::swap(this->get_first(), hold_); + has_hold_ = false; + return true; + } + void revert_adjust_start() + { + // this will be called only if adjust_start above returned true + std::swap(this->get_first(), hold_); + has_hold_ = true; + } + + token_value_type const& get_value() const + { + if (!has_value_) { + spirit::traits::assign_to(this->get_first(), end_, value_); + has_value_ = true; + } + return value_; + } + template <typename Value> + void set_value(Value const& val) + { + value_ = val; + has_value_ = true; + } + void set_end(Iterator const& it) + { + end_ = it; + } + bool has_value() const { return has_value_; } + void reset_value() { has_value_ = false; } + + protected: + semantic_actions_type const& actions_; + Iterator hold_; // iterator needed to support lex::more() + Iterator end_; // iterator pointing to end of matched token + mutable token_value_type value_; // token value to use + mutable bool has_value_; // 'true' if value_ is valid + bool has_hold_; // 'true' if hold_ is valid + + private: + // silence MSVC warning C4512: assignment operator could not be generated + data& operator= (data const&); + }; + } +}}}} + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/iterator.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/iterator.hpp new file mode 100644 index 0000000..f2793ba --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/iterator.hpp @@ -0,0 +1,121 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_LEXER_ITERATOR_MAR_16_2007_0353PM) +#define BOOST_SPIRIT_LEX_LEXER_ITERATOR_MAR_16_2007_0353PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#if defined(BOOST_SPIRIT_DEBUG) +#include <boost/spirit/home/support/iterators/detail/buf_id_check_policy.hpp> +#else +#include <boost/spirit/home/support/iterators/detail/no_check_policy.hpp> +#endif +#include <boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp> +#include <boost/spirit/home/support/iterators/detail/ref_counted_policy.hpp> +#include <boost/spirit/home/support/iterators/detail/split_std_deque_policy.hpp> +#include <boost/spirit/home/support/iterators/multi_pass.hpp> + +namespace boost { namespace spirit { namespace lex { namespace lexertl +{ + /////////////////////////////////////////////////////////////////////////// + template <typename FunctorData> + struct make_multi_pass + { + // Divide the given functor type into its components (unique and + // shared) and build a std::pair from these parts + typedef std::pair<typename FunctorData::unique + , typename FunctorData::shared> functor_data_type; + + // This is the result type returned from the iterator + typedef typename FunctorData::result_type result_type; + + // Compose the multi_pass iterator policy type from the appropriate + // policies + typedef iterator_policies::split_functor_input input_policy; + typedef iterator_policies::ref_counted ownership_policy; +#if defined(BOOST_SPIRIT_DEBUG) + typedef iterator_policies::buf_id_check check_policy; +#else + typedef iterator_policies::no_check check_policy; +#endif + typedef iterator_policies::split_std_deque storage_policy; + + typedef iterator_policies::default_policy< + ownership_policy, check_policy, input_policy, storage_policy> + policy_type; + + // Compose the multi_pass iterator from the policy + typedef spirit::multi_pass<functor_data_type, policy_type> type; + }; + + /////////////////////////////////////////////////////////////////////////// + // lexer_iterator exposes an iterator for a lexertl based dfa (lexer) + // The template parameters have the same semantics as described for the + // functor above. + /////////////////////////////////////////////////////////////////////////// + template <typename Functor> + class iterator : public make_multi_pass<Functor>::type + { + public: + typedef typename Functor::unique unique_functor_type; + typedef typename Functor::shared shared_functor_type; + + typedef typename Functor::iterator_type base_iterator_type; + typedef typename Functor::result_type token_type; + + private: + typedef typename make_multi_pass<Functor>::functor_data_type + functor_type; + typedef typename make_multi_pass<Functor>::type base_type; + typedef typename Functor::char_type char_type; + + public: + // create a new iterator encapsulating the lexer object to be used + // for tokenization + template <typename IteratorData> + iterator(IteratorData const& iterdata_, base_iterator_type& first + , base_iterator_type const& last, char_type const* state = 0) + : base_type(functor_type(unique_functor_type() + , shared_functor_type(iterdata_, first, last))) + { + set_state(map_state(state)); + } + + // create an end iterator usable for end of range checking + iterator() {} + + // (wash): < mgaunard> T it; T it2 = ++it; doesn't ocmpile + // < mgaunard> this gets fixed by adding + iterator(const base_type& base) + : base_type(base) { } + + // set the new required state for the underlying lexer object + std::size_t set_state(std::size_t state) + { + return unique_functor_type::set_state(*this, state); + } + + // get the curent state for the underlying lexer object + std::size_t get_state() + { + return unique_functor_type::get_state(*this); + } + + // map the given state name to a corresponding state id as understood + // by the underlying lexer object + std::size_t map_state(char_type const* statename) + { + return (0 != statename) + ? unique_functor_type::map_state(*this, statename) + : 0; + } + }; + +}}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/iterator_tokenizer.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/iterator_tokenizer.hpp new file mode 100644 index 0000000..31dffce --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/iterator_tokenizer.hpp @@ -0,0 +1,255 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEXERTL_ITERATOR_TOKENISER_MARCH_22_2007_0859AM) +#define BOOST_SPIRIT_LEXERTL_ITERATOR_TOKENISER_MARCH_22_2007_0859AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/detail/iterator.hpp> +#include <boost/spirit/home/support/detail/lexer/state_machine.hpp> +#include <boost/spirit/home/support/detail/lexer/consts.hpp> +#include <boost/spirit/home/support/detail/lexer/size_t.hpp> +#include <boost/spirit/home/support/detail/lexer/char_traits.hpp> +#include <vector> + +namespace boost { namespace spirit { namespace lex { namespace lexertl +{ + /////////////////////////////////////////////////////////////////////////// + template<typename Iterator> + class basic_iterator_tokeniser + { + public: + typedef std::vector<std::size_t> size_t_vector; + typedef typename boost::detail::iterator_traits<Iterator>::value_type + char_type; + + static std::size_t next ( + boost::lexer::basic_state_machine<char_type> const& state_machine_ + , std::size_t &dfa_state_, bool& bol_, Iterator &start_token_ + , Iterator const& end_, std::size_t& unique_id_) + { + if (start_token_ == end_) + { + unique_id_ = boost::lexer::npos; + return 0; + } + + bool bol = bol_; + boost::lexer::detail::internals const& internals_ = + state_machine_.data(); + + again: + std::size_t const* lookup_ = &internals_._lookup[dfa_state_]-> + front (); + std::size_t dfa_alphabet_ = internals_._dfa_alphabet[dfa_state_]; + std::size_t const* dfa_ = &internals_._dfa[dfa_state_]->front (); + + std::size_t const* ptr_ = dfa_ + dfa_alphabet_; + Iterator curr_ = start_token_; + bool end_state_ = *ptr_ != 0; + std::size_t id_ = *(ptr_ + boost::lexer::id_index); + std::size_t uid_ = *(ptr_ + boost::lexer::unique_id_index); + std::size_t end_start_state_ = dfa_state_; + bool end_bol_ = bol_; + Iterator end_token_ = start_token_; + + while (curr_ != end_) + { + std::size_t const BOL_state_ = ptr_[boost::lexer::bol_index]; + std::size_t const EOL_state_ = ptr_[boost::lexer::eol_index]; + + if (BOL_state_ && bol) + { + ptr_ = &dfa_[BOL_state_ * dfa_alphabet_]; + } + else if (EOL_state_ && *curr_ == '\n') + { + ptr_ = &dfa_[EOL_state_ * dfa_alphabet_]; + } + else + { + typedef typename + boost::detail::iterator_traits<Iterator>::value_type + value_type; + typedef typename + boost::lexer::char_traits<value_type>::index_type + index_type; + + index_type index = + boost::lexer::char_traits<value_type>::call(*curr_++); + bol = (index == '\n') ? true : false; + std::size_t const state_ = ptr_[ + lookup_[static_cast<std::size_t>(index)]]; + + if (state_ == 0) + { + break; + } + + ptr_ = &dfa_[state_ * dfa_alphabet_]; + } + + if (*ptr_) + { + end_state_ = true; + id_ = *(ptr_ + boost::lexer::id_index); + uid_ = *(ptr_ + boost::lexer::unique_id_index); + end_start_state_ = *(ptr_ + boost::lexer::state_index); + end_bol_ = bol; + end_token_ = curr_; + } + } + + std::size_t const EOL_state_ = ptr_[boost::lexer::eol_index]; + + if (EOL_state_ && curr_ == end_) + { + ptr_ = &dfa_[EOL_state_ * dfa_alphabet_]; + + if (*ptr_) + { + end_state_ = true; + id_ = *(ptr_ + boost::lexer::id_index); + uid_ = *(ptr_ + boost::lexer::unique_id_index); + end_start_state_ = *(ptr_ + boost::lexer::state_index); + end_bol_ = bol; + end_token_ = curr_; + } + } + + if (end_state_) { + // return longest match + dfa_state_ = end_start_state_; + start_token_ = end_token_; + + if (id_ == 0) + { + bol = end_bol_; + goto again; + } + else + { + bol_ = end_bol_; + } + } + else { + bol_ = (*start_token_ == '\n') ? true : false; + id_ = boost::lexer::npos; + uid_ = boost::lexer::npos; + } + + unique_id_ = uid_; + return id_; + } + + /////////////////////////////////////////////////////////////////////// + static std::size_t next ( + boost::lexer::basic_state_machine<char_type> const& state_machine_ + , bool& bol_, Iterator &start_token_, Iterator const& end_ + , std::size_t& unique_id_) + { + if (start_token_ == end_) + { + unique_id_ = boost::lexer::npos; + return 0; + } + + bool bol = bol_; + std::size_t const* lookup_ = &state_machine_.data()._lookup[0]->front(); + std::size_t dfa_alphabet_ = state_machine_.data()._dfa_alphabet[0]; + std::size_t const* dfa_ = &state_machine_.data()._dfa[0]->front (); + std::size_t const* ptr_ = dfa_ + dfa_alphabet_; + + Iterator curr_ = start_token_; + bool end_state_ = *ptr_ != 0; + std::size_t id_ = *(ptr_ + boost::lexer::id_index); + std::size_t uid_ = *(ptr_ + boost::lexer::unique_id_index); + bool end_bol_ = bol_; + Iterator end_token_ = start_token_; + + while (curr_ != end_) + { + std::size_t const BOL_state_ = ptr_[boost::lexer::bol_index]; + std::size_t const EOL_state_ = ptr_[boost::lexer::eol_index]; + + if (BOL_state_ && bol) + { + ptr_ = &dfa_[BOL_state_ * dfa_alphabet_]; + } + else if (EOL_state_ && *curr_ == '\n') + { + ptr_ = &dfa_[EOL_state_ * dfa_alphabet_]; + } + else + { + typedef typename + boost::detail::iterator_traits<Iterator>::value_type + value_type; + typedef typename + boost::lexer::char_traits<value_type>::index_type + index_type; + + index_type index = + boost::lexer::char_traits<value_type>::call(*curr_++); + bol = (index == '\n') ? true : false; + std::size_t const state_ = ptr_[ + lookup_[static_cast<std::size_t>(index)]]; + + if (state_ == 0) + { + break; + } + + ptr_ = &dfa_[state_ * dfa_alphabet_]; + } + + if (*ptr_) + { + end_state_ = true; + id_ = *(ptr_ + boost::lexer::id_index); + uid_ = *(ptr_ + boost::lexer::unique_id_index); + end_bol_ = bol; + end_token_ = curr_; + } + } + + std::size_t const EOL_state_ = ptr_[boost::lexer::eol_index]; + + if (EOL_state_ && curr_ == end_) + { + ptr_ = &dfa_[EOL_state_ * dfa_alphabet_]; + + if (*ptr_) + { + end_state_ = true; + id_ = *(ptr_ + boost::lexer::id_index); + uid_ = *(ptr_ + boost::lexer::unique_id_index); + end_bol_ = bol; + end_token_ = curr_; + } + } + + if (end_state_) { + // return longest match + bol_ = end_bol_; + start_token_ = end_token_; + } + else { + bol_ = *start_token_ == '\n'; + id_ = boost::lexer::npos; + uid_ = boost::lexer::npos; + } + + unique_id_ = uid_; + return id_; + } + }; + +}}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/lexer.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/lexer.hpp new file mode 100644 index 0000000..0f8af55 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/lexer.hpp @@ -0,0 +1,399 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_LEXER_MAR_17_2007_0139PM) +#define BOOST_SPIRIT_LEX_LEXER_MAR_17_2007_0139PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <iosfwd> + +#include <boost/spirit/home/support/detail/lexer/generator.hpp> +#include <boost/spirit/home/support/detail/lexer/rules.hpp> +#include <boost/spirit/home/support/detail/lexer/consts.hpp> +#include <boost/spirit/home/support/unused.hpp> + +#include <boost/spirit/home/lex/lexer/lexertl/token.hpp> +#include <boost/spirit/home/lex/lexer/lexertl/functor.hpp> +#include <boost/spirit/home/lex/lexer/lexertl/functor_data.hpp> +#include <boost/spirit/home/lex/lexer/lexertl/iterator.hpp> +#if defined(BOOST_SPIRIT_LEXERTL_DEBUG) +#include <boost/spirit/home/support/detail/lexer/debug.hpp> +#endif + +#include <boost/foreach.hpp> + +namespace boost { namespace spirit { namespace lex { namespace lexertl +{ + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + /////////////////////////////////////////////////////////////////////// + // The must_escape function checks if the given character value needs + // to be preceded by a backslash character to disable its special + // meaning in the context of a regular expression + /////////////////////////////////////////////////////////////////////// + template <typename Char> + inline bool must_escape(Char c) + { + // FIXME: more needed? + switch (c) { + case '+': case '/': case '*': case '?': + case '|': + case '(': case ')': + case '[': case ']': + case '{': case '}': + case '.': + case '^': case '$': + case '\\': + case '"': + return true; + + default: + break; + } + return false; + } + + /////////////////////////////////////////////////////////////////////// + // The escape function returns the string representation of the given + // character value, possibly escaped with a backslash character, to + // allow it being safely used in a regular expression definition. + /////////////////////////////////////////////////////////////////////// + template <typename Char> + inline std::basic_string<Char> escape(Char ch) + { + std::basic_string<Char> result(1, ch); + if (detail::must_escape(ch)) + { + typedef typename std::basic_string<Char>::size_type size_type; + result.insert((size_type)0, 1, '\\'); + } + return result; + } + + /////////////////////////////////////////////////////////////////////// + // + /////////////////////////////////////////////////////////////////////// + inline boost::lexer::regex_flags map_flags(unsigned int flags) + { + unsigned int retval = boost::lexer::none; + if (flags & match_flags::match_not_dot_newline) + retval |= boost::lexer::dot_not_newline; + if (flags & match_flags::match_icase) + retval |= boost::lexer::icase; + + return boost::lexer::regex_flags(retval); + } + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Lexer, typename F> + bool generate_static(Lexer const& + , std::basic_ostream<typename Lexer::char_type>& + , typename Lexer::char_type const*, F); + + /////////////////////////////////////////////////////////////////////////// + // + // Every lexer type to be used as a lexer for Spirit has to conform to + // the following public interface: + // + // typedefs: + // iterator_type The type of the iterator exposed by this lexer. + // token_type The type of the tokens returned from the exposed + // iterators. + // + // functions: + // default constructor + // Since lexers are instantiated as base classes + // only it might be a good idea to make this + // constructor protected. + // begin, end Return a pair of iterators, when dereferenced + // returning the sequence of tokens recognized in + // the input stream given as the parameters to the + // begin() function. + // add_token Should add the definition of a token to be + // recognized by this lexer. + // clear Should delete all current token definitions + // associated with the given state of this lexer + // object. + // + // template parameters: + // Iterator The type of the iterator used to access the + // underlying character stream. + // Token The type of the tokens to be returned from the + // exposed token iterator. + // Functor The type of the InputPolicy to use to instantiate + // the multi_pass iterator type to be used as the + // token iterator (returned from begin()/end()). + // + /////////////////////////////////////////////////////////////////////////// + + /////////////////////////////////////////////////////////////////////////// + // + // The lexer class is a implementation of a Spirit.Lex lexer on + // top of Ben Hanson's lexertl library as outlined above (For more + // information about lexertl go here: http://www.benhanson.net/lexertl.html). + // + // This class is supposed to be used as the first and only template + // parameter while instantiating instances of a lex::lexer class. + // + /////////////////////////////////////////////////////////////////////////// + template <typename Token = token<> + , typename Iterator = typename Token::iterator_type + , typename Functor = functor<Token, lexertl::detail::data, Iterator> > + class lexer + { + private: + struct dummy { void true_() {} }; + typedef void (dummy::*safe_bool)(); + + static std::size_t const all_states_id = static_cast<std::size_t>(-2); + + public: + operator safe_bool() const + { return initialized_dfa_ ? &dummy::true_ : 0; } + + typedef typename boost::detail::iterator_traits<Iterator>::value_type + char_type; + typedef std::basic_string<char_type> string_type; + + typedef boost::lexer::basic_rules<char_type> basic_rules_type; + + // Every lexer type to be used as a lexer for Spirit has to conform to + // a public interface . + typedef Token token_type; + typedef typename Token::id_type id_type; + typedef iterator<Functor> iterator_type; + + private: + // this type is purely used for the iterator_type construction below + struct iterator_data_type + { + typedef typename Functor::semantic_actions_type semantic_actions_type; + + iterator_data_type( + boost::lexer::basic_state_machine<char_type> const& sm + , boost::lexer::basic_rules<char_type> const& rules + , semantic_actions_type const& actions) + : state_machine_(sm), rules_(rules), actions_(actions) + {} + + boost::lexer::basic_state_machine<char_type> const& state_machine_; + boost::lexer::basic_rules<char_type> const& rules_; + semantic_actions_type const& actions_; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + iterator_data_type& operator= (iterator_data_type const&); + }; + + public: + // Return the start iterator usable for iterating over the generated + // tokens. + iterator_type begin(Iterator& first, Iterator const& last + , char_type const* initial_state = 0) const + { + if (!init_dfa()) // never minimize DFA for dynamic lexers + return iterator_type(); + + iterator_data_type iterator_data(state_machine_, rules_, actions_); + return iterator_type(iterator_data, first, last, initial_state); + } + + // Return the end iterator usable to stop iterating over the generated + // tokens. + iterator_type end() const + { + return iterator_type(); + } + + protected: + // Lexer instances can be created by means of a derived class only. + lexer(unsigned int flags) + : flags_(detail::map_flags(flags)) + , rules_(flags_) + , initialized_dfa_(false) + {} + + public: + // interface for token definition management + std::size_t add_token(char_type const* state, char_type tokendef, + std::size_t token_id, char_type const* targetstate) + { + add_state(state); + initialized_dfa_ = false; + if (state == all_states()) + return rules_.add(state, detail::escape(tokendef), token_id, rules_.dot()); + + if (0 == targetstate) + targetstate = state; + else + add_state(targetstate); + return rules_.add(state, detail::escape(tokendef), token_id, targetstate); + } + std::size_t add_token(char_type const* state, string_type const& tokendef, + std::size_t token_id, char_type const* targetstate) + { + add_state(state); + initialized_dfa_ = false; + if (state == all_states()) + return rules_.add(state, tokendef, token_id, rules_.dot()); + + if (0 == targetstate) + targetstate = state; + else + add_state(targetstate); + return rules_.add(state, tokendef, token_id, targetstate); + } + + // interface for pattern definition management + void add_pattern (char_type const* state, string_type const& name, + string_type const& patterndef) + { + add_state(state); + rules_.add_macro(name.c_str(), patterndef); + initialized_dfa_ = false; + } + + boost::lexer::rules const& get_rules() const { return rules_; } + + void clear(char_type const* state) + { + std::size_t s = rules_.state(state); + if (boost::lexer::npos != s) + rules_.clear(state); + initialized_dfa_ = false; + } + std::size_t add_state(char_type const* state) + { + if (state == all_states()) + return all_states_id; + + std::size_t stateid = rules_.state(state); + if (boost::lexer::npos == stateid) { + stateid = rules_.add_state(state); + initialized_dfa_ = false; + } + return stateid; + } + string_type initial_state() const + { + return string_type(rules_.initial()); + } + string_type all_states() const + { + return string_type(rules_.all_states()); + } + + // Register a semantic action with the given id + template <typename F> + void add_action(std::size_t unique_id, std::size_t state, F act) + { + // If you see an error here stating add_action is not a member of + // fusion::unused_type then you are probably having semantic actions + // attached to at least one token in the lexer definition without + // using the lex::lexertl::actor_lexer<> as its base class. + typedef typename Functor::wrap_action_type wrapper_type; + if (state == all_states_id) { + // add the action to all known states + typedef typename + basic_rules_type::string_size_t_map::value_type + state_type; + + std::size_t states = rules_.statemap().size(); + BOOST_FOREACH(state_type const& s, rules_.statemap()) { + for (std::size_t j = 0; j < states; ++j) + actions_.add_action(unique_id + j, s.second, wrapper_type::call(act)); + } + } + else { + actions_.add_action(unique_id, state, wrapper_type::call(act)); + } + } +// template <typename F> +// void add_action(std::size_t unique_id, char_type const* state, F act) +// { +// typedef typename Functor::wrap_action_type wrapper_type; +// actions_.add_action(unique_id, add_state(state), wrapper_type::call(act)); +// } + + // We do not minimize the state machine by default anymore because + // Ben said: "If you can afford to generate a lexer at runtime, there + // is little point in calling minimise." + // Go figure. + bool init_dfa(bool minimize = false) const + { + if (!initialized_dfa_) { + state_machine_.clear(); + typedef boost::lexer::basic_generator<char_type> generator; + generator::build (rules_, state_machine_); + if (minimize) + generator::minimise (state_machine_); + +#if defined(BOOST_SPIRIT_LEXERTL_DEBUG) + boost::lexer::debug::dump(state_machine_, std::cerr); +#endif + initialized_dfa_ = true; + +// // release memory held by rules description +// basic_rules_type rules; +// rules.init_state_info(rules_); // preserve states +// std::swap(rules, rules_); + } + return true; + } + + private: + // lexertl specific data + mutable boost::lexer::basic_state_machine<char_type> state_machine_; + boost::lexer::regex_flags flags_; + /*mutable*/ basic_rules_type rules_; + + typename Functor::semantic_actions_type actions_; + mutable bool initialized_dfa_; + + // generator functions must be able to access members directly + template <typename Lexer, typename F> + friend bool generate_static(Lexer const& + , std::basic_ostream<typename Lexer::char_type>& + , typename Lexer::char_type const*, F); + }; + + /////////////////////////////////////////////////////////////////////////// + // + // The actor_lexer class is another implementation of a Spirit.Lex + // lexer on top of Ben Hanson's lexertl library as outlined above (For + // more information about lexertl go here: + // http://www.benhanson.net/lexertl.html). + // + // The only difference to the lexer class above is that token_def + // definitions may have semantic (lexer) actions attached while being + // defined: + // + // int w; + // token_def word = "[^ \t\n]+"; + // self = word[++ref(w)]; // see example: word_count_lexer + // + // This class is supposed to be used as the first and only template + // parameter while instantiating instances of a lex::lexer class. + // + /////////////////////////////////////////////////////////////////////////// + template <typename Token = token<> + , typename Iterator = typename Token::iterator_type + , typename Functor = functor<Token, lexertl::detail::data, Iterator, mpl::true_> > + class actor_lexer : public lexer<Token, Iterator, Functor> + { + protected: + // Lexer instances can be created by means of a derived class only. + actor_lexer(unsigned int flags) + : lexer<Token, Iterator, Functor>(flags) {} + }; + +}}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/semantic_action_data.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/semantic_action_data.hpp new file mode 100644 index 0000000..30748c5 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/semantic_action_data.hpp @@ -0,0 +1,121 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_LEXER_SEMANTIC_ACTION_DATA_JUN_10_2009_0417PM) +#define BOOST_SPIRIT_LEX_LEXER_SEMANTIC_ACTION_DATA_JUN_10_2009_0417PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/lex/lexer/pass_flags.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/function.hpp> +#include <vector> + +namespace boost { namespace spirit { namespace lex { namespace lexertl +{ + namespace detail + { + /////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename SupportsState, typename Data> + struct semantic_actions; + + // This specialization of semantic_actions will be used if the token + // type (lexer definition) does not support states, which simplifies + // the data structures used to store the semantic action function + // objects. + template <typename Iterator, typename Data> + struct semantic_actions<Iterator, mpl::false_, Data> + { + typedef void functor_type(Iterator&, Iterator& + , BOOST_SCOPED_ENUM(pass_flags)&, std::size_t&, Data&); + typedef boost::function<functor_type> functor_wrapper_type; + + // add a semantic action function object + template <typename F> + void add_action(std::size_t unique_id, std::size_t, F act) + { + if (actions_.size() <= unique_id) + actions_.resize(unique_id + 1); + + actions_[unique_id] = act; + } + + // try to invoke a semantic action for the given token (unique_id) + BOOST_SCOPED_ENUM(pass_flags) invoke_actions(std::size_t /*state*/ + , std::size_t& id, std::size_t unique_id, Iterator& end + , Data& data) const + { + // if there is nothing to invoke, continue with 'match' + if (unique_id >= actions_.size() || !actions_[unique_id]) + return pass_flags::pass_normal; + + // Note: all arguments might be changed by the invoked semantic + // action + BOOST_SCOPED_ENUM(pass_flags) match = pass_flags::pass_normal; + actions_[unique_id](data.get_first(), end, match, id, data); + return match; + } + + std::vector<functor_wrapper_type> actions_; + }; + + // This specialization of semantic_actions will be used if the token + // type (lexer definition) needs to support states, resulting in a more + // complex data structure needed for storing the semantic action + // function objects. + template <typename Iterator, typename Data> + struct semantic_actions<Iterator, mpl::true_, Data> + { + typedef void functor_type(Iterator&, Iterator& + , BOOST_SCOPED_ENUM(pass_flags)&, std::size_t&, Data&); + typedef boost::function<functor_type> functor_wrapper_type; + + // add a semantic action function object + template <typename F> + void add_action(std::size_t unique_id, std::size_t state, F act) + { + if (actions_.size() <= state) + actions_.resize(state + 1); + + std::vector<functor_wrapper_type>& actions (actions_[state]); + if (actions.size() <= unique_id) + actions.resize(unique_id + 1); + + actions[unique_id] = act; + } + + // try to invoke a semantic action for the given token (unique_id) + BOOST_SCOPED_ENUM(pass_flags) invoke_actions(std::size_t state + , std::size_t& id, std::size_t unique_id, Iterator& end + , Data& data) const + { + // if there is no action defined for this state, return match + if (state >= actions_.size()) + return pass_flags::pass_normal; + + // if there is nothing to invoke, continue with 'match' + std::vector<functor_wrapper_type> const& actions = actions_[state]; + if (unique_id >= actions.size() || !actions[unique_id]) + return pass_flags::pass_normal; + + // set token value + data.set_end(end); + + // Note: all arguments might be changed by the invoked semantic + // action + BOOST_SCOPED_ENUM(pass_flags) match = pass_flags::pass_normal; + actions[unique_id](data.get_first(), end, match, id, data); + return match; + } + + std::vector<std::vector<functor_wrapper_type> > actions_; + }; + } + +}}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/token.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/token.hpp new file mode 100644 index 0000000..90961af --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/token.hpp @@ -0,0 +1,654 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_TOKEN_FEB_10_2008_0751PM) +#define BOOST_SPIRIT_LEX_TOKEN_FEB_10_2008_0751PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/config.hpp> +#include <boost/detail/workaround.hpp> +#include <boost/spirit/home/qi/detail/assign_to.hpp> +#include <boost/spirit/home/support/attributes.hpp> +#include <boost/spirit/home/support/argument.hpp> +#include <boost/spirit/home/support/detail/lexer/generator.hpp> +#include <boost/spirit/home/support/detail/lexer/rules.hpp> +#include <boost/spirit/home/support/detail/lexer/consts.hpp> +#include <boost/spirit/home/support/utree/utree_traits_fwd.hpp> +#include <boost/spirit/home/lex/lexer/terminals.hpp> +#include <boost/fusion/include/vector.hpp> +#include <boost/fusion/include/at.hpp> +#include <boost/fusion/include/value_at.hpp> +#include <boost/detail/iterator.hpp> +#include <boost/variant.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/mpl/is_sequence.hpp> +#include <boost/mpl/begin.hpp> +#include <boost/mpl/insert.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/or.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/range/iterator_range.hpp> +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +#include <boost/static_assert.hpp> +#endif + +#if defined(BOOST_SPIRIT_DEBUG) +#include <iosfwd> +#endif + +namespace boost { namespace spirit { namespace lex { namespace lexertl +{ + /////////////////////////////////////////////////////////////////////////// + // + // The token is the type of the objects returned by default by the + // iterator. + // + // template parameters: + // Iterator The type of the iterator used to access the + // underlying character stream. + // AttributeTypes A mpl sequence containing the types of all + // required different token values to be supported + // by this token type. + // HasState A mpl::bool_ indicating, whether this token type + // should support lexer states. + // Idtype The type to use for the token id (defaults to + // std::size_t). + // + // It is possible to use other token types with the spirit::lex + // framework as well. If you plan to use a different type as your token + // type, you'll need to expose the following things from your token type + // to make it compatible with spirit::lex: + // + // typedefs + // iterator_type The type of the iterator used to access the + // underlying character stream. + // + // id_type The type of the token id used. + // + // methods + // default constructor + // This should initialize the token as an end of + // input token. + // constructors The prototype of the other required + // constructors should be: + // + // token(int) + // This constructor should initialize the token as + // an invalid token (not carrying any specific + // values) + // + // where: the int is used as a tag only and its value is + // ignored + // + // and: + // + // token(Idtype id, std::size_t state, + // iterator_type first, iterator_type last); + // + // where: id: token id + // state: lexer state this token was matched in + // first, last: pair of iterators marking the matched + // range in the underlying input stream + // + // accessors + // id() return the token id of the matched input sequence + // id(newid) set the token id of the token instance + // + // state() return the lexer state this token was matched in + // + // value() return the token value + // + // Additionally, you will have to implement a couple of helper functions + // in the same namespace as the token type: a comparison operator==() to + // compare your token instances, a token_is_valid() function and different + // specializations of the Spirit customization point + // assign_to_attribute_from_value as shown below. + // + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator = char const* + , typename AttributeTypes = mpl::vector0<> + , typename HasState = mpl::true_ + , typename Idtype = std::size_t> + struct token; + + /////////////////////////////////////////////////////////////////////////// + // This specialization of the token type doesn't contain any item data and + // doesn't support working with lexer states. + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename Idtype> + struct token<Iterator, lex::omit, mpl::false_, Idtype> + { + typedef Iterator iterator_type; + typedef mpl::false_ has_state; + typedef Idtype id_type; + typedef unused_type token_value_type; + + // default constructed tokens correspond to EOI tokens + token() : id_(id_type(boost::lexer::npos)) {} + + // construct an invalid token + explicit token(int) : id_(id_type(0)) {} + + token(id_type id, std::size_t) : id_(id) {} + + token(id_type id, std::size_t, token_value_type) + : id_(id) {} + + token_value_type& value() { static token_value_type u; return u; } + token_value_type const& value() const { return unused; } + +#if defined(BOOST_SPIRIT_DEBUG) + token(id_type id, std::size_t, Iterator const& first + , Iterator const& last) + : matched_(first, last) + , id_(id) {} +#else + token(id_type id, std::size_t, Iterator const&, Iterator const&) + : id_(id) {} +#endif + + // this default conversion operator is needed to allow the direct + // usage of tokens in conjunction with the primitive parsers defined + // in Qi + operator id_type() const { return id_; } + + // Retrieve or set the token id of this token instance. + id_type id() const { return id_; } + void id(id_type newid) { id_ = newid; } + + std::size_t state() const { return 0; } // always '0' (INITIAL state) + + bool is_valid() const + { + return 0 != id_ && id_type(boost::lexer::npos) != id_; + } + +#if defined(BOOST_SPIRIT_DEBUG) +#if BOOST_WORKAROUND(BOOST_MSVC, == 1600) + // workaround for MSVC10 which has problems copying a default + // constructed iterator_range + token& operator= (token const& rhs) + { + if (this != &rhs) + { + id_ = rhs.id_; + if (is_valid()) + matched_ = rhs.matched_; + } + return *this; + } +#endif + std::pair<Iterator, Iterator> matched_; +#endif + + protected: + id_type id_; // token id, 0 if nothing has been matched + }; + +#if defined(BOOST_SPIRIT_DEBUG) + template <typename Char, typename Traits, typename Iterator + , typename AttributeTypes, typename HasState, typename Idtype> + inline std::basic_ostream<Char, Traits>& + operator<< (std::basic_ostream<Char, Traits>& os + , token<Iterator, AttributeTypes, HasState, Idtype> const& t) + { + if (t.is_valid()) { + Iterator end = t.matched_.second; + for (Iterator it = t.matched_.first; it != end; ++it) + os << *it; + } + else { + os << "<invalid token>"; + } + return os; + } +#endif + + /////////////////////////////////////////////////////////////////////////// + // This specialization of the token type doesn't contain any item data but + // supports working with lexer states. + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename Idtype> + struct token<Iterator, lex::omit, mpl::true_, Idtype> + : token<Iterator, lex::omit, mpl::false_, Idtype> + { + private: + typedef token<Iterator, lex::omit, mpl::false_, Idtype> base_type; + + public: + typedef typename base_type::id_type id_type; + typedef Iterator iterator_type; + typedef mpl::true_ has_state; + typedef unused_type token_value_type; + + // default constructed tokens correspond to EOI tokens + token() : state_(boost::lexer::npos) {} + + // construct an invalid token + explicit token(int) : base_type(0), state_(boost::lexer::npos) {} + + token(id_type id, std::size_t state) + : base_type(id, boost::lexer::npos), state_(state) {} + + token(id_type id, std::size_t state, token_value_type) + : base_type(id, boost::lexer::npos, unused) + , state_(state) {} + + token(id_type id, std::size_t state + , Iterator const& first, Iterator const& last) + : base_type(id, boost::lexer::npos, first, last) + , state_(state) {} + + std::size_t state() const { return state_; } + +#if defined(BOOST_SPIRIT_DEBUG) && BOOST_WORKAROUND(BOOST_MSVC, == 1600) + // workaround for MSVC10 which has problems copying a default + // constructed iterator_range + token& operator= (token const& rhs) + { + if (this != &rhs) + { + this->base_type::operator=(static_cast<base_type const&>(rhs)); + state_ = rhs.state_; + } + return *this; + } +#endif + + protected: + std::size_t state_; // lexer state this token was matched in + }; + + /////////////////////////////////////////////////////////////////////////// + // The generic version of the token type derives from the + // specialization above and adds a single data member holding the item + // data carried by the token instance. + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + /////////////////////////////////////////////////////////////////////// + // Meta-function to calculate the type of the variant data item to be + // stored with each token instance. + // + // Note: The iterator pair needs to be the first type in the list of + // types supported by the generated variant type (this is being + // used to identify whether the stored data item in a particular + // token instance needs to be converted from the pair of + // iterators (see the first of the assign_to_attribute_from_value + // specializations below). + /////////////////////////////////////////////////////////////////////// + template <typename IteratorPair, typename AttributeTypes> + struct token_value_typesequence + { + typedef typename mpl::insert< + AttributeTypes + , typename mpl::begin<AttributeTypes>::type + , IteratorPair + >::type sequence_type; + typedef typename make_variant_over<sequence_type>::type type; + }; + + /////////////////////////////////////////////////////////////////////// + // The type of the data item stored with a token instance is defined + // by the template parameter 'AttributeTypes' and may be: + // + // lex::omit: no data item is stored with the token + // instance (this is handled by the + // specializations of the token class + // below) + // mpl::vector0<>: each token instance stores a pair of + // iterators pointing to the matched input + // sequence + // mpl::vector<...>: each token instance stores a variant being + // able to store the pair of iterators pointing + // to the matched input sequence, or any of the + // types a specified in the mpl::vector<> + // + // All this is done to ensure the token type is as small (in terms + // of its byte-size) as possible. + /////////////////////////////////////////////////////////////////////// + template <typename IteratorPair, typename AttributeTypes> + struct token_value_type + : mpl::eval_if< + mpl::or_< + is_same<AttributeTypes, mpl::vector0<> > + , is_same<AttributeTypes, mpl::vector<> > > + , mpl::identity<IteratorPair> + , token_value_typesequence<IteratorPair, AttributeTypes> > + {}; + } + + template <typename Iterator, typename AttributeTypes, typename HasState + , typename Idtype> + struct token : token<Iterator, lex::omit, HasState, Idtype> + { + private: // precondition assertions +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + BOOST_STATIC_ASSERT((mpl::is_sequence<AttributeTypes>::value || + is_same<AttributeTypes, lex::omit>::value)); +#endif + typedef token<Iterator, lex::omit, HasState, Idtype> base_type; + + protected: + // If no additional token value types are given, the the token will + // hold the plain pair of iterators pointing to the matched range + // in the underlying input sequence. Otherwise the token value is + // stored as a variant and will again hold the pair of iterators but + // is able to hold any of the given data types as well. The conversion + // from the iterator pair to the required data type is done when it is + // accessed for the first time. + typedef iterator_range<Iterator> iterpair_type; + + public: + typedef typename base_type::id_type id_type; + typedef typename detail::token_value_type< + iterpair_type, AttributeTypes + >::type token_value_type; + + typedef Iterator iterator_type; + + // default constructed tokens correspond to EOI tokens + token() : value_(iterpair_type(iterator_type(), iterator_type())) {} + + // construct an invalid token + explicit token(int) + : base_type(0) + , value_(iterpair_type(iterator_type(), iterator_type())) {} + + token(id_type id, std::size_t state, token_value_type const& value) + : base_type(id, state, value) + , value_(value) {} + + token(id_type id, std::size_t state, Iterator const& first + , Iterator const& last) + : base_type(id, state, first, last) + , value_(iterpair_type(first, last)) {} + + token_value_type& value() { return value_; } + token_value_type const& value() const { return value_; } + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1600) + // workaround for MSVC10 which has problems copying a default + // constructed iterator_range + token& operator= (token const& rhs) + { + if (this != &rhs) + { + this->base_type::operator=(static_cast<base_type const&>(rhs)); + if (this->is_valid()) + value_ = rhs.value_; + } + return *this; + } +#endif + + protected: + token_value_type value_; // token value, by default a pair of iterators + }; + + /////////////////////////////////////////////////////////////////////////// + // tokens are considered equal, if their id's match (these are unique) + template <typename Iterator, typename AttributeTypes, typename HasState + , typename Idtype> + inline bool + operator== (token<Iterator, AttributeTypes, HasState, Idtype> const& lhs, + token<Iterator, AttributeTypes, HasState, Idtype> const& rhs) + { + return lhs.id() == rhs.id(); + } + + /////////////////////////////////////////////////////////////////////////// + // This overload is needed by the multi_pass/functor_input_policy to + // validate a token instance. It has to be defined in the same namespace + // as the token class itself to allow ADL to find it. + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename AttributeTypes, typename HasState + , typename Idtype> + inline bool + token_is_valid(token<Iterator, AttributeTypes, HasState, Idtype> const& t) + { + return t.is_valid(); + } +}}}} + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + // We have to provide specializations for the customization point + // assign_to_attribute_from_value allowing to extract the needed value + // from the token. + /////////////////////////////////////////////////////////////////////////// + + // This is called from the parse function of token_def if the token_def + // has been defined to carry a special attribute type + template <typename Attribute, typename Iterator, typename AttributeTypes + , typename HasState, typename Idtype> + struct assign_to_attribute_from_value<Attribute + , lex::lexertl::token<Iterator, AttributeTypes, HasState, Idtype> > + { + static void + call(lex::lexertl::token<Iterator, AttributeTypes, HasState, Idtype> const& t + , Attribute& attr) + { + // The goal of this function is to avoid the conversion of the pair of + // iterators (to the matched character sequence) into the token value + // of the required type being done more than once. For this purpose it + // checks whether the stored value type is still the default one (pair + // of iterators) and if yes, replaces the pair of iterators with the + // converted value to be returned from subsequent calls. + + if (0 == t.value().which()) { + // first access to the token value + typedef iterator_range<Iterator> iterpair_type; + iterpair_type const& ip = boost::get<iterpair_type>(t.value()); + + // Interestingly enough we use the assign_to() framework defined in + // Spirit.Qi allowing to convert the pair of iterators to almost any + // required type (assign_to(), if available, uses the standard Spirit + // parsers to do the conversion). + spirit::traits::assign_to(ip.begin(), ip.end(), attr); + + // If you get an error during the compilation of the following + // assignment expression, you probably forgot to list one or more + // types used as token value types (in your token_def<...> + // definitions) in your definition of the token class. I.e. any token + // value type used for a token_def<...> definition has to be listed + // during the declaration of the token type to use. For instance let's + // assume we have two token_def's: + // + // token_def<int> number; number = "..."; + // token_def<std::string> identifier; identifier = "..."; + // + // Then you'll have to use the following token type definition + // (assuming you are using the token class): + // + // typedef mpl::vector<int, std::string> token_values; + // typedef token<base_iter_type, token_values> token_type; + // + // where: base_iter_type is the iterator type used to expose the + // underlying input stream. + // + // This token_type has to be used as the second template parameter + // to the lexer class: + // + // typedef lexer<base_iter_type, token_type> lexer_type; + // + // again, assuming you're using the lexer<> template for your + // tokenization. + + typedef lex::lexertl::token< + Iterator, AttributeTypes, HasState, Idtype> token_type; + spirit::traits::assign_to( + attr, const_cast<token_type&>(t).value()); // re-assign value + } + else { + // reuse the already assigned value + spirit::traits::assign_to(boost::get<Attribute>(t.value()), attr); + } + } + }; + + template <typename Attribute, typename Iterator, typename AttributeTypes + , typename HasState, typename Idtype> + struct assign_to_container_from_value<Attribute + , lex::lexertl::token<Iterator, AttributeTypes, HasState, Idtype> > + : assign_to_attribute_from_value<Attribute + , lex::lexertl::token<Iterator, AttributeTypes, HasState, Idtype> > + {}; + + template <typename Iterator, typename AttributeTypes + , typename HasState, typename Idtype> + struct assign_to_container_from_value<utree + , lex::lexertl::token<Iterator, AttributeTypes, HasState, Idtype> > + : assign_to_attribute_from_value<utree + , lex::lexertl::token<Iterator, AttributeTypes, HasState, Idtype> > + {}; + + template <typename Iterator> + struct assign_to_container_from_value< + iterator_range<Iterator>, iterator_range<Iterator> > + { + static void + call(iterator_range<Iterator> const& val, iterator_range<Iterator>& attr) + { + attr = val; + } + }; + + // These are called from the parse function of token_def if the token type + // has no special attribute type assigned + template <typename Attribute, typename Iterator, typename HasState + , typename Idtype> + struct assign_to_attribute_from_value<Attribute + , lex::lexertl::token<Iterator, mpl::vector0<>, HasState, Idtype> > + { + static void + call(lex::lexertl::token<Iterator, mpl::vector0<>, HasState, Idtype> const& t + , Attribute& attr) + { + // The default type returned by the token_def parser component (if + // it has no token value type assigned) is the pair of iterators + // to the matched character sequence. + spirit::traits::assign_to(t.value().begin(), t.value().end(), attr); + } + }; + +// template <typename Attribute, typename Iterator, typename HasState +// , typename Idtype> +// struct assign_to_container_from_value<Attribute +// , lex::lexertl::token<Iterator, mpl::vector0<>, HasState, Idtype> > +// : assign_to_attribute_from_value<Attribute +// , lex::lexertl::token<Iterator, mpl::vector0<>, HasState, Idtype> > +// {}; + + // same as above but using mpl::vector<> instead of mpl::vector0<> + template <typename Attribute, typename Iterator, typename HasState + , typename Idtype> + struct assign_to_attribute_from_value<Attribute + , lex::lexertl::token<Iterator, mpl::vector<>, HasState, Idtype> > + { + static void + call(lex::lexertl::token<Iterator, mpl::vector<>, HasState, Idtype> const& t + , Attribute& attr) + { + // The default type returned by the token_def parser component (if + // it has no token value type assigned) is the pair of iterators + // to the matched character sequence. + spirit::traits::assign_to(t.value().begin(), t.value().end(), attr); + } + }; + +// template <typename Attribute, typename Iterator, typename HasState +// , typename Idtype> +// struct assign_to_container_from_value<Attribute +// , lex::lexertl::token<Iterator, mpl::vector<>, HasState, Idtype> > +// : assign_to_attribute_from_value<Attribute +// , lex::lexertl::token<Iterator, mpl::vector<>, HasState, Idtype> > +// {}; + + // This is called from the parse function of token_def if the token type + // has been explicitly omitted (i.e. no attribute value is used), which + // essentially means that every attribute gets initialized using default + // constructed values. + template <typename Attribute, typename Iterator, typename HasState + , typename Idtype> + struct assign_to_attribute_from_value<Attribute + , lex::lexertl::token<Iterator, lex::omit, HasState, Idtype> > + { + static void + call(lex::lexertl::token<Iterator, lex::omit, HasState, Idtype> const& t + , Attribute& attr) + { + // do nothing + } + }; + + template <typename Attribute, typename Iterator, typename HasState + , typename Idtype> + struct assign_to_container_from_value<Attribute + , lex::lexertl::token<Iterator, lex::omit, HasState, Idtype> > + : assign_to_attribute_from_value<Attribute + , lex::lexertl::token<Iterator, lex::omit, HasState, Idtype> > + {}; + + // This is called from the parse function of lexer_def_ + template <typename Iterator, typename AttributeTypes, typename HasState + , typename Idtype_, typename Idtype> + struct assign_to_attribute_from_value< + fusion::vector2<Idtype_, iterator_range<Iterator> > + , lex::lexertl::token<Iterator, AttributeTypes, HasState, Idtype> > + { + static void + call(lex::lexertl::token<Iterator, AttributeTypes, HasState, Idtype> const& t + , fusion::vector2<Idtype_, iterator_range<Iterator> >& attr) + { + // The type returned by the lexer_def_ parser components is a + // fusion::vector containing the token id of the matched token + // and the pair of iterators to the matched character sequence. + typedef iterator_range<Iterator> iterpair_type; + typedef fusion::vector2<Idtype_, iterator_range<Iterator> > + attribute_type; + + iterpair_type const& ip = boost::get<iterpair_type>(t.value()); + attr = attribute_type(t.id(), ip); + } + }; + + template <typename Iterator, typename AttributeTypes, typename HasState + , typename Idtype_, typename Idtype> + struct assign_to_container_from_value< + fusion::vector2<Idtype_, iterator_range<Iterator> > + , lex::lexertl::token<Iterator, AttributeTypes, HasState, Idtype> > + : assign_to_attribute_from_value< + fusion::vector2<Idtype_, iterator_range<Iterator> > + , lex::lexertl::token<Iterator, AttributeTypes, HasState, Idtype> > + {}; + + /////////////////////////////////////////////////////////////////////////// + // Overload debug output for a single token, this integrates lexer tokens + // with Qi's simple_trace debug facilities + template <typename Iterator, typename Attribute, typename HasState + , typename Idtype> + struct token_printer_debug< + lex::lexertl::token<Iterator, Attribute, HasState, Idtype> > + { + typedef lex::lexertl::token<Iterator, Attribute, HasState, Idtype> token_type; + + template <typename Out> + static void print(Out& out, token_type const& val) + { + out << '['; + spirit::traits::print_token(out, val.value()); + out << ']'; + } + }; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp new file mode 100644 index 0000000..e128d27 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/lexertl/wrap_action.hpp @@ -0,0 +1,154 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 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_WRAP_ACTION_APR_19_2008_0103PM) +#define BOOST_SPIRIT_WRAP_ACTION_APR_19_2008_0103PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/include/phoenix_core.hpp> +#include <boost/spirit/include/phoenix_bind.hpp> +#include <boost/spirit/include/phoenix_scope.hpp> + +#include <boost/spirit/home/support/attributes.hpp> +#include <boost/spirit/home/lex/lexer/pass_flags.hpp> + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { namespace lex { namespace lexertl +{ + namespace detail + { + template <typename FunctionType, typename Iterator, typename Context + , typename IdType> + struct wrap_action + { + // plain functions with 5 arguments, function objects (including + // phoenix actors) are not touched at all + template <typename F> + static FunctionType call(F const& f) + { + return f; + } + + // semantic actions with 4 arguments + template <typename F> + static void arg4_action(F* f, Iterator& start, Iterator& end + , BOOST_SCOPED_ENUM(pass_flags)& pass, IdType& id + , Context const&) + { + f(start, end, pass, id); + } + + template <typename A0, typename A1, typename A2, typename A3> + static FunctionType call(void (*f)(A0, A1, A2, A3)) + { + void (*pf)(void(*)(A0, A1, A2, A3) + , Iterator&, Iterator&, BOOST_SCOPED_ENUM(pass_flags)& + , IdType&, Context const&) = &wrap_action::arg4_action; + + using phoenix::arg_names::_1; + using phoenix::arg_names::_2; + using phoenix::arg_names::_3; + using phoenix::arg_names::_4; + using phoenix::arg_names::_5; + return phoenix::bind(pf, f, _1, _2, _3, _4, _5); + } + + // semantic actions with 3 arguments + template <typename F> + static void arg3_action(F* f, Iterator& start, Iterator& end + , BOOST_SCOPED_ENUM(pass_flags)& pass, IdType + , Context const&) + { + f(start, end, pass); + } + + template <typename A0, typename A1, typename A2> + static FunctionType call(void (*f)(A0, A1, A2)) + { + void (*pf)(void(*)(A0, A1, A2), Iterator&, Iterator& + , BOOST_SCOPED_ENUM(pass_flags)&, IdType + , Context const&) = &wrap_action::arg3_action; + + using phoenix::arg_names::_1; + using phoenix::arg_names::_2; + using phoenix::arg_names::_3; + using phoenix::arg_names::_4; + using phoenix::arg_names::_5; + return phoenix::bind(pf, f, _1, _2, _3, _4, _5); + } + + // semantic actions with 2 arguments + template <typename F> + static void arg2_action(F* f, Iterator& start, Iterator& end + , BOOST_SCOPED_ENUM(pass_flags)&, IdType, Context const&) + { + f (start, end); + } + + template <typename A0, typename A1> + static FunctionType call(void (*f)(A0, A1)) + { + void (*pf)(void(*)(A0, A1), Iterator&, Iterator& + , BOOST_SCOPED_ENUM(pass_flags)& + , IdType, Context const&) = &wrap_action::arg2_action; + + using phoenix::arg_names::_1; + using phoenix::arg_names::_2; + using phoenix::arg_names::_3; + using phoenix::arg_names::_4; + using phoenix::arg_names::_5; + return phoenix::bind(pf, f, _1, _2, _3, _4, _5); + } + + // we assume that either both iterators are to be passed to the + // semantic action or none iterator at all (i.e. it's not possible + // to have a lexer semantic action function taking one arguments). + + // semantic actions with 0 argument + template <typename F> + static void arg0_action(F* f, Iterator&, Iterator& + , BOOST_SCOPED_ENUM(pass_flags)&, IdType, Context const&) + { + f(); + } + + static FunctionType call(void (*f)()) + { + void (*pf)(void(*)(), Iterator&, Iterator& + , BOOST_SCOPED_ENUM(pass_flags)& + , IdType, Context const&) = &arg0_action; + + using phoenix::arg_names::_1; + using phoenix::arg_names::_2; + using phoenix::arg_names::_3; + using phoenix::arg_names::_4; + using phoenix::arg_names::_5; + return phoenix::bind(pf, f, _1, _2, _3, _4, _5); + } + }; + + // specialization allowing to skip wrapping for lexer types not + // supporting semantic actions + template <typename Iterator, typename Context, typename Idtype> + struct wrap_action<unused_type, Iterator, Context, Idtype> + { + // plain function objects are not touched at all + template <typename F> + static F const& call(F const& f) + { + return f; + } + }; + } + +}}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/pass_flags.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/pass_flags.hpp new file mode 100644 index 0000000..6cda3ba --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/pass_flags.hpp @@ -0,0 +1,28 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_PASS_FLAGS_JUN_09_2009_0840PM) +#define BOOST_SPIRIT_LEX_PASS_FLAGS_JUN_09_2009_0840PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/detail/scoped_enum_emulation.hpp> + +namespace boost { namespace spirit { namespace lex +{ + /////////////////////////////////////////////////////////////////////////// + BOOST_SCOPED_ENUM_START(pass_flags) + { + pass_fail = 0, // make the current match fail in retrospective + pass_normal = 1, // continue normal token matching, that's the default + pass_ignore = 2 // ignore the current token and start matching the next + }; + BOOST_SCOPED_ENUM_END + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/sequence.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/sequence.hpp new file mode 100644 index 0000000..b7fad61 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/sequence.hpp @@ -0,0 +1,72 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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(SPIRIT_LEX_SEQUENCE_MAR_28_2007_0610PM) +#define SPIRIT_LEX_SEQUENCE_MAR_28_2007_0610PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/lex/domain.hpp> +#include <boost/spirit/home/lex/lexer_type.hpp> +#include <boost/spirit/home/lex/meta_compiler.hpp> +#include <boost/spirit/home/lex/detail/sequence_function.hpp> +#include <boost/fusion/include/any.hpp> + +namespace boost { namespace spirit +{ + /////////////////////////////////////////////////////////////////////////// + // Enablers + /////////////////////////////////////////////////////////////////////////// + template <> + struct use_operator<lex::domain, proto::tag::bitwise_or> // enables | + : mpl::true_ {}; + + template <> + struct flatten_tree<lex::domain, proto::tag::bitwise_or> // flattens | + : mpl::true_ {}; + +}} + +namespace boost { namespace spirit { namespace lex +{ + template <typename Elements> + struct sequence : nary_lexer<sequence<Elements> > + { + sequence(Elements const& elements) + : elements(elements) {} + + template <typename LexerDef, typename String> + void collect(LexerDef& lexdef, String const& state + , String const& targetstate) const + { + typedef detail::sequence_collect_function<LexerDef, String> + collect_function_type; + collect_function_type f (lexdef, state, targetstate); + fusion::any(elements, f); + } + + template <typename LexerDef> + void add_actions(LexerDef& lexdef) const + { + detail::sequence_add_actions_function<LexerDef> f (lexdef); + fusion::any(elements, f); + } + + Elements elements; + }; + + /////////////////////////////////////////////////////////////////////////// + // Lexer generator: make_xxx function (objects) + /////////////////////////////////////////////////////////////////////////// + template <typename Elements, typename Modifiers> + struct make_composite<proto::tag::bitwise_or, Elements, Modifiers> + : make_nary_composite<Elements, sequence> + {}; + +}}} // namespace boost::spirit::lex + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/string_token_def.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/string_token_def.hpp new file mode 100644 index 0000000..9eb9870 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/string_token_def.hpp @@ -0,0 +1,178 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_STRING_TOKEN_DEF_MAR_28_2007_0722PM) +#define BOOST_SPIRIT_LEX_STRING_TOKEN_DEF_MAR_28_2007_0722PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/common_terminals.hpp> +#include <boost/spirit/home/support/string_traits.hpp> +#include <boost/spirit/home/lex/domain.hpp> +#include <boost/spirit/home/lex/lexer_type.hpp> +#include <boost/spirit/home/lex/meta_compiler.hpp> +#include <boost/type_traits/add_const.hpp> +#include <boost/type_traits/add_reference.hpp> +#include <boost/type_traits/is_integral.hpp> +#include <boost/type_traits/remove_const.hpp> +#include <boost/fusion/include/vector.hpp> +#include <boost/fusion/include/at.hpp> + +namespace boost { namespace spirit +{ + /////////////////////////////////////////////////////////////////////////// + // Enablers + /////////////////////////////////////////////////////////////////////////// + + // enables strings + template <typename T> + struct use_terminal<lex::domain, T + , typename enable_if<traits::is_string<T> >::type> + : mpl::true_ {}; + + // enables string(str) + template <typename CharEncoding, typename A0> + struct use_terminal<lex::domain + , terminal_ex< + tag::char_code<tag::string, CharEncoding> + , fusion::vector1<A0> > > + : traits::is_string<A0> {}; + + // enables string(str, ID) + template <typename CharEncoding, typename A0, typename A1> + struct use_terminal<lex::domain + , terminal_ex< + tag::char_code<tag::string, CharEncoding> + , fusion::vector2<A0, A1> > > + : traits::is_string<A0> {}; +}} + +namespace boost { namespace spirit { namespace lex +{ + // use string from standard character set by default +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + using spirit::standard::string; +#endif + using spirit::standard::string_type; + + /////////////////////////////////////////////////////////////////////////// + // + // string_token_def + // represents a string based token definition + // + /////////////////////////////////////////////////////////////////////////// + template <typename String, typename IdType = std::size_t + , typename CharEncoding = char_encoding::standard> + struct string_token_def + : primitive_lexer<string_token_def<String, IdType, CharEncoding> > + { + typedef typename + remove_const<typename traits::char_type_of<String>::type>::type + char_type; + typedef std::basic_string<char_type> string_type; + + string_token_def(typename add_reference<String>::type str, IdType const& id) + : str_(str), id_(id), unique_id_(std::size_t(~0)) + , token_state_(std::size_t(~0)) + {} + + template <typename LexerDef, typename String_> + void collect(LexerDef& lexdef, String_ const& state + , String_ const& targetstate) const + { + std::size_t state_id = lexdef.add_state(state.c_str()); + + // If the following assertion fires you are probably trying to use + // a single string_token_def instance in more than one lexer state. + // This is not possible. Please create a separate token_def instance + // from the same regular expression for each lexer state it needs + // to be associated with. + BOOST_ASSERT( + (std::size_t(~0) == token_state_ || state_id == token_state_) && + "Can't use single string_token_def with more than one lexer state"); + + char_type const* target = targetstate.empty() ? 0 : targetstate.c_str(); + if (target) + lexdef.add_state(target); + + token_state_ = state_id; + + typedef typename LexerDef::id_type id_type; + if (IdType(~0) == id_) + id_ = IdType(lexdef.get_next_id()); + + unique_id_ = lexdef.add_token (state.c_str(), str_, id_, target); + } + + template <typename LexerDef> + void add_actions(LexerDef&) const {} + + std::size_t id() const { return id_; } + std::size_t unique_id() const { return unique_id_; } + std::size_t state() const { return token_state_; } + + string_type str_; + mutable IdType id_; + mutable std::size_t unique_id_; + mutable std::size_t token_state_; + }; + + /////////////////////////////////////////////////////////////////////////// + // Lex generators: make_xxx function (objects) + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Modifiers> + struct make_primitive<T, Modifiers + , typename enable_if<traits::is_string<T> >::type> + { + typedef typename add_const<T>::type const_string; + typedef string_token_def<const_string> result_type; + + result_type operator()( + typename add_reference<const_string>::type str, unused_type) const + { + return result_type(str, std::size_t(~0)); + } + }; + + template <typename Modifiers, typename CharEncoding, typename A0> + struct make_primitive< + terminal_ex< + tag::char_code<tag::string, CharEncoding> + , fusion::vector1<A0> > + , Modifiers> + { + typedef typename add_const<A0>::type const_string; + typedef string_token_def<const_string, std::size_t, CharEncoding> + result_type; + + template <typename Terminal> + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args), std::size_t(~0)); + } + }; + + template <typename Modifiers, typename CharEncoding, typename A0, typename A1> + struct make_primitive< + terminal_ex< + tag::char_code<tag::string, CharEncoding> + , fusion::vector2<A0, A1> > + , Modifiers> + { + typedef typename add_const<A0>::type const_string; + typedef string_token_def<const_string, A1, CharEncoding> result_type; + + template <typename Terminal> + result_type operator()(Terminal const& term, unused_type) const + { + return result_type( + fusion::at_c<0>(term.args), fusion::at_c<1>(term.args)); + } + }; +}}} // namespace boost::spirit::lex + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/support_functions.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/support_functions.hpp new file mode 100644 index 0000000..f3987c6 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/support_functions.hpp @@ -0,0 +1,205 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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(SPIRIT_LEX_SUPPORT_FUNCTIONS_JUN_08_2009_0211PM) +#define SPIRIT_LEX_SUPPORT_FUNCTIONS_JUN_08_2009_0211PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/include/phoenix_core.hpp> +#include <boost/spirit/home/support/detail/scoped_enum_emulation.hpp> +#include <boost/spirit/home/lex/lexer/pass_flags.hpp> + +#include <boost/spirit/home/lex/lexer/support_functions_expression.hpp> + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { namespace lex +{ + /////////////////////////////////////////////////////////////////////////// + // The function object less_type is used by the implementation of the + // support function lex::less(). Its functionality is equivalent to flex' + // function yyless(): it returns an iterator positioned to the nth input + // character beyond the current start iterator (i.e. by assigning the + // return value to the placeholder '_end' it is possible to return all but + // the first n characters of the current token back to the input stream. + // + // This Phoenix actor is invoked whenever the function lex::less(n) is + // used inside a lexer semantic action: + // + // lex::token_def<> identifier = "[a-zA-Z_][a-zA-Z0-9_]*"; + // this->self = identifier [ _end = lex::less(4) ]; + // + // The example shows how to limit the length of the matched identifier to + // four characters. + // + // Note: the function lex::less() has no effect if used on it's own, you + // need to use the returned result in order to make use of its + // functionality. + template <typename Actor> + struct less_type + { + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result + { + typedef typename + remove_const< + typename mpl::at_c<typename Env::args_type, 4>::type + >::type + context_type; + typedef typename context_type::base_iterator_type type; + }; + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + typename result<Env>::type it; + return fusion::at_c<4>(env.args()).less(it, actor_()); + } + + less_type(Actor const& actor) + : actor_(actor) {} + + Actor actor_; + }; + + // The function lex::less() is used to create a Phoenix actor allowing to + // implement functionality similar to flex' function yyless(). + template <typename T> + inline typename expression::less< + typename phoenix::as_actor<T>::type + >::type const + less(T const& v) + { + return expression::less<T>::make(phoenix::as_actor<T>::convert(v)); + } + + /////////////////////////////////////////////////////////////////////////// + // The function object more_type is used by the implementation of the + // support function lex::more(). Its functionality is equivalent to flex' + // function yymore(): it tells the lexer that the next time it matches a + // rule, the corresponding token should be appended onto the current token + // value rather than replacing it. + // + // This Phoenix actor is invoked whenever the function lex::more(n) is + // used inside a lexer semantic action: + // + // lex::token_def<> identifier = "[a-zA-Z_][a-zA-Z0-9_]*"; + // this->self = identifier [ lex::more() ]; + // + // The example shows how prefix the next matched token with the matched + // identifier. + struct more_type + { + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result + { + typedef void type; + }; + + template <typename Env> + void eval(Env const& env) const + { + fusion::at_c<4>(env.args()).more(); + } + }; + + // The function lex::more() is used to create a Phoenix actor allowing to + // implement functionality similar to flex' function yymore(). + //inline expression::more<mpl::void_>::type const + inline phoenix::actor<more_type> more() + { + return phoenix::actor<more_type>(); + } + + /////////////////////////////////////////////////////////////////////////// + // The function object lookahead_type is used by the implementation of the + // support function lex::lookahead(). Its functionality is needed to + // emulate the flex' lookahead operator a/b. Use lex::lookahead() inside + // of lexer semantic actions to test whether the argument to this function + // matches the current look ahead input. lex::lookahead() can be used with + // either a token id or a token_def instance as its argument. It returns + // a bool indicating whether the look ahead has been matched. + template <typename IdActor, typename StateActor> + struct lookahead_type + { + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result + { + typedef bool type; + }; + + template <typename Env> + bool eval(Env const& env) const + { + return fusion::at_c<4>(env.args()). + lookahead(id_actor_(), state_actor_()); + } + + lookahead_type(IdActor const& id_actor, StateActor const& state_actor) + : id_actor_(id_actor), state_actor_(state_actor) {} + + IdActor id_actor_; + StateActor state_actor_; + }; + + // The function lex::lookahead() is used to create a Phoenix actor + // allowing to implement functionality similar to flex' lookahead operator + // a/b. + template <typename T> + inline typename expression::lookahead< + typename phoenix::as_actor<T>::type + , typename phoenix::as_actor<std::size_t>::type + >::type const + lookahead(T const& id) + { + typedef typename phoenix::as_actor<T>::type id_actor_type; + typedef typename phoenix::as_actor<std::size_t>::type state_actor_type; + + return expression::lookahead<id_actor_type, state_actor_type>::make( + phoenix::as_actor<T>::convert(id), + phoenix::as_actor<std::size_t>::convert(std::size_t(~0))); + } + + template <typename Attribute, typename Char, typename Idtype> + inline typename expression::lookahead< + typename phoenix::as_actor<Idtype>::type + , typename phoenix::as_actor<std::size_t>::type + >::type const + lookahead(token_def<Attribute, Char, Idtype> const& tok) + { + typedef typename phoenix::as_actor<Idtype>::type id_actor_type; + typedef typename phoenix::as_actor<std::size_t>::type state_actor_type; + + std::size_t state = tok.state(); + + // The following assertion fires if you pass a token_def instance to + // lex::lookahead without first associating this instance with the + // lexer. + BOOST_ASSERT(std::size_t(~0) != state && + "token_def instance not associated with lexer yet"); + + return expression::lookahead<id_actor_type, state_actor_type>::make( + phoenix::as_actor<Idtype>::convert(tok.id()), + phoenix::as_actor<std::size_t>::convert(state)); + } + + /////////////////////////////////////////////////////////////////////////// + inline BOOST_SCOPED_ENUM(pass_flags) ignore() + { + return pass_flags::pass_ignore; + } + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/support_functions_expression.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/support_functions_expression.hpp new file mode 100644 index 0000000..613a4a4 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/support_functions_expression.hpp @@ -0,0 +1,135 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2011 Thomas Heller +// +// 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(SPIRIT_LEX_SUPPORT_FUNCTIONS_EXPRESSION_MAR_22_2011_0711PM) +#define SPIRIT_LEX_SUPPORT_FUNCTIONS_EXPRESSION_MAR_22_2011_0711PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/include/phoenix_core.hpp> + +namespace boost { namespace spirit { namespace lex +{ + template <typename> struct less_type; + struct more_type; + template <typename, typename> struct lookahead_type; +}}} + +/////////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 + +namespace boost { namespace spirit { namespace lex +{ + namespace expression + { + template <typename Eval> + struct less + { + typedef phoenix::actor<lex::less_type<Eval> > type; + + static type make(Eval const & eval) + { + return lex::less_type<Eval>(eval); + } + }; + + template <typename IdType, typename State> + struct lookahead + { + typedef phoenix::actor<lex::lookahead_type<IdType, State> > type; + + static type make(IdType const & id_type, State const & state) + { + return lex::lookahead_type<IdType, State>(id_type, state); + } + }; + } +}}} + +#else // BOOST_SPIRIT_USE_PHOENIX_V3 + +BOOST_PHOENIX_DEFINE_EXPRESSION( + (boost)(spirit)(lex)(less) + , (boost::phoenix::meta_grammar) +) + +BOOST_PHOENIX_DEFINE_EXPRESSION( + (boost)(spirit)(lex)(lookahead) + , (boost::phoenix::meta_grammar) + (boost::phoenix::meta_grammar) +) + +namespace boost { namespace phoenix +{ + + namespace result_of + { + template <> + struct is_nullary<custom_terminal<boost::spirit::lex::more_type> > + : mpl::false_ + {}; + } + + template <typename Dummy> + struct is_custom_terminal<boost::spirit::lex::more_type, Dummy> : mpl::true_ {}; + + template <typename Dummy> + struct custom_terminal<boost::spirit::lex::more_type, Dummy> + : proto::call< + v2_eval( + proto::make<boost::spirit::lex::more_type()> + , proto::call<functional::env(proto::_state)> + ) + > + {}; + + + template <typename Dummy> + struct is_nullary::when<spirit::lex::rule::less, Dummy> + : proto::make<mpl::false_()> + {}; + + template <typename Dummy> + struct default_actions::when<spirit::lex::rule::less, Dummy> + : proto::call< + v2_eval( + proto::make< + spirit::lex::less_type<proto::_child0>(proto::_child0) + > + , _env + ) + > + {}; + + template <typename Dummy> + struct is_nullary::when<spirit::lex::rule::lookahead, Dummy> + : proto::make<mpl::false_()> + {}; + + template <typename Dummy> + struct default_actions::when<spirit::lex::rule::lookahead, Dummy> + : proto::call< + v2_eval( + proto::make< + spirit::lex::lookahead_type< + proto::_child0 + , proto::_child1 + >( + proto::_child0 + , proto::_child1 + ) + > + , _env + ) + > + {}; +}} + +#endif // BOOST_SPIRIT_USE_PHOENIX_V3 + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/terminals.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/terminals.hpp new file mode 100644 index 0000000..b5059cc --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/terminals.hpp @@ -0,0 +1,23 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_TERMINALS_APR_20_2009_0550PM) +#define BOOST_SPIRIT_LEX_TERMINALS_APR_20_2009_0550PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/common_terminals.hpp> + +namespace boost { namespace spirit { namespace lex +{ + /////////////////////////////////////////////////////////////////////////// + // Define a more convenient name for an omitted token attribute type + typedef spirit::omit_type omit; + using spirit::omit_type; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer/token_def.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/token_def.hpp new file mode 100644 index 0000000..1bd2534 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer/token_def.hpp @@ -0,0 +1,246 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_TOKEN_DEF_MAR_13_2007_0145PM) +#define BOOST_SPIRIT_LEX_TOKEN_DEF_MAR_13_2007_0145PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/unused.hpp> +#include <boost/spirit/home/support/argument.hpp> +#include <boost/spirit/home/support/info.hpp> +#include <boost/spirit/home/support/handles_container.hpp> +#include <boost/spirit/home/qi/parser.hpp> +#include <boost/spirit/home/qi/skip_over.hpp> +#include <boost/spirit/home/qi/detail/construct.hpp> +#include <boost/spirit/home/qi/detail/assign_to.hpp> +#include <boost/spirit/home/lex/reference.hpp> +#include <boost/spirit/home/lex/lexer_type.hpp> +#include <boost/spirit/home/lex/lexer/terminals.hpp> + +#include <boost/fusion/include/vector.hpp> +#include <boost/mpl/if.hpp> +#include <boost/detail/iterator.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/variant.hpp> + +#include <string> +#include <cstdlib> + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable: 4355) // 'this' : used in base member initializer list warning +#endif + +namespace boost { namespace spirit { namespace lex +{ + /////////////////////////////////////////////////////////////////////////// + // This component represents a token definition + /////////////////////////////////////////////////////////////////////////// + template<typename Attribute = unused_type + , typename Char = char + , typename Idtype = std::size_t> + struct token_def + : proto::extends< + typename proto::terminal< + lex::reference<token_def<Attribute, Char, Idtype> const, Idtype> + >::type + , token_def<Attribute, Char, Idtype> > + , qi::parser<token_def<Attribute, Char, Idtype> > + , lex::lexer_type<token_def<Attribute, Char, Idtype> > + { + private: + // initialize proto base class + typedef lex::reference<token_def const, Idtype> reference_; + typedef typename proto::terminal<reference_>::type terminal_type; + typedef proto::extends<terminal_type, token_def> proto_base_type; + + static std::size_t const all_states_id = static_cast<std::size_t>(-2); + + public: + // Qi interface: meta-function calculating parser return type + template <typename Context, typename Iterator> + struct attribute + { + // The return value of the token_def is either the specified + // attribute type, or the pair of iterators from the match of the + // corresponding token (if no attribute type has been specified), + // or unused_type (if omit has been specified). + typedef typename Iterator::base_iterator_type iterator_type; + typedef typename mpl::if_< + traits::not_is_unused<Attribute> + , typename mpl::if_< + is_same<Attribute, lex::omit>, unused_type, Attribute + >::type + , iterator_range<iterator_type> + >::type type; + }; + + public: + // Qi interface: parse functionality + template <typename Iterator, typename Context + , typename Skipper, typename Attribute_> + bool parse(Iterator& first, Iterator const& last + , Context& /*context*/, Skipper const& skipper + , Attribute_& attr) const + { + qi::skip_over(first, last, skipper); // always do a pre-skip + + if (first != last) { + typedef typename + boost::detail::iterator_traits<Iterator>::value_type + token_type; + + // If the following assertion fires you probably forgot to + // associate this token definition with a lexer instance. + BOOST_ASSERT(std::size_t(~0) != token_state_); + + token_type const& t = *first; + if (token_id_ == t.id() && + (all_states_id == token_state_ || token_state_ == t.state())) + { + spirit::traits::assign_to(t, attr); + ++first; + return true; + } + } + return false; + } + + template <typename Context> + info what(Context& /*context*/) const + { + if (0 == def_.which()) + return info("token_def", boost::get<string_type>(def_)); + + return info("token_def", boost::get<char_type>(def_)); + } + + /////////////////////////////////////////////////////////////////////// + // Lex interface: collect token definitions and put it into the + // provided lexer def + template <typename LexerDef, typename String> + void collect(LexerDef& lexdef, String const& state + , String const& targetstate) const + { + std::size_t state_id = lexdef.add_state(state.c_str()); + + // If the following assertion fires you are probably trying to use + // a single token_def instance in more than one lexer state. This + // is not possible. Please create a separate token_def instance + // from the same regular expression for each lexer state it needs + // to be associated with. + BOOST_ASSERT( + (std::size_t(~0) == token_state_ || state_id == token_state_) && + "Can't use single token_def with more than one lexer state"); + + char_type const* target = targetstate.empty() ? 0 : targetstate.c_str(); + if (target) + lexdef.add_state(target); + + token_state_ = state_id; + if (0 == token_id_) + token_id_ = lexdef.get_next_id(); + + if (0 == def_.which()) { + unique_id_ = lexdef.add_token(state.c_str() + , boost::get<string_type>(def_), token_id_, target); + } + else { + unique_id_ = lexdef.add_token(state.c_str() + , boost::get<char_type>(def_), token_id_, target); + } + } + + template <typename LexerDef> + void add_actions(LexerDef&) const {} + + public: + typedef Char char_type; + typedef Idtype id_type; + typedef std::basic_string<char_type> string_type; + + // Lex interface: constructing token definitions + token_def() + : proto_base_type(terminal_type::make(reference_(*this))) + , def_('\0'), token_id_() + , unique_id_(std::size_t(~0)), token_state_(std::size_t(~0)) {} + + token_def(token_def const& rhs) + : proto_base_type(terminal_type::make(reference_(*this))) + , def_(rhs.def_), token_id_(rhs.token_id_) + , unique_id_(rhs.unique_id_), token_state_(rhs.token_state_) {} + + explicit token_def(char_type def_, Idtype id_ = Idtype()) + : proto_base_type(terminal_type::make(reference_(*this))) + , def_(def_) + , token_id_(Idtype() == id_ ? Idtype(def_) : id_) + , unique_id_(std::size_t(~0)), token_state_(std::size_t(~0)) {} + + explicit token_def(string_type const& def_, Idtype id_ = Idtype()) + : proto_base_type(terminal_type::make(reference_(*this))) + , def_(def_), token_id_(id_) + , unique_id_(std::size_t(~0)), token_state_(std::size_t(~0)) {} + + template <typename String> + token_def& operator= (String const& definition) + { + def_ = definition; + token_id_ = Idtype(); + unique_id_ = std::size_t(~0); + token_state_ = std::size_t(~0); + return *this; + } + token_def& operator= (token_def const& rhs) + { + def_ = rhs.def_; + token_id_ = rhs.token_id_; + unique_id_ = rhs.unique_id_; + token_state_ = rhs.token_state_; + return *this; + } + + // general accessors + Idtype const& id() const { return token_id_; } + void id(Idtype const& id) { token_id_ = id; } + std::size_t unique_id() const { return unique_id_; } + + string_type definition() const + { + return (0 == def_.which()) ? + boost::get<string_type>(def_) : + string_type(1, boost::get<char_type>(def_)); + } + std::size_t state() const { return token_state_; } + + private: + variant<string_type, char_type> def_; + mutable Idtype token_id_; + mutable std::size_t unique_id_; + mutable std::size_t token_state_; + }; +}}} + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template<typename Attribute, typename Char, typename Idtype + , typename Attr, typename Context, typename Iterator> + struct handles_container< + lex::token_def<Attribute, Char, Idtype>, Attr, Context, Iterator> + : traits::is_container< + typename attribute_of< + lex::token_def<Attribute, Char, Idtype>, Context, Iterator + >::type> + {}; +}}} + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer_lexertl.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer_lexertl.hpp new file mode 100644 index 0000000..0706bd9 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer_lexertl.hpp @@ -0,0 +1,18 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_LEXERTL_MAR_17_2007_1008PM) +#define BOOST_SPIRIT_LEX_LEXERTL_MAR_17_2007_1008PM + +#if defined(_MSC_VER) +#pragma once +#endif + +// These includes make available everything needed to use lexertl either +// standalone or as a lexer component for spirit::qi +#include <boost/spirit/home/lex.hpp> +#include <boost/spirit/home/lex/lexer/lexertl/lexer.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/lexer_type.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/lexer_type.hpp new file mode 100644 index 0000000..e58bce0 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/lexer_type.hpp @@ -0,0 +1,100 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// +// 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_LEXER_TYPE_APR_20_2009_0759PM) +#define BOOST_SPIRIT_LEXER_TYPE_APR_20_2009_0759PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/mpl/has_xxx.hpp> +#include <boost/spirit/home/lex/domain.hpp> + +namespace boost { namespace spirit { namespace lex +{ + template <typename Derived> + struct lexer_type + { + struct lexer_id; + typedef Derived derived_type; + typedef lex::domain domain; + + // Requirement: l.collect(def, state, targetstate) -> void + // + // l: a lexer component + // def: token definition container + // state: lexer state this token definition needs to be added to + // targetstate: an optional lexer state the lexer should be switched + // into after matching this token + + Derived const& derived() const + { + return *static_cast<Derived const*>(this); + } + }; + + template <typename Derived> + struct primitive_lexer : lexer_type<Derived> + { + struct primitive_lexer_id; + }; + + template <typename Derived> + struct unary_lexer : lexer_type<Derived> + { + struct unary_lexer_id; + + // Requirement: l.subject -> subject lexer component + // + // l: a unary lexer component + + // Requirement: L::subject_type -> subject lexer component type + // + // L: a unary lexer component type + }; + + template <typename Derived> + struct nary_lexer : lexer_type<Derived> + { + struct nary_lexer_id; + + // Requirement: l.elements -> fusion sequence + // + // l: a composite lexer component + + // Requirement: L::elements_type -> fusion sequence + // + // L: a composite lexer component type + }; + +}}} + +namespace boost { namespace spirit { namespace traits // classification +{ + namespace detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(lexer_id) + BOOST_MPL_HAS_XXX_TRAIT_DEF(primitive_lexer_id) + BOOST_MPL_HAS_XXX_TRAIT_DEF(unary_lexer_id) + BOOST_MPL_HAS_XXX_TRAIT_DEF(nary_lexer_id) + } + + template <typename T> + struct is_lexer : detail::has_lexer_id<T> {}; + + template <typename T> + struct is_primitive_lexer : detail::has_primitive_lexer_id<T> {}; + + template <typename T> + struct is_unary_lexer : detail::has_unary_lexer_id<T> {}; + + template <typename T> + struct is_nary_lexer : detail::has_nary_lexer_id<T> {}; + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/meta_compiler.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/meta_compiler.hpp new file mode 100644 index 0000000..6e13d37 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/meta_compiler.hpp @@ -0,0 +1,104 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// +// 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_LEX_META_COMPILER_APR_20_2009_0756PM) +#define BOOST_SPIRIT_LEX_META_COMPILER_APR_20_2009_0756PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/meta_compiler.hpp> +#include <boost/spirit/home/lex/domain.hpp> +#include <boost/spirit/home/lex/lexer_type.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/utility/enable_if.hpp> + +namespace boost { namespace spirit +{ + template <typename T> + struct use_terminal<lex::domain, T + , typename enable_if<traits::is_lexer<T> >::type> // enables lexers + : mpl::true_ {}; + + namespace lex + { + template <typename T, typename Modifiers, typename Enable = void> + struct make_primitive // by default, return it as-is + { + typedef T result_type; + + template <typename T_> + T_& operator()(T_& val, unused_type) const + { + return val; + } + + template <typename T_> + T_ const& operator()(T_ const& val, unused_type) const + { + return val; + } + }; + + template <typename Tag, typename Elements + , typename Modifiers, typename Enable = void> + struct make_composite; + } + + // Lex primitive meta-compiler + template <> + struct make_component<lex::domain, proto::tag::terminal> + { + template <typename Sig> + struct result; + + template <typename This, typename Elements, typename Modifiers> + struct result<This(Elements, Modifiers)> + { + typedef typename lex::make_primitive< + typename remove_const<typename Elements::car_type>::type, + typename remove_reference<Modifiers>::type>::result_type + type; + }; + + template <typename Elements, typename Modifiers> + typename result<make_component(Elements, Modifiers)>::type + operator()(Elements const& elements, Modifiers const& modifiers) const + { + typedef typename remove_const<typename Elements::car_type>::type term; + return lex::make_primitive<term, Modifiers>()(elements.car, modifiers); + } + }; + + // Lex composite meta-compiler + template <typename Tag> + struct make_component<lex::domain, Tag> + { + template <typename Sig> + struct result; + + template <typename This, typename Elements, typename Modifiers> + struct result<This(Elements, Modifiers)> + { + typedef typename + lex::make_composite<Tag, Elements + , typename remove_reference<Modifiers>::type>::result_type + type; + }; + + template <typename Elements, typename Modifiers> + typename result<make_component(Elements, Modifiers)>::type + operator()(Elements const& elements, Modifiers const& modifiers) const + { + return lex::make_composite<Tag, Elements, Modifiers>()( + elements, modifiers); + } + }; + +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/qi.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/qi.hpp new file mode 100644 index 0000000..3b4e704 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/qi.hpp @@ -0,0 +1,20 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEXER_QI_APR_21_2009_0205PM) +#define BOOST_SPIRIT_LEXER_QI_APR_21_2009_0205PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/lex/qi/state_switcher.hpp> +#include <boost/spirit/home/lex/qi/in_state.hpp> +#include <boost/spirit/home/lex/qi/plain_token.hpp> +#include <boost/spirit/home/lex/qi/plain_tokenid.hpp> +#include <boost/spirit/home/lex/qi/plain_tokenid_mask.hpp> +#include <boost/spirit/home/lex/qi/plain_raw_token.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/qi/in_state.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/qi/in_state.hpp new file mode 100644 index 0000000..fe7580b --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/qi/in_state.hpp @@ -0,0 +1,32 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_IN_STATE_OCT_09_2007_0748PM) +#define BOOST_SPIRIT_LEX_IN_STATE_OCT_09_2007_0748PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/proto/core.hpp> + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { namespace qi +{ + /////////////////////////////////////////////////////////////////////////// + // The following is a helper template allowing to use the in_state()[] as + // a skip parser + /////////////////////////////////////////////////////////////////////////// + template <typename Skipper, typename String = char const*> + struct in_state_skipper + : proto::subscript< + typename proto::terminal< + terminal_ex<tag::in_state, fusion::vector1<String> > + >::type + , Skipper + >::type {}; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/qi/plain_raw_token.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/qi/plain_raw_token.hpp new file mode 100644 index 0000000..ebe980d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/qi/plain_raw_token.hpp @@ -0,0 +1,149 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_PLAIN_RAW_TOKEN_JUN_03_2011_0853PM) +#define BOOST_SPIRIT_LEX_PLAIN_RAW_TOKEN_JUN_03_2011_0853PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/info.hpp> +#include <boost/spirit/home/qi/detail/attributes.hpp> +#include <boost/spirit/home/support/common_terminals.hpp> +#include <boost/spirit/home/support/handles_container.hpp> +#include <boost/spirit/home/qi/skip_over.hpp> +#include <boost/spirit/home/qi/domain.hpp> +#include <boost/spirit/home/qi/parser.hpp> +#include <boost/spirit/home/qi/meta_compiler.hpp> +#include <boost/spirit/home/qi/detail/assign_to.hpp> +#include <boost/range/iterator_range.hpp> +#include <boost/fusion/include/vector.hpp> +#include <boost/fusion/include/at.hpp> +#include <boost/mpl/or.hpp> +#include <boost/type_traits/is_integral.hpp> +#include <boost/type_traits/is_enum.hpp> +#include <boost/lexical_cast.hpp> + +namespace boost { namespace spirit +{ + /////////////////////////////////////////////////////////////////////////// + // Enablers + /////////////////////////////////////////////////////////////////////////// + + // enables raw_token + template <> + struct use_terminal<qi::domain, tag::raw_token> + : mpl::true_ {}; + + // enables raw_token(id) + template <typename A0> + struct use_terminal<qi::domain + , terminal_ex<tag::raw_token, fusion::vector1<A0> > + > : mpl::or_<is_integral<A0>, is_enum<A0> > {}; + + // enables *lazy* raw_token(id) + template <> + struct use_lazy_terminal< + qi::domain, tag::raw_token, 1 + > : mpl::true_ {}; +}} + +namespace boost { namespace spirit { namespace qi +{ +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + using spirit::raw_token; +#endif + using spirit::raw_token_type; + + /////////////////////////////////////////////////////////////////////////// + template <typename TokenId> + struct plain_raw_token + : primitive_parser<plain_raw_token<TokenId> > + { + template <typename Context, typename Iterator> + struct attribute + { + typedef unused_type type; + }; + + plain_raw_token(TokenId const& id) + : id(id) {} + + template <typename Iterator, typename Context + , typename Skipper, typename Attribute> + bool parse(Iterator& first, Iterator const& last + , Context& /*context*/, Skipper const& skipper + , Attribute& attr) const + { + qi::skip_over(first, last, skipper); // always do a pre-skip + + if (first != last) { + // simply match the token id with the id this component has + // been initialized with + + typedef typename + boost::detail::iterator_traits<Iterator>::value_type + token_type; + typedef typename token_type::id_type id_type; + + token_type const& t = *first; + if (id_type(~0) == id_type(id) || id_type(id) == t.id()) { + spirit::traits::assign_to(t, attr); + ++first; + return true; + } + } + return false; + } + + template <typename Context> + info what(Context& /*context*/) const + { + return info("raw_token", + "raw_token(" + boost::lexical_cast<utf8_string>(id) + ")"); + } + + TokenId id; + }; + + /////////////////////////////////////////////////////////////////////////// + // Parser generators: make_xxx function (objects) + /////////////////////////////////////////////////////////////////////////// + template <typename Modifiers> + struct make_primitive<tag::raw_token, Modifiers> + { + typedef plain_raw_token<std::size_t> result_type; + + result_type operator()(unused_type, unused_type) const + { + return result_type(std::size_t(~0)); + } + }; + + template <typename Modifiers, typename TokenId> + struct make_primitive<terminal_ex<tag::raw_token, fusion::vector1<TokenId> > + , Modifiers> + { + typedef plain_raw_token<TokenId> result_type; + + template <typename Terminal> + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; +}}} + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template<typename Idtype, typename Attr, typename Context, typename Iterator> + struct handles_container<qi::plain_raw_token<Idtype>, Attr, Context, Iterator> + : mpl::true_ + {}; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/qi/plain_token.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/qi/plain_token.hpp new file mode 100644 index 0000000..b77e2a9 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/qi/plain_token.hpp @@ -0,0 +1,242 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_PLAIN_TOKEN_NOV_11_2007_0451PM) +#define BOOST_SPIRIT_LEX_PLAIN_TOKEN_NOV_11_2007_0451PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/info.hpp> +#include <boost/spirit/home/qi/detail/attributes.hpp> +#include <boost/spirit/home/support/common_terminals.hpp> +#include <boost/spirit/home/support/handles_container.hpp> +#include <boost/spirit/home/qi/skip_over.hpp> +#include <boost/spirit/home/qi/domain.hpp> +#include <boost/spirit/home/qi/parser.hpp> +#include <boost/spirit/home/qi/meta_compiler.hpp> +#include <boost/spirit/home/qi/detail/assign_to.hpp> +#include <boost/range/iterator_range.hpp> +#include <boost/fusion/include/vector.hpp> +#include <boost/fusion/include/at.hpp> +#include <boost/mpl/or.hpp> +#include <boost/mpl/and.hpp> +#include <boost/type_traits/is_integral.hpp> +#include <boost/type_traits/is_enum.hpp> +#include <boost/lexical_cast.hpp> + +namespace boost { namespace spirit +{ + /////////////////////////////////////////////////////////////////////////// + // Enablers + /////////////////////////////////////////////////////////////////////////// + + // enables token + template <> + struct use_terminal<qi::domain, tag::token> + : mpl::true_ {}; + + // enables token(id) + template <typename A0> + struct use_terminal<qi::domain + , terminal_ex<tag::token, fusion::vector1<A0> > + > : mpl::or_<is_integral<A0>, is_enum<A0> > {}; + + // enables token(idmin, idmax) + template <typename A0, typename A1> + struct use_terminal<qi::domain + , terminal_ex<tag::token, fusion::vector2<A0, A1> > + > : mpl::and_< + mpl::or_<is_integral<A0>, is_enum<A0> > + , mpl::or_<is_integral<A1>, is_enum<A1> > + > {}; + + // enables *lazy* token(id) + template <> + struct use_lazy_terminal< + qi::domain, tag::token, 1 + > : mpl::true_ {}; + + // enables *lazy* token(idmin, idmax) + template <> + struct use_lazy_terminal< + qi::domain, tag::token, 2 + > : mpl::true_ {}; +}} + +namespace boost { namespace spirit { namespace qi +{ +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + using spirit::token; +#endif + using spirit::token_type; + + /////////////////////////////////////////////////////////////////////////// + template <typename TokenId> + struct plain_token + : primitive_parser<plain_token<TokenId> > + { + template <typename Context, typename Iterator> + struct attribute + { + typedef typename Iterator::base_iterator_type iterator_type; + typedef iterator_range<iterator_type> type; + }; + + plain_token(TokenId const& id) + : id(id) {} + + template <typename Iterator, typename Context + , typename Skipper, typename Attribute> + bool parse(Iterator& first, Iterator const& last + , Context& /*context*/, Skipper const& skipper + , Attribute& attr) const + { + qi::skip_over(first, last, skipper); // always do a pre-skip + + if (first != last) { + // simply match the token id with the id this component has + // been initialized with + + typedef typename + boost::detail::iterator_traits<Iterator>::value_type + token_type; + typedef typename token_type::id_type id_type; + + token_type const& t = *first; + if (id_type(~0) == id_type(id) || id_type(id) == t.id()) { + spirit::traits::assign_to(t, attr); + ++first; + return true; + } + } + return false; + } + + template <typename Context> + info what(Context& /*context*/) const + { + return info("token", + "token(" + boost::lexical_cast<utf8_string>(id) + ")"); + } + + TokenId id; + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename TokenId> + struct plain_token_range + : primitive_parser<plain_token_range<TokenId> > + { + template <typename Context, typename Iterator> + struct attribute + { + typedef typename Iterator::base_iterator_type iterator_type; + typedef iterator_range<iterator_type> type; + }; + + plain_token_range(TokenId const& idmin, TokenId const& idmax) + : idmin(idmin), idmax(idmax) {} + + template <typename Iterator, typename Context + , typename Skipper, typename Attribute> + bool parse(Iterator& first, Iterator const& last + , Context& /*context*/, Skipper const& skipper + , Attribute& attr) const + { + qi::skip_over(first, last, skipper); // always do a pre-skip + + if (first != last) { + // simply match the token id with the id this component has + // been initialized with + + typedef typename + boost::detail::iterator_traits<Iterator>::value_type + token_type; + typedef typename token_type::id_type id_type; + + token_type const& t = *first; + if (id_type(idmin) >= t.id() && id_type(idmin) <= t.id()) + { + spirit::traits::assign_to(t, attr); + ++first; + return true; + } + } + return false; + } + + template <typename Context> + info what(Context& /*context*/) const + { + return info("token_range" + , "token(" + + boost::lexical_cast<utf8_string>(idmin) + ", " + + boost::lexical_cast<utf8_string>(idmax) + ")" + ); + return info("token_range"); + } + + TokenId idmin, idmax; + }; + + /////////////////////////////////////////////////////////////////////////// + // Parser generators: make_xxx function (objects) + /////////////////////////////////////////////////////////////////////////// + template <typename Modifiers> + struct make_primitive<tag::token, Modifiers> + { + typedef plain_token<std::size_t> result_type; + + result_type operator()(unused_type, unused_type) const + { + return result_type(std::size_t(~0)); + } + }; + + template <typename Modifiers, typename TokenId> + struct make_primitive<terminal_ex<tag::token, fusion::vector1<TokenId> > + , Modifiers> + { + typedef plain_token<TokenId> result_type; + + template <typename Terminal> + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; + + template <typename Modifiers, typename TokenId> + struct make_primitive<terminal_ex<tag::token, fusion::vector2<TokenId, TokenId> > + , Modifiers> + { + typedef plain_token_range<TokenId> result_type; + + template <typename Terminal> + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args) + , fusion::at_c<1>(term.args)); + } + }; +}}} + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template<typename Idtype, typename Attr, typename Context, typename Iterator> + struct handles_container<qi::plain_token<Idtype>, Attr, Context, Iterator> + : mpl::true_ + {}; + + template<typename Idtype, typename Attr, typename Context, typename Iterator> + struct handles_container<qi::plain_token_range<Idtype>, Attr, Context, Iterator> + : mpl::true_ + {}; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/qi/plain_tokenid.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/qi/plain_tokenid.hpp new file mode 100644 index 0000000..7a70c77 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/qi/plain_tokenid.hpp @@ -0,0 +1,242 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_PLAIN_TOKENID_NOV_26_2010_0944AM) +#define BOOST_SPIRIT_LEX_PLAIN_TOKENID_NOV_26_2010_0944AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/info.hpp> +#include <boost/spirit/home/qi/detail/attributes.hpp> +#include <boost/spirit/home/support/common_terminals.hpp> +#include <boost/spirit/home/support/handles_container.hpp> +#include <boost/spirit/home/qi/skip_over.hpp> +#include <boost/spirit/home/qi/domain.hpp> +#include <boost/spirit/home/qi/parser.hpp> +#include <boost/spirit/home/qi/meta_compiler.hpp> +#include <boost/spirit/home/qi/detail/assign_to.hpp> +#include <boost/range/iterator_range.hpp> +#include <boost/fusion/include/vector.hpp> +#include <boost/fusion/include/at.hpp> +#include <boost/mpl/or.hpp> +#include <boost/mpl/and.hpp> +#include <boost/type_traits/is_integral.hpp> +#include <boost/type_traits/is_enum.hpp> +#include <boost/lexical_cast.hpp> + +namespace boost { namespace spirit +{ + /////////////////////////////////////////////////////////////////////////// + // Enablers + /////////////////////////////////////////////////////////////////////////// + + // enables tokenid + template <> + struct use_terminal<qi::domain, tag::tokenid> + : mpl::true_ {}; + + // enables tokenid(id) + template <typename A0> + struct use_terminal<qi::domain + , terminal_ex<tag::tokenid, fusion::vector1<A0> > + > : mpl::or_<is_integral<A0>, is_enum<A0> > {}; + + // enables tokenid(idmin, idmax) + template <typename A0, typename A1> + struct use_terminal<qi::domain + , terminal_ex<tag::tokenid, fusion::vector2<A0, A1> > + > : mpl::and_< + mpl::or_<is_integral<A0>, is_enum<A0> > + , mpl::or_<is_integral<A1>, is_enum<A1> > + > {}; + + // enables *lazy* tokenid(id) + template <> + struct use_lazy_terminal< + qi::domain, tag::tokenid, 1 + > : mpl::true_ {}; + + // enables *lazy* tokenid(idmin, idmax) + template <> + struct use_lazy_terminal< + qi::domain, tag::tokenid, 2 + > : mpl::true_ {}; +}} + +namespace boost { namespace spirit { namespace qi +{ +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + using spirit::tokenid; +#endif + using spirit::tokenid_type; + + /////////////////////////////////////////////////////////////////////////// + // The plain_tokenid represents a simple token defined by the lexer inside + // a Qi grammar. The difference to plain_token is that it exposes the + // matched token id instead of the iterator_range of the matched input. + template <typename TokenId> + struct plain_tokenid + : primitive_parser<plain_tokenid<TokenId> > + { + template <typename Context, typename Iterator> + struct attribute + { + typedef TokenId type; + }; + + plain_tokenid(TokenId const& id) + : id(id) {} + + template <typename Iterator, typename Context + , typename Skipper, typename Attribute> + bool parse(Iterator& first, Iterator const& last + , Context& /*context*/, Skipper const& skipper + , Attribute& attr) const + { + qi::skip_over(first, last, skipper); // always do a pre-skip + + if (first != last) { + // simply match the token id with the id this component has + // been initialized with + + typedef typename + boost::detail::iterator_traits<Iterator>::value_type + token_type; + typedef typename token_type::id_type id_type; + + token_type const& t = *first; + if (id_type(~0) == id_type(id) || id_type(id) == t.id()) { + spirit::traits::assign_to(id, attr); + ++first; + return true; + } + } + return false; + } + + template <typename Context> + info what(Context& /*context*/) const + { + return info("tokenid", + "tokenid(" + boost::lexical_cast<utf8_string>(id) + ")"); + } + + TokenId id; + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename TokenId> + struct plain_tokenid_range + : primitive_parser<plain_tokenid_range<TokenId> > + { + template <typename Context, typename Iterator> + struct attribute + { + typedef TokenId type; + }; + + plain_tokenid_range(TokenId const& idmin, TokenId const& idmax) + : idmin(idmin), idmax(idmax) {} + + template <typename Iterator, typename Context + , typename Skipper, typename Attribute> + bool parse(Iterator& first, Iterator const& last + , Context& /*context*/, Skipper const& skipper + , Attribute& attr) const + { + qi::skip_over(first, last, skipper); // always do a pre-skip + + if (first != last) { + // simply match the token id with the id this component has + // been initialized with + + typedef typename + boost::detail::iterator_traits<Iterator>::value_type + token_type; + typedef typename token_type::id_type id_type; + + token_type const& t = *first; + if (id_type(idmin) >= t.id() && id_type(idmin) <= t.id()) + { + spirit::traits::assign_to(t.id(), attr); + ++first; + return true; + } + } + return false; + } + + template <typename Context> + info what(Context& /*context*/) const + { + return info("tokenid_range" + , "token(" + + boost::lexical_cast<utf8_string>(idmin) + ", " + + boost::lexical_cast<utf8_string>(idmax) + ")" + ); + } + + TokenId idmin, idmax; + }; + + /////////////////////////////////////////////////////////////////////////// + // Parser generators: make_xxx function (objects) + /////////////////////////////////////////////////////////////////////////// + template <typename Modifiers> + struct make_primitive<tag::tokenid, Modifiers> + { + typedef plain_tokenid<std::size_t> result_type; + + result_type operator()(unused_type, unused_type) const + { + return result_type(std::size_t(~0)); + } + }; + + template <typename Modifiers, typename TokenId> + struct make_primitive<terminal_ex<tag::tokenid, fusion::vector1<TokenId> > + , Modifiers> + { + typedef plain_tokenid<TokenId> result_type; + + template <typename Terminal> + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; + + template <typename Modifiers, typename TokenId> + struct make_primitive<terminal_ex<tag::tokenid, fusion::vector2<TokenId, TokenId> > + , Modifiers> + { + typedef plain_tokenid_range<TokenId> result_type; + + template <typename Terminal> + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args) + , fusion::at_c<1>(term.args)); + } + }; +}}} + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template<typename Idtype, typename Attr, typename Context, typename Iterator> + struct handles_container<qi::plain_tokenid<Idtype>, Attr, Context, Iterator> + : mpl::true_ + {}; + + template<typename Idtype, typename Attr, typename Context, typename Iterator> + struct handles_container<qi::plain_tokenid_range<Idtype>, Attr, Context, Iterator> + : mpl::true_ + {}; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/qi/plain_tokenid_mask.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/qi/plain_tokenid_mask.hpp new file mode 100644 index 0000000..92ac126 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/qi/plain_tokenid_mask.hpp @@ -0,0 +1,138 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEX_PLAIN_TOKENID_MASK_JUN_03_2011_0929PM) +#define BOOST_SPIRIT_LEX_PLAIN_TOKENID_MASK_JUN_03_2011_0929PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/info.hpp> +#include <boost/spirit/home/qi/detail/attributes.hpp> +#include <boost/spirit/home/support/common_terminals.hpp> +#include <boost/spirit/home/support/handles_container.hpp> +#include <boost/spirit/home/qi/skip_over.hpp> +#include <boost/spirit/home/qi/domain.hpp> +#include <boost/spirit/home/qi/parser.hpp> +#include <boost/spirit/home/qi/meta_compiler.hpp> +#include <boost/spirit/home/qi/detail/assign_to.hpp> +#include <boost/range/iterator_range.hpp> +#include <boost/fusion/include/vector.hpp> +#include <boost/fusion/include/at.hpp> +#include <boost/mpl/or.hpp> +#include <boost/type_traits/is_integral.hpp> +#include <boost/type_traits/is_enum.hpp> +#include <boost/lexical_cast.hpp> + +namespace boost { namespace spirit +{ + /////////////////////////////////////////////////////////////////////////// + // Enablers + /////////////////////////////////////////////////////////////////////////// + + // enables tokenid_mask(id) + template <typename A0> + struct use_terminal<qi::domain + , terminal_ex<tag::tokenid_mask, fusion::vector1<A0> > + > : mpl::or_<is_integral<A0>, is_enum<A0> > {}; + + // enables *lazy* tokenid_mask(id) + template <> + struct use_lazy_terminal< + qi::domain, tag::tokenid_mask, 1 + > : mpl::true_ {}; +}} + +namespace boost { namespace spirit { namespace qi +{ +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + using spirit::tokenid_mask; +#endif + using spirit::tokenid_mask_type; + + /////////////////////////////////////////////////////////////////////////// + // The plain_tokenid represents a simple token defined by the lexer inside + // a Qi grammar. The difference to plain_token is that it exposes the + // matched token id instead of the iterator_range of the matched input. + // Additionally it applies the given mask to the matched token id. + template <typename Mask> + struct plain_tokenid_mask + : primitive_parser<plain_tokenid_mask<Mask> > + { + template <typename Context, typename Iterator> + struct attribute + { + typedef Mask type; + }; + + plain_tokenid_mask(Mask const& mask) + : mask(mask) {} + + template <typename Iterator, typename Context + , typename Skipper, typename Attribute> + bool parse(Iterator& first, Iterator const& last + , Context& /*context*/, Skipper const& skipper + , Attribute& attr) const + { + qi::skip_over(first, last, skipper); // always do a pre-skip + + if (first != last) { + // simply match the token id with the mask this component has + // been initialized with + + typedef typename + boost::detail::iterator_traits<Iterator>::value_type + token_type; + typedef typename token_type::id_type id_type; + + token_type const& t = *first; + if ((t.id() & mask) == id_type(mask)) + { + spirit::traits::assign_to(t.id(), attr); + ++first; + return true; + } + } + return false; + } + + template <typename Context> + info what(Context& /*context*/) const + { + return info("tokenid_mask", + "tokenid_mask(" + boost::lexical_cast<utf8_string>(mask) + ")"); + } + + Mask mask; + }; + + /////////////////////////////////////////////////////////////////////////// + // Parser generators: make_xxx function (objects) + /////////////////////////////////////////////////////////////////////////// + template <typename Modifiers, typename Mask> + struct make_primitive<terminal_ex<tag::tokenid_mask, fusion::vector1<Mask> > + , Modifiers> + { + typedef plain_tokenid_mask<Mask> result_type; + + template <typename Terminal> + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(fusion::at_c<0>(term.args)); + } + }; +}}} + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template<typename Mask, typename Attr, typename Context, typename Iterator> + struct handles_container<qi::plain_tokenid_mask<Mask>, Attr, Context, Iterator> + : mpl::true_ + {}; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/qi/state_switcher.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/qi/state_switcher.hpp new file mode 100644 index 0000000..a8fd55a --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/qi/state_switcher.hpp @@ -0,0 +1,270 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2010 Bryce Lelbach +// +// 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_LEX_STATE_SWITCHER_SEP_23_2007_0714PM) +#define BOOST_SPIRIT_LEX_STATE_SWITCHER_SEP_23_2007_0714PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/info.hpp> +#include <boost/spirit/home/qi/detail/attributes.hpp> +#include <boost/spirit/home/support/common_terminals.hpp> +#include <boost/spirit/home/support/string_traits.hpp> +#include <boost/spirit/home/support/has_semantic_action.hpp> +#include <boost/spirit/home/support/handles_container.hpp> +#include <boost/spirit/home/qi/skip_over.hpp> +#include <boost/spirit/home/qi/domain.hpp> +#include <boost/spirit/home/qi/parser.hpp> +#include <boost/spirit/home/qi/meta_compiler.hpp> +#include <boost/mpl/print.hpp> + +namespace boost { namespace spirit +{ + /////////////////////////////////////////////////////////////////////////// + // Enablers + /////////////////////////////////////////////////////////////////////////// + + // enables set_state(s) + template <typename A0> + struct use_terminal<qi::domain + , terminal_ex<tag::set_state, fusion::vector1<A0> > + > : traits::is_string<A0> {}; + + // enables *lazy* set_state(s) + template <> + struct use_lazy_terminal< + qi::domain, tag::set_state, 1 + > : mpl::true_ {}; + + // enables in_state(s)[p] + template <typename A0> + struct use_directive<qi::domain + , terminal_ex<tag::in_state, fusion::vector1<A0> > + > : traits::is_string<A0> {}; + + // enables *lazy* in_state(s)[p] + template <> + struct use_lazy_directive< + qi::domain, tag::in_state, 1 + > : mpl::true_ {}; + +}} + +namespace boost { namespace spirit { namespace qi +{ +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + using spirit::set_state; + using spirit::in_state; +#endif + using spirit::set_state_type; + using spirit::in_state_type; + + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + template <typename Iterator> + inline std::size_t + set_lexer_state(Iterator& it, std::size_t state) + { + return it.set_state(state); + } + + template <typename Iterator, typename Char> + inline std::size_t + set_lexer_state(Iterator& it, Char const* statename) + { + std::size_t state = it.map_state(statename); + + // If the following assertion fires you probably used the + // set_state(...) or in_state(...)[...] lexer state switcher with + // a lexer state name unknown to the lexer (no token definitions + // have been associated with this lexer state). + BOOST_ASSERT(std::size_t(~0) != state); + return it.set_state(state); + } + } + + /////////////////////////////////////////////////////////////////////////// + // Parser switching the state of the underlying lexer component. + // This parser gets used for the set_state(...) construct. + /////////////////////////////////////////////////////////////////////////// + template <typename State> + struct state_switcher + : primitive_parser<state_switcher<State> > + { + typedef typename + remove_const<typename traits::char_type_of<State>::type>::type + char_type; + typedef std::basic_string<char_type> string_type; + + template <typename Context, typename Iterator> + struct attribute + { + typedef unused_type type; + }; + + state_switcher(char_type const* state) + : state(state) {} + + template <typename Iterator, typename Context + , typename Skipper, typename Attribute> + bool parse(Iterator& first, Iterator const& last + , Context& /*context*/, Skipper const& skipper + , Attribute& /*attr*/) const + { + qi::skip_over(first, last, skipper); // always do a pre-skip + + // just switch the state and return success + detail::set_lexer_state(first, state.c_str()); + return true; + } + + template <typename Context> + info what(Context& /*context*/) const + { + return info("set_state"); + } + + string_type state; + }; + + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + template <typename Iterator> + struct reset_state_on_exit + { + template <typename State> + reset_state_on_exit(Iterator& it_, State state_) + : it(it_) + , state(set_lexer_state(it_, traits::get_c_string(state_))) + {} + + ~reset_state_on_exit() + { + // reset the state of the underlying lexer instance + set_lexer_state(it, state); + } + + Iterator& it; + std::size_t state; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + reset_state_on_exit& operator= (reset_state_on_exit const&); + }; + } + + /////////////////////////////////////////////////////////////////////////// + // Parser, which switches the state of the underlying lexer component + // for the execution of the embedded sub-parser, switching the state back + // afterwards. This parser gets used for the in_state(...)[p] construct. + /////////////////////////////////////////////////////////////////////////// + template <typename Subject, typename State> + struct state_switcher_context + : unary_parser<state_switcher_context<Subject, State> > + { + typedef Subject subject_type; + typedef typename traits::char_type_of<State>::type char_type; + typedef typename remove_const<char_type>::type non_const_char_type; + + template <typename Context, typename Iterator> + struct attribute + { + typedef typename + traits::attribute_of<subject_type, Context, Iterator>::type + type; + }; + + state_switcher_context(Subject const& subject + , typename add_reference<State>::type state) + : subject(subject), state(state) {} + + // The following conversion constructors are needed to make the + // in_state_switcher template usable + template <typename String> + state_switcher_context( + state_switcher_context<Subject, String> const& rhs) + : subject(rhs.subject), state(traits::get_c_string(rhs.state)) {} + + template <typename Iterator, typename Context + , typename Skipper, typename Attribute> + bool parse(Iterator& first, Iterator const& last + , Context& context, Skipper const& skipper + , Attribute& attr) const + { + qi::skip_over(first, last, skipper); // always do a pre-skip + + // the state has to be reset at exit in any case + detail::reset_state_on_exit<Iterator> guard(first, state); + return subject.parse(first, last, context, skipper, attr); + } + + template <typename Context> + info what(Context& context) const + { + return info("in_state", subject.what(context)); + } + + Subject subject; + State state; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + state_switcher_context& operator= (state_switcher_context const&); + }; + + /////////////////////////////////////////////////////////////////////////// + // Parser generators: make_xxx function (objects) + /////////////////////////////////////////////////////////////////////////// + template <typename Modifiers, typename State> + struct make_primitive<terminal_ex<tag::set_state, fusion::vector1<State> > + , Modifiers, typename enable_if<traits::is_string<State> >::type> + { + typedef typename add_const<State>::type const_string; + typedef state_switcher<const_string> result_type; + + template <typename Terminal> + result_type operator()(Terminal const& term, unused_type) const + { + return result_type(traits::get_c_string(fusion::at_c<0>(term.args))); + } + }; + + template <typename State, typename Subject, typename Modifiers> + struct make_directive<terminal_ex<tag::in_state, fusion::vector1<State> > + , Subject, Modifiers> + { + typedef typename add_const<State>::type const_string; + typedef state_switcher_context<Subject, const_string> result_type; + + template <typename Terminal> + result_type operator()(Terminal const& term, Subject const& subject + , unused_type) const + { + return result_type(subject, fusion::at_c<0>(term.args)); + } + }; +}}} + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template <typename Subject, typename State> + struct has_semantic_action<qi::state_switcher_context<Subject, State> > + : unary_has_semantic_action<Subject> {}; + + /////////////////////////////////////////////////////////////////////////// + template <typename Subject, typename State, typename Attribute + , typename Context, typename Iterator> + struct handles_container<qi::state_switcher_context<Subject, State> + , Attribute, Context, Iterator> + : unary_handles_container<Subject, Attribute, Context, Iterator> {}; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/reference.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/reference.hpp new file mode 100644 index 0000000..d1aaabf --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/reference.hpp @@ -0,0 +1,85 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// +// 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_LEX_REFERENCE_APR_20_2009_0827AM) +#define BOOST_SPIRIT_LEX_REFERENCE_APR_20_2009_0827AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/lex/meta_compiler.hpp> +#include <boost/spirit/home/lex/lexer_type.hpp> +#include <boost/spirit/home/qi/reference.hpp> +#include <boost/spirit/home/support/info.hpp> +#include <boost/spirit/home/support/handles_container.hpp> +#include <boost/ref.hpp> + +namespace boost { namespace spirit { namespace lex +{ + /////////////////////////////////////////////////////////////////////////// + // reference is a lexer that references another lexer (its Subject) + // all lexer components are at the same time + /////////////////////////////////////////////////////////////////////////// + template <typename Subject, typename IdType = unused_type> + struct reference; + + template <typename Subject> + struct reference<Subject, unused_type> + : qi::reference<Subject> + , lexer_type<reference<Subject> > + { + reference(Subject& subject) + : qi::reference<Subject>(subject) {} + + template <typename LexerDef, typename String> + void collect(LexerDef& lexdef, String const& state + , String const& targetstate) const + { + this->ref.get().collect(lexdef, state, targetstate); + } + + template <typename LexerDef> + void add_actions(LexerDef& lexdef) const + { + this->ref.get().add_actions(lexdef); + } + }; + + template <typename Subject, typename IdType> + struct reference : reference<Subject> + { + reference(Subject& subject) + : reference<Subject>(subject) {} + + IdType id() const + { + return this->ref.get().id(); + } + std::size_t unique_id() const + { + return this->ref.get().unique_id(); + } + std::size_t state() const + { + return this->ref.get().state(); + } + }; +}}} + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template <typename Subject, typename IdType + , typename Attribute, typename Context, typename Iterator> + struct handles_container<lex::reference<Subject, IdType> + , Attribute, Context, Iterator> + : handles_container< + typename remove_const<Subject>::type, Attribute, Context, Iterator> + {}; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/tokenize_and_parse.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/tokenize_and_parse.hpp new file mode 100644 index 0000000..db12935 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/tokenize_and_parse.hpp @@ -0,0 +1,325 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_LEXER_PARSE_NOV_17_2007_0246PM) +#define BOOST_SPIRIT_LEXER_PARSE_NOV_17_2007_0246PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/qi/skip_over.hpp> +#include <boost/spirit/home/qi/parse.hpp> +#include <boost/spirit/home/qi/nonterminal/grammar.hpp> +#include <boost/spirit/home/support/unused.hpp> +#include <boost/spirit/home/lex/lexer.hpp> +#include <boost/mpl/assert.hpp> + +namespace boost { namespace spirit { namespace lex +{ + /////////////////////////////////////////////////////////////////////////// + // Import skip_flag enumerator type from Qi namespace + using qi::skip_flag; + + /////////////////////////////////////////////////////////////////////////// + // + // The tokenize_and_parse() function is one of the main Spirit API + // functions. It simplifies using a lexer as the underlying token source + // while parsing a given input sequence. + // + // The function takes a pair of iterators spanning the underlying input + // stream to parse, the lexer object (built from the token definitions) + // and a parser object (built from the parser grammar definition). + // + // The second version of this function additionally takes an attribute to + // be used as the top level data structure instance the parser should use + // to store the recognized input to. + // + // The function returns true if the parsing succeeded (the given input + // sequence has been successfully matched by the given grammar). + // + // first, last: The pair of iterators spanning the underlying input + // sequence to parse. These iterators must at least + // conform to the requirements of the std::intput_iterator + // category. + // On exit the iterator 'first' will be updated to the + // position right after the last successfully matched + // token. + // lex: The lexer object (encoding the token definitions) to be + // used to convert the input sequence into a sequence of + // tokens. This token sequence is passed to the parsing + // process. The LexerExpr type must conform to the + // lexer interface described in the corresponding section + // of the documentation. + // xpr: The grammar object (encoding the parser grammar) to be + // used to match the token sequence generated by the lex + // object instance. The ParserExpr type must conform to + // the grammar interface described in the corresponding + // section of the documentation. + // attr: The top level attribute passed to the parser. It will + // be populated during the parsing of the input sequence. + // On exit it will hold the 'parser result' corresponding + // to the matched input sequence. + // + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename Lexer, typename ParserExpr> + inline bool + tokenize_and_parse(Iterator& first, Iterator last, Lexer const& lex, + ParserExpr const& xpr) + { + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then the expression (expr) is not a valid spirit qi expression. + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, ParserExpr); + + typename Lexer::iterator_type iter = lex.begin(first, last); + return compile<qi::domain>(xpr).parse( + iter, lex.end(), unused, unused, unused); + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename Lexer, typename ParserExpr + , typename Attribute> + inline bool + tokenize_and_parse(Iterator& first, Iterator last, Lexer const& lex + , ParserExpr const& xpr, Attribute& attr) + { + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then the expression (expr) is not a valid spirit qi expression. + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, ParserExpr); + + typename Lexer::iterator_type iter = lex.begin(first, last); + return compile<qi::domain>(xpr).parse( + iter, lex.end(), unused, unused, attr); + } + + /////////////////////////////////////////////////////////////////////////// + // + // The tokenize_and_phrase_parse() function is one of the main Spirit API + // functions. It simplifies using a lexer as the underlying token source + // while phrase parsing a given input sequence. + // + // The function takes a pair of iterators spanning the underlying input + // stream to parse, the lexer object (built from the token definitions) + // and a parser object (built from the parser grammar definition). The + // additional skipper parameter will be used as the skip parser during + // the parsing process. + // + // The second version of this function additionally takes an attribute to + // be used as the top level data structure instance the parser should use + // to store the recognized input to. + // + // The function returns true if the parsing succeeded (the given input + // sequence has been successfully matched by the given grammar). + // + // first, last: The pair of iterators spanning the underlying input + // sequence to parse. These iterators must at least + // conform to the requirements of the std::intput_iterator + // category. + // On exit the iterator 'first' will be updated to the + // position right after the last successfully matched + // token. + // lex: The lexer object (encoding the token definitions) to be + // used to convert the input sequence into a sequence of + // tokens. This token sequence is passed to the parsing + // process. The LexerExpr type must conform to the + // lexer interface described in the corresponding section + // of the documentation. + // xpr: The grammar object (encoding the parser grammar) to be + // used to match the token sequence generated by the lex + // object instance. The ParserExpr type must conform to + // the grammar interface described in the corresponding + // section of the documentation. + // skipper: The skip parser to be used while parsing the given + // input sequence. Note, the skip parser will have to + // act on the same token sequence as the main parser + // 'xpr'. + // post_skip: The post_skip flag controls whether the function will + // invoke an additional post skip after the main parser + // returned. + // attr: The top level attribute passed to the parser. It will + // be populated during the parsing of the input sequence. + // On exit it will hold the 'parser result' corresponding + // to the matched input sequence. + // + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename Lexer, typename ParserExpr + , typename Skipper> + inline bool + tokenize_and_phrase_parse(Iterator& first, Iterator last + , Lexer const& lex, ParserExpr const& xpr, Skipper const& skipper + , BOOST_SCOPED_ENUM(skip_flag) post_skip = skip_flag::postskip) + { + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then the expression (expr) is not a valid spirit qi expression. + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, ParserExpr); + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Skipper); + + typedef + typename spirit::result_of::compile<qi::domain, Skipper>::type + skipper_type; + skipper_type const skipper_ = compile<qi::domain>(skipper); + + typename Lexer::iterator_type iter = lex.begin(first, last); + typename Lexer::iterator_type end = lex.end(); + if (!compile<qi::domain>(xpr).parse( + iter, end, unused, skipper_, unused)) + return false; + + // do a final post-skip + if (post_skip == skip_flag::postskip) + qi::skip_over(iter, end, skipper_); + return true; + } + + template <typename Iterator, typename Lexer, typename ParserExpr + , typename Skipper, typename Attribute> + inline bool + tokenize_and_phrase_parse(Iterator& first, Iterator last + , Lexer const& lex, ParserExpr const& xpr, Skipper const& skipper + , BOOST_SCOPED_ENUM(skip_flag) post_skip, Attribute& attr) + { + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then the expression (expr) is not a valid spirit qi expression. + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, ParserExpr); + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Skipper); + + typedef + typename spirit::result_of::compile<qi::domain, Skipper>::type + skipper_type; + skipper_type const skipper_ = compile<qi::domain>(skipper); + + typename Lexer::iterator_type iter = lex.begin(first, last); + typename Lexer::iterator_type end = lex.end(); + if (!compile<qi::domain>(xpr).parse( + iter, end, unused, skipper_, attr)) + return false; + + // do a final post-skip + if (post_skip == skip_flag::postskip) + qi::skip_over(iter, end, skipper_); + return true; + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename Lexer, typename ParserExpr + , typename Skipper, typename Attribute> + inline bool + tokenize_and_phrase_parse(Iterator& first, Iterator last + , Lexer const& lex, ParserExpr const& xpr, Skipper const& skipper + , Attribute& attr) + { + return tokenize_and_phrase_parse(first, last, lex, xpr, skipper + , skip_flag::postskip, attr); + } + + /////////////////////////////////////////////////////////////////////////// + // + // The tokenize() function is one of the main Spirit API functions. It + // simplifies using a lexer to tokenize a given input sequence. It's main + // purpose is to use the lexer to tokenize all the input. + // + // The second version below discards all generated tokens afterwards. + // This is useful whenever all the needed functionality has been + // implemented directly inside the lexer semantic actions, which are being + // executed while the tokens are matched. + // + // The function takes a pair of iterators spanning the underlying input + // stream to scan, the lexer object (built from the token definitions), + // and a (optional) functor being called for each of the generated tokens. + // + // The function returns true if the scanning of the input succeeded (the + // given input sequence has been successfully matched by the given token + // definitions). + // + // first, last: The pair of iterators spanning the underlying input + // sequence to parse. These iterators must at least + // conform to the requirements of the std::intput_iterator + // category. + // On exit the iterator 'first' will be updated to the + // position right after the last successfully matched + // token. + // lex: The lexer object (encoding the token definitions) to be + // used to convert the input sequence into a sequence of + // tokens. The LexerExpr type must conform to the + // lexer interface described in the corresponding section + // of the documentation. + // f: A functor (callable object) taking a single argument of + // the token type and returning a bool, indicating whether + // the tokenization should be canceled. + // initial_state: The name of the state the lexer should start matching. + // The default value is zero, causing the lexer to start + // in its 'INITIAL' state. + // + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + template <typename Token, typename F> + bool tokenize_callback(Token const& t, F f) + { + return f(t); + } + + template <typename Token, typename Eval> + bool tokenize_callback(Token const& t, phoenix::actor<Eval> const& f) + { + f(t); + return true; + } + + template <typename Token> + bool tokenize_callback(Token const& t, void (*f)(Token const&)) + { + f(t); + return true; + } + + template <typename Token> + bool tokenize_callback(Token const& t, bool (*f)(Token const&)) + { + return f(t); + } + } + + template <typename Iterator, typename Lexer, typename F> + inline bool + tokenize(Iterator& first, Iterator last, Lexer const& lex, F f + , typename Lexer::char_type const* initial_state = 0) + { + typedef typename Lexer::iterator_type iterator_type; + + iterator_type iter = lex.begin(first, last, initial_state); + iterator_type end = lex.end(); + for (/**/; iter != end && token_is_valid(*iter); ++iter) + { + if (!detail::tokenize_callback(*iter, f)) + return false; + } + return (iter == end) ? true : false; + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename Lexer> + inline bool + tokenize(Iterator& first, Iterator last, Lexer const& lex + , typename Lexer::char_type const* initial_state = 0) + { + typedef typename Lexer::iterator_type iterator_type; + + iterator_type iter = lex.begin(first, last, initial_state); + iterator_type end = lex.end(); + + while (iter != end && token_is_valid(*iter)) + ++iter; + + return (iter == end) ? true : false; + } + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/lex/tokenize_and_parse_attr.hpp b/3rdParty/Boost/src/boost/spirit/home/lex/tokenize_and_parse_attr.hpp new file mode 100644 index 0000000..98d191d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/lex/tokenize_and_parse_attr.hpp @@ -0,0 +1,114 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// Copyright (c) 2009 Carl Barron +// +// 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_PP_IS_ITERATING) + +#if !defined(BOOST_SPIRIT_LEXER_PARSE_ATTR_MAY_27_2009_0926AM) +#define BOOST_SPIRIT_LEXER_PARSE_ATTR_MAY_27_2009_0926AM + +#include <boost/spirit/home/lex/tokenize_and_parse.hpp> + +#include <boost/fusion/include/vector.hpp> +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> + +#define BOOST_PP_FILENAME_1 <boost/spirit/home/lex/tokenize_and_parse_attr.hpp> +#define BOOST_PP_ITERATION_LIMITS (2, SPIRIT_ARGUMENTS_LIMIT) +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() +#define BOOST_SPIRIT_QI_ATTRIBUTE_REFERENCE(z, n, A) BOOST_PP_CAT(A, n)& + +namespace boost { namespace spirit { namespace lex +{ + template <typename Iterator, typename Lexer, typename ParserExpr + , BOOST_PP_ENUM_PARAMS(N, typename A)> + inline bool + tokenize_and_parse(Iterator& first, Iterator last, Lexer const& lex + , ParserExpr const& expr, BOOST_PP_ENUM_BINARY_PARAMS(N, A, & attr)) + { + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then the expression (expr) is not a valid spirit qi expression. + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, ParserExpr); + + typedef fusion::vector< + BOOST_PP_ENUM(N, BOOST_SPIRIT_QI_ATTRIBUTE_REFERENCE, A) + > vector_type; + + vector_type attr (BOOST_PP_ENUM_PARAMS(N, attr)); + typename Lexer::iterator_type iter = lex.begin(first, last); + return compile<qi::domain>(expr).parse( + iter, lex.end(), unused, unused, attr); + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename Lexer, typename ParserExpr + , typename Skipper, BOOST_PP_ENUM_PARAMS(N, typename A)> + inline bool + tokenize_and_phrase_parse(Iterator& first, Iterator last, Lexer const& lex + , ParserExpr const& expr, Skipper const& skipper + , BOOST_SCOPED_ENUM(skip_flag) post_skip + , BOOST_PP_ENUM_BINARY_PARAMS(N, A, & attr)) + { + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then either the expression (expr) or skipper is not a valid + // spirit qi expression. + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, ParserExpr); + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Skipper); + + typedef + typename spirit::result_of::compile<qi::domain, Skipper>::type + skipper_type; + skipper_type const skipper_ = compile<qi::domain>(skipper); + + typedef fusion::vector< + BOOST_PP_ENUM(N, BOOST_SPIRIT_QI_ATTRIBUTE_REFERENCE, A) + > vector_type; + + vector_type attr (BOOST_PP_ENUM_PARAMS(N, attr)); + typename Lexer::iterator_type iter = lex.begin(first, last); + if (!compile<qi::domain>(expr).parse( + iter, lex.end(), unused, skipper_, attr)) + return false; + + if (post_skip == skip_flag::postskip) + qi::skip_over(first, last, skipper_); + return true; + } + + template <typename Iterator, typename Lexer, typename ParserExpr + , typename Skipper, BOOST_PP_ENUM_PARAMS(N, typename A)> + inline bool + tokenize_and_phrase_parse(Iterator& first, Iterator last, Lexer const& lex + , ParserExpr const& expr, Skipper const& skipper + , BOOST_PP_ENUM_BINARY_PARAMS(N, A, & attr)) + { + return tokenize_and_phrase_parse(first, last, expr, skipper + , skip_flag::postskip, BOOST_PP_ENUM_PARAMS(N, attr)); + } + +}}} + +#undef BOOST_SPIRIT_QI_ATTRIBUTE_REFERENCE +#undef N + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind.hpp new file mode 100644 index 0000000..5a90d44 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind.hpp @@ -0,0 +1,16 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_BIND_HPP +#define PHOENIX_BIND_HPP + +#include <boost/spirit/home/phoenix/version.hpp> +#include <boost/spirit/home/phoenix/bind/bind_function.hpp> +#include <boost/spirit/home/phoenix/bind/bind_function_object.hpp> +#include <boost/spirit/home/phoenix/bind/bind_member_function.hpp> +#include <boost/spirit/home/phoenix/bind/bind_member_variable.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_function.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_function.hpp new file mode 100644 index 0000000..9121fdc --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_function.hpp @@ -0,0 +1,58 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_BIND_BIND_FUNCTION_HPP +#define PHOENIX_BIND_BIND_FUNCTION_HPP + +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/core/detail/function_eval.hpp> +#include <boost/spirit/home/phoenix/bind/detail/function_ptr.hpp> + +namespace boost { namespace phoenix +{ + template <typename RT> + inline actor< + typename as_composite< + detail::function_eval<0> + , detail::function_ptr<0, RT, RT(*)()> + >::type> + bind(RT(*f)()) + { + typedef detail::function_ptr<0, RT, RT(*)()> fp_type; + return compose<detail::function_eval<0> >(fp_type(f)); + } + + template <typename RT, typename T0, typename A0> + inline actor< + typename as_composite< + detail::function_eval<1> + , detail::function_ptr<1, RT, RT(*)(T0)> + , A0 + >::type> + bind(RT(*f)(T0), A0 const& _0) + { + typedef detail::function_ptr<1, RT, RT(*)(T0)> fp_type; + return compose<detail::function_eval<1> >(fp_type(f), _0); + } + + template <typename RT, typename T0, typename T1, typename A0, typename A1> + inline actor< + typename as_composite< + detail::function_eval<2> + , detail::function_ptr<2, RT, RT(*)(T0, T1)> + , A0, A1 + >::type> + bind(RT(*f)(T0, T1), A0 const& _0, A1 const& _1) + { + typedef detail::function_ptr<2, RT, RT(*)(T0, T1)> fp_type; + return compose<detail::function_eval<2> >(fp_type(f), _0, _1); + } + + // Bring in the rest of the function binders + #include <boost/spirit/home/phoenix/bind/detail/bind_function.hpp> +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_function_object.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_function_object.hpp new file mode 100644 index 0000000..752ae31 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_function_object.hpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_BIND_BIND_FUNCTION_OBJECT_HPP +#define PHOENIX_BIND_BIND_FUNCTION_OBJECT_HPP + +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/core/detail/function_eval.hpp> + +namespace boost { namespace phoenix +{ + template <typename F> + inline actor<typename as_composite<detail::function_eval<0>, F>::type> + bind(F const& f) + { + return compose<detail::function_eval<0> >(f); + } + + template <typename F, typename A0> + inline actor<typename as_composite<detail::function_eval<1>, F, A0>::type> + bind(F const& f, A0 const& _0) + { + return compose<detail::function_eval<1> >(f, _0); + } + + template <typename F, typename A0, typename A1> + inline actor<typename as_composite<detail::function_eval<2>, F, A0, A1>::type> + bind(F const& f, A0 const& _0, A1 const& _1) + { + return compose<detail::function_eval<2> >(f, _0, _1); + } + + // Bring in the rest of the function object binders + #include <boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp> +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_member_function.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_member_function.hpp new file mode 100644 index 0000000..9d31a38 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_member_function.hpp @@ -0,0 +1,77 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_BIND_BIND_MEMBER_FUNCTION_HPP +#define PHOENIX_BIND_BIND_MEMBER_FUNCTION_HPP + +#include <boost/spirit/home/phoenix/core/reference.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/core/detail/function_eval.hpp> +#include <boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp> + +namespace boost { namespace phoenix +{ + template <typename RT, typename ClassT, typename ClassA> + inline actor< + typename as_composite< + detail::function_eval<1> + , detail::member_function_ptr<0, RT, RT(ClassT::*)()> + , ClassA + >::type> + bind(RT(ClassT::*f)(), ClassA const& obj) + { + typedef detail::member_function_ptr<0, RT, RT(ClassT::*)()> fp_type; + return compose<detail::function_eval<1> >(fp_type(f), obj); + } + + template <typename RT, typename ClassT, typename ClassA> + inline actor< + typename as_composite< + detail::function_eval<1> + , detail::member_function_ptr<0, RT, RT(ClassT::*)() const> + , ClassA + >::type> + bind(RT(ClassT::*f)() const, ClassA const& obj) + { + typedef detail::member_function_ptr<0, RT, RT(ClassT::*)() const> fp_type; + return compose<detail::function_eval<1> >(fp_type(f), obj); + } + + template <typename RT, typename ClassT> + inline actor< + typename as_composite< + detail::function_eval<1> + , detail::member_function_ptr<0, RT, RT(ClassT::*)()> + , actor<reference<ClassT> > + >::type> + bind(RT(ClassT::*f)(), ClassT& obj) + { + typedef detail::member_function_ptr<0, RT, RT(ClassT::*)()> fp_type; + return compose<detail::function_eval<1> >( + fp_type(f) + , actor<reference<ClassT> >(reference<ClassT>(obj))); + } + + template <typename RT, typename ClassT> + inline actor< + typename as_composite< + detail::function_eval<1> + , detail::member_function_ptr<0, RT, RT(ClassT::*)() const> + , actor<reference<ClassT> > + >::type> + bind(RT(ClassT::*f)() const, ClassT& obj) + { + typedef detail::member_function_ptr<0, RT, RT(ClassT::*)() const> fp_type; + return compose<detail::function_eval<1> >( + fp_type(f) + , actor<reference<ClassT> >(reference<ClassT>(obj))); + } + + // Bring in the rest of the function binders + #include <boost/spirit/home/phoenix/bind/detail/bind_member_function.hpp> +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_member_variable.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_member_variable.hpp new file mode 100644 index 0000000..3d11351 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/bind_member_variable.hpp @@ -0,0 +1,105 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_BIND_BIND_MEMBER_VARIABLE_HPP +#define PHOENIX_BIND_BIND_MEMBER_VARIABLE_HPP + +#include <boost/mpl/if.hpp> +#include <boost/type_traits/is_const.hpp> +#include <boost/type_traits/remove_pointer.hpp> +#include <boost/type_traits/remove_reference.hpp> + +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/core/reference.hpp> +#include <boost/spirit/home/phoenix/core/detail/function_eval.hpp> +#include <boost/mpl/if.hpp> +#include <boost/type_traits/is_const.hpp> +#include <boost/type_traits/remove_pointer.hpp> +#include <boost/type_traits/remove_reference.hpp> + +namespace boost { namespace phoenix +{ + namespace detail + { + template <typename RT, typename MP> + struct member_variable + { + template <typename Class> + struct result + { + typedef typename boost::mpl::if_< + boost::is_const< + typename boost::remove_pointer< + typename boost::remove_reference<Class>::type + >::type + > + , const RT& + , RT& + >::type type; + }; + + member_variable(MP mp) + : mp(mp) {} + + template <typename Class> + RT& operator()(Class& obj) const + { + return obj.*mp; + } + + template <typename Class> + RT& operator()(Class* obj) const + { + return obj->*mp; + } + + template <typename Class> + RT const& operator()(Class const& obj) const + { + return obj.*mp; + } + + template <typename Class> + RT const& operator()(Class const* obj) const + { + return obj->*mp; + } + + MP mp; + }; + } + + template <typename RT, typename ClassT, typename ClassA> + inline actor< + typename as_composite< + detail::function_eval<1> + , detail::member_variable<RT, RT ClassT::*> + , ClassA + >::type> + bind(RT ClassT::*mp, ClassA const& obj) + { + typedef detail::member_variable<RT, RT ClassT::*> mp_type; + return compose<detail::function_eval<1> >(mp_type(mp), obj); + } + + template <typename RT, typename ClassT> + inline actor< + typename as_composite< + detail::function_eval<1> + , detail::member_variable<RT, RT ClassT::*> + , actor<reference<ClassT> > + >::type> + bind(RT ClassT::*mp, ClassT& obj) + { + typedef detail::member_variable<RT, RT ClassT::*> mp_type; + return compose<detail::function_eval<1> >( + mp_type(mp) + , actor<reference<ClassT> >(reference<ClassT>(obj))); + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_function.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_function.hpp new file mode 100644 index 0000000..8d6340d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_function.hpp @@ -0,0 +1,53 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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_PP_IS_ITERATING) +#if !defined(PHOENIX_BIND_DETAIL_BIND_FUNCTION_HPP) +#define PHOENIX_BIND_DETAIL_BIND_FUNCTION_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT), \ + "boost/spirit/home/phoenix/bind/detail/bind_function.hpp")) +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <typename RT + , BOOST_PP_ENUM_PARAMS(N, typename T) + , BOOST_PP_ENUM_PARAMS(N, typename A)> + inline actor< + typename as_composite< + detail::function_eval<N> + , detail::function_ptr<N, RT, RT(*)(BOOST_PP_ENUM_PARAMS(N, T))> + , BOOST_PP_ENUM_PARAMS(N, A) + >::type> + bind(RT(*f)(BOOST_PP_ENUM_PARAMS(N, T)) + , BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) + { + typedef detail::function_ptr< + N, RT, RT(*)(BOOST_PP_ENUM_PARAMS(N, T))> fp_type; + return compose<detail::function_eval<N> >( + fp_type(f), BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp new file mode 100644 index 0000000..4e4984d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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_PP_IS_ITERATING) +#if !defined(PHOENIX_BIND_DETAIL_BIND_FUNCTION_OBJECT_HPP) +#define PHOENIX_BIND_DETAIL_BIND_FUNCTION_OBJECT_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT), \ + "boost/spirit/home/phoenix/bind/detail/bind_function_object.hpp")) +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <typename F, BOOST_PP_ENUM_PARAMS(N, typename A)> + inline actor<typename as_composite<detail::function_eval<N>, F + , BOOST_PP_ENUM_PARAMS(N, A)>::type> + bind(F const& f, BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) + { + return compose<detail::function_eval<N> >(f, BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_member_function.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_member_function.hpp new file mode 100644 index 0000000..315f56f --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/bind_member_function.hpp @@ -0,0 +1,132 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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_PP_IS_ITERATING) +#if !defined(PHOENIX_BIND_DETAIL_BIND_MEMBER_FUNCTION_HPP) +#define PHOENIX_BIND_DETAIL_BIND_MEMBER_FUNCTION_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/preprocessor/inc.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, BOOST_PP_DEC(BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT)), \ + "boost/spirit/home/phoenix/bind/detail/bind_member_function.hpp")) +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <typename RT + , typename ClassT + , BOOST_PP_ENUM_PARAMS(N, typename T) + , typename ClassA + , BOOST_PP_ENUM_PARAMS(N, typename A)> + inline actor< + typename as_composite< + detail::function_eval<BOOST_PP_INC(N)> + , detail::member_function_ptr<N, + RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T))> + , ClassA, BOOST_PP_ENUM_PARAMS(N, A) + >::type> + bind( + RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(N, T)) + , ClassA const& obj + , BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) + { + typedef detail::member_function_ptr< + N, RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T))> fp_type; + return compose<detail::function_eval<BOOST_PP_INC(N)> >( + fp_type(f), obj, BOOST_PP_ENUM_PARAMS(N, _)); + } + + template <typename RT + , typename ClassT + , BOOST_PP_ENUM_PARAMS(N, typename T) + , typename ClassA + , BOOST_PP_ENUM_PARAMS(N, typename A)> + inline actor< + typename as_composite< + detail::function_eval<BOOST_PP_INC(N)> + , detail::member_function_ptr<N, + RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T)) const> + , ClassA, BOOST_PP_ENUM_PARAMS(N, A) + >::type> + bind( + RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(N, T)) const + , ClassA const& obj + , BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) + { + typedef detail::member_function_ptr< + N, RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T)) const> fp_type; + return compose<detail::function_eval<BOOST_PP_INC(N)> >( + fp_type(f), obj, BOOST_PP_ENUM_PARAMS(N, _)); + } + + template <typename RT + , typename ClassT + , BOOST_PP_ENUM_PARAMS(N, typename T) + , BOOST_PP_ENUM_PARAMS(N, typename A)> + inline actor< + typename as_composite< + detail::function_eval<BOOST_PP_INC(N)> + , detail::member_function_ptr<N, + RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T))> + , actor<reference<ClassT> > + , BOOST_PP_ENUM_PARAMS(N, A) + >::type> + bind( + RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(N, T)) + , ClassT& obj + , BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) + { + typedef detail::member_function_ptr< + N, RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T))> fp_type; + return compose<detail::function_eval<BOOST_PP_INC(N)> >( + fp_type(f) + , actor<reference<ClassT> >(reference<ClassT>(obj)) + , BOOST_PP_ENUM_PARAMS(N, _)); + } + + template <typename RT + , typename ClassT + , BOOST_PP_ENUM_PARAMS(N, typename T) + , BOOST_PP_ENUM_PARAMS(N, typename A)> + inline actor< + typename as_composite< + detail::function_eval<BOOST_PP_INC(N)> + , detail::member_function_ptr<N, + RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T)) const> + , actor<reference<ClassT> > + , BOOST_PP_ENUM_PARAMS(N, A) + >::type> + bind( + RT(ClassT::*f)(BOOST_PP_ENUM_PARAMS(N, T)) const + , ClassT& obj + , BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) + { + typedef detail::member_function_ptr< + N, RT, RT(ClassT::*)(BOOST_PP_ENUM_PARAMS(N, T)) const> fp_type; + return compose<detail::function_eval<BOOST_PP_INC(N)> >( + fp_type(f) + , actor<reference<ClassT> >(reference<ClassT>(obj)) + , BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/function_ptr.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/function_ptr.hpp new file mode 100644 index 0000000..a2352cd --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/function_ptr.hpp @@ -0,0 +1,99 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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_PP_IS_ITERATING) +#if !defined(PHOENIX_BIND_DETAIL_FUNCTION_PTR_HPP) +#define PHOENIX_BIND_DETAIL_FUNCTION_PTR_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/dec.hpp> + +namespace boost { namespace phoenix { namespace detail +{ + template <int N> + struct function_ptr_impl + { + template <typename RT, typename FP> + struct impl; + }; + + template <int N, typename RT, typename FP> + struct function_ptr : function_ptr_impl<N>::template impl<RT, FP> + { + typedef typename function_ptr_impl<N>::template impl<RT, FP> base; + function_ptr(FP fp) + : base(fp) {} + }; + + template <> + struct function_ptr_impl<0> + { + template <typename RT, typename FP> + struct impl + { + typedef RT result_type; + + impl(FP fp) + : fp(fp) {} + + RT operator()() const + { + return fp(); + } + + FP fp; + }; + }; + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, PHOENIX_COMPOSITE_LIMIT, \ + "boost/spirit/home/phoenix/bind/detail/function_ptr.hpp")) +#include BOOST_PP_ITERATE() + +}}} // namespace boost::phoenix::detail + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <> + struct function_ptr_impl<N> + { + template <typename RT, typename FP> + struct impl + { + template <BOOST_PP_ENUM_PARAMS(N, typename T)> + struct result + { + typedef RT type; + }; + + impl(FP fp) + : fp(fp) {} + + template <BOOST_PP_ENUM_PARAMS(N, typename A)> + RT operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, & _)) const + { + return fp(BOOST_PP_ENUM_PARAMS(N, _)); + } + + FP fp; + }; + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp new file mode 100644 index 0000000..2c11510 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp @@ -0,0 +1,119 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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_PP_IS_ITERATING) +#if !defined(PHOENIX_BIND_DETAIL_MEMBER_FUNCTION_PTR_HPP) +#define PHOENIX_BIND_DETAIL_MEMBER_FUNCTION_PTR_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/utility/addressof.hpp> + +namespace boost { namespace phoenix { namespace detail +{ + template <int N> + struct member_function_ptr_impl + { + template <typename RT, typename FP> + struct impl; + }; + + template <int N, typename RT, typename FP> + struct member_function_ptr + : member_function_ptr_impl<N>::template impl<RT, FP> + { + typedef typename member_function_ptr_impl<N>:: + template impl<RT, FP> base; + member_function_ptr(FP fp) + : base(fp) {} + }; + + template <> + struct member_function_ptr_impl<0> + { + template <typename RT, typename FP> + struct impl + { + template <typename Class> + struct result + { + typedef RT type; + }; + + impl(FP fp) + : fp(fp) {} + + template <typename Class> + RT operator()(Class& obj) const + { + return (obj.*fp)(); + } + + template <typename Class> + RT operator()(Class* obj) const + { + return (obj->*fp)(); + } + + FP fp; + }; + }; + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, PHOENIX_COMPOSITE_LIMIT, \ + "boost/spirit/home/phoenix/bind/detail/member_function_ptr.hpp")) +#include BOOST_PP_ITERATE() + +}}} // namespace boost::phoenix::detail + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <> + struct member_function_ptr_impl<N> + { + template <typename RT, typename FP> + struct impl + { + template <typename Class, BOOST_PP_ENUM_PARAMS(N, typename T)> + struct result + { + typedef RT type; + }; + + impl(FP fp) + : fp(fp) {} + + template <typename Class, BOOST_PP_ENUM_PARAMS(N, typename A)> + RT operator()(Class& obj, BOOST_PP_ENUM_BINARY_PARAMS(N, A, & _)) const + { + return (obj.*fp)(BOOST_PP_ENUM_PARAMS(N, _)); + } + + template <typename Class, BOOST_PP_ENUM_PARAMS(N, typename A)> + RT operator()(Class* obj, BOOST_PP_ENUM_BINARY_PARAMS(N, A, & _)) const + { + return (obj->*fp)(BOOST_PP_ENUM_PARAMS(N, _)); + } + + FP fp; + }; + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core.hpp new file mode 100644 index 0000000..7dfefb3 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core.hpp @@ -0,0 +1,23 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_CORE_HPP +#define PHOENIX_CORE_HPP + +#include <boost/spirit/home/phoenix/version.hpp> +#include <boost/spirit/home/phoenix/core/limits.hpp> +#include <boost/spirit/home/phoenix/core/basic_environment.hpp> +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/spirit/home/phoenix/core/as_actor.hpp> +#include <boost/spirit/home/phoenix/core/is_actor.hpp> +#include <boost/spirit/home/phoenix/core/argument.hpp> +#include <boost/spirit/home/phoenix/core/value.hpp> +#include <boost/spirit/home/phoenix/core/reference.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/nothing.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/actor.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/actor.hpp new file mode 100644 index 0000000..6ff48e9 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/actor.hpp @@ -0,0 +1,194 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_CORE_ACTOR_HPP +#define PHOENIX_CORE_ACTOR_HPP + +#include <boost/spirit/home/phoenix/core/limits.hpp> + +#if !defined(BOOST_RESULT_OF_NUM_ARGS) +# define BOOST_RESULT_OF_NUM_ARGS PHOENIX_ACTOR_LIMIT +#elif (BOOST_RESULT_OF_NUM_ARGS < PHOENIX_ACTOR_LIMIT) +# error "BOOST_RESULT_OF_NUM_ARGS < PHOENIX_ACTOR_LIMIT" +#endif + +#include <boost/spirit/home/phoenix/core/basic_environment.hpp> +#include <boost/mpl/min.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/type_traits/add_const.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/utility/result_of.hpp> + +namespace boost { namespace phoenix +{ + // phoenix::void_ is the same as fusion::void_ + typedef fusion::void_ void_; + + namespace detail + { + // Forward declarations. These will come in when we get to the + // operator module, yet, the actor's assignment operator and index + // operator are required to be members. + + template <typename T0, typename T1> + struct make_assign_composite; + + template <typename T0, typename T1> + struct make_index_composite; + + template <typename BaseT0, typename BaseT1> + struct comma_result; + + // error no arguments supplied + struct error_expecting_arguments + { + template <typename T> + error_expecting_arguments(T const&) {} + }; + } + + template <typename Eval, typename Env> + struct eval_result + { + typedef typename Eval::template result<Env>::type type; + }; + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable: 4522) // multiple assignment operators specified warning +#endif + + template <typename Eval> + struct actor : Eval + { + typedef actor<Eval> self_type; + typedef Eval eval_type; + + template <class Sig> struct result {}; + + actor() + : Eval() {} + + actor(Eval const& base) + : Eval(base) {} + + template <typename T0> + explicit actor(T0 const& _0) + : Eval(_0) {} + + template <typename T0, typename T1> + actor(T0 const& _0, T1 const& _1) + : Eval(_0, _1) {} + + typedef typename + mpl::eval_if< + typename Eval::no_nullary // avoid calling eval_result when this is true + , mpl::identity<detail::error_expecting_arguments> + , eval_result<eval_type, basic_environment<> > + >::type + nullary_result; + + actor& operator=(actor const& rhs) + { + Eval::operator=(rhs); + return *this; + } + + actor& operator=(actor& rhs) + { + Eval::operator=(rhs); + return *this; + } + + nullary_result + operator()() const + { + return eval_type::eval(basic_environment<>()); + } + + template <class F, class A0> + struct result<F(A0)> + : eval_result< + eval_type + , basic_environment< + typename remove_reference<A0>::type + > + > + {}; + + template <typename T0> + typename result<actor(T0&)>::type + operator()(T0& _0) const + { + return eval_type::eval(basic_environment<T0>(_0)); + } + + template <class F, class A0, class A1> + struct result<F(A0,A1)> + : eval_result< + eval_type + , basic_environment< + typename remove_reference<A0>::type + , typename remove_reference<A1>::type + > + > + {}; + + template <typename T0, typename T1> + typename result<actor(T0&,T1&)>::type + operator()(T0& _0, T1& _1) const + { + return eval_type::eval(basic_environment<T0, T1>(_0, _1)); + } + + template <typename T1> + typename detail::make_assign_composite<self_type, T1>::type + operator=(T1 const& a1) const; + + template <typename T1> + typename detail::make_index_composite<self_type, T1>::type + operator[](T1 const& a1) const; + + // Bring in the rest of the constructors and function call operators + #include <boost/spirit/home/phoenix/core/detail/actor.hpp> + }; + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + + // Forward declaration: The intent to overload the comma must be + // stated early on to avoid the subtle problem that arises when + // the header file where the comma operator overload is defined, + // is not included by the client and the client attempts to use + // the comma anyway. + + namespace detail + { + template <typename BaseT0, typename BaseT1> + struct comma_result; + } + + template <typename BaseT0, typename BaseT1> + typename detail::comma_result<BaseT0, BaseT1>::type + operator,(actor<BaseT0> const& a0, actor<BaseT1> const& a1); +}} + +namespace boost +{ + template <typename Eval> + struct result_of<phoenix::actor<Eval>()> + { + typedef typename phoenix::actor<Eval>::nullary_result type; + }; + + template <typename Eval> + struct result_of<phoenix::actor<Eval> const()> + : result_of<phoenix::actor<Eval>()> + {}; +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/argument.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/argument.hpp new file mode 100644 index 0000000..1679cb2 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/argument.hpp @@ -0,0 +1,99 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_CORE_ARGUMENT_HPP +#define PHOENIX_CORE_ARGUMENT_HPP + +#include <boost/preprocessor/repetition/repeat_from_to.hpp> +#include <boost/preprocessor/inc.hpp> +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/fusion/include/at.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/less.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/int.hpp> +#include <boost/mpl/at.hpp> +#include <boost/mpl/size.hpp> +#include <boost/type_traits/add_reference.hpp> + +#define PHOENIX_DECLARE_ARG(z, n, data) \ + typedef actor<argument<n> > \ + BOOST_PP_CAT(BOOST_PP_CAT(arg, BOOST_PP_INC(n)), _type); \ + actor<argument<n> > const \ + BOOST_PP_CAT(arg, BOOST_PP_INC(n)) = argument<n>(); \ + typedef actor<argument<n> > \ + BOOST_PP_CAT(BOOST_PP_CAT(_, BOOST_PP_INC(n)), _type); \ + actor<argument<n> > const \ + BOOST_PP_CAT(_, BOOST_PP_INC(n)) = argument<n>(); + +namespace boost { namespace phoenix +{ + namespace detail + { + template <typename Arg> + struct error_argument_not_found {}; + inline void test_invalid_argument(int) {} + } + + template <int N> + struct argument + { + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result + { + typedef typename + fusion::result_of::at<typename Env::tie_type, mpl::int_<N> >::type + type; + }; + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + typedef typename + mpl::if_< + mpl::less<mpl::int_<N>, mpl::size<typename Env::args_type> > + , int + , detail::error_argument_not_found<argument<N> > + >::type + check_out_of_bounds; + + detail::test_invalid_argument(check_out_of_bounds()); + return fusion::at_c<N>(env.args()); + } + }; + + namespace arg_names + { + // Phoenix style names + typedef actor<argument<0> > arg1_type; + actor<argument<0> > const arg1 = argument<0>(); + typedef actor<argument<1> > arg2_type; + actor<argument<1> > const arg2 = argument<1>(); + typedef actor<argument<2> > arg3_type; + actor<argument<2> > const arg3 = argument<2>(); + + // BLL style names + typedef actor<argument<0> > _1_type; + actor<argument<0> > const _1 = argument<0>(); + typedef actor<argument<1> > _2_type; + actor<argument<1> > const _2 = argument<1>(); + typedef actor<argument<2> > _3_type; + actor<argument<2> > const _3 = argument<2>(); + + // Bring in the rest or the Phoenix style arguments (arg4 .. argN+1) + // and BLL style arguments (_4 .. _N+1), using PP + BOOST_PP_REPEAT_FROM_TO( + 3, PHOENIX_ARG_LIMIT, PHOENIX_DECLARE_ARG, _) + } +}} + +#undef PHOENIX_DECLARE_ARG +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/as_actor.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/as_actor.hpp new file mode 100644 index 0000000..36f0aac --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/as_actor.hpp @@ -0,0 +1,62 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_CORE_AS_ACTOR_HPP +#define PHOENIX_CORE_AS_ACTOR_HPP + +#include <boost/spirit/home/phoenix/core/actor.hpp> + +namespace boost { namespace phoenix +{ + template <typename T> + struct as_actor_base; // defined in value.hpp + + template <typename Base> + struct as_actor_base<actor<Base> > + { + typedef Base type; + + static Base const& + convert(actor<Base> const& x) + { + return x; + } + }; + + template <> + struct as_actor_base<fusion::void_> + { + typedef fusion::void_ type; + struct error_attempting_to_convert_void_type_to_an_actor {}; + + static void + convert(error_attempting_to_convert_void_type_to_an_actor); + }; + + template <> + struct as_actor_base<void> + { + typedef void type; + struct error_attempting_to_convert_void_type_to_an_actor {}; + + static void + convert(error_attempting_to_convert_void_type_to_an_actor); + }; + + template <typename T> + struct as_actor + { + typedef actor<typename as_actor_base<T>::type> type; + + static type + convert(T const& x) + { + return as_actor_base<T>::convert(x); + } + }; +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/basic_environment.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/basic_environment.hpp new file mode 100644 index 0000000..5ef8223 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/basic_environment.hpp @@ -0,0 +1,81 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_CORE_BASIC_ENVIRONMENT_HPP +#define PHOENIX_CORE_BASIC_ENVIRONMENT_HPP + +#include <boost/spirit/home/phoenix/core/limits.hpp> +#include <boost/mpl/remove.hpp> +#include <boost/mpl/transform.hpp> +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +#include <boost/type_traits/add_reference.hpp> +#include <boost/fusion/include/as_vector.hpp> +#include <boost/fusion/include/mpl.hpp> + +namespace boost { namespace phoenix +{ + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + PHOENIX_ARG_LIMIT, typename T, fusion::void_)> + class basic_environment + { + typedef + mpl::BOOST_PP_CAT(vector, PHOENIX_ARG_LIMIT)< + BOOST_PP_ENUM_PARAMS(PHOENIX_ARG_LIMIT, T)> + args_with_void_type; + + public: + + // args_type: the list of types in an mpl::sequence + typedef typename + mpl::remove<args_with_void_type, fusion::void_>::type + args_type; + + // tie_type: a fusion::tuple of references + typedef typename + fusion::result_of::as_vector< + typename mpl::transform< + args_type, boost::add_reference<mpl::_1> + >::type + >::type + tie_type; + + basic_environment() + : args_() {} + + template <typename U0> + explicit basic_environment(U0& _0) + : args_(_0) {} + + template <typename U0, typename U1> + basic_environment(U0& _0, U1& _1) + : args_(_0, _1) {} + + // Bring in the rest of the constructors + #include <boost/spirit/home/phoenix/core/detail/basic_environment.hpp> + + tie_type const& + args() const + { + return args_; + } + + tie_type& + args() + { + return args_; + } + + private: + + tie_type args_; + }; +}} + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/compose.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/compose.hpp new file mode 100644 index 0000000..d536113 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/compose.hpp @@ -0,0 +1,118 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_CORE_COMPOSE_HPP +#define PHOENIX_CORE_COMPOSE_HPP + +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/preprocessor/repetition/enum.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/value.hpp> +#include <boost/spirit/home/phoenix/core/as_actor.hpp> + +#define PHOENIX_AS_ACTOR(z, n, data) \ + typename mpl::eval_if< \ + is_same<BOOST_PP_CAT(T, n), fusion::void_> \ + , mpl::identity<fusion::void_> \ + , as_actor_base<BOOST_PP_CAT(T, n)> \ + >::type + +namespace boost { namespace phoenix +{ + +/////////////////////////////////////////////////////////////////////////////// +// +// as_composite<EvalPolicy, T0,... TN> metafunction +// +// Create a composite given an EvalPolicy and types T0..TN. +// The types are converted to an actor through the as_actor +// metafunction (see as_actor.hpp). +// +/////////////////////////////////////////////////////////////////////////////// + template < + typename EvalPolicy + , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + PHOENIX_COMPOSITE_LIMIT, typename T, fusion::void_)> + struct as_composite + { + typedef composite< + EvalPolicy + , fusion::vector< + BOOST_PP_ENUM(PHOENIX_COMPOSITE_LIMIT, PHOENIX_AS_ACTOR, _)> + > + type; + }; + +/////////////////////////////////////////////////////////////////////////////// +// +// compose functions +// +// Usage: +// +// compose<EvalPolicy>(_0, _1,... _N) +// +// Returns a composite given an EvalPolicy and arguments _0.._N. +// The arguments are converted to an actor through the as_actor +// metafunction (see as_actor.hpp). +// +/////////////////////////////////////////////////////////////////////////////// + template <typename EvalPolicy> + inline actor<typename as_composite<EvalPolicy>::type> + compose() + { + return actor<typename as_composite<EvalPolicy>::type>(); + } + + template <typename EvalPolicy, typename T0> + inline actor<typename as_composite<EvalPolicy, T0>::type> + compose(T0 const& _0) + { + return actor<typename as_composite<EvalPolicy, T0>::type>( + as_actor<T0>::convert(_0) + ); + } + + template <typename EvalPolicy, typename T0, typename T1> + inline actor<typename as_composite<EvalPolicy, T0, T1>::type> + compose(T0 const& _0, T1 const& _1) + { + return actor<typename as_composite<EvalPolicy, T0, T1>::type>( + as_actor<T0>::convert(_0) + , as_actor<T1>::convert(_1) + ); + } + + // Bring in the the rest of the compose overloads + #include <boost/spirit/home/phoenix/core/detail/compose.hpp> + +/////////////////////////////////////////////////////////////////////////////// +// +// re_curry<EvalPolicy, T0,...TN> +// +// returns the result of re currying T0..TN using EvalPolicy. +// +/////////////////////////////////////////////////////////////////////////////// + template < + typename EvalPolicy + , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + PHOENIX_COMPOSITE_LIMIT, typename T, fusion::void_)> + struct re_curry + { + typedef actor< + typename as_composite< + EvalPolicy + , BOOST_PP_ENUM_PARAMS(PHOENIX_COMPOSITE_LIMIT, T)>::type + > + type; + }; +}} + +#undef PHOENIX_AS_ACTOR +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/composite.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/composite.hpp new file mode 100644 index 0000000..283bdc2 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/composite.hpp @@ -0,0 +1,96 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_CORE_COMPOSITE_HPP +#define PHOENIX_CORE_COMPOSITE_HPP + +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/spirit/home/phoenix/core/is_actor.hpp> +#include <boost/fusion/include/vector.hpp> +#include <boost/fusion/include/at.hpp> +#include <boost/fusion/include/size.hpp> +#include <boost/fusion/include/mpl.hpp> +#include <boost/mpl/fold.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/or.hpp> + +namespace boost { namespace phoenix +{ + namespace detail + { + template <int N> + struct composite_eval; + + struct compute_no_nullary + { + template <typename State, typename T> + struct apply + { + typedef typename + mpl::or_<typename T::no_nullary, State>::type + type; + }; + }; + } + + template <typename EvalPolicy, typename EvalTuple> + struct composite : EvalTuple + { + typedef EvalTuple base_type; + typedef composite<EvalPolicy, EvalTuple> self_type; + typedef EvalPolicy eval_policy_type; + + typedef typename + mpl::fold< + EvalTuple + , mpl::false_ + , detail::compute_no_nullary + >::type + no_nullary; + + template <typename Env> + struct result + { + typedef + typename detail::composite_eval< + fusion::result_of::size<base_type>::value>:: + template result<self_type, Env>::type + type; + }; + + composite() + : base_type() {} + + composite(base_type const& base) + : base_type(base) {} + + template <typename U0> + composite(U0& _0) + : base_type(_0) {} + + template <typename U0, typename U1> + composite(U0& _0, U1& _1) + : base_type(_0, _1) {} + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + typedef typename result<Env>::type return_type; + return detail:: + composite_eval<fusion::result_of::size<base_type>::value>::template + call<return_type>(*this, env); + } + + // Bring in the rest of the constructors + #include <boost/spirit/home/phoenix/core/detail/composite.hpp> + }; + + // Bring in the detail::composite_eval<0..N> definitions + #include <boost/spirit/home/phoenix/core/detail/composite_eval.hpp> +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/actor.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/actor.hpp new file mode 100644 index 0000000..66666c5 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/actor.hpp @@ -0,0 +1,65 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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_PP_IS_ITERATING +#ifndef PHOENIX_CORE_DETAIL_ACTOR_HPP +#define PHOENIX_CORE_DETAIL_ACTOR_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/facilities/intercept.hpp> + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, PHOENIX_ACTOR_LIMIT, \ + "boost/spirit/home/phoenix/core/detail/actor.hpp")) +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <BOOST_PP_ENUM_PARAMS(N, typename T)> + actor(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) + : Eval(BOOST_PP_ENUM_PARAMS(N, _)) {} + + template <typename F, BOOST_PP_ENUM_PARAMS(N, typename A)> + struct result<F(BOOST_PP_ENUM_PARAMS(N, A))> + : eval_result< + eval_type + , basic_environment< + BOOST_PP_ENUM_BINARY_PARAMS( + N + , typename remove_reference<A + , >::type BOOST_PP_INTERCEPT + ) + > + > + {}; + + template <BOOST_PP_ENUM_PARAMS(N, typename T)> + typename result< + actor(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & BOOST_PP_INTERCEPT)) + >::type + operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _)) const + { + return eval_type::eval( + basic_environment<BOOST_PP_ENUM_PARAMS(N, T)>( + BOOST_PP_ENUM_PARAMS(N, _)) + ); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/basic_environment.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/basic_environment.hpp new file mode 100644 index 0000000..986ecf2 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/basic_environment.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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_PP_IS_ITERATING +#ifndef PHOENIX_CORE_DETAIL_BASIC_ENVIRONMENT_HPP +#define PHOENIX_CORE_DETAIL_BASIC_ENVIRONMENT_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, PHOENIX_ARG_LIMIT, \ + "boost/spirit/home/phoenix/core/detail/basic_environment.hpp")) +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <BOOST_PP_ENUM_PARAMS(N, typename U)> + basic_environment(BOOST_PP_ENUM_BINARY_PARAMS(N, U, & _)) + : args_(BOOST_PP_ENUM_PARAMS(N, _)) {} + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/compose.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/compose.hpp new file mode 100644 index 0000000..945a3d3 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/compose.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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_PP_IS_ITERATING +#ifndef PHOENIX_CORE_DETAIL_COMPOSE_DETAIL_HPP +#define PHOENIX_CORE_DETAIL_COMPOSE_DETAIL_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum.hpp> + +#define PHOENIX_AS_ACTOR_CONVERT(z, n, data) \ + as_actor<BOOST_PP_CAT(T, n)>::convert(BOOST_PP_CAT(_, n)) + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, PHOENIX_COMPOSITE_LIMIT, \ + "boost/spirit/home/phoenix/core/detail/compose.hpp")) +#include BOOST_PP_ITERATE() + +#undef PHOENIX_AS_ACTOR_CONVERT +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <typename EvalPolicy, BOOST_PP_ENUM_PARAMS(N, typename T)> + inline actor< + typename as_composite<EvalPolicy, BOOST_PP_ENUM_PARAMS(N, T)>::type> + compose(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) + { + return actor< + typename as_composite<EvalPolicy, BOOST_PP_ENUM_PARAMS(N, T)>::type>( + BOOST_PP_ENUM(N, PHOENIX_AS_ACTOR_CONVERT, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite.hpp new file mode 100644 index 0000000..6970f7c --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite.hpp @@ -0,0 +1,36 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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_PP_IS_ITERATING +#ifndef PHOENIX_CORE_DETAIL_COMPOSITE_HPP +#define PHOENIX_CORE_DETAIL_COMPOSITE_HPP + +#include <boost/preprocessor/iterate.hpp> + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, PHOENIX_COMPOSITE_LIMIT, \ + "boost/spirit/home/phoenix/core/detail/composite.hpp")) +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <BOOST_PP_ENUM_PARAMS(N, typename U)> + composite(BOOST_PP_ENUM_BINARY_PARAMS(N, U, & _)) + : base_type(BOOST_PP_ENUM_PARAMS(N, _)) {} + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite_eval.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite_eval.hpp new file mode 100644 index 0000000..14f12af --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/composite_eval.hpp @@ -0,0 +1,106 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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_PP_IS_ITERATING +#ifndef PHOENIX_CORE_DETAIL_COMPOSITE_EVAL_HPP +#define PHOENIX_CORE_DETAIL_COMPOSITE_EVAL_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> + + namespace detail + { + template <int N> + struct composite_eval; + + template <> + struct composite_eval<0> + { + template <typename Composite, typename Env> + struct result + { + typedef typename Composite::eval_policy_type:: + template result<Env>::type + type; + }; + + template <typename RT, typename Composite, typename Env> + static RT + call(Composite const& /*composite*/, Env const& env) + { + typedef typename Composite::eval_policy_type eval_policy_type; + return eval_policy_type::template eval<RT>(env); + } + }; + + template <typename Actor, typename Env> + struct eval_is_actor + : is_actor<typename Actor::template result<Env>::type> {}; + + template <typename Actor, typename Env> + struct eval_is_void + : is_same<typename Actor::template result<Env>::type, fusion::void_> {}; + } + +#define PHOENIX_GET_ACTOR_TYPE(z, n, data) \ + typedef \ + typename fusion::result_of::value_at_c<Composite, n>::type \ + BOOST_PP_CAT(actor, n); + +#define PHOENIX_GET_ACTOR(z, n, data) \ + fusion::at_c<n>(composite) + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, PHOENIX_COMPOSITE_LIMIT, \ + "boost/spirit/home/phoenix/core/detail/composite_eval.hpp")) +#include BOOST_PP_ITERATE() + +#undef PHOENIX_GET_ACTOR +#undef PHOENIX_GET_ACTOR_TYPE +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + namespace detail + { + template <> + struct composite_eval<N> + { + template <typename Composite, typename Env> + struct result + { + BOOST_PP_REPEAT(N, PHOENIX_GET_ACTOR_TYPE, _) + + typedef typename + Composite::eval_policy_type::template result< + Env, BOOST_PP_ENUM_PARAMS(N, actor) + >::type + type; + }; + + template <typename RT, typename Composite, typename Env> + static RT + call(Composite const& composite, Env const& env) + { + typedef typename Composite::eval_policy_type eval_policy_type; + return eval_policy_type::template eval<RT>( + env, BOOST_PP_ENUM(N, PHOENIX_GET_ACTOR, _)); + } + }; + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/function_eval.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/function_eval.hpp new file mode 100644 index 0000000..711b32c --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/detail/function_eval.hpp @@ -0,0 +1,142 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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_PP_IS_ITERATING) +#if !defined(PHOENIX_CORE_DETAIL_FUNCTION_EVAL_HPP) +#define PHOENIX_CORE_DETAIL_FUNCTION_EVAL_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/enum.hpp> +#include <boost/preprocessor/repeat.hpp> +#include <boost/preprocessor/dec.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/find.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/remove_reference.hpp> + +// we assume that mpl::vectorN, where N = PHOENIX_COMPOSITE_LIMIT +// is included already. + +namespace boost { namespace phoenix { namespace detail +{ + template <int N> + struct function_eval; + + template <> + struct function_eval<0> + { + template <typename Env, typename F> + struct result + { + typedef typename + remove_reference< + typename F::template result<Env>::type + >::type + fn; + typedef typename fn::result_type type; + }; + + template <typename RT, typename Env, typename F> + static RT + eval(Env const& env, F const& f) + { + return f.eval(env)(); + } + }; + + template <typename T> + T& help_rvalue_deduction(T& x) + { + return x; + } + + template <typename T> + T const& help_rvalue_deduction(T const& x) + { + return x; + } + +// When we call f(_0, _1...) we remove the reference when deducing f's +// return type. $$$ Explain why $$$ + +#define PHOENIX_GET_ARG(z, n, data) \ + typedef typename \ + remove_reference< \ + typename BOOST_PP_CAT(A, n)::template result<Env>::type \ + >::type \ + BOOST_PP_CAT(a, n); + +#define PHOENIX_EVAL_ARG(z, n, data) \ + help_rvalue_deduction(BOOST_PP_CAT(_, n).eval(env)) + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT), \ + "boost/spirit/home/phoenix/core/detail/function_eval.hpp")) +#include BOOST_PP_ITERATE() + +}}} // namespace boost::phoenix::detail + +#undef PHOENIX_GET_ARG +#undef PHOENIX_EVAL_ARG +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <> + struct function_eval<N> + { + template <typename Env, typename F + , BOOST_PP_ENUM_PARAMS(N, typename A)> + struct result + { + typedef typename + remove_reference< + typename F::template result<Env>::type + >::type + fn; + BOOST_PP_REPEAT(N, PHOENIX_GET_ARG, _) + + typedef BOOST_PP_CAT(mpl::vector, N) + <BOOST_PP_ENUM_PARAMS(N, a)> + args; + + typedef typename + fn::template result<BOOST_PP_ENUM_PARAMS(N, a)> + function_apply; + + typedef typename + mpl::eval_if< + is_same< + typename mpl::find<args, fusion::void_>::type + , typename mpl::end<args>::type> + , function_apply + , mpl::identity<fusion::void_> + >::type + type; + }; + + template <typename RT, typename Env, typename F + , BOOST_PP_ENUM_PARAMS(N, typename A)> + static RT + eval(Env const& env, F const& f + , BOOST_PP_ENUM_BINARY_PARAMS(N, A, & _)) + { + return f.eval(env)(BOOST_PP_ENUM(N, PHOENIX_EVAL_ARG, _)); + } + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/is_actor.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/is_actor.hpp new file mode 100644 index 0000000..ba0e77c --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/is_actor.hpp @@ -0,0 +1,29 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_CORE_IS_ACTOR_HPP +#define PHOENIX_CORE_IS_ACTOR_HPP + +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/mpl/bool.hpp> + +namespace boost { namespace phoenix +{ +/////////////////////////////////////////////////////////////////////////////// +// +// is_actor<T> +// +// Tests if T is an actor. Evaluates to mpl::true_ or mpl::false_ +// +/////////////////////////////////////////////////////////////////////////////// + template <typename T> + struct is_actor : mpl::false_ {}; + + template <typename Base> + struct is_actor<actor<Base> > : mpl::true_ {}; +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/limits.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/limits.hpp new file mode 100644 index 0000000..50c7573 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/limits.hpp @@ -0,0 +1,79 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_CORE_LIMITS_HPP +#define PHOENIX_CORE_LIMITS_HPP + +#include <boost/preprocessor/dec.hpp> + +#if !defined(PHOENIX_LIMIT) +# define PHOENIX_LIMIT 10 +#elif (PHOENIX_LIMIT < 5) +# error "PHOENIX_LIMIT is set too low" +#endif + +#if !defined(PHOENIX_ARG_LIMIT) +# define PHOENIX_ARG_LIMIT PHOENIX_LIMIT +#elif (PHOENIX_ARG_LIMIT < 5) +# error "PHOENIX_ARG_LIMIT is set too low" +#endif + +#if !defined(PHOENIX_ACTOR_LIMIT) +# define PHOENIX_ACTOR_LIMIT PHOENIX_LIMIT +#elif (PHOENIX_ACTOR_LIMIT > PHOENIX_ARG_LIMIT) +# error "PHOENIX_ACTOR_LIMIT > PHOENIX_ARG_LIMIT" +#elif (PHOENIX_ACTOR_LIMIT < 3) +# error "PHOENIX_ACTOR_LIMIT is set too low" +#endif + +#if !defined(PHOENIX_COMPOSITE_LIMIT) +# define PHOENIX_COMPOSITE_LIMIT PHOENIX_LIMIT +#elif (PHOENIX_COMPOSITE_LIMIT < 5) +# error "PHOENIX_COMPOSITE_LIMIT is set too low" +#endif + +#if !defined(PHOENIX_MEMBER_LIMIT) +# define PHOENIX_MEMBER_LIMIT BOOST_PP_DEC(BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT)) +#elif (PHOENIX_MEMBER_LIMIT > PHOENIX_COMPOSITE_LIMIT) +# error "PHOENIX_MEMBER_LIMIT > PHOENIX_COMPOSITE_LIMIT" +#elif (PHOENIX_MEMBER_LIMIT < 3) +# error "PHOENIX_MEMBER_LIMIT is set too low" +#endif + +#if !defined(PHOENIX_CATCH_LIMIT) +# define PHOENIX_CATCH_LIMIT BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT) +#elif (PHOENIX_CATCH_LIMIT < 1) +# error "PHOENIX_CATCH_LIMIT is set too low" +#endif + +#if !defined(PHOENIX_DYNAMIC_LIMIT) +# define PHOENIX_DYNAMIC_LIMIT PHOENIX_LIMIT +#elif (PHOENIX_DYNAMIC_LIMIT < 1) +# error "PHOENIX_DYNAMIC_LIMIT is set too low" +#endif + +#if !defined(PHOENIX_LOCAL_LIMIT) +# define PHOENIX_LOCAL_LIMIT PHOENIX_LIMIT +#elif (PHOENIX_LOCAL_LIMIT < 3) +# error "PHOENIX_LOCAL_LIMIT is set too low" +#endif + + +#if !defined(FUSION_MAX_VECTOR_SIZE) +# define FUSION_MAX_VECTOR_SIZE PHOENIX_LIMIT +#elif (FUSION_MAX_VECTOR_SIZE < PHOENIX_LIMIT) +# error "FUSION_MAX_VECTOR_SIZE < PHOENIX_LIMIT" +#endif + +// this include will bring in mpl::vectorN and +// fusion::vectorN where N is PHOENIX_LIMIT +#include <boost/fusion/include/vector.hpp> + +// for some reason, this must be included now to make +// detail/type_deduction.hpp compile. $$$ TODO: Investigate further $$$ +#include <boost/mpl/vector/vector20.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/nothing.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/nothing.hpp new file mode 100644 index 0000000..029fbbf --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/nothing.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_CORE_NOTHING_HPP +#define PHOENIX_CORE_NOTHING_HPP + +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/mpl/bool.hpp> + +namespace boost { namespace phoenix +{ +/////////////////////////////////////////////////////////////////////////////// +// +// null_actor +// +// A actor that does nothing (a "bum", if you will :-). +// +/////////////////////////////////////////////////////////////////////////////// + struct null_actor + { + typedef mpl::false_ no_nullary; + + template <typename Env> + struct result + { + typedef void type; + }; + + template <typename Env> + void + eval(Env const&) const + { + } + }; + + actor<null_actor> const nothing = null_actor(); +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/reference.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/reference.hpp new file mode 100644 index 0000000..2e1f588 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/reference.hpp @@ -0,0 +1,80 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_CORE_REFERENCE_HPP +#define PHOENIX_CORE_REFERENCE_HPP + +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/static_assert.hpp> +#include <boost/type_traits/is_reference.hpp> +#include <boost/mpl/bool.hpp> + +namespace boost { namespace phoenix +{ + template <typename T> + struct reference + { + // $$$ TODO: a better (user friendly) static assert + BOOST_STATIC_ASSERT( + mpl::not_<is_reference<T> >::value != 0); + + typedef mpl::false_ no_nullary; + + template <typename Env> + struct result + { + typedef T& type; + }; + + reference(T& arg) + : ref(arg) {} + + template <typename Env> + T& eval(Env const&) const + { + return ref; + } + + T& ref; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + reference& operator= (reference const&); + }; + + template <typename T> + inline actor<reference<T> > const + ref(T& v) + { + return reference<T>(v); + } + + template <typename T> + inline actor<reference<T const> > const + cref(T const& v) + { + return reference<T const>(v); + } + + namespace detail + { + struct error_attempting_to_convert_an_actor_to_a_reference {}; + } + + template <typename Base> + void + ref(actor<Base> const& v + , detail::error_attempting_to_convert_an_actor_to_a_reference + = detail::error_attempting_to_convert_an_actor_to_a_reference()); + + template <typename Base> + void + cref(actor<Base> const& v + , detail::error_attempting_to_convert_an_actor_to_a_reference + = detail::error_attempting_to_convert_an_actor_to_a_reference()); +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/core/value.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/value.hpp new file mode 100644 index 0000000..a275a7d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/core/value.hpp @@ -0,0 +1,158 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_CORE_VALUE_HPP +#define PHOENIX_CORE_VALUE_HPP + +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/spirit/home/phoenix/core/as_actor.hpp> +#include <boost/static_assert.hpp> + +#include <boost/type_traits/is_reference.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/type_traits/is_pointer.hpp> +#include <boost/type_traits/add_const.hpp> +#include <boost/type_traits/add_reference.hpp> +#include <boost/type_traits/remove_pointer.hpp> +#include <boost/type_traits/is_function.hpp> + +#include <boost/mpl/bool.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> + +namespace boost { namespace phoenix +{ + namespace meta + { + template<typename T> + struct const_ref + : add_reference<typename add_const<T>::type> + {}; + + template<typename T> + struct argument_type + : mpl::eval_if< + is_function<typename remove_pointer<T>::type>, + mpl::identity<T>, + const_ref<T> > + { + typedef T type; + }; + } + + template <typename T> + struct value + { + BOOST_STATIC_ASSERT( + mpl::not_<is_reference<T> >::value != 0); + + typedef mpl::false_ no_nullary; + + template <typename Env> + struct result + { + typedef T type; + }; + + value() + : val() {} + + value(T const& arg) + : val(arg) {} + + template <typename Env> + T const& + eval(Env const&) const + { + return val; + } + + T val; + }; + + template <typename Actor> + struct actor_value + { + typedef typename Actor::no_nullary no_nullary; + + template <typename Env> + struct result + { + typedef typename + remove_reference< + typename eval_result<Actor, Env>::type + >::type + type; + }; + + actor_value(Actor const& actor) + : actor(actor) {} + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + return actor.eval(env); + } + + Actor actor; + }; + + template <typename T> + inline typename as_actor<T>::type + val(T const& v) + { + return as_actor<T>::convert(v); + } + + template <typename Derived> + inline actor<actor_value<Derived> > + val(actor<Derived> const& actor) + { + return actor_value<Derived>(actor); + } + + template <typename T> + struct as_actor_base + { + typedef value<T> type; + + static value<T> + convert(typename meta::argument_type<T>::type x) + { + return value<T>(x); + } + }; + + // Sometimes it is necessary to auto-convert references to + // a value<T>. This happens when we are re-currying. This + // cannot happen through the standard public actor interfaces. + template <typename T> + struct as_actor_base<T&> + { + typedef value<T> type; + + static value<T> + convert(T& x) + { + return value<T>(x); + } + }; + + template <typename T, int N> + struct as_actor_base<T[N]> + { + typedef value<T const*> type; + + static value<T const*> + convert(T const x[N]) + { + return value<T const*>(x); + } + }; +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/detail/local_reference.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/detail/local_reference.hpp new file mode 100644 index 0000000..ad1fdb4 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/detail/local_reference.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2005-2007 Joel de Guzman + + 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 PHOENIX_DETAIL_LOCAL_REFERENCE_HPP +#define PHOENIX_DETAIL_LOCAL_REFERENCE_HPP + +#include <boost/utility/addressof.hpp> + +namespace boost { namespace phoenix { namespace detail +{ + template <typename T> + struct local_reference + { + typedef T type; + + explicit local_reference(T& t): t_(boost::addressof(t)) {} + operator T& () const { return *t_; } + local_reference& operator=(T const& x) { *t_ = x; return *this; } + local_reference const& operator=(T const& x) const { *t_ = x; return *this; } + T& get() const { return *t_; } + T* get_pointer() const { return t_; } + + private: + + T* t_; + }; + + template <typename T> + struct unwrap_local_reference + { + typedef T type; // T should be a reference + }; + + template <typename T> + struct unwrap_local_reference<local_reference<T> > + { + typedef T type; // unwrap the reference; T is a value + }; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/detail/type_deduction.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/detail/type_deduction.hpp new file mode 100644 index 0000000..b99ea1e --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/detail/type_deduction.hpp @@ -0,0 +1,497 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_DETAIL_TYPE_DEDUCTION_HPP +#define PHOENIX_DETAIL_TYPE_DEDUCTION_HPP + +/*============================================================================= + + Return Type Deduction + [JDG Sept. 15, 2003] + + Before C++ adopts the typeof, there is currently no way to deduce the + result type of an expression such as x + y. This deficiency is a major + problem with template metaprogramming; for example, when writing + forwarding functions that attempt to capture the essence of an + expression inside a function. Consider the std::plus<T>: + + template <typename T> + struct plus : public binary_function<T, T, T> + { + T operator()(T const& x, T const& y) const + { + return x + y; + } + }; + + What's wrong with this? Well, this functor does not accurately capture + the behavior of the plus operator. 1) It does not handle the case where + x and y are of different types (e.g. x is short and y is int). 2) It + assumes that the arguments and return type are the same (i.e. when + adding a short and an int, the return type ought to be an int). Due to + these shortcomings, std::plus<T>(x, y) is a poor substitute for x + y. + + The case where x is short and y is int does not really expose the + problem. We can simply use std::plus<int> and be happy that the + operands x and y will simply be converted to an int. The problem + becomes evident when an operand is a user defined type such as bigint. + Here, the conversion to bigint is simply not acceptable. Even if the + unnecessary conversion is tolerable, in generic code, it is not always + possible to choose the right T type that can accomodate both x and y + operands. + + To truly model the plus operator, what we need is a polymorphic functor + that can take arbitrary x and y operands. Here's a rough schematic: + + struct plus + { + template <typename X, typename Y> + unspecified-type + operator()(X const& x, Y const& y) const + { + return x + y; + } + }; + + Now, we can handle the case where X and Y are arbitrary types. We've + solved the first problem. To solve the second problem, we need some + form of return type deduction mechanism. If we had the typeof, it would + be something like: + + template <typename X, typename Y> + typeof(X() + Y()) + operator()(X const& x, Y const& y) const + { + return x + y; + } + + Without the typeof facility, it is only possible to wrap an expression + such as x + y in a function or functor if we are given a hint that + tells us what the actual result type of such an expression is. Such a + hint can be in the form of a metaprogram, that, given the types of the + arguments, will return the result type. Example: + + template <typename X, typename Y> + struct result_of_plus + { + typedef unspecified-type type; + }; + + Given a result_of_plus metaprogram, we can complete our polymorphic + plus functor: + + struct plus + { + template <typename X, typename Y> + typename result_of_plus<X, Y>::type + operator()(X const& x, Y const& y) const + { + return x + y; + } + }; + + The process is not automatic. We have to specialize the metaprogram for + specific argument types. Examples: + + template <> + struct result_of_plus<short, int> + { + typedef int type; + }; + + template <typename T> + struct result_of_plus<std::complex<T>, std::complex<T> > + { + typedef std::complex<T> type; + }; + + To make it easier for the user, specializations are provided for common + types such as primitive c++ types (e.g. int, char, double, etc.), and + standard types (e.g. std::complex, iostream, std containers and + iterators). + + To further improve the ease of use, for user defined classes, we can + supply a few more basic specializations through metaprogramming using + heuristics based on canonical operator rules (Such heuristics can be + found in the LL and Phoenix, for example). For example, it is rather + common that the result of x += y is X& or the result of x || y is a + bool. The client is out of luck if her classes do not follow the + canonical rules. She'll then have to supply her own specialization. + + The type deduction mechanism demostrated below approaches the problem + not through specialization and heuristics, but through a limited form + of typeof mechanism. The code does not use heuristics, hence, no + guessing games. The code takes advantage of the fact that, in general, + the result type of an expression is related to one its arguments' type. + For example, x + y, where x has type int and y has type double, has the + result type double (the second operand type). Another example, x[y] + where x is a vector<T> and y is a std::size_t, has the result type + vector<T>::reference (the vector<T>'s reference type type). + + The limited form of type deduction presented can detect common + relations if the result of a binary or unary operation, given arguments + x and y with types X and Y (respectively), is X, Y, X&, Y&, X*, Y*, X + const*, Y const*, bool, int, unsigned, double, container and iterator + elements (e.g the T, where X is: T[N], T*, vector<T>, map<T>, + vector<T>::iterator). More arguments/return type relationships can be + established if needed. + + A set of overloaded test(T) functions capture these argument related + types. Each test(T) function returns a distinct type that can be used + to determine the exact type of an expression. + + Consider: + + template <typename X, typename Y> + x_value_type + test(X const&); + + template <typename X, typename Y> + y_value_type + test(Y const&); + + Given an expression x + y, where x is int and y is double, the call to: + + test<int, double>(x + y) + + will return a y_value_type. + + Now, if we rig x_value_type and y_value_type such that both have unique + sizes, we can use sizeof(test<X, Y>(x + y)) to determine if the result + type is either X or Y. + + For example, if: + + sizeof(test<X, Y>(x + y)) == sizeof(y_value_type) + + then, we know for sure that the result of x + y has type Y. + + The same basic scheme can be used to detect more argument-dependent + return types where the sizeof the test(T) return type is used to index + through a boost::mpl vector which holds each of the corresponding + result types. + +==============================================================================*/ +#include <boost/mpl/vector/vector20.hpp> +#include <boost/mpl/at.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/or.hpp> +#include <boost/mpl/and.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/type_traits/add_reference.hpp> +#include <boost/type_traits/remove_cv.hpp> +#include <boost/type_traits/is_const.hpp> +#include <boost/type_traits/is_reference.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/is_array.hpp> +#include <boost/type_traits/is_pointer.hpp> +#include <boost/utility/enable_if.hpp> +#include <boost/static_assert.hpp> +#include <boost/preprocessor/cat.hpp> +#include <boost/spirit/home/phoenix/detail/local_reference.hpp> + +namespace boost +{ + struct error_cant_deduce_type {}; +} + +namespace boost { namespace type_deduction_detail +{ + typedef char(&bool_value_type)[1]; + typedef char(&int_value_type)[2]; + typedef char(&uint_value_type)[3]; + typedef char(&double_value_type)[4]; + + typedef char(&bool_reference_type)[5]; + typedef char(&int_reference_type)[6]; + typedef char(&uint_reference_type)[7]; + typedef char(&double_reference_type)[8]; + + typedef char(&x_value_type)[9]; + typedef char(&x_reference_type)[10]; + typedef char(&x_const_pointer_type)[11]; + typedef char(&x_pointer_type)[12]; + + typedef char(&y_value_type)[13]; + typedef char(&y_reference_type)[14]; + typedef char(&y_const_pointer_type)[15]; + typedef char(&y_pointer_type)[16]; + + typedef char(&container_reference_type)[17]; + typedef char(&container_const_reference_type)[18]; + typedef char(&container_mapped_type)[19]; + + typedef char(&cant_deduce_type)[20]; + + template <typename T, typename Plain = typename remove_cv<T>::type> + struct is_basic + : mpl::or_< + is_same<Plain, bool> + , is_same<Plain, int> + , is_same<Plain, unsigned> + , is_same<Plain, double> + > {}; + + template <typename C> + struct reference_type + { + typedef typename C::reference type; + }; + + template <typename T> + struct reference_type<T const> + : reference_type<T> {}; + + template <typename T, std::size_t N> + struct reference_type<T[N]> + { + typedef T& type; + }; + + template <typename T> + struct reference_type<T*> + { + typedef T& type; + }; + + template <typename T> + struct reference_type<T* const> + { + typedef T const& type; + }; + + template <typename C> + struct const_reference_type + { + typedef typename C::const_reference type; + }; + + template <typename C> + struct mapped_type + { + typedef typename C::mapped_type type; + }; + + struct asymmetric; + + template <typename X, typename Y> + cant_deduce_type + test(...); // The black hole !!! + + template <typename X, typename Y> + bool_value_type + test(bool const&); + + template <typename X, typename Y> + int_value_type + test(int const&); + + template <typename X, typename Y> + uint_value_type + test(unsigned const&); + + template <typename X, typename Y> + double_value_type + test(double const&); + + template <typename X, typename Y> + bool_reference_type + test(bool&); + + template <typename X, typename Y> + int_reference_type + test(int&); + + template <typename X, typename Y> + uint_reference_type + test(unsigned&); + + template <typename X, typename Y> + double_reference_type + test(double&); + + template <typename X, typename Y> + typename disable_if< + mpl::or_<is_basic<X>, is_const<X> > + , x_value_type + >::type + test(X const&); + + template <typename X, typename Y> + typename disable_if< + is_basic<X> + , x_reference_type + >::type + test(X&); + + template <typename X, typename Y> + typename disable_if< + mpl::or_< + is_basic<X> + , is_const<X> + > + , x_const_pointer_type + >::type + test(X const*); + + template <typename X, typename Y> + x_pointer_type + test(X*); + + template <typename X, typename Y> + typename disable_if< + mpl::or_< + is_basic<Y> + , is_same<Y, asymmetric> + , is_const<Y> + , is_same<X, Y> + > + , y_value_type + >::type + test(Y const&); + + template <typename X, typename Y> + typename disable_if< + mpl::or_< + is_basic<Y> + , is_same<Y, asymmetric> + , is_same<X, Y> + > + , y_reference_type + >::type + test(Y&); + + template <typename X, typename Y> + typename disable_if< + mpl::or_< + is_same<Y, asymmetric> + , is_const<Y> + , is_same<X, Y> + > + , y_const_pointer_type + >::type + test(Y const*); + + template <typename X, typename Y> + typename disable_if< + mpl::or_< + is_same<Y, asymmetric> + , is_same<X, Y> + > + , y_pointer_type + >::type + test(Y*); + + template <typename X, typename Y> + typename disable_if< + mpl::or_< + is_basic<typename X::value_type> + , is_same<typename add_reference<X>::type, typename X::reference> + > + , container_reference_type + >::type + test(typename X::reference); + + template <typename X, typename Y, typename Z> + typename enable_if< + mpl::and_< + mpl::or_<is_array<X>, is_pointer<X> > + , mpl::not_<is_basic<Z> > + , mpl::not_<is_same<X, Z> > + > + , container_reference_type + >::type + test(Z&); + + template <typename X, typename Y> + typename disable_if< + mpl::or_< + is_basic<typename X::value_type> + , is_same<typename add_reference<X>::type, typename X::const_reference> + > + , container_const_reference_type + >::type + test(typename X::const_reference); + + template <typename X, typename Y> + typename disable_if< + is_basic<typename X::mapped_type> + , container_mapped_type + >::type + test(typename X::mapped_type); + + template <typename X, typename Y> + struct base_result_of + { + typedef typename phoenix::detail::unwrap_local_reference<X>::type x_type_; + typedef typename phoenix::detail::unwrap_local_reference<Y>::type y_type_; + typedef typename remove_reference<x_type_>::type x_type; + typedef typename remove_reference<y_type_>::type y_type; + + typedef mpl::vector20< + mpl::identity<bool> + , mpl::identity<int> + , mpl::identity<unsigned> + , mpl::identity<double> + , mpl::identity<bool&> + , mpl::identity<int&> + , mpl::identity<unsigned&> + , mpl::identity<double&> + , mpl::identity<x_type> + , mpl::identity<x_type&> + , mpl::identity<x_type const*> + , mpl::identity<x_type*> + , mpl::identity<y_type> + , mpl::identity<y_type&> + , mpl::identity<y_type const*> + , mpl::identity<y_type*> + , reference_type<x_type> + , const_reference_type<x_type> + , mapped_type<x_type> + , mpl::identity<error_cant_deduce_type> + > + types; + }; + +}} // namespace boost::type_deduction_detail + +#define BOOST_RESULT_OF_COMMON(expr, name, Y, SYMMETRY) \ + struct name \ + { \ + typedef type_deduction_detail::base_result_of<X, Y> base_type; \ + static typename base_type::x_type x; \ + static typename base_type::y_type y; \ + \ + BOOST_STATIC_CONSTANT(int, \ + size = sizeof( \ + type_deduction_detail::test< \ + typename base_type::x_type \ + , SYMMETRY \ + >(expr) \ + )); \ + \ + BOOST_STATIC_CONSTANT(int, index = (size / sizeof(char)) - 1); \ + \ + typedef typename mpl::at_c< \ + typename base_type::types, index>::type id; \ + typedef typename id::type type; \ + }; + +#define BOOST_UNARY_RESULT_OF(expr, name) \ + template <typename X> \ + BOOST_RESULT_OF_COMMON(expr, name, \ + type_deduction_detail::asymmetric, type_deduction_detail::asymmetric) + +#define BOOST_BINARY_RESULT_OF(expr, name) \ + template <typename X, typename Y> \ + BOOST_RESULT_OF_COMMON(expr, name, Y, typename base_type::y_type) + +#define BOOST_ASYMMETRIC_BINARY_RESULT_OF(expr, name) \ + template <typename X, typename Y> \ + BOOST_RESULT_OF_COMMON(expr, name, Y, type_deduction_detail::asymmetric) + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/function.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/function.hpp new file mode 100644 index 0000000..5309d9a --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/function.hpp @@ -0,0 +1,13 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_FUNCTION_HPP +#define PHOENIX_FUNCTION_HPP + +#include <boost/spirit/home/phoenix/version.hpp> +#include <boost/spirit/home/phoenix/function/function.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/function/detail/function_call.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/function/detail/function_call.hpp new file mode 100644 index 0000000..622f118 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/function/detail/function_call.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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_PP_IS_ITERATING +#ifndef PHOENIX_FUNCTION_DETAIL_FUNCTION_CALL_HPP +#define PHOENIX_FUNCTION_DETAIL_FUNCTION_CALL_HPP + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT), \ + "boost/spirit/home/phoenix/function/detail/function_call.hpp")) +#include BOOST_PP_ITERATE() + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <BOOST_PP_ENUM_PARAMS(N, typename A)> + actor<typename as_composite<detail::function_eval<N>, F + , BOOST_PP_ENUM_PARAMS(N, A)>::type> + operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) const + { + return compose<detail::function_eval<N> >(f, BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/function/function.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/function/function.hpp new file mode 100644 index 0000000..1cf4701 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/function/function.hpp @@ -0,0 +1,48 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_FUNCTION_FUNCTION_HPP +#define PHOENIX_FUNCTION_FUNCTION_HPP + +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/core/detail/function_eval.hpp> + +namespace boost { namespace phoenix +{ + template <typename F> + struct function + { + function() : f() {} + function(F const& f) : f(f) {} + + actor<typename as_composite<detail::function_eval<0>, F>::type> + operator()() const + { + return compose<detail::function_eval<0> >(f); + } + + template <typename A0> + actor<typename as_composite<detail::function_eval<1>, F, A0>::type> + operator()(A0 const& _0) const + { + return compose<detail::function_eval<1> >(f, _0); + } + + template <typename A0, typename A1> + actor<typename as_composite<detail::function_eval<2>, F, A0, A1>::type> + operator()(A0 const& _0, A1 const& _1) const + { + return compose<detail::function_eval<2> >(f, _0, _1); + } + + // Bring in the rest of the function call operators + #include <boost/spirit/home/phoenix/function/detail/function_call.hpp> + + F f; + }; +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator.hpp new file mode 100644 index 0000000..2d8ee6c --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator.hpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_OPERATOR_HPP +#define PHOENIX_OPERATOR_HPP + +#include <boost/spirit/home/phoenix/version.hpp> +#include <boost/spirit/home/phoenix/operator/arithmetic.hpp> +#include <boost/spirit/home/phoenix/operator/bitwise.hpp> +#include <boost/spirit/home/phoenix/operator/comparison.hpp> +#include <boost/spirit/home/phoenix/operator/if_else.hpp> +#include <boost/spirit/home/phoenix/operator/logical.hpp> +#include <boost/spirit/home/phoenix/operator/self.hpp> +#include <boost/spirit/home/phoenix/operator/io.hpp> +#include <boost/spirit/home/phoenix/operator/member.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/arithmetic.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/arithmetic.hpp new file mode 100644 index 0000000..e51b23e --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/arithmetic.hpp @@ -0,0 +1,115 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_OPERATOR_ARITHMETIC_HPP +#define PHOENIX_OPERATOR_ARITHMETIC_HPP + +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/detail/type_deduction.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_compose.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_compose.hpp> + +namespace boost { namespace phoenix +{ + struct negate_eval; + struct posit_eval; + struct pre_increment_eval; + struct pre_decrement_eval; + struct post_increment_eval; + struct post_decrement_eval; + + struct plus_assign_eval; + struct minus_assign_eval; + struct multiplies_assign_eval; + struct divides_assign_eval; + struct modulus_assign_eval; + + struct plus_eval; + struct minus_eval; + struct multiplies_eval; + struct divides_eval; + struct modulus_eval; + + BOOST_UNARY_RESULT_OF(-x, result_of_negate) + BOOST_UNARY_RESULT_OF(+x, result_of_posit) + BOOST_UNARY_RESULT_OF(++x, result_of_pre_increment) + BOOST_UNARY_RESULT_OF(--x, result_of_pre_decrement) + BOOST_UNARY_RESULT_OF(x++, result_of_post_increment) + BOOST_UNARY_RESULT_OF(x--, result_of_post_decrement) + + BOOST_BINARY_RESULT_OF(x += y, result_of_plus_assign) + BOOST_BINARY_RESULT_OF(x -= y, result_of_minus_assign) + BOOST_BINARY_RESULT_OF(x *= y, result_of_multiplies_assign) + BOOST_BINARY_RESULT_OF(x /= y, result_of_divides_assign) + BOOST_BINARY_RESULT_OF(x %= y, result_of_modulus_assign) + + BOOST_BINARY_RESULT_OF(x + y, result_of_plus) + BOOST_BINARY_RESULT_OF(x - y, result_of_minus) + BOOST_BINARY_RESULT_OF(x * y, result_of_multiplies) + BOOST_BINARY_RESULT_OF(x / y, result_of_divides) + BOOST_BINARY_RESULT_OF(x % y, result_of_modulus) + +#define x a0.eval(env) +#define y a1.eval(env) + + PHOENIX_UNARY_EVAL(negate_eval, result_of_negate, -x) + PHOENIX_UNARY_EVAL(posit_eval, result_of_posit, +x) + PHOENIX_UNARY_EVAL(pre_increment_eval, result_of_pre_increment, ++x) + PHOENIX_UNARY_EVAL(pre_decrement_eval, result_of_pre_decrement, --x) + PHOENIX_UNARY_EVAL(post_increment_eval, result_of_post_increment, x++) + PHOENIX_UNARY_EVAL(post_decrement_eval, result_of_post_decrement, x--) + + PHOENIX_BINARY_EVAL(plus_assign_eval, result_of_plus_assign, x += y) + PHOENIX_BINARY_EVAL(minus_assign_eval, result_of_minus_assign, x -= y) + PHOENIX_BINARY_EVAL(multiplies_assign_eval, result_of_multiplies_assign, x *= y) + PHOENIX_BINARY_EVAL(divides_assign_eval, result_of_divides_assign, x /= y) + PHOENIX_BINARY_EVAL(modulus_assign_eval, result_of_modulus_assign, x %= y) + + PHOENIX_BINARY_EVAL(plus_eval, result_of_plus, x + y) + PHOENIX_BINARY_EVAL(minus_eval, result_of_minus, x - y) + PHOENIX_BINARY_EVAL(multiplies_eval, result_of_multiplies, x * y) + PHOENIX_BINARY_EVAL(divides_eval, result_of_divides, x / y) + PHOENIX_BINARY_EVAL(modulus_eval, result_of_modulus, x % y) + + PHOENIX_UNARY_COMPOSE(negate_eval, -) + PHOENIX_UNARY_COMPOSE(posit_eval, +) + PHOENIX_UNARY_COMPOSE(pre_increment_eval, ++) + PHOENIX_UNARY_COMPOSE(pre_decrement_eval, --) + + template <typename T0> + inline actor<typename as_composite<post_increment_eval, actor<T0> >::type> + operator++(actor<T0> const& a0, int) // special case + { + return compose<post_increment_eval>(a0); + } + + template <typename T0> + inline actor<typename as_composite<post_decrement_eval, actor<T0> >::type> + operator--(actor<T0> const& a0, int) // special case + { + return compose<post_decrement_eval>(a0); + } + + PHOENIX_BINARY_COMPOSE(plus_assign_eval, +=) + PHOENIX_BINARY_COMPOSE(minus_assign_eval, -=) + PHOENIX_BINARY_COMPOSE(multiplies_assign_eval, *=) + PHOENIX_BINARY_COMPOSE(divides_assign_eval, /=) + PHOENIX_BINARY_COMPOSE(modulus_assign_eval, %=) + + PHOENIX_BINARY_COMPOSE(plus_eval, +) + PHOENIX_BINARY_COMPOSE(minus_eval, -) + PHOENIX_BINARY_COMPOSE(multiplies_eval, *) + PHOENIX_BINARY_COMPOSE(divides_eval, /) + PHOENIX_BINARY_COMPOSE(modulus_eval, %) + +#undef x +#undef y +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/bitwise.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/bitwise.hpp new file mode 100644 index 0000000..0450db4 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/bitwise.hpp @@ -0,0 +1,91 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_OPERATOR_BITWISE_HPP +#define PHOENIX_OPERATOR_BITWISE_HPP + +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/detail/type_deduction.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_compose.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_compose.hpp> + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4800) +#endif + +namespace boost { namespace phoenix +{ + struct invert_eval; + + struct and_assign_eval; + struct or_assign_eval; + struct xor_assign_eval; + struct shift_left_assign_eval; + struct shift_right_assign_eval; + + struct and_eval; + struct or_eval; + struct xor_eval; + struct shift_left_eval; + struct shift_right_eval; + + BOOST_UNARY_RESULT_OF(~x, result_of_invert) + + BOOST_BINARY_RESULT_OF(x &= y, result_of_and_assign) + BOOST_BINARY_RESULT_OF(x |= y, result_of_or_assign) + BOOST_BINARY_RESULT_OF(x ^= y, result_of_xor_assign) + BOOST_BINARY_RESULT_OF(x <<= y, result_of_shift_left_assign) + BOOST_BINARY_RESULT_OF(x >>= y, result_of_shift_right_assign) + + BOOST_BINARY_RESULT_OF(x & y, result_of_and) + BOOST_BINARY_RESULT_OF(x | y, result_of_or) + BOOST_BINARY_RESULT_OF(x ^ y, result_of_xor) + BOOST_BINARY_RESULT_OF(x << y, result_of_shift_left) + BOOST_BINARY_RESULT_OF(x >> y, result_of_shift_right) + +#define x a0.eval(env) +#define y a1.eval(env) + + PHOENIX_UNARY_EVAL(invert_eval, result_of_invert, ~x) + PHOENIX_UNARY_COMPOSE(invert_eval, ~) + + PHOENIX_BINARY_EVAL(and_assign_eval, result_of_and_assign, x &= y) + PHOENIX_BINARY_EVAL(or_assign_eval, result_of_or_assign, x |= y) + PHOENIX_BINARY_EVAL(xor_assign_eval, result_of_xor_assign, x ^= y) + PHOENIX_BINARY_EVAL(shift_left_assign_eval, result_of_shift_left_assign, x <<= y) + PHOENIX_BINARY_EVAL(shift_right_assign_eval, result_of_shift_right_assign, x >>= y) + + PHOENIX_BINARY_EVAL(and_eval, result_of_and, x & y) + PHOENIX_BINARY_EVAL(or_eval, result_of_or, x | y) + PHOENIX_BINARY_EVAL(xor_eval, result_of_xor, x ^ y) + PHOENIX_BINARY_EVAL(shift_left_eval, result_of_shift_left, x << y) + PHOENIX_BINARY_EVAL(shift_right_eval, result_of_shift_right, x >> y) + + PHOENIX_BINARY_COMPOSE(and_assign_eval, &=) + PHOENIX_BINARY_COMPOSE(or_assign_eval, |=) + PHOENIX_BINARY_COMPOSE(xor_assign_eval, ^=) + PHOENIX_BINARY_COMPOSE(shift_left_assign_eval, <<=) + PHOENIX_BINARY_COMPOSE(shift_right_assign_eval, >>=) + + PHOENIX_BINARY_COMPOSE(and_eval, &) + PHOENIX_BINARY_COMPOSE(or_eval, |) + PHOENIX_BINARY_COMPOSE(xor_eval, ^) + PHOENIX_BINARY_COMPOSE(shift_left_eval, <<) + PHOENIX_BINARY_COMPOSE(shift_right_eval, >>) + +#undef x +#undef y +}} + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/comparison.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/comparison.hpp new file mode 100644 index 0000000..fe9298c --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/comparison.hpp @@ -0,0 +1,55 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_OPERATOR_COMPARISON_HPP +#define PHOENIX_OPERATOR_COMPARISON_HPP + +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/detail/type_deduction.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_compose.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_compose.hpp> + +namespace boost { namespace phoenix +{ + struct equal_to_eval; + struct not_equal_to_eval; + struct less_eval; + struct less_equal_eval; + struct greater_eval; + struct greater_equal_eval; + + BOOST_BINARY_RESULT_OF(x == y, result_of_equal_to) + BOOST_BINARY_RESULT_OF(x != y, result_of_not_equal_to) + BOOST_BINARY_RESULT_OF(x < y, result_of_less) + BOOST_BINARY_RESULT_OF(x <= y, result_of_less_equal) + BOOST_BINARY_RESULT_OF(x > y, result_of_greater) + BOOST_BINARY_RESULT_OF(x >= y, result_of_greater_equal) + +#define x a0.eval(env) +#define y a1.eval(env) + + PHOENIX_BINARY_EVAL(equal_to_eval, result_of_equal_to, x == y) + PHOENIX_BINARY_EVAL(not_equal_to_eval, result_of_not_equal_to, x != y) + PHOENIX_BINARY_EVAL(less_eval, result_of_less, x < y) + PHOENIX_BINARY_EVAL(less_equal_eval, result_of_less_equal, x <= y) + PHOENIX_BINARY_EVAL(greater_eval, result_of_greater, x > y) + PHOENIX_BINARY_EVAL(greater_equal_eval, result_of_greater_equal, x >= y) + + PHOENIX_BINARY_COMPOSE(equal_to_eval, ==) + PHOENIX_BINARY_COMPOSE(not_equal_to_eval, !=) + PHOENIX_BINARY_COMPOSE(less_eval, <) + PHOENIX_BINARY_COMPOSE(less_equal_eval, <=) + PHOENIX_BINARY_COMPOSE(greater_eval, >) + PHOENIX_BINARY_COMPOSE(greater_equal_eval, >=) + +#undef x +#undef y +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/binary_compose.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/binary_compose.hpp new file mode 100644 index 0000000..49335fd --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/binary_compose.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_OPERATOR_DETAIL_BINARY_COMPOSE_HPP +#define PHOENIX_OPERATOR_DETAIL_BINARY_COMPOSE_HPP + +#define PHOENIX_BINARY_COMPOSE(eval_name, op) \ + template <typename T0, typename T1> \ + inline actor<typename as_composite<eval_name, actor<T0>, actor<T1> >::type> \ + operator op (actor<T0> const& a0, actor<T1> const& a1) \ + { \ + return compose<eval_name>(a0, a1); \ + } \ + \ + template <typename T0, typename T1> \ + inline actor<typename as_composite<eval_name, actor<T0>, T1>::type> \ + operator op (actor<T0> const& a0, T1 const& a1) \ + { \ + return compose<eval_name>(a0, a1); \ + } \ + \ + template <typename T0, typename T1> \ + inline actor<typename as_composite<eval_name, T0, actor<T1> >::type> \ + operator op (T0 const& a0, actor<T1> const& a1) \ + { \ + return compose<eval_name>(a0, a1); \ + } + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/binary_eval.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/binary_eval.hpp new file mode 100644 index 0000000..1789882 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/binary_eval.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_OPERATOR_DETAIL_BINARY_EVAL_HPP +#define PHOENIX_OPERATOR_DETAIL_BINARY_EVAL_HPP + +#include <boost/mpl/or.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> + +#define PHOENIX_BINARY_EVAL(eval_name, op_result, expr) \ + struct eval_name \ + { \ + template <typename Env, typename A0, typename A1> \ + struct result \ + { \ + typedef typename A0::template result<Env>::type x_type; \ + typedef typename A1::template result<Env>::type y_type; \ + \ + typedef typename \ + mpl::eval_if< \ + mpl::or_<is_actor<x_type>, is_actor<y_type> > \ + , re_curry<eval_name, x_type, y_type> \ + , op_result<x_type, y_type> \ + >::type \ + type; \ + }; \ + \ + template <typename RT, typename Env, typename A0, typename A1> \ + static RT \ + eval(Env const& env, A0& a0, A1& a1) \ + { \ + return expr; \ + } \ + }; + +#undef x +#undef y +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/io.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/io.hpp new file mode 100644 index 0000000..d82a153 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/io.hpp @@ -0,0 +1,78 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_OPERATOR_DETAIL_IO_HPP +#define PHOENIX_OPERATOR_DETAIL_IO_HPP + +#include <boost/spirit/home/phoenix/operator/bitwise.hpp> +#include <boost/spirit/home/phoenix/core/reference.hpp> +#include <boost/utility/addressof.hpp> +#include <boost/utility/enable_if.hpp> +#include <iostream> + +namespace boost { namespace phoenix { namespace detail +{ + typedef char(&no)[1]; + typedef char(&yes)[2]; + + template <typename CharType, typename CharTrait> + yes ostream_test(std::basic_ostream<CharType, CharTrait>*); + no ostream_test(...); + + template <typename CharType, typename CharTrait> + yes istream_test(std::basic_istream<CharType, CharTrait>*); + no istream_test(...); + + template <typename T> + struct is_ostream + { + static T x; + BOOST_STATIC_CONSTANT(bool, + value = sizeof(detail::ostream_test(boost::addressof(x))) == sizeof(yes)); + }; + + template <typename T> + struct is_istream + { + static T x; + BOOST_STATIC_CONSTANT(bool, + value = sizeof(detail::istream_test(boost::addressof(x))) == sizeof(yes)); + }; + + template <typename T0, typename T1> + struct enable_if_ostream : + enable_if< + detail::is_ostream<T0> + , actor< + typename as_composite< + shift_left_eval + , actor<reference<T0> > + , actor<T1> + >::type + > + > + {}; + + template <typename T0, typename T1> + struct enable_if_istream : + enable_if< + detail::is_istream<T0> + , actor< + typename as_composite< + shift_right_eval + , actor<reference<T0> > + , actor<T1> + >::type + > + > + {}; + + typedef std::ios_base& (*iomanip_type)(std::ios_base&); + typedef std::istream& (*imanip_type)(std::istream&); + typedef std::ostream& (*omanip_type)(std::ostream&); +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp new file mode 100644 index 0000000..cb77613 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp @@ -0,0 +1,76 @@ +/*============================================================================= + Copyright (c) 2005-2007 Dan Marsden + Copyright (c) 2005-2007 Joel de Guzman + + 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_PP_IS_ITERATING +#ifndef PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_EVAL_HPP +#define PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_EVAL_HPP + +#include <boost/spirit/home/phoenix/core/limits.hpp> +#include <boost/spirit/home/phoenix/core/actor.hpp> + +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/iteration/iterate.hpp> +#include <boost/preprocessor/arithmetic/sub.hpp> +#include <boost/preprocessor/arithmetic/dec.hpp> + +#include <boost/mpl/void.hpp> + +#include <boost/type_traits/function_traits.hpp> + +#include <boost/get_pointer.hpp> + +#include <boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp> + +namespace boost { namespace phoenix { + + struct mem_fun_ptr_eval + { + template<typename Env, typename PtrActor, typename MemFunPtrActor, + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PP_SUB(PHOENIX_MEMBER_LIMIT, 2), typename Arg, mpl::void_)> + + struct result + : detail::mem_fun_ptr_return<typename eval_result<MemFunPtrActor, Env>::type> { }; + + template<typename Rt, typename Env, typename PtrActor, typename MemFunPtrActor> + static typename result<Env,PtrActor,MemFunPtrActor>::type + eval(const Env& env, PtrActor& ptrActor, MemFunPtrActor& memFunPtrActor) + { + return (get_pointer(ptrActor.eval(env))->*memFunPtrActor.eval(env))(); + } + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, BOOST_PP_DEC(BOOST_PP_DEC(PHOENIX_MEMBER_LIMIT)), "boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp")) + +#include BOOST_PP_ITERATE() + + }; +}} + +#endif + +#else + +#define PHOENIX_ITERATION BOOST_PP_ITERATION() + +#define PHOENIX_EVAL_ARG(z,n,_) arg ## n.eval(env) + + template<typename Rt, typename Env, typename PtrActor, typename MemFunPtrActor, + BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, typename Arg)> + static typename result<Env,PtrActor,MemFunPtrActor, BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION,Arg)>::type + eval(const Env& env, PtrActor& ptrActor, MemFunPtrActor& memFunPtrActor, + BOOST_PP_ENUM_BINARY_PARAMS(PHOENIX_ITERATION, Arg, & arg)) + { + return (get_pointer(ptrActor.eval(env))->*memFunPtrActor.eval(env))( + BOOST_PP_ENUM(PHOENIX_ITERATION,PHOENIX_EVAL_ARG,_)); + } + +#undef PHOENIX_EVAL_ARG +#undef PHOENIX_ITERATION + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp new file mode 100644 index 0000000..31d5413 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp @@ -0,0 +1,69 @@ +/*============================================================================= + Copyright (c) 2005-2007 Dan Marsden + Copyright (c) 2005-2007 Joel de Guzman + + 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_PP_IS_ITERATING +#ifndef PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_GEN_HPP +#define PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_GEN_HPP + +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/core/as_actor.hpp> +#include <boost/spirit/home/phoenix/core/limits.hpp> +#include <boost/spirit/home/phoenix/core/actor.hpp> + +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/iteration/iterate.hpp> +#include <boost/preprocessor/arithmetic/dec.hpp> + +#include <boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_eval.hpp> + +namespace boost { namespace phoenix { + template<typename Actor, typename MemFunPtr> + struct mem_fun_ptr_gen + { + mem_fun_ptr_gen( + const Actor& actor, MemFunPtr memFunPtr) + : mActor(actor), mMemFunPtr(memFunPtr) { } + + actor<typename as_composite<mem_fun_ptr_eval, Actor, typename as_actor<MemFunPtr>::type>::type> + operator()() const + { + return compose<mem_fun_ptr_eval>( + mActor, as_actor<MemFunPtr>::convert(mMemFunPtr)); + } + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, BOOST_PP_DEC(BOOST_PP_DEC(PHOENIX_MEMBER_LIMIT)), "boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp")) + +#include BOOST_PP_ITERATE() + + Actor mActor; + MemFunPtr mMemFunPtr; + }; +}} + +#endif +#else + +#define PHOENIX_ITERATION BOOST_PP_ITERATION() + + template<BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, typename Arg)> + actor<typename as_composite< + mem_fun_ptr_eval, Actor, typename as_actor<MemFunPtr>::type, + BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, Arg)>::type> + operator()( + BOOST_PP_ENUM_BINARY_PARAMS(PHOENIX_ITERATION, const Arg, &arg)) const + { + return compose<mem_fun_ptr_eval>( + mActor, as_actor<MemFunPtr>::convert(mMemFunPtr), + BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, arg)); + } + +#undef PHOENIX_ITERATION + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp new file mode 100644 index 0000000..102f17f --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp @@ -0,0 +1,65 @@ +/*============================================================================= + Copyright (c) 2005-2007 Dan Marsden + Copyright (c) 2005-2007 Joel de Guzman + + 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_PP_IS_ITERATING +#ifndef PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_RETURN_HPP +#define PHOENIX_OPERATOR_DETAIL_MEM_FUN_PTR_RETURN_HPP + +#include <boost/spirit/home/phoenix/core/limits.hpp> + +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/iteration/iterate.hpp> + +namespace boost { namespace phoenix { +namespace detail +{ + template<typename MemFunPtr> + struct mem_fun_ptr_return; + + template<typename Ret, typename Class> + struct mem_fun_ptr_return<Ret (Class::*)()> + { + typedef Ret type; + }; + + template<typename Ret, typename Class> + struct mem_fun_ptr_return<Ret (Class::*)() const> + { + typedef Ret type; + }; + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (1, PHOENIX_MEMBER_LIMIT, "boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_return.hpp")) + +#include BOOST_PP_ITERATE() + +} +}} + +#endif + +#else + +#define PHOENIX_ITERATION BOOST_PP_ITERATION() + + template<typename Ret, typename Class, + BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, typename T)> + struct mem_fun_ptr_return<Ret (Class::*)(BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, T))> + { + typedef Ret type; + }; + + template<typename Ret, typename Class, + BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, typename T)> + struct mem_fun_ptr_return<Ret (Class::*)(BOOST_PP_ENUM_PARAMS(PHOENIX_ITERATION, T)) const> + { + typedef Ret type; + }; + +#undef PHOENIX_ITERATION + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/unary_compose.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/unary_compose.hpp new file mode 100644 index 0000000..fd9a8c7 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/unary_compose.hpp @@ -0,0 +1,18 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_OPERATOR_DETAIL_UNARY_COMPOSE_HPP +#define PHOENIX_OPERATOR_DETAIL_UNARY_COMPOSE_HPP + +#define PHOENIX_UNARY_COMPOSE(eval_name, op) \ + template <typename T0> \ + inline actor<typename as_composite<eval_name, actor<T0> >::type> \ + operator op (actor<T0> const& a0) \ + { \ + return compose<eval_name>(a0); \ + } + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/unary_eval.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/unary_eval.hpp new file mode 100644 index 0000000..501f6df --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/detail/unary_eval.hpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_OPERATOR_DETAIL_UNARY_EVAL_HPP +#define PHOENIX_OPERATOR_DETAIL_UNARY_EVAL_HPP + +#include <boost/mpl/eval_if.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> + +#define PHOENIX_UNARY_EVAL(eval_name, op_result, expr) \ + struct eval_name \ + { \ + template <typename Env, typename A0> \ + struct result \ + { \ + typedef typename A0::template result<Env>::type x_type; \ + \ + typedef typename \ + mpl::eval_if< \ + is_actor<x_type> \ + , re_curry<eval_name, x_type> \ + , op_result<x_type> \ + >::type \ + type; \ + }; \ + \ + template <typename RT, typename Env, typename A0> \ + static RT \ + eval(Env const& env, A0& a0) \ + { \ + return expr; \ + } \ + }; + +#endif + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/if_else.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/if_else.hpp new file mode 100644 index 0000000..8492e90 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/if_else.hpp @@ -0,0 +1,78 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_OPERATOR_IF_ELSE_HPP +#define PHOENIX_OPERATOR_IF_ELSE_HPP + +#include <boost/mpl/and.hpp> +#include <boost/mpl/if.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/is_reference.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/detail/type_deduction.hpp> + +namespace boost { namespace phoenix +{ + BOOST_BINARY_RESULT_OF(true ? x : y, result_of_if_else) + + struct if_else_op_eval + { + template < + typename Env + , typename Cond + , typename Then + , typename Else + > + struct result + { + typedef typename Then::template result<Env>::type then_type; + typedef typename Else::template result<Env>::type else_type; + + typedef typename + result_of_if_else<then_type, else_type>::type + ite_result; + + // Note: c ? x : y can return an lvalue! Allow if_else_op_eval + // to return an lvalue IFF then_type and else_type are both lvalues + // with the same type. + + typedef typename + mpl::if_< + mpl::and_< + is_same<then_type, else_type> + , is_reference<then_type> + > + , ite_result + , typename remove_reference<ite_result>::type + >::type + type; + }; + + template < + typename RT + , typename Env + , typename Cond + , typename Then + , typename Else + > + static RT + eval(Env const& env, Cond& cond, Then& then, Else& else_) + { + return cond.eval(env) ? then.eval(env) : else_.eval(env); + } + }; + + template <typename Cond, typename Then, typename Else> + inline actor<typename as_composite<if_else_op_eval, Cond, Then, Else>::type> + if_else(Cond const& cond, Then const& then, Else const& else_) + { + return compose<if_else_op_eval>(cond, then, else_); + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/io.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/io.hpp new file mode 100644 index 0000000..360a46f --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/io.hpp @@ -0,0 +1,86 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_OPERATOR_IO_HPP +#define PHOENIX_OPERATOR_IO_HPP + +#include <boost/spirit/home/phoenix/operator/detail/io.hpp> + +namespace boost { namespace phoenix +{ +/////////////////////////////////////////////////////////////////////////////// +// +// overloads for std::basic_ostream and std::basic_istream +// +/////////////////////////////////////////////////////////////////////////////// + template <typename T0, typename T1> + inline typename detail::enable_if_ostream<T0, T1>::type + operator<<(T0& a0, actor<T1> const& a1) + { + return compose<shift_left_eval>(phoenix::ref(a0), a1); + } + + template <typename T0, typename T1> + inline typename detail::enable_if_istream<T0, T1>::type + operator>>(T0& a0, actor<T1> const& a1) + { + return compose<shift_right_eval>(phoenix::ref(a0), a1); + } + + // resolve ambiguities with fusion. + template <typename T1> + inline typename detail::enable_if_ostream<std::ostream, T1>::type + operator<<(std::ostream& a0, actor<T1> const& a1) + { + return compose<shift_left_eval>(phoenix::ref(a0), a1); + } + + template <typename T1> + inline typename detail::enable_if_istream<std::istream, T1>::type + operator>>(std::istream& a0, actor<T1> const& a1) + { + return compose<shift_right_eval>(phoenix::ref(a0), a1); + } + +/////////////////////////////////////////////////////////////////////////////// +// +// overloads for I/O manipulators. +// +/////////////////////////////////////////////////////////////////////////////// + template <typename T0> + inline actor<typename as_composite< + shift_left_eval, actor<T0>, detail::omanip_type>::type> + operator<<(actor<T0> const& a0, detail::omanip_type a1) + { + return compose<shift_left_eval>(a0, a1); + } + + template <typename T0> + inline actor<typename as_composite< + shift_left_eval, actor<T0>, detail::iomanip_type>::type> + operator<<(actor<T0> const& a0, detail::iomanip_type a1) + { + return compose<shift_left_eval>(a0, a1); + } + + template <typename T0> + inline actor<typename as_composite< + shift_right_eval, actor<T0>, detail::imanip_type>::type> + operator>>(actor<T0> const& a0, detail::imanip_type a1) + { + return compose<shift_right_eval>(a0, a1); + } + + template <typename T0> + inline actor<typename as_composite< + shift_right_eval, actor<T0>, detail::iomanip_type>::type> + operator>>(actor<T0> const& a0, detail::iomanip_type a1) + { + return compose<shift_right_eval>(a0, a1); + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/logical.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/logical.hpp new file mode 100644 index 0000000..84619aa --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/logical.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_OPERATOR_LOGICAL_HPP +#define PHOENIX_OPERATOR_LOGICAL_HPP + +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/detail/type_deduction.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_compose.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_compose.hpp> + +namespace boost { namespace phoenix +{ + struct logical_not_eval; + struct logical_and_eval; + struct logical_or_eval; + + BOOST_UNARY_RESULT_OF(!x, result_of_logical_not) + BOOST_BINARY_RESULT_OF(x && y, result_of_logical_and) + BOOST_BINARY_RESULT_OF(x || y, result_of_logical_or) + +#define x a0.eval(env) +#define y a1.eval(env) + + PHOENIX_UNARY_EVAL(logical_not_eval, result_of_logical_not, !x) + PHOENIX_BINARY_EVAL(logical_and_eval, result_of_logical_and, x && y) + PHOENIX_BINARY_EVAL(logical_or_eval, result_of_logical_or, x || y) + + PHOENIX_UNARY_COMPOSE(logical_not_eval, !) + PHOENIX_BINARY_COMPOSE(logical_and_eval, &&) + PHOENIX_BINARY_COMPOSE(logical_or_eval, ||) + +#undef x +#undef y +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/member.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/member.hpp new file mode 100644 index 0000000..27f3e8d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/member.hpp @@ -0,0 +1,145 @@ +/*============================================================================= + Copyright (c) 2005-2007 Dan Marsden + Copyright (c) 2005-2007 Joel de Guzman + + 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 PHOENIX_OPERATOR_MEMBER_HPP +#define PHOENIX_OPERATOR_MEMBER_HPP + +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> + +#include <boost/type_traits/add_reference.hpp> +#include <boost/type_traits/add_const.hpp> +#include <boost/type_traits/is_const.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/type_traits/is_member_pointer.hpp> +#include <boost/type_traits/is_member_function_pointer.hpp> + +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/and.hpp> +#include <boost/mpl/not.hpp> + +#include <boost/utility/enable_if.hpp> + +#include <boost/get_pointer.hpp> + +#include <boost/spirit/home/phoenix/operator/detail/mem_fun_ptr_gen.hpp> + +#include <memory> + +namespace boost { + template<typename T> class shared_ptr; + template<typename T> class scoped_ptr; + +namespace phoenix { + namespace detail + { + template<typename T> + struct member_type; + + template<typename Class, typename MemberType> + struct member_type<MemberType (Class::*)> + { + typedef MemberType type; + }; + } + + namespace meta + { + template<typename T> + struct pointed_type; + + template<typename T> + struct pointed_type<T*> + { + typedef T type; + }; + + template<typename T> + struct pointed_type<shared_ptr<T> > + { + typedef T type; + }; + + template<typename T> + struct pointed_type<scoped_ptr<T> > + { + typedef T type; + }; + + template<typename T> + struct pointed_type<std::auto_ptr<T> > + { + typedef T type; + }; + } + + struct member_object_eval + { + template<typename Env, typename PtrActor, typename MemPtrActor> + struct result + { + typedef typename detail::member_type< + typename eval_result<MemPtrActor, Env>::type>::type member_type; + + typedef typename meta::pointed_type< + typename remove_reference< + typename eval_result<PtrActor, Env>::type>::type>::type object_type; + + typedef typename add_reference< + typename mpl::eval_if< + is_const<object_type>, + add_const<member_type>, + mpl::identity<member_type> >::type>::type type; + }; + + template<typename Rt, typename Env, typename PtrActor, typename MemPtrActor> + static typename result<Env,PtrActor,MemPtrActor>::type + eval(const Env& env, PtrActor& ptrActor, MemPtrActor& memPtrActor) + { + return get_pointer(ptrActor.eval(env))->*memPtrActor.eval(env); + } + }; + + namespace member_object + { + template<typename T0, typename MemObjPtr> + typename enable_if< + mpl::and_<is_member_pointer<MemObjPtr>, mpl::not_<is_member_function_pointer<MemObjPtr> > >, + actor<typename as_composite< + member_object_eval, actor<T0>, + typename as_actor<MemObjPtr>::type>::type> >::type + operator->*( + const actor<T0>& ptrActor, + MemObjPtr memObjPtr) + { + return compose<member_object_eval>( + ptrActor, + as_actor<MemObjPtr>::convert(memObjPtr)); + } + } + + namespace member_function + { + template<typename T0, typename MemFunPtr> + typename enable_if< + is_member_function_pointer<MemFunPtr>, + mem_fun_ptr_gen<actor<T0>, MemFunPtr> >::type + operator->*(const actor<T0>& ptrActor, MemFunPtr memFunPtr) + { + return mem_fun_ptr_gen<actor<T0>, MemFunPtr>( + ptrActor, memFunPtr); + } + } + + using member_object::operator->*; + using member_function::operator->*; +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/self.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/self.hpp new file mode 100644 index 0000000..294adf6 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/operator/self.hpp @@ -0,0 +1,75 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_OPERATOR_SELF_HPP +#define PHOENIX_OPERATOR_SELF_HPP + +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/core/compose.hpp> +#include <boost/spirit/home/phoenix/detail/type_deduction.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/unary_compose.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_eval.hpp> +#include <boost/spirit/home/phoenix/operator/detail/binary_compose.hpp> + +namespace boost { namespace phoenix +{ + struct reference_eval; + struct dereference_eval; + struct assign_eval; + struct index_eval; + + BOOST_UNARY_RESULT_OF(&x, result_of_reference) + BOOST_UNARY_RESULT_OF(*x, result_of_dereference) + BOOST_BINARY_RESULT_OF(x = y, result_of_assign) + BOOST_ASYMMETRIC_BINARY_RESULT_OF(x[y], result_of_index) + + namespace detail + { + template <typename T0, typename T1> + struct make_assign_composite + { + typedef actor<typename as_composite<assign_eval, T0, T1>::type> type; + }; + + template <typename T0, typename T1> + struct make_index_composite + { + typedef actor<typename as_composite<index_eval, T0, T1>::type> type; + }; + } + + template <typename Base> + template <typename T1> + typename detail::make_assign_composite<actor<Base>, T1>::type + actor<Base>::operator=(T1 const& a1) const + { + return compose<assign_eval>(*this, a1); + } + + template <typename Base> + template <typename T1> + typename detail::make_index_composite<actor<Base>, T1>::type + actor<Base>::operator[](T1 const& a1) const + { + return compose<index_eval>(*this, a1); + } + +#define x a0.eval(env) +#define y a1.eval(env) + + PHOENIX_UNARY_EVAL(reference_eval, result_of_reference, &x) + PHOENIX_UNARY_EVAL(dereference_eval, result_of_dereference, *x) + PHOENIX_UNARY_COMPOSE(reference_eval, &) + PHOENIX_UNARY_COMPOSE(dereference_eval, *) + + PHOENIX_BINARY_EVAL(assign_eval, result_of_assign, x = y) + PHOENIX_BINARY_EVAL(index_eval, result_of_index, x[y]) +}} + +#undef x +#undef y +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/scope.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope.hpp new file mode 100644 index 0000000..c1b9ae3 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope.hpp @@ -0,0 +1,16 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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 PHOENIX_SCOPE_HPP +#define PHOENIX_SCOPE_HPP + +#include <boost/spirit/home/phoenix/version.hpp> +#include <boost/spirit/home/phoenix/scope/scoped_environment.hpp> +#include <boost/spirit/home/phoenix/scope/lambda.hpp> +#include <boost/spirit/home/phoenix/scope/let.hpp> +#include <boost/spirit/home/phoenix/scope/local_variable.hpp> + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/detail/local_gen.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/detail/local_gen.hpp new file mode 100644 index 0000000..6a74df6 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/detail/local_gen.hpp @@ -0,0 +1,57 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + + 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_PP_IS_ITERATING +// Allow multiple inclusion. let.hpp and lambda.hpp will have the guards + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> + +#define PHOENIX_LOCAL_GEN_PARAM(z, n, data) \ + actor<composite<assign_eval \ + , fusion::vector<local_variable<K##n>, V##n> > > const& a##n + +#define PHOENIX_LOCAL_GEN_ACTOR(z, n, data) \ + fusion::at_c<1>(a##n) + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3, (3, PHOENIX_LOCAL_LIMIT, \ + "boost/spirit/home/phoenix/scope/detail/local_gen.hpp")) +#include BOOST_PP_ITERATE() + +#undef PHOENIX_LOCAL_GEN_PARAM +#undef PHOENIX_LOCAL_GEN_ACTOR + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template < + BOOST_PP_ENUM_PARAMS(N, typename K) + , BOOST_PP_ENUM_PARAMS(N, typename V) + > + PHOENIX_LOCAL_GEN_NAME< + fusion::vector<BOOST_PP_ENUM_PARAMS(N, V)> + , detail::map_local_index_to_tuple<BOOST_PP_ENUM_PARAMS(N, K)> + > + operator()( + BOOST_PP_ENUM(N, PHOENIX_LOCAL_GEN_PARAM, _) + ) const + { + return fusion::vector<BOOST_PP_ENUM_PARAMS(N, V)>( + BOOST_PP_ENUM(N, PHOENIX_LOCAL_GEN_ACTOR, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/detail/local_variable.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/detail/local_variable.hpp new file mode 100644 index 0000000..1ad7932 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/detail/local_variable.hpp @@ -0,0 +1,198 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2004 Daniel Wallin + + 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 PHOENIX_SCOPE_DETAIL_LOCAL_VARIABLE_HPP +#define PHOENIX_SCOPE_DETAIL_LOCAL_VARIABLE_HPP + +#include <boost/mpl/int.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/equal_to.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/less.hpp> +#include <boost/mpl/size.hpp> +#include <boost/fusion/include/at.hpp> +#include <boost/fusion/include/value_at.hpp> +#include <boost/preprocessor/enum.hpp> +#include <boost/preprocessor/repeat.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/type_traits/is_reference.hpp> + +#define PHOENIX_MAP_LOCAL_TEMPLATE_PARAM(z, n, data) \ + typename T##n = unused<n> + +#define PHOENIX_MAP_LOCAL_DISPATCH(z, n, data) \ + typedef char(&result##n)[n+2]; \ + static result##n get(T##n*); + +namespace boost { namespace phoenix +{ + template <typename Env, typename OuterEnv, typename Locals, typename Map> + struct scoped_environment; + + namespace detail + { + template <typename Env> + struct initialize_local + { + template <class F> + struct result; + + template <class F, class Actor> + struct result<F(Actor)> + { + typedef typename remove_reference<Actor>::type actor_type; + typedef typename actor_type::template result<Env>::type type; + }; + + initialize_local(Env const& env) + : env(env) {} + + template <typename Actor> + typename result<initialize_local(Actor)>::type + operator()(Actor const& actor) const + { + return actor.eval(env); + } + + Env const& env; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + initialize_local& operator= (initialize_local const&); + }; + + template <typename T> + struct is_scoped_environment : mpl::false_ {}; + + template <typename Env, typename OuterEnv, typename Locals, typename Map> + struct is_scoped_environment<scoped_environment<Env, OuterEnv, Locals, Map> > + : mpl::true_ {}; + + template <int N> + struct unused; + + template <BOOST_PP_ENUM( + PHOENIX_LOCAL_LIMIT, PHOENIX_MAP_LOCAL_TEMPLATE_PARAM, _)> + struct map_local_index_to_tuple + { + typedef char(¬_found)[1]; + static not_found get(...); + + BOOST_PP_REPEAT(PHOENIX_LOCAL_LIMIT, PHOENIX_MAP_LOCAL_DISPATCH, _) + }; + + template<typename T> + T* generate_pointer(); + + template <typename Map, typename Tag> + struct get_index + { + BOOST_STATIC_CONSTANT(int, + value = ( + static_cast<int>((sizeof(Map::get(generate_pointer<Tag>()))) / sizeof(char)) - 2 + )); + + // if value == -1, Tag is not found + typedef mpl::int_<value> type; + }; + + template <typename Local, typename Env> + struct apply_local; + + template <typename Local, typename Env> + struct outer_local + { + typedef typename + apply_local<Local, typename Env::outer_env_type>::type + type; + }; + + template <typename Locals, typename Index> + struct get_local_or_void + { + typedef typename + mpl::eval_if< + mpl::less<Index, mpl::size<Locals> > + , fusion::result_of::at<Locals, Index> + , mpl::identity<fusion::void_> + >::type + type; + }; + + template <typename Local, typename Env, typename Index> + struct get_local_from_index + { + typedef typename + mpl::eval_if< + mpl::equal_to<Index, mpl::int_<-1> > + , outer_local<Local, Env> + , get_local_or_void<typename Env::locals_type, Index> + >::type + type; + }; + + template <typename Local, typename Env> + struct get_local + { + typedef typename + get_index< + typename Env::map_type, typename Local::key_type>::type + index_type; + + typedef typename + get_local_from_index<Local, Env, index_type>::type + type; + }; + + template <typename Local, typename Env> + struct apply_local + { + // $$$ TODO: static assert that Env is a scoped_environment $$$ + typedef typename get_local<Local, Env>::type type; + }; + + template <typename Key> + struct eval_local + { + template <typename RT, typename Env, typename Index> + static RT + get(Env const& env, Index, mpl::false_) + { + return RT(fusion::at<Index>(env.locals)); + } + + template <typename RT, typename Env, typename Index> + static RT + get(Env const& env, Index index, mpl::true_) + { + typedef typename + get_index<typename Env::outer_env_type::map_type, Key>::type + index_type; + + return get<RT>( + env.outer_env + , index_type() + , mpl::equal_to<index_type, mpl::int_<-1> >()); + } + + template <typename RT, typename Env, typename Index> + static RT + get(Env const& env, Index index) + { + return get<RT>( + env + , index + , mpl::equal_to<Index, mpl::int_<-1> >()); + } + }; + } +}} + +#undef PHOENIX_MAP_LOCAL_TEMPLATE_PARAM +#undef PHOENIX_MAP_LOCAL_DISPATCH +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/lambda.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/lambda.hpp new file mode 100644 index 0000000..c4a7ce8 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/lambda.hpp @@ -0,0 +1,176 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2004 Daniel Wallin + + 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 PHOENIX_SCOPE_LAMBDA_HPP +#define PHOENIX_SCOPE_LAMBDA_HPP + +#include <boost/spirit/home/phoenix/core/limits.hpp> +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/scope/scoped_environment.hpp> +#include <boost/spirit/home/phoenix/scope/detail/local_variable.hpp> +#include <boost/spirit/home/phoenix/detail/local_reference.hpp> +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/fusion/include/transform.hpp> +#include <boost/fusion/include/as_vector.hpp> + +namespace boost { namespace phoenix +{ + template <typename Base, typename OuterEnv, typename Locals, typename Map> + struct lambda_eval : Base + { + template <typename Env> + struct result + { + typedef typename Base::template + result<scoped_environment<Env, OuterEnv, Locals, Map> >::type + result_type; + + typedef typename + detail::unwrap_local_reference<result_type>::type + type; + }; + + lambda_eval( + Base const& base + , OuterEnv const& outer_env + , Locals const& locals) + : Base(base) + , outer_env(outer_env) + , locals(locals) {} + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + typedef typename result<Env>::type RT; + return RT(Base::eval( + scoped_environment<Env, OuterEnv, Locals, Map>( + env, outer_env, locals))); + } + + OuterEnv outer_env; + mutable Locals locals; + }; + + template <typename Base, typename Vars, typename Map> + struct lambda_actor + { + typedef typename + mpl::fold< + Vars + , mpl::false_ + , detail::compute_no_nullary + >::type + no_nullary; + + template <typename Env> + struct result + { + typedef typename + fusion::result_of::as_vector< + typename fusion::result_of::transform< + Vars + , detail::initialize_local<Env> + >::type + >::type + locals_type; + + typedef actor<lambda_eval<Base, Env, locals_type, Map> > type; + }; + + lambda_actor(Base const& f, Vars const& vars) + : f(f), vars(vars) {} + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + typedef typename result<Env>::type result_type; + + return result_type( + f, env, fusion::as_vector( + fusion::transform( + vars + , detail::initialize_local<Env>(env) + ))); + } + + Base f; + Vars vars; + }; + + template <typename Vars, typename Map> + struct lambda_actor_gen + { + template <typename Base> + actor<lambda_actor<Base, Vars, Map> > const + operator[](actor<Base> const& f) const + { + return lambda_actor<Base, Vars, Map>(f, vars); + } + + lambda_actor_gen(Vars const& vars) + : vars(vars) {} + + Vars vars; + }; + + template <typename Key> + struct local_variable; // forward + struct assign_eval; // forward + + struct lambda_gen + : lambda_actor_gen< + fusion::vector<> + , detail::map_local_index_to_tuple<> > + { + typedef + lambda_actor_gen< + fusion::vector<> + , detail::map_local_index_to_tuple<> > + base_type; + + lambda_gen() + : base_type(fusion::vector<>()) + { + } + + template <typename K0, typename V0> + lambda_actor_gen< + fusion::vector<V0> + , detail::map_local_index_to_tuple<K0> + > + operator()( + actor<composite<assign_eval, fusion::vector<local_variable<K0>, V0> > > const& a0 + ) const + { + return fusion::vector<V0>(fusion::at_c<1>(a0)); + } + + template <typename K0, typename K1, typename V0, typename V1> + lambda_actor_gen< + fusion::vector<V0, V1> + , detail::map_local_index_to_tuple<K0, K1> + > + operator()( + actor<composite<assign_eval, fusion::vector<local_variable<K0>, V0> > > const& a0 + , actor<composite<assign_eval, fusion::vector<local_variable<K1>, V1> > > const& a1 + ) const + { + return fusion::vector<V0, V1>(fusion::at_c<1>(a0), fusion::at_c<1>(a1)); + } + + // Bring in the rest... + #define PHOENIX_LOCAL_GEN_NAME lambda_actor_gen + #include <boost/spirit/home/phoenix/scope/detail/local_gen.hpp> + #undef PHOENIX_LOCAL_GEN_NAME + }; + + lambda_gen const lambda = lambda_gen(); +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/let.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/let.hpp new file mode 100644 index 0000000..40e951a --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/let.hpp @@ -0,0 +1,145 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2004 Daniel Wallin + + 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 PHOENIX_SCOPE_LET_HPP +#define PHOENIX_SCOPE_LET_HPP + +#include <boost/spirit/home/phoenix/core/limits.hpp> +#include <boost/spirit/home/phoenix/core/composite.hpp> +#include <boost/spirit/home/phoenix/scope/scoped_environment.hpp> +#include <boost/spirit/home/phoenix/scope/detail/local_variable.hpp> +#include <boost/spirit/home/phoenix/detail/local_reference.hpp> +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/fusion/include/transform.hpp> +#include <boost/fusion/include/as_vector.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/bool.hpp> + +namespace boost { namespace phoenix +{ + template <typename Base, typename Vars, typename Map> + struct let_actor : Base + { + typedef typename + mpl::fold< + Vars + , mpl::false_ + , detail::compute_no_nullary + >::type + no_nullary; + + template <typename Env> + struct result + { + typedef typename + fusion::result_of::as_vector< + typename fusion::result_of::transform< + Vars + , detail::initialize_local<Env> + >::type + >::type + locals_type; + + typedef typename Base::template + result<scoped_environment<Env, Env, locals_type, Map> >::type + result_type; + + typedef typename + detail::unwrap_local_reference<result_type>::type + type; + }; + + let_actor(Base const& base, Vars const& vars) + : Base(base), vars(vars) {} + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + typedef typename + fusion::result_of::as_vector< + typename fusion::result_of::transform< + Vars + , detail::initialize_local<Env> + >::type + >::type + locals_type; + + locals_type locals = + fusion::as_vector( + fusion::transform( + vars + , detail::initialize_local<Env>(env))); + + typedef typename result<Env>::type RT; + return RT(Base::eval( + scoped_environment<Env, Env, locals_type, Map>( + env + , env + , locals))); + } + + Vars vars; + }; + + template <typename Vars, typename Map> + struct let_actor_gen + { + template <typename Base> + actor<let_actor<Base, Vars, Map> > const + operator[](actor<Base> const& base) const + { + return let_actor<Base, Vars, Map>(base, vars); + } + + let_actor_gen(Vars const& vars) + : vars(vars) {} + + Vars vars; + }; + + template <typename Key> + struct local_variable; // forward + struct assign_eval; // forward + + struct let_gen + { + template <typename K0, typename V0> + let_actor_gen< + fusion::vector<V0> + , detail::map_local_index_to_tuple<K0> + > + operator()( + actor<composite<assign_eval, fusion::vector<local_variable<K0>, V0> > > const& a0 + ) const + { + return fusion::vector<V0>(fusion::at_c<1>(a0)); + } + + template <typename K0, typename K1, typename V0, typename V1> + let_actor_gen< + fusion::vector<V0, V1> + , detail::map_local_index_to_tuple<K0, K1> + > + operator()( + actor<composite<assign_eval, fusion::vector<local_variable<K0>, V0> > > const& a0 + , actor<composite<assign_eval, fusion::vector<local_variable<K1>, V1> > > const& a1 + ) const + { + return fusion::vector<V0, V1>(fusion::at_c<1>(a0), fusion::at_c<1>(a1)); + } + + // Bring in the rest... + #define PHOENIX_LOCAL_GEN_NAME let_actor_gen + #include <boost/spirit/home/phoenix/scope/detail/local_gen.hpp> + #undef PHOENIX_LOCAL_GEN_NAME + }; + + let_gen const let = let_gen(); +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/local_variable.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/local_variable.hpp new file mode 100644 index 0000000..5987ed4 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/local_variable.hpp @@ -0,0 +1,111 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2004 Daniel Wallin + + 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 PHOENIX_SCOPE_LOCAL_VARIABLE_HPP +#define PHOENIX_SCOPE_LOCAL_VARIABLE_HPP + +#include <boost/spirit/home/phoenix/core/limits.hpp> +#include <boost/spirit/home/phoenix/detail/local_reference.hpp> +#include <boost/spirit/home/phoenix/scope/detail/local_variable.hpp> +#include <boost/spirit/home/phoenix/core/actor.hpp> +#include <boost/mpl/bool.hpp> + +namespace boost { namespace phoenix +{ + template <typename Key> + struct local_variable + { + typedef Key key_type; + + // This will prevent actor::operator()() from kicking in. + // Actually, we do not need all actor::operator()s for + // all arities, but this will suffice. The nullary + // actor::operator() is particularly troublesome because + // it is always eagerly evaluated by the compiler. + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result : detail::apply_local<local_variable<Key>, Env> {}; + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + typedef typename result<Env>::type return_type; + typedef typename + detail::get_index<typename Env::map_type, Key>::type + index_type; + typedef detail::eval_local<Key> eval_local; + + return eval_local::template get<return_type>( + env + , index_type()); + } + + private: + // silence MSVC warning C4512: assignment operator could not be generated + local_variable& operator= (local_variable const&); + }; + + namespace local_names + { + actor<local_variable<struct _a_key> > const _a + = local_variable<struct _a_key>(); + actor<local_variable<struct _b_key> > const _b + = local_variable<struct _b_key>(); + actor<local_variable<struct _c_key> > const _c + = local_variable<struct _c_key>(); + actor<local_variable<struct _d_key> > const _d + = local_variable<struct _d_key>(); + actor<local_variable<struct _e_key> > const _e + = local_variable<struct _e_key>(); + actor<local_variable<struct _f_key> > const _f + = local_variable<struct _f_key>(); + actor<local_variable<struct _g_key> > const _g + = local_variable<struct _g_key>(); + actor<local_variable<struct _h_key> > const _h + = local_variable<struct _h_key>(); + actor<local_variable<struct _i_key> > const _i + = local_variable<struct _i_key>(); + actor<local_variable<struct _j_key> > const _j + = local_variable<struct _j_key>(); + actor<local_variable<struct _k_key> > const _k + = local_variable<struct _k_key>(); + actor<local_variable<struct _l_key> > const _l + = local_variable<struct _l_key>(); + actor<local_variable<struct _m_key> > const _m + = local_variable<struct _m_key>(); + actor<local_variable<struct _n_key> > const _n + = local_variable<struct _n_key>(); + actor<local_variable<struct _o_key> > const _o + = local_variable<struct _o_key>(); + actor<local_variable<struct _p_key> > const _p + = local_variable<struct _p_key>(); + actor<local_variable<struct _q_key> > const _q + = local_variable<struct _q_key>(); + actor<local_variable<struct _r_key> > const _r + = local_variable<struct _r_key>(); + actor<local_variable<struct _s_key> > const _s + = local_variable<struct _s_key>(); + actor<local_variable<struct _t_key> > const _t + = local_variable<struct _t_key>(); + actor<local_variable<struct _u_key> > const _u + = local_variable<struct _u_key>(); + actor<local_variable<struct _v_key> > const _v + = local_variable<struct _v_key>(); + actor<local_variable<struct _w_key> > const _w + = local_variable<struct _w_key>(); + actor<local_variable<struct _x_key> > const _x + = local_variable<struct _x_key>(); + actor<local_variable<struct _y_key> > const _y + = local_variable<struct _y_key>(); + actor<local_variable<struct _z_key> > const _z + = local_variable<struct _z_key>(); + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/scoped_environment.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/scoped_environment.hpp new file mode 100644 index 0000000..b23f9ee --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/scope/scoped_environment.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2007 Joel de Guzman + Copyright (c) 2004 Daniel Wallin + + 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 PHOENIX_SCOPE_SCOPED_ENVIRONMENT_HPP +#define PHOENIX_SCOPE_SCOPED_ENVIRONMENT_HPP + +namespace boost { namespace phoenix +{ + template <typename Env, typename OuterEnv, typename Locals, typename Map> + struct scoped_environment + { + typedef Env env_type; + typedef OuterEnv outer_env_type; + typedef Locals locals_type; + typedef Map map_type; + typedef typename Env::args_type args_type; + typedef typename Env::tie_type tie_type; + + scoped_environment( + Env const& env + , OuterEnv const& outer_env + , Locals& locals) + : env(env) + , outer_env(outer_env) + , locals(locals) {} + + tie_type const& + args() const + { + return env.args(); + } + + Env const& env; + OuterEnv const& outer_env; + Locals& locals; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + scoped_environment& operator= (scoped_environment const&); + }; +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/phoenix/version.hpp b/3rdParty/Boost/src/boost/spirit/home/phoenix/version.hpp new file mode 100644 index 0000000..c29baf8 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/phoenix/version.hpp @@ -0,0 +1,18 @@ +/*============================================================================= + Copyright (c) 2005-2008 Hartmut Kaiser + Copyright (c) 2005-2007 Joel de Guzman + + 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 PHOENIX_VERSION_HPP +#define PHOENIX_VERSION_HPP + +/////////////////////////////////////////////////////////////////////////////// +// +// This is the version of the library +// +/////////////////////////////////////////////////////////////////////////////// +#define BOOST_PHOENIX_VERSION 0x2000 // 2.0.0 + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/detail/assign_to.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/detail/assign_to.hpp new file mode 100644 index 0000000..38142bf --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/detail/assign_to.hpp @@ -0,0 +1,392 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 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_ASSIGN_TO_APR_16_2006_0812PM) +#define BOOST_SPIRIT_ASSIGN_TO_APR_16_2006_0812PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/qi/detail/construct.hpp> +#include <boost/spirit/home/support/unused.hpp> +#include <boost/spirit/home/qi/detail/attributes.hpp> +#include <boost/spirit/home/support/container.hpp> +#include <boost/fusion/include/copy.hpp> +#include <boost/ref.hpp> +#include <boost/range/iterator_range.hpp> + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + // This file contains assignment utilities. The utilities provided also + // accept spirit's unused_type; all no-ops. Compiler optimization will + // easily strip these away. + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + template <typename T> + struct is_iter_range : mpl::false_ {}; + + template <typename I> + struct is_iter_range<boost::iterator_range<I> > : mpl::true_ {}; + + template <typename C> + struct is_container_of_ranges + : is_iter_range<typename C::value_type> {}; + } + + template <typename Attribute, typename Iterator, typename Enable> + struct assign_to_attribute_from_iterators + { + // Common case + static void + call(Iterator const& first, Iterator const& last, Attribute& attr, mpl::false_) + { + if (traits::is_empty(attr)) + attr = Attribute(first, last); + else { + for (Iterator i = first; i != last; ++i) + push_back(attr, *i); + } + } + + // If Attribute is a container with value_type==iterator_range<T> just push the + // iterator_range into it + static void + call(Iterator const& first, Iterator const& last, Attribute& attr, mpl::true_) + { + typename Attribute::value_type rng(first, last); + push_back(attr, rng); + } + + static void + call(Iterator const& first, Iterator const& last, Attribute& attr) + { + call(first, last, attr, detail::is_container_of_ranges<Attribute>()); + } + }; + + template <typename Attribute, typename Iterator> + struct assign_to_attribute_from_iterators< + reference_wrapper<Attribute>, Iterator> + { + static void + call(Iterator const& first, Iterator const& last + , reference_wrapper<Attribute> attr) + { + if (traits::is_empty(attr)) + attr = Attribute(first, last); + else { + for (Iterator i = first; i != last; ++i) + push_back(attr, *i); + } + } + }; + + template <typename Attribute, typename Iterator> + struct assign_to_attribute_from_iterators< + boost::optional<Attribute>, Iterator> + { + static void + call(Iterator const& first, Iterator const& last + , boost::optional<Attribute>& attr) + { + Attribute val; + assign_to(first, last, val); + attr = val; + } + }; + + template <typename Iterator> + struct assign_to_attribute_from_iterators< + iterator_range<Iterator>, Iterator> + { + static void + call(Iterator const& first, Iterator const& last + , iterator_range<Iterator>& attr) + { + attr = iterator_range<Iterator>(first, last); + } + }; + + template <typename Iterator, typename Attribute> + inline void + assign_to(Iterator const& first, Iterator const& last, Attribute& attr) + { + assign_to_attribute_from_iterators<Attribute, Iterator>:: + call(first, last, attr); + } + + template <typename Iterator> + inline void + assign_to(Iterator const&, Iterator const&, unused_type) + { + } + + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Attribute> + void assign_to(T const& val, Attribute& attr); + + template <typename Attribute, typename T, typename Enable> + struct assign_to_attribute_from_value + { + typedef typename traits::one_element_sequence<Attribute>::type + is_one_element_sequence; + + typedef typename mpl::eval_if< + is_one_element_sequence + , fusion::result_of::at_c<Attribute, 0> + , mpl::identity<Attribute&> + >::type type; + + template <typename T_> + static void + call(T_ const& val, Attribute& attr, mpl::false_) + { + attr = static_cast<Attribute>(val); + } + + // This handles the case where the attribute is a single element fusion + // sequence. We silently assign to the only element and treat it as the + // attribute to parse the results into. + template <typename T_> + static void + call(T_ const& val, Attribute& attr, mpl::true_) + { + typedef typename fusion::result_of::value_at_c<Attribute, 0>::type + element_type; + fusion::at_c<0>(attr) = static_cast<element_type>(val); + } + + static void + call(T const& val, Attribute& attr) + { + call(val, attr, is_one_element_sequence()); + } + }; + + template <typename Attribute> + struct assign_to_attribute_from_value<Attribute, Attribute> + { + static void + call(Attribute const& val, Attribute& attr) + { + attr = val; + } + }; + + template <typename Attribute, typename T> + struct assign_to_attribute_from_value<Attribute, reference_wrapper<T> + , typename disable_if<is_same<Attribute, reference_wrapper<T> > >::type> + { + static void + call(reference_wrapper<T> const& val, Attribute& attr) + { + assign_to(val.get(), attr); + } + }; + + template <typename Attribute, typename T> + struct assign_to_attribute_from_value<Attribute, boost::optional<T> + , typename disable_if<is_same<Attribute, boost::optional<T> > >::type> + { + static void + call(boost::optional<T> const& val, Attribute& attr) + { + assign_to(val.get(), attr); + } + }; + + namespace detail + { + template <typename A, typename B> + struct is_same_size_sequence + : mpl::bool_<fusion::result_of::size<A>::value + == fusion::result_of::size<B>::value> + {}; + } + + template <typename Attribute, typename T> + struct assign_to_attribute_from_value<Attribute, T, + mpl::and_< + fusion::traits::is_sequence<Attribute>, + fusion::traits::is_sequence<T>, + detail::is_same_size_sequence<Attribute, T> + > + > + { + static void + call(T const& val, Attribute& attr) + { + fusion::copy(val, attr); + } + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename Attribute, typename T, typename Enable> + struct assign_to_container_from_value + { + // T is not a container and not a string + template <typename T_> + static void call(T_ const& val, Attribute& attr, mpl::false_, mpl::false_) + { + traits::push_back(attr, val); + } + + // T is a container (but not a string), and T is convertible to the + // value_type of the Attribute container + template <typename T_> + static void + append_to_container_not_string(T_ const& val, Attribute& attr, mpl::true_) + { + traits::push_back(attr, val); + } + + // T is a container (but not a string), generic overload + template <typename T_> + static void + append_to_container_not_string(T_ const& val, Attribute& attr, mpl::false_) + { + typedef typename traits::container_iterator<T_ const>::type + iterator_type; + + iterator_type end = traits::end(val); + for (iterator_type i = traits::begin(val); i != end; traits::next(i)) + traits::push_back(attr, traits::deref(i)); + } + + // T is a container (but not a string) + template <typename T_> + static void call(T_ const& val, Attribute& attr, mpl::true_, mpl::false_) + { + typedef typename container_value<Attribute>::type value_type; + typedef typename is_convertible<T, value_type>::type is_value_type; + + append_to_container_not_string(val, attr, is_value_type()); + } + + /////////////////////////////////////////////////////////////////////// + // T is a string + template <typename Iterator> + static void append_to_string(Attribute& attr, Iterator begin, Iterator end) + { + for (Iterator i = begin; i != end; ++i) + traits::push_back(attr, *i); + } + + // T is string, but not convertible to value_type of container + template <typename T_> + static void append_to_container(T_ const& val, Attribute& attr, mpl::false_) + { + typedef typename char_type_of<T_>::type char_type; + + append_to_string(attr, traits::get_begin<char_type>(val) + , traits::get_end<char_type>(val)); + } + + // T is string, and convertible to value_type of container + template <typename T_> + static void append_to_container(T_ const& val, Attribute& attr, mpl::true_) + { + traits::push_back(attr, val); + } + + template <typename T_, typename Pred> + static void call(T_ const& val, Attribute& attr, Pred, mpl::true_) + { + typedef typename container_value<Attribute>::type value_type; + typedef typename is_convertible<T, value_type>::type is_value_type; + + append_to_container(val, attr, is_value_type()); + } + + /////////////////////////////////////////////////////////////////////// + static void call(T const& val, Attribute& attr) + { + typedef typename traits::is_container<T>::type is_container; + typedef typename traits::is_string<T>::type is_string; + + call(val, attr, is_container(), is_string()); + } + }; + + template <typename Attribute> + struct assign_to_container_from_value<Attribute, Attribute> + { + static void + call(Attribute const& val, Attribute& attr) + { + attr = val; + } + }; + + template <typename Attribute, typename T> + struct assign_to_container_from_value<Attribute, boost::optional<T> + , typename disable_if<is_same<Attribute, boost::optional<T> > >::type> + { + static void + call(boost::optional<T> const& val, Attribute& attr) + { + assign_to(val.get(), attr); + } + }; + + template <typename Attribute, typename T> + struct assign_to_container_from_value<Attribute, reference_wrapper<T> + , typename disable_if<is_same<Attribute, reference_wrapper<T> > >::type> + { + static void + call(reference_wrapper<T> const& val, Attribute& attr) + { + assign_to(val.get(), attr); + } + }; + + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + // overload for non-container attributes + template <typename T, typename Attribute> + inline void + assign_to(T const& val, Attribute& attr, mpl::false_) + { + assign_to_attribute_from_value<Attribute, T>::call(val, attr); + } + + // overload for containers (but not for variants or optionals + // holding containers) + template <typename T, typename Attribute> + inline void + assign_to(T const& val, Attribute& attr, mpl::true_) + { + assign_to_container_from_value<Attribute, T>::call(val, attr); + } + } + + template <typename T, typename Attribute> + inline void + assign_to(T const& val, Attribute& attr) + { + typedef typename mpl::and_< + traits::is_container<Attribute> + , traits::not_is_variant<Attribute> + , traits::not_is_optional<Attribute> + >::type is_not_wrapped_container; + + detail::assign_to(val, attr, is_not_wrapped_container()); + } + + template <typename T> + inline void + assign_to(T const&, unused_type) + { + } +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/detail/attributes.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/detail/attributes.hpp new file mode 100644 index 0000000..0a66a65 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/detail/attributes.hpp @@ -0,0 +1,176 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// Copyright (c) 2001-2011 Joel de Guzman +// +// 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(SPIRIT_QI_DETAIL_ATTRIBUTES_APR_18_2010_0458PM) +#define SPIRIT_QI_DETAIL_ATTRIBUTES_APR_18_2010_0458PM + +#include <boost/spirit/home/qi/domain.hpp> +#include <boost/spirit/home/support/attributes_fwd.hpp> +#include <boost/spirit/home/support/attributes.hpp> +#include <boost/spirit/home/support/utree/utree_traits_fwd.hpp> + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { namespace qi +{ + template <typename Exposed, typename Transformed> + struct default_transform_attribute + { + typedef Transformed type; + + static Transformed pre(Exposed&) { return Transformed(); } + + static void post(Exposed& val, Transformed const& attr) + { + traits::assign_to(attr, val); + } + + // fail() will be called by Qi rule's if the rhs failed parsing + static void fail(Exposed&) {} + }; + + // handle case where no transformation is required as the types are the same + template <typename Attribute> + struct default_transform_attribute<Attribute, Attribute> + { + typedef Attribute& type; + static Attribute& pre(Attribute& val) { return val; } + static void post(Attribute&, Attribute const&) {} + static void fail(Attribute&) {} + }; + + template <typename Exposed, typename Transformed> + struct proxy_transform_attribute + { + typedef Transformed type; + + static Transformed pre(Exposed& val) { return Transformed(val); } + static void post(Exposed&, Transformed const&) { /* no-op */ } + + // fail() will be called by Qi rule's if the rhs failed parsing + static void fail(Exposed&) {} + }; + + // handle case where no transformation is required as the types are the same + template <typename Attribute> + struct proxy_transform_attribute<Attribute, Attribute> + { + typedef Attribute& type; + static Attribute& pre(Attribute& val) { return val; } + static void post(Attribute&, Attribute const&) {} + static void fail(Attribute&) {} + }; + + // main specialization for Qi + template <typename Exposed, typename Transformed, typename Enable = void> + struct transform_attribute + : mpl::if_< + mpl::and_< + mpl::not_<is_const<Exposed> > + , mpl::not_<is_reference<Exposed> > + , traits::is_proxy<Transformed> > + , proxy_transform_attribute<Exposed, Transformed> + , default_transform_attribute<Exposed, Transformed> + >::type + {}; + + template <typename Exposed, typename Transformed> + struct transform_attribute<boost::optional<Exposed>, Transformed + , typename disable_if<is_same<boost::optional<Exposed>, Transformed> >::type> + { + typedef Transformed& type; + static Transformed& pre(boost::optional<Exposed>& val) + { + if (!val) + val = Transformed(); + return boost::get<Transformed>(val); + } + static void post(boost::optional<Exposed>&, Transformed const&) {} + static void fail(boost::optional<Exposed>& val) + { + val = none_t(); // leave optional uninitialized if rhs failed + } + }; + + // reference types need special handling + template <typename Attribute> + struct transform_attribute<Attribute&, Attribute> + { + typedef Attribute& type; + static Attribute& pre(Attribute& val) { return val; } + static void post(Attribute&, Attribute const&) {} + static void fail(Attribute&) {} + }; + + // unused_type needs some special handling as well + template <> + struct transform_attribute<unused_type, unused_type> + { + typedef unused_type type; + static unused_type pre(unused_type) { return unused; } + static void post(unused_type, unused_type) {} + static void fail(unused_type) {} + }; + + template <> + struct transform_attribute<unused_type const, unused_type> + : transform_attribute<unused_type, unused_type> + {}; + + template <typename Attribute> + struct transform_attribute<unused_type, Attribute> + : transform_attribute<unused_type, unused_type> + {}; + + template <typename Attribute> + struct transform_attribute<unused_type const, Attribute> + : transform_attribute<unused_type, unused_type> + {}; + + template <typename Attribute> + struct transform_attribute<Attribute, unused_type> + : transform_attribute<unused_type, unused_type> + {}; + + template <typename Attribute> + struct transform_attribute<Attribute const, unused_type> + : transform_attribute<unused_type, unused_type> + {}; +}}} + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { namespace traits +{ + template <typename Exposed, typename Transformed> + struct transform_attribute<Exposed, Transformed, qi::domain> + : qi::transform_attribute<Exposed, Transformed> + {}; + + template <typename Exposed, typename Transformed> + struct transform_attribute<Exposed&, Transformed, qi::domain> + : transform_attribute<Exposed, Transformed, qi::domain> + {}; + + template <typename Attribute> + struct transform_attribute<Attribute&, Attribute, qi::domain> + : qi::transform_attribute<Attribute&, Attribute> + {}; + + /////////////////////////////////////////////////////////////////////////// + template <typename Exposed, typename Transformed> + void post_transform(Exposed& dest, Transformed const& attr) + { + return transform_attribute<Exposed, Transformed, qi::domain>::post(dest, attr); + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Exposed, typename Transformed> + void fail_transform(Exposed& dest, Transformed const&) + { + return transform_attribute<Exposed, Transformed, qi::domain>::fail(dest); + } +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/detail/construct.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/detail/construct.hpp new file mode 100644 index 0000000..5d8122f --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/detail/construct.hpp @@ -0,0 +1,202 @@ +/*============================================================================= + Copyright (c) 2001-2011 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_CONSTRUCT_MAR_24_2007_0629PM) +#define BOOST_SPIRIT_CONSTRUCT_MAR_24_2007_0629PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/config.hpp> +#include <boost/spirit/home/qi/parse.hpp> +#include <boost/spirit/home/support/common_terminals.hpp> +#include <boost/spirit/home/support/attributes_fwd.hpp> + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + // We provide overloads for the assign_to_attribute_from_iterators + // customization point for all built in types + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator> + struct assign_to_attribute_from_iterators<char, Iterator> + { + static void + call(Iterator const& first, Iterator const&, char& attr) + { + attr = *first; + } + }; + + template <typename Iterator> + struct assign_to_attribute_from_iterators<signed char, Iterator> + { + static void + call(Iterator const& first, Iterator const&, signed char& attr) + { + attr = *first; + } + }; + + template <typename Iterator> + struct assign_to_attribute_from_iterators<unsigned char, Iterator> + { + static void + call(Iterator const& first, Iterator const&, unsigned char& attr) + { + attr = *first; + } + }; + + // wchar_t is intrinsic + template <typename Iterator> + struct assign_to_attribute_from_iterators<wchar_t, Iterator> + { + static void + call(Iterator const& first, Iterator const&, wchar_t& attr) + { + attr = *first; + } + }; + +#if !defined(BOOST_NO_INTRINSIC_WCHAR_T) + // wchar_t is intrinsic, have separate overload for unsigned short + template <typename Iterator> + struct assign_to_attribute_from_iterators<unsigned short, Iterator> + { + static void + call(Iterator const& first, Iterator const&, unsigned short& attr) + { + attr = *first; + } + }; +#endif + + template <typename Iterator> + struct assign_to_attribute_from_iterators<bool, Iterator> + { + static void + call(Iterator const& first, Iterator const& last, bool& attr) + { + Iterator first_ = first; + qi::parse(first_, last, bool_type(), attr); + } + }; + + template <typename Iterator> + struct assign_to_attribute_from_iterators<short, Iterator> + { + static void + call(Iterator const& first, Iterator const& last, short& attr) + { + Iterator first_ = first; + qi::parse(first_, last, short_type(), attr); + } + }; + + template <typename Iterator> + struct assign_to_attribute_from_iterators<int, Iterator> + { + static void + call(Iterator const& first, Iterator const& last, int& attr) + { + Iterator first_ = first; + qi::parse(first_, last, int_type(), attr); + } + }; + template <typename Iterator> + struct assign_to_attribute_from_iterators<unsigned int, Iterator> + { + static void + call(Iterator const& first, Iterator const& last, unsigned int& attr) + { + Iterator first_ = first; + qi::parse(first_, last, uint_type(), attr); + } + }; + + template <typename Iterator> + struct assign_to_attribute_from_iterators<long, Iterator> + { + static void + call(Iterator const& first, Iterator const& last, long& attr) + { + Iterator first_ = first; + qi::parse(first_, last, long_type(), attr); + } + }; + template <typename Iterator> + struct assign_to_attribute_from_iterators<unsigned long, Iterator> + { + static void + call(Iterator const& first, Iterator const& last, unsigned long& attr) + { + Iterator first_ = first; + qi::parse(first_, last, ulong_type(), attr); + } + }; + +#ifdef BOOST_HAS_LONG_LONG + template <typename Iterator> + struct assign_to_attribute_from_iterators<long_long_type, Iterator> + { + static void + call(Iterator const& first, Iterator const& last, long_long_type& attr) + { + Iterator first_ = first; + qi::parse(first_, last, long_long_type(), attr); + } + }; + template <typename Iterator> + struct assign_to_attribute_from_iterators<ulong_long_type, Iterator> + { + static void + call(Iterator const& first, Iterator const& last, ulong_long_type& attr) + { + Iterator first_ = first; + qi::parse(first_, last, ulong_long_type(), attr); + } + }; +#endif + + template <typename Iterator> + struct assign_to_attribute_from_iterators<float, Iterator> + { + static void + call(Iterator const& first, Iterator const& last, float& attr) + { + Iterator first_ = first; + qi::parse(first_, last, float_type(), attr); + } + }; + + template <typename Iterator> + struct assign_to_attribute_from_iterators<double, Iterator> + { + static void + call(Iterator const& first, Iterator const& last, double& attr) + { + Iterator first_ = first; + qi::parse(first_, last, double_type(), attr); + } + }; + + template <typename Iterator> + struct assign_to_attribute_from_iterators<long double, Iterator> + { + static void + call(Iterator const& first, Iterator const& last, long double& attr) + { + Iterator first_ = first; + qi::parse(first_, last, long_double_type(), attr); + } + }; + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/detail/parse.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/detail/parse.hpp new file mode 100644 index 0000000..b81f1e7 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/detail/parse.hpp @@ -0,0 +1,97 @@ +/*============================================================================= + Copyright (c) 2001-2011 Hartmut Kaiser + + 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_DETAIL_PARSE_DEC_02_2009_0411PM) +#define BOOST_SPIRIT_DETAIL_PARSE_DEC_02_2009_0411PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/qi/meta_compiler.hpp> +#include <boost/spirit/home/qi/skip_flag.hpp> +#include <boost/spirit/home/qi/skip_over.hpp> +#include <boost/spirit/home/support/unused.hpp> +#include <boost/mpl/assert.hpp> +#include <boost/mpl/bool.hpp> + +namespace boost { namespace spirit { namespace qi { namespace detail +{ + /////////////////////////////////////////////////////////////////////////// + template <typename Expr, typename Enable = void> + struct parse_impl + { + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then the expression (expr) is not a valid spirit qi expression. + // Did you intend to use the auto_ facilities while forgetting to + // #include <boost/spirit/include/qi_auto.hpp>? + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Expr); + }; + + template <typename Expr> + struct parse_impl<Expr + , typename enable_if<traits::matches<qi::domain, Expr> >::type> + { + template <typename Iterator> + static bool call( + Iterator& first + , Iterator last + , Expr const& expr) + { + return compile<qi::domain>(expr).parse( + first, last, unused, unused, unused); + } + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename Expr, typename Enable = void> + struct phrase_parse_impl + { + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then the expression (expr) is not a valid spirit qi expression. + // Did you intend to use the auto_ facilities while forgetting to + // #include <boost/spirit/include/qi_auto.hpp>? + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Expr); + }; + + template <typename Expr> + struct phrase_parse_impl<Expr + , typename enable_if<traits::matches<qi::domain, Expr> >::type> + { + template <typename Iterator, typename Skipper> + static bool call( + Iterator& first + , Iterator last + , Expr const& expr + , Skipper const& skipper + , BOOST_SCOPED_ENUM(skip_flag) post_skip) + { + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then the skipper is not a valid spirit qi expression. + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Skipper); + + typedef + typename result_of::compile<qi::domain, Skipper>::type + skipper_type; + skipper_type const skipper_ = compile<qi::domain>(skipper); + + if (!compile<qi::domain>(expr).parse( + first, last, unused, skipper_, unused)) + return false; + + if (post_skip == skip_flag::postskip) + qi::skip_over(first, last, skipper_); + return true; + } + }; + +}}}} + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/detail/unused_skipper.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/detail/unused_skipper.hpp new file mode 100644 index 0000000..c1405d6 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/detail/unused_skipper.hpp @@ -0,0 +1,50 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_QI_UNUSED_SKIPPER_JUL_25_2009_0921AM) +#define BOOST_SPIRIT_QI_UNUSED_SKIPPER_JUL_25_2009_0921AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/unused.hpp> + +namespace boost { namespace spirit { namespace qi { namespace detail +{ + template <typename Skipper> + struct unused_skipper : unused_type + { + unused_skipper(Skipper const& skipper) + : skipper(skipper) {} + Skipper const& skipper; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + unused_skipper& operator= (unused_skipper const&); + }; + + // If a surrounding lexeme[] directive was specified, the current + // skipper is of the type unused_skipper. In this case we + // re-activate the skipper which was active before the skip[] + // directive. + template <typename Skipper> + inline Skipper const& + get_skipper(unused_skipper<Skipper> const& u) + { + return u.skipper; + } + + // If no surrounding lexeme[] directive was specified we keep what we got. + template <typename Skipper> + inline Skipper const& + get_skipper(Skipper const& u) + { + return u; + } + +}}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/domain.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/domain.hpp new file mode 100644 index 0000000..cc6b8c3 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/domain.hpp @@ -0,0 +1,74 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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_DOMAIN_JANUARY_29_2007_0954AM) +#define BOOST_SPIRIT_DOMAIN_JANUARY_29_2007_0954AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/unused.hpp> +#include <boost/spirit/home/support/meta_compiler.hpp> +#include <boost/spirit/home/support/info.hpp> +#include <boost/spirit/home/support/argument.hpp> +#include <boost/spirit/home/support/context.hpp> + +#include <boost/preprocessor/repeat.hpp> +#include <boost/preprocessor/cat.hpp> + +namespace boost { namespace spirit { namespace qi +{ + // qi's domain + struct domain {}; + + // bring in some of spirit parts into spirit::qi + using spirit::unused; + using spirit::unused_type; + using spirit::compile; + using spirit::info; + + // You can bring these in with the using directive + // without worrying about bringing in too much. + namespace labels + { + BOOST_PP_REPEAT(SPIRIT_ARGUMENTS_LIMIT, SPIRIT_USING_ARGUMENT, _) + BOOST_PP_REPEAT(SPIRIT_ATTRIBUTES_LIMIT, SPIRIT_USING_ATTRIBUTE, _) + + using spirit::_pass_type; + using spirit::_val_type; + using spirit::_a_type; + using spirit::_b_type; + using spirit::_c_type; + using spirit::_d_type; + using spirit::_e_type; + using spirit::_f_type; + using spirit::_g_type; + using spirit::_h_type; + using spirit::_i_type; + using spirit::_j_type; + +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + + using spirit::_pass; + using spirit::_val; + using spirit::_a; + using spirit::_b; + using spirit::_c; + using spirit::_d; + using spirit::_e; + using spirit::_f; + using spirit::_g; + using spirit::_h; + using spirit::_i; + using spirit::_j; + +#endif + } + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/meta_compiler.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/meta_compiler.hpp new file mode 100644 index 0000000..68649c0 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/meta_compiler.hpp @@ -0,0 +1,177 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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_META_COMPILER_OCTOBER_16_2008_0347PM) +#define BOOST_SPIRIT_META_COMPILER_OCTOBER_16_2008_0347PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/meta_compiler.hpp> +#include <boost/spirit/home/qi/domain.hpp> +#include <boost/spirit/home/qi/parser.hpp> +#include <boost/spirit/home/support/string_traits.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/utility/enable_if.hpp> +#include <boost/fusion/include/at.hpp> + +namespace boost { namespace spirit +{ + template <typename T> + struct use_terminal<qi::domain, T + , typename enable_if<traits::is_parser<T> >::type> // enables parsers + : mpl::true_ {}; + + namespace qi + { + template <typename T, typename Modifiers, typename Enable = void> + struct make_primitive // by default, return it as-is + { + typedef T result_type; + + template <typename T_> + T_& operator()(T_& val, unused_type) const + { + return val; + } + + template <typename T_> + T_ const& operator()(T_ const& val, unused_type) const + { + return val; + } + }; + + template <typename Tag, typename Elements + , typename Modifiers, typename Enable = void> + struct make_composite; + + template <typename Directive, typename Body + , typename Modifiers, typename Enable = void> + struct make_directive + { + typedef Body result_type; + result_type operator()(unused_type, Body const& body, unused_type) const + { + return body; // By default, a directive simply returns its subject + } + }; + } + + // Qi primitive meta-compiler + template <> + struct make_component<qi::domain, proto::tag::terminal> + { + template <typename Sig> + struct result; + + template <typename This, typename Elements, typename Modifiers> + struct result<This(Elements, Modifiers)> + { + typedef typename qi::make_primitive< + typename remove_const<typename Elements::car_type>::type, + typename remove_reference<Modifiers>::type>::result_type + type; + }; + + template <typename Elements, typename Modifiers> + typename result<make_component(Elements, Modifiers)>::type + operator()(Elements const& elements, Modifiers const& modifiers) const + { + typedef typename remove_const<typename Elements::car_type>::type term; + return qi::make_primitive<term, Modifiers>()(elements.car, modifiers); + } + }; + + // Qi composite meta-compiler + template <typename Tag> + struct make_component<qi::domain, Tag> + { + template <typename Sig> + struct result; + + template <typename This, typename Elements, typename Modifiers> + struct result<This(Elements, Modifiers)> + { + typedef typename + qi::make_composite<Tag, Elements, + typename remove_reference<Modifiers>::type>::result_type + type; + }; + + template <typename Elements, typename Modifiers> + typename result<make_component(Elements, Modifiers)>::type + operator()(Elements const& elements, Modifiers const& modifiers) const + { + return qi::make_composite<Tag, Elements, Modifiers>()( + elements, modifiers); + } + }; + + // Qi function meta-compiler + template <> + struct make_component<qi::domain, proto::tag::function> + { + template <typename Sig> + struct result; + + template <typename This, typename Elements, typename Modifiers> + struct result<This(Elements, Modifiers)> + { + typedef typename + qi::make_composite< + typename remove_const<typename Elements::car_type>::type, + typename Elements::cdr_type, + typename remove_reference<Modifiers>::type + >::result_type + type; + }; + + template <typename Elements, typename Modifiers> + typename result<make_component(Elements, Modifiers)>::type + operator()(Elements const& elements, Modifiers const& modifiers) const + { + return qi::make_composite< + typename remove_const<typename Elements::car_type>::type, + typename Elements::cdr_type, + Modifiers>()(elements.cdr, modifiers); + } + }; + + // Qi directive meta-compiler + template <> + struct make_component<qi::domain, tag::directive> + { + template <typename Sig> + struct result; + + template <typename This, typename Elements, typename Modifiers> + struct result<This(Elements, Modifiers)> + { + typedef typename + qi::make_directive< + typename remove_const<typename Elements::car_type>::type, + typename remove_const<typename Elements::cdr_type::car_type>::type, + typename remove_reference<Modifiers>::type + >::result_type + type; + }; + + template <typename Elements, typename Modifiers> + typename result<make_component(Elements, Modifiers)>::type + operator()(Elements const& elements, Modifiers const& modifiers) const + { + return qi::make_directive< + typename remove_const<typename Elements::car_type>::type, + typename remove_const<typename Elements::cdr_type::car_type>::type, + Modifiers>()(elements.car, elements.cdr.car, modifiers); + } + }; + +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/detail/fcall.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/detail/fcall.hpp new file mode 100644 index 0000000..e4fa17f --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/detail/fcall.hpp @@ -0,0 +1,53 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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_PP_IS_ITERATING + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> + +#define BOOST_PP_FILENAME_1 \ + <boost/spirit/home/qi/nonterminal/detail/fcall.hpp> +#define BOOST_PP_ITERATION_LIMITS (1, SPIRIT_ARGUMENTS_LIMIT) +#include BOOST_PP_ITERATE() + +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// +#else // defined(BOOST_PP_IS_ITERATING) + +#define N BOOST_PP_ITERATION() + + template <BOOST_PP_ENUM_PARAMS(N, typename A)> + typename lazy_enable_if_c< + (params_size == N) + , proto::terminal< + spirit::qi::parameterized_nonterminal< + parameterized_subject_type + , fusion::vector<BOOST_PP_ENUM_PARAMS(N, A)> > + > + >::type + operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& f)) const + { + typedef fusion::vector<BOOST_PP_ENUM_PARAMS(N, A)> vector_type; + typedef spirit::qi::parameterized_nonterminal< + parameterized_subject_type, vector_type> parameterized_type; + typedef typename proto::terminal<parameterized_type>::type result_type; + + return result_type::make( + parameterized_type( + this->get_parameterized_subject() + , fusion::make_vector(BOOST_PP_ENUM_PARAMS(N, f))) + ); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + + diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/detail/parameterized.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/detail/parameterized.hpp new file mode 100644 index 0000000..0300a06 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/detail/parameterized.hpp @@ -0,0 +1,75 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2009 Francois Barel + + 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_PARAMETERIZED_AUGUST_09_2009_0539AM) +#define BOOST_SPIRIT_PARAMETERIZED_AUGUST_09_2009_0539AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/ref.hpp> + +#include <boost/spirit/home/support/handles_container.hpp> +#include <boost/spirit/home/qi/parser.hpp> + +namespace boost { namespace spirit { namespace qi +{ + /////////////////////////////////////////////////////////////////////////// + // parameterized_nonterminal: parser representing the invocation of a + // nonterminal, passing inherited attributes + /////////////////////////////////////////////////////////////////////////// + template <typename Subject, typename Params> + struct parameterized_nonterminal + : parser<parameterized_nonterminal<Subject, Params> > + { + parameterized_nonterminal(Subject const& subject, Params const& params) + : ref(subject), params(params) + { + } + + template <typename Context, typename Iterator> + struct attribute + // Forward to subject. + : Subject::template attribute<Context, Iterator> {}; + + template <typename Iterator, typename Context + , typename Skipper, typename Attribute> + bool parse(Iterator& first, Iterator const& last + , Context& context, Skipper const& skipper + , Attribute& attr) const + { + // Forward to subject, passing the additional + // params argument to parse. + return ref.get().parse(first, last, context, skipper, attr, params); + } + + template <typename Context> + info what(Context& context) const + { + // Forward to subject. + return ref.get().what(context); + } + + boost::reference_wrapper<Subject const> ref; + Params params; + }; +}}} + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template <typename Subject, typename Params, typename Attribute + , typename Context, typename Iterator> + struct handles_container<qi::parameterized_nonterminal<Subject, Params> + , Attribute, Context, Iterator> + : handles_container<typename remove_const<Subject>::type + , Attribute, Context, Iterator> + {}; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/detail/parser_binder.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/detail/parser_binder.hpp new file mode 100644 index 0000000..91bceba --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/detail/parser_binder.hpp @@ -0,0 +1,87 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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_BINDER_DECEMBER_05_2008_0516_PM) +#define BOOST_SPIRIT_PARSER_BINDER_DECEMBER_05_2008_0516_PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/fusion/include/at.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/spirit/home/support/has_semantic_action.hpp> + +namespace boost { namespace spirit { namespace qi { namespace detail +{ + // parser_binder for plain rules + template <typename Parser, typename Auto> + struct parser_binder + { + parser_binder(Parser const& p) + : p(p) {} + + template <typename Iterator, typename Skipper, typename Context> + bool call(Iterator& first, Iterator const& last + , Context& context, Skipper const& skipper, mpl::true_) const + { + // If DeducedAuto is false (semantic actions is present), the + // component's attribute is unused. + return p.parse(first, last, context, skipper, unused); + } + + template <typename Iterator, typename Skipper, typename Context> + bool call(Iterator& first, Iterator const& last + , Context& context, Skipper const& skipper, mpl::false_) const + { + // If DeducedAuto is true (no semantic action), we pass the rule's + // attribute on to the component. + return p.parse(first, last, context, skipper + , fusion::at_c<0>(context.attributes)); + } + + template <typename Iterator, typename Skipper, typename Context> + bool operator()( + Iterator& first, Iterator const& last + , Context& context, Skipper const& skipper) const + { + // If Auto is false, we need to deduce whether to apply auto rule + typedef typename traits::has_semantic_action<Parser>::type auto_rule; + return call(first, last, context, skipper, auto_rule()); + } + + Parser p; + }; + + // parser_binder for auto rules + template <typename Parser> + struct parser_binder<Parser, mpl::true_> + { + parser_binder(Parser const& p) + : p(p) {} + + template <typename Iterator, typename Skipper, typename Context> + bool operator()( + Iterator& first, Iterator const& last + , Context& context, Skipper const& skipper) const + { + // If Auto is true, we pass the rule's attribute on to the component. + return p.parse(first, last, context, skipper + , fusion::at_c<0>(context.attributes)); + } + + Parser p; + }; + + template <typename Auto, typename Parser> + inline parser_binder<Parser, Auto> + bind_parser(Parser const& p) + { + return parser_binder<Parser, Auto>(p); + } +}}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/grammar.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/grammar.hpp new file mode 100644 index 0000000..982e49b --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/grammar.hpp @@ -0,0 +1,132 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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_GRAMMAR_FEBRUARY_19_2007_0236PM) +#define BOOST_SPIRIT_GRAMMAR_FEBRUARY_19_2007_0236PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/unused.hpp> +#include <boost/spirit/home/support/info.hpp> +#include <boost/spirit/home/support/assert_msg.hpp> +#include <boost/spirit/home/qi/domain.hpp> +#include <boost/spirit/home/qi/nonterminal/rule.hpp> +#include <boost/spirit/home/qi/nonterminal/nonterminal_fwd.hpp> +#include <boost/spirit/home/qi/reference.hpp> +#include <boost/noncopyable.hpp> +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace spirit { namespace qi +{ + template < + typename Iterator, typename T1, typename T2, typename T3 + , typename T4> + struct grammar + : proto::extends< + typename proto::terminal< + reference<rule<Iterator, T1, T2, T3, T4> const> + >::type + , grammar<Iterator, T1, T2, T3, T4> + > + , parser<grammar<Iterator, T1, T2, T3, T4> > + , noncopyable + { + typedef Iterator iterator_type; + typedef rule<Iterator, T1, T2, T3, T4> start_type; + typedef typename start_type::sig_type sig_type; + typedef typename start_type::locals_type locals_type; + typedef typename start_type::skipper_type skipper_type; + typedef typename start_type::encoding_type encoding_type; + typedef grammar<Iterator, T1, T2, T3, T4> base_type; + typedef reference<start_type const> reference_; + typedef typename proto::terminal<reference_>::type terminal; + + static size_t const params_size = start_type::params_size; + + template <typename Context, typename Iterator_> + struct attribute + { + typedef typename start_type::attr_type type; + }; + + grammar( + start_type const& start + , std::string const& name_ = "unnamed-grammar") + : proto::extends<terminal, base_type>(terminal::make(reference_(start))) + , name_(name_) + {} + + // This constructor is used to catch if the start rule is not + // compatible with the grammar. + template <typename Iterator_, + typename T1_, typename T2_, typename T3_, typename T4_> + grammar( + rule<Iterator_, T1_, T2_, T3_, T4_> const& + , std::string const& = "unnamed-grammar") + { + // If you see the assertion below failing then the start rule + // passed to the constructor of the grammar is not compatible with + // the grammar (i.e. it uses different template parameters). + BOOST_SPIRIT_ASSERT_MSG( + (is_same<start_type, rule<Iterator_, T1_, T2_, T3_, T4_> >::value) + , incompatible_start_rule, (rule<Iterator_, T1_, T2_, T3_, T4_>)); + } + + std::string name() const + { + return name_; + } + + void name(std::string const& str) + { + name_ = str; + } + + template <typename Context, typename Skipper, typename Attribute> + bool parse(Iterator& first, Iterator const& last + , Context& context, Skipper const& skipper + , Attribute& attr) const + { + return this->proto_base().child0.parse( + first, last, context, skipper, attr); + } + + template <typename Context> + info what(Context&) const + { + return info(name_); + } + + // bring in the operator() overloads + start_type const& get_parameterized_subject() const + { return this->proto_base().child0.ref.get(); } + typedef start_type parameterized_subject_type; + #include <boost/spirit/home/qi/nonterminal/detail/fcall.hpp> + + std::string name_; + + }; +}}} + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template < + typename IteratorA, typename IteratorB, typename Attribute + , typename Context, typename T1, typename T2, typename T3, typename T4> + struct handles_container< + qi::grammar<IteratorA, T1, T2, T3, T4>, Attribute, Context, IteratorB> + : traits::is_container< + typename attribute_of< + qi::grammar<IteratorA, T1, T2, T3, T4>, Context, IteratorB + >::type + > + {}; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/nonterminal_fwd.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/nonterminal_fwd.hpp new file mode 100644 index 0000000..9e39345 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/nonterminal_fwd.hpp @@ -0,0 +1,31 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_QI_NONTERMINAL_FWD_DEC_24_2010_1105PM) +#define BOOST_SPIRIT_QI_NONTERMINAL_FWD_DEC_24_2010_1105PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/unused.hpp> + +namespace boost { namespace spirit { namespace qi +{ + // forward declaration only + template < + typename Iterator, typename T1 = unused_type + , typename T2 = unused_type, typename T3 = unused_type + , typename T4 = unused_type> + struct rule; + + template < + typename Iterator, typename T1 = unused_type + , typename T2 = unused_type, typename T3 = unused_type + , typename T4 = unused_type> + struct grammar; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/rule.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/rule.hpp new file mode 100644 index 0000000..23d2559 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/nonterminal/rule.hpp @@ -0,0 +1,439 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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_RULE_FEBRUARY_12_2007_1020AM) +#define BOOST_SPIRIT_RULE_FEBRUARY_12_2007_1020AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/assert.hpp> +#include <boost/config.hpp> +#include <boost/function.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/type_traits/add_reference.hpp> +#include <boost/type_traits/is_same.hpp> + +#include <boost/fusion/include/vector.hpp> +#include <boost/fusion/include/size.hpp> +#include <boost/fusion/include/make_vector.hpp> +#include <boost/fusion/include/cons.hpp> +#include <boost/fusion/include/as_list.hpp> +#include <boost/fusion/include/as_vector.hpp> + +#include <boost/spirit/home/support/unused.hpp> +#include <boost/spirit/home/support/argument.hpp> +#include <boost/spirit/home/support/context.hpp> +#include <boost/spirit/home/support/info.hpp> +#include <boost/spirit/home/qi/detail/attributes.hpp> +#include <boost/spirit/home/support/nonterminal/extract_param.hpp> +#include <boost/spirit/home/support/nonterminal/locals.hpp> +#include <boost/spirit/home/qi/reference.hpp> +#include <boost/spirit/home/qi/nonterminal/detail/parameterized.hpp> +#include <boost/spirit/home/qi/nonterminal/detail/parser_binder.hpp> +#include <boost/spirit/home/qi/nonterminal/nonterminal_fwd.hpp> +#include <boost/spirit/home/qi/skip_over.hpp> + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable: 4355) // 'this' : used in base member initializer list warning +#endif + +namespace boost { namespace spirit { namespace qi +{ + BOOST_PP_REPEAT(SPIRIT_ATTRIBUTES_LIMIT, SPIRIT_USING_ATTRIBUTE, _) + + using spirit::_pass_type; + using spirit::_val_type; + using spirit::_a_type; + using spirit::_b_type; + using spirit::_c_type; + using spirit::_d_type; + using spirit::_e_type; + using spirit::_f_type; + using spirit::_g_type; + using spirit::_h_type; + using spirit::_i_type; + using spirit::_j_type; + +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + + using spirit::_pass; + using spirit::_val; + using spirit::_a; + using spirit::_b; + using spirit::_c; + using spirit::_d; + using spirit::_e; + using spirit::_f; + using spirit::_g; + using spirit::_h; + using spirit::_i; + using spirit::_j; + +#endif + + using spirit::info; + using spirit::locals; + + template < + typename Iterator, typename T1, typename T2, typename T3 + , typename T4> + struct rule + : proto::extends< + typename proto::terminal< + reference<rule<Iterator, T1, T2, T3, T4> const> + >::type + , rule<Iterator, T1, T2, T3, T4> + > + , parser<rule<Iterator, T1, T2, T3, T4> > + { + typedef Iterator iterator_type; + typedef rule<Iterator, T1, T2, T3, T4> this_type; + typedef reference<this_type const> reference_; + typedef typename proto::terminal<reference_>::type terminal; + typedef proto::extends<terminal, this_type> base_type; + typedef mpl::vector<T1, T2, T3, T4> template_params; + + // The rule's locals_type: a sequence of types to be used as local variables + typedef typename + spirit::detail::extract_locals<template_params>::type + locals_type; + + // The rule's skip-parser type + typedef typename + spirit::detail::extract_component< + qi::domain, template_params>::type + skipper_type; + + // The rule's signature + typedef typename + spirit::detail::extract_sig<template_params>::type + sig_type; + + // The rule's encoding type + typedef typename + spirit::detail::extract_encoding<template_params>::type + encoding_type; + + // This is the rule's attribute type + typedef typename + spirit::detail::attr_from_sig<sig_type>::type + attr_type; + typedef typename add_reference<attr_type>::type attr_reference_type; + + // parameter_types is a sequence of types passed as parameters to the rule + typedef typename + spirit::detail::params_from_sig<sig_type>::type + parameter_types; + + static size_t const params_size = + fusion::result_of::size<parameter_types>::type::value; + + typedef context< + fusion::cons<attr_reference_type, parameter_types> + , locals_type> + context_type; + + typedef function< + bool(Iterator& first, Iterator const& last + , context_type& context + , skipper_type const& skipper + )> + function_type; + + typedef typename + mpl::if_< + is_same<encoding_type, unused_type> + , unused_type + , tag::char_code<tag::encoding, encoding_type> + >::type + encoding_modifier_type; + + explicit rule(std::string const& name_ = "unnamed-rule") + : base_type(terminal::make(reference_(*this))) + , name_(name_) + { + } + + rule(rule const& rhs) + : base_type(terminal::make(reference_(*this))) + , name_(rhs.name_) + , f(rhs.f) + { + } + + template <typename Auto, typename Expr> + static void define(rule& lhs, Expr const& expr, mpl::false_) + { + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then the expression (expr) is not a valid spirit qi expression. + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Expr); + } + + template <typename Auto, typename Expr> + static void define(rule& lhs, Expr const& expr, mpl::true_) + { + lhs.f = detail::bind_parser<Auto>( + compile<qi::domain>(expr, encoding_modifier_type())); + } + + template <typename Expr> + rule(Expr const& expr, std::string const& name_ = "unnamed-rule") + : base_type(terminal::make(reference_(*this))) + , name_(name_) + { + define<mpl::false_>(*this, expr, traits::matches<qi::domain, Expr>()); + } + + rule& operator=(rule const& rhs) + { + // The following assertion fires when you try to initialize a rule + // from an uninitialized one. Did you mean to refer to the right + // hand side rule instead of assigning from it? In this case you + // should write lhs = rhs.alias(); + BOOST_ASSERT(rhs.f && "Did you mean rhs.alias() instead of rhs?"); + + f = rhs.f; + name_ = rhs.name_; + return *this; + } + + std::string const& name() const + { + return name_; + } + + void name(std::string const& str) + { + name_ = str; + } + + template <typename Expr> + rule& operator=(Expr const& expr) + { + define<mpl::false_>(*this, expr, traits::matches<qi::domain, Expr>()); + return *this; + } + +// VC7.1 has problems to resolve 'rule' without explicit template parameters +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1400) + // g++ 3.3 barfs if this is a member function :( + template <typename Expr> + friend rule& operator%=(rule& r, Expr const& expr) + { + define<mpl::true_>(r, expr, traits::matches<qi::domain, Expr>()); + return r; + } + +#if defined(BOOST_NO_RVALUE_REFERENCES) + // non-const version needed to suppress proto's %= kicking in + template <typename Expr> + friend rule& operator%=(rule& r, Expr& expr) + { + return r %= static_cast<Expr const&>(expr); + } +#else + // for rvalue references + template <typename Expr> + friend rule& operator%=(rule& r, Expr&& expr) + { + define<mpl::true_>(r, expr, traits::matches<qi::domain, Expr>()); + return r; + } +#endif + +#else + // both friend functions have to be defined out of class as VC7.1 + // will complain otherwise + template <typename OutputIterator_, typename T1_, typename T2_ + , typename T3_, typename T4_, typename Expr> + friend rule<OutputIterator_, T1_, T2_, T3_, T4_>& operator%=( + rule<OutputIterator_, T1_, T2_, T3_, T4_>& r, Expr const& expr); + + // non-const version needed to suppress proto's %= kicking in + template <typename OutputIterator_, typename T1_, typename T2_ + , typename T3_, typename T4_, typename Expr> + friend rule<OutputIterator_, T1_, T2_, T3_, T4_>& operator%=( + rule<OutputIterator_, T1_, T2_, T3_, T4_>& r, Expr& expr); +#endif + + template <typename Context, typename Iterator_> + struct attribute + { + typedef attr_type type; + }; + + template <typename Context, typename Skipper, typename Attribute> + bool parse(Iterator& first, Iterator const& last + , Context& /*context*/, Skipper const& skipper + , Attribute& attr) const + { + if (f) + { + // do a preskip if this is an implied lexeme + if (is_same<skipper_type, unused_type>::value) + qi::skip_over(first, last, skipper); + + typedef traits::make_attribute<attr_type, Attribute> make_attribute; + + // do down-stream transformation, provides attribute for + // rhs parser + typedef traits::transform_attribute< + typename make_attribute::type, attr_type, domain> + transform; + + typename make_attribute::type made_attr = make_attribute::call(attr); + typename transform::type attr_ = transform::pre(made_attr); + + // If you are seeing a compilation error here, you are probably + // trying to use a rule or a grammar which has inherited + // attributes, without passing values for them. + context_type context(attr_); + + // If you are seeing a compilation error here stating that the + // fourth parameter can't be converted to a required target type + // then you are probably trying to use a rule or a grammar with + // an incompatible skipper type. + if (f(first, last, context, skipper)) + { + // do up-stream transformation, this integrates the results + // back into the original attribute value, if appropriate + traits::post_transform(attr, attr_); + return true; + } + + // inform attribute transformation of failed rhs + traits::fail_transform(attr, attr_); + } + return false; + } + + template <typename Context, typename Skipper + , typename Attribute, typename Params> + bool parse(Iterator& first, Iterator const& last + , Context& caller_context, Skipper const& skipper + , Attribute& attr, Params const& params) const + { + if (f) + { + // do a preskip if this is an implied lexeme + if (is_same<skipper_type, unused_type>::value) + qi::skip_over(first, last, skipper); + + typedef traits::make_attribute<attr_type, Attribute> make_attribute; + + // do down-stream transformation, provides attribute for + // rhs parser + typedef traits::transform_attribute< + typename make_attribute::type, attr_type, domain> + transform; + + typename make_attribute::type made_attr = make_attribute::call(attr); + typename transform::type attr_ = transform::pre(made_attr); + + // If you are seeing a compilation error here, you are probably + // trying to use a rule or a grammar which has inherited + // attributes, passing values of incompatible types for them. + context_type context(attr_, params, caller_context); + + // If you are seeing a compilation error here stating that the + // fourth parameter can't be converted to a required target type + // then you are probably trying to use a rule or a grammar with + // an incompatible skipper type. + if (f(first, last, context, skipper)) + { + // do up-stream transformation, this integrates the results + // back into the original attribute value, if appropriate + traits::post_transform(attr, attr_); + return true; + } + + // inform attribute transformation of failed rhs + traits::fail_transform(attr, attr_); + } + return false; + } + + template <typename Context> + info what(Context& /*context*/) const + { + return info(name_); + } + + reference_ alias() const + { + return reference_(*this); + } + + typename proto::terminal<this_type>::type copy() const + { + typename proto::terminal<this_type>::type result = {*this}; + return result; + } + + // bring in the operator() overloads + rule const& get_parameterized_subject() const { return *this; } + typedef rule parameterized_subject_type; + #include <boost/spirit/home/qi/nonterminal/detail/fcall.hpp> + + std::string name_; + function_type f; + }; + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1400) + template <typename OutputIterator_, typename T1_, typename T2_ + , typename T3_, typename T4_, typename Expr> + rule<OutputIterator_, T1_, T2_, T3_, T4_>& operator%=( + rule<OutputIterator_, T1_, T2_, T3_, T4_>& r, Expr const& expr) + { + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then the expression (expr) is not a valid spirit qi expression. + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Expr); + + typedef typename + rule<OutputIterator_, T1_, T2_, T3_, T4_>::encoding_modifier_type + encoding_modifier_type; + + r.f = detail::bind_parser<mpl::true_>( + compile<qi::domain>(expr, encoding_modifier_type())); + return r; + } + + template <typename Iterator_, typename T1_, typename T2_ + , typename T3_, typename T4_, typename Expr> + rule<Iterator_, T1_, T2_, T3_, T4_>& operator%=( + rule<Iterator_, T1_, T2_, T3_, T4_>& r, Expr& expr) + { + return r %= static_cast<Expr const&>(expr); + } +#endif +}}} + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template < + typename IteratorA, typename IteratorB, typename Attribute + , typename Context, typename T1, typename T2, typename T3, typename T4> + struct handles_container< + qi::rule<IteratorA, T1, T2, T3, T4>, Attribute, Context, IteratorB> + : traits::is_container< + typename attribute_of< + qi::rule<IteratorA, T1, T2, T3, T4>, Context, IteratorB + >::type + > + {}; +}}} + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/parse.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/parse.hpp new file mode 100644 index 0000000..261df75 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/parse.hpp @@ -0,0 +1,215 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + + 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_PARSE_APRIL_16_2006_0442PM) +#define BOOST_SPIRIT_PARSE_APRIL_16_2006_0442PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/context.hpp> +#include <boost/spirit/home/support/nonterminal/locals.hpp> +#include <boost/spirit/home/qi/detail/parse.hpp> +#include <boost/concept_check.hpp> + +namespace boost { namespace spirit { namespace qi +{ + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename Expr> + inline bool + parse( + Iterator& first + , Iterator last + , Expr const& expr) + { + // Make sure the iterator is at least a forward_iterator. If you got a + // compilation error here, then you are using an input_iterator while + // calling this function, you need to supply at least a + // forward_iterator instead. + BOOST_CONCEPT_ASSERT((ForwardIterator<Iterator>)); + + return detail::parse_impl<Expr>::call(first, last, expr); + } + + template <typename Iterator, typename Expr> + inline bool + parse( + Iterator const& first_ + , Iterator last + , Expr const& expr) + { + Iterator first = first_; + return qi::parse(first, last, expr); + } + + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + template <typename T> + struct make_context + { + typedef context<fusion::cons<T&>, locals<> > type; + }; + + template <> + struct make_context<unused_type> + { + typedef unused_type type; + }; + } + + template <typename Iterator, typename Expr, typename Attr> + inline bool + parse( + Iterator& first + , Iterator last + , Expr const& expr + , Attr& attr) + { + // Make sure the iterator is at least a forward_iterator. If you got a + // compilation error here, then you are using an input_iterator while + // calling this function, you need to supply at least a + // forward_iterator instead. + BOOST_CONCEPT_ASSERT((ForwardIterator<Iterator>)); + + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then the expression (expr) is not a valid spirit qi expression. + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Expr); + + typename detail::make_context<Attr>::type context(attr); + return compile<qi::domain>(expr).parse(first, last, context, unused, attr); + } + + template <typename Iterator, typename Expr, typename Attr> + inline bool + parse( + Iterator const& first_ + , Iterator last + , Expr const& expr + , Attr& attr) + { + Iterator first = first_; + return qi::parse(first, last, expr, attr); + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename Expr, typename Skipper> + inline bool + phrase_parse( + Iterator& first + , Iterator last + , Expr const& expr + , Skipper const& skipper + , BOOST_SCOPED_ENUM(skip_flag) post_skip = skip_flag::postskip) + { + // Make sure the iterator is at least a forward_iterator. If you got a + // compilation error here, then you are using an input_iterator while + // calling this function, you need to supply at least a + // forward_iterator instead. + BOOST_CONCEPT_ASSERT((ForwardIterator<Iterator>)); + + return detail::phrase_parse_impl<Expr>::call( + first, last, expr, skipper, post_skip); + } + + template <typename Iterator, typename Expr, typename Skipper> + inline bool + phrase_parse( + Iterator const& first_ + , Iterator last + , Expr const& expr + , Skipper const& skipper + , BOOST_SCOPED_ENUM(skip_flag) post_skip = skip_flag::postskip) + { + Iterator first = first_; + return qi::phrase_parse(first, last, expr, skipper, post_skip); + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename Expr, typename Skipper, typename Attr> + inline bool + phrase_parse( + Iterator& first + , Iterator last + , Expr const& expr + , Skipper const& skipper + , BOOST_SCOPED_ENUM(skip_flag) post_skip + , Attr& attr) + { + // Make sure the iterator is at least a forward_iterator. If you got a + // compilation error here, then you are using an input_iterator while + // calling this function, you need to supply at least a + // forward_iterator instead. + BOOST_CONCEPT_ASSERT((ForwardIterator<Iterator>)); + + // Report invalid expression error as early as possible. + // If you got an error_invalid_expression error message here, + // then either the expression (expr) or skipper is not a valid + // spirit qi expression. + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Expr); + BOOST_SPIRIT_ASSERT_MATCH(qi::domain, Skipper); + + typedef + typename result_of::compile<qi::domain, Skipper>::type + skipper_type; + skipper_type const skipper_ = compile<qi::domain>(skipper); + + typename detail::make_context<Attr>::type context(attr); + if (!compile<qi::domain>(expr).parse( + first, last, context, skipper_, attr)) + return false; + + if (post_skip == skip_flag::postskip) + qi::skip_over(first, last, skipper_); + return true; + } + + template <typename Iterator, typename Expr, typename Skipper, typename Attr> + inline bool + phrase_parse( + Iterator const& first_ + , Iterator last + , Expr const& expr + , Skipper const& skipper + , BOOST_SCOPED_ENUM(skip_flag) post_skip + , Attr& attr) + { + Iterator first = first_; + return qi::phrase_parse(first, last, expr, skipper, post_skip, attr); + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename Expr, typename Skipper, typename Attr> + inline bool + phrase_parse( + Iterator& first + , Iterator last + , Expr const& expr + , Skipper const& skipper + , Attr& attr) + { + return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip, attr); + } + + template <typename Iterator, typename Expr, typename Skipper, typename Attr> + inline bool + phrase_parse( + Iterator const& first_ + , Iterator last + , Expr const& expr + , Skipper const& skipper + , Attr& attr) + { + Iterator first = first_; + return qi::phrase_parse(first, last, expr, skipper, skip_flag::postskip, attr); + } +}}} + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/parser.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/parser.hpp new file mode 100644 index 0000000..ffd8bc9 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/parser.hpp @@ -0,0 +1,140 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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_OCTOBER_16_2008_0254PM) +#define BOOST_SPIRIT_PARSER_OCTOBER_16_2008_0254PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/mpl/has_xxx.hpp> +#include <boost/spirit/home/qi/domain.hpp> + +namespace boost { namespace spirit { namespace qi +{ + + //[parser_base_parser + template <typename Derived> + struct parser + { + struct parser_id; + typedef Derived derived_type; + typedef qi::domain domain; + + // Requirement: p.parse(f, l, context, skip, attr) -> bool + // + // p: a parser + // f, l: first/last iterator pair + // context: enclosing rule context (can be unused_type) + // skip: skipper (can be unused_type) + // attr: attribute (can be unused_type) + + // Requirement: p.what(context) -> info + // + // p: a parser + // context: enclosing rule context (can be unused_type) + + // Requirement: P::template attribute<Ctx, Iter>::type + // + // P: a parser type + // Ctx: A context type (can be unused_type) + // Iter: An iterator type (can be unused_type) + + Derived const& derived() const + { + return *static_cast<Derived const*>(this); + } + }; + //] + + template <typename Derived> + struct primitive_parser : parser<Derived> + { + struct primitive_parser_id; + }; + + template <typename Derived> + struct nary_parser : parser<Derived> + { + struct nary_parser_id; + + // Requirement: p.elements -> fusion sequence + // + // p: a composite parser + + // Requirement: P::elements_type -> fusion sequence + // + // P: a composite parser type + }; + + template <typename Derived> + struct unary_parser : parser<Derived> + { + struct unary_parser_id; + + // Requirement: p.subject -> subject parser + // + // p: a unary parser + + // Requirement: P::subject_type -> subject parser type + // + // P: a unary parser type + }; + + template <typename Derived> + struct binary_parser : parser<Derived> + { + struct binary_parser_id; + + // Requirement: p.left -> left parser + // + // p: a binary parser + + // Requirement: P::left_type -> left parser type + // + // P: a binary parser type + + // Requirement: p.right -> right parser + // + // p: a binary parser + + // Requirement: P::right_type -> right parser type + // + // P: a binary parser type + }; +}}} + +namespace boost { namespace spirit { namespace traits // classification +{ + namespace detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(parser_id) + BOOST_MPL_HAS_XXX_TRAIT_DEF(primitive_parser_id) + BOOST_MPL_HAS_XXX_TRAIT_DEF(nary_parser_id) + BOOST_MPL_HAS_XXX_TRAIT_DEF(unary_parser_id) + BOOST_MPL_HAS_XXX_TRAIT_DEF(binary_parser_id) + } + + // parser type identification + template <typename T> + struct is_parser : detail::has_parser_id<T> {}; + + template <typename T> + struct is_primitive_parser : detail::has_primitive_parser_id<T> {}; + + template <typename T> + struct is_nary_parser : detail::has_nary_parser_id<T> {}; + + template <typename T> + struct is_unary_parser : detail::has_unary_parser_id<T> {}; + + template <typename T> + struct is_binary_parser : detail::has_binary_parser_id<T> {}; + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/reference.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/reference.hpp new file mode 100644 index 0000000..f6fcabc --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/reference.hpp @@ -0,0 +1,69 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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_REFERENCE_OCTOBER_31_2008_1218AM) +#define BOOST_SPIRIT_REFERENCE_OCTOBER_31_2008_1218AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/qi/meta_compiler.hpp> +#include <boost/spirit/home/qi/parser.hpp> +#include <boost/spirit/home/support/info.hpp> +#include <boost/spirit/home/support/handles_container.hpp> +#include <boost/type_traits/remove_const.hpp> +#include <boost/ref.hpp> + +namespace boost { namespace spirit { namespace qi +{ + /////////////////////////////////////////////////////////////////////////// + // reference is a parser that references another parser (its Subject) + /////////////////////////////////////////////////////////////////////////// + template <typename Subject> + struct reference : parser<reference<Subject> > + { + typedef Subject subject_type; + + reference(Subject& subject) + : ref(subject) {} + + template <typename Context, typename Iterator> + struct attribute : Subject::template attribute<Context, Iterator> {}; + + template <typename Iterator, typename Context + , typename Skipper, typename Attribute> + bool parse(Iterator& first, Iterator const& last + , Context& context, Skipper const& skipper + , Attribute& attr) const + { + return ref.get().parse(first, last, context, skipper, attr); + } + + template <typename Context> + info what(Context& context) const + { + // the reference is transparent (does not add any info) + return ref.get().what(context); + } + + boost::reference_wrapper<Subject> ref; + }; +}}} + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + template <typename Subject, typename Attribute, typename Context + , typename Iterator> + struct handles_container<qi::reference<Subject>, Attribute, Context + , Iterator> + : handles_container<typename remove_const<Subject>::type + , Attribute, Context, Iterator> + {}; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/skip_flag.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/skip_flag.hpp new file mode 100644 index 0000000..28fd856 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/skip_flag.hpp @@ -0,0 +1,29 @@ +/*============================================================================= + Copyright (c) 2001-2011 Hartmut Kaiser + + 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_SKIP_FLAG_DEC_02_2009_0412PM) +#define BOOST_SPIRIT_SKIP_FLAG_DEC_02_2009_0412PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/detail/scoped_enum_emulation.hpp> + +namespace boost { namespace spirit { namespace qi +{ + /////////////////////////////////////////////////////////////////////////// + BOOST_SCOPED_ENUM_START(skip_flag) + { + postskip, // force post-skipping in phrase_parse() + dont_postskip // inhibit post-skipping in phrase_parse() + }; + BOOST_SCOPED_ENUM_END + +}}} + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/qi/skip_over.hpp b/3rdParty/Boost/src/boost/spirit/home/qi/skip_over.hpp new file mode 100644 index 0000000..f46b304 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/qi/skip_over.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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_SKIP_APRIL_16_2006_0625PM) +#define BOOST_SPIRIT_SKIP_APRIL_16_2006_0625PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/unused.hpp> +#include <boost/spirit/home/qi/detail/unused_skipper.hpp> + +namespace boost { namespace spirit { namespace qi +{ + /////////////////////////////////////////////////////////////////////////// + // Move the /first/ iterator to the first non-matching position + // given a skip-parser. The function is a no-op if unused_type is + // passed as the skip-parser. + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename T> + inline void skip_over(Iterator& first, Iterator const& last, T const& skipper) + { + while (first != last && skipper.parse(first, last, unused, unused, unused)) + /***/; + } + + template <typename Iterator> + inline void skip_over(Iterator&, Iterator const&, unused_type) + { + } + + template <typename Iterator, typename Skipper> + inline void skip_over(Iterator&, Iterator const& + , detail::unused_skipper<Skipper> const&) + { + } + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/argument.hpp b/3rdParty/Boost/src/boost/spirit/home/support/argument.hpp new file mode 100644 index 0000000..caeee0b --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/argument.hpp @@ -0,0 +1,217 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2011 Thomas Heller + + 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_ARGUMENT_FEBRUARY_17_2007_0339PM) +#define BOOST_SPIRIT_ARGUMENT_FEBRUARY_17_2007_0339PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/preprocessor/repetition/repeat_from_to.hpp> +#include <boost/preprocessor/arithmetic/inc.hpp> +#include <boost/spirit/include/phoenix_core.hpp> +#include <boost/spirit/home/support/assert_msg.hpp> +#include <boost/spirit/home/support/limits.hpp> +#include <boost/fusion/include/at.hpp> +#include <boost/fusion/include/size.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/at.hpp> + +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + +#define SPIRIT_DECLARE_ARG(z, n, data) \ + typedef phoenix::actor<argument<n> > \ + BOOST_PP_CAT(BOOST_PP_CAT(_, BOOST_PP_INC(n)), _type); \ + phoenix::actor<argument<n> > const \ + BOOST_PP_CAT(_, BOOST_PP_INC(n)) = \ + BOOST_PP_CAT(BOOST_PP_CAT(_, BOOST_PP_INC(n)), _type)(); \ + /***/ + +#define SPIRIT_USING_ARGUMENT(z, n, data) \ + using spirit::BOOST_PP_CAT(BOOST_PP_CAT(_, n), _type); \ + using spirit::BOOST_PP_CAT(_, n); \ + /***/ + +#else + +#define SPIRIT_DECLARE_ARG(z, n, data) \ + typedef phoenix::actor<argument<n> > \ + BOOST_PP_CAT(BOOST_PP_CAT(_, BOOST_PP_INC(n)), _type); \ + /***/ + +#define SPIRIT_USING_ARGUMENT(z, n, data) \ + using spirit::BOOST_PP_CAT(BOOST_PP_CAT(_, n), _type); \ + /***/ + +#endif + +namespace boost { namespace spirit +{ + template <int N> + struct argument; + + template <typename Dummy> + struct attribute_context; +}} + +BOOST_PHOENIX_DEFINE_CUSTOM_TERMINAL( + template <int N> + , boost::spirit::argument<N> + , mpl::false_ // is not nullary + , v2_eval( + proto::make< + boost::spirit::argument<N>() + > + , proto::call< + functional::env(proto::_state) + > + ) +) + +BOOST_PHOENIX_DEFINE_CUSTOM_TERMINAL( + template <typename Dummy> + , boost::spirit::attribute_context<Dummy> + , mpl::false_ // is not nullary + , v2_eval( + proto::make< + boost::spirit::attribute_context<Dummy>() + > + , proto::call< + functional::env(proto::_state) + > + ) +) + +namespace boost { namespace spirit +{ + namespace result_of + { + template <typename Sequence, int N> + struct get_arg + { + typedef typename + fusion::result_of::size<Sequence>::type + sequence_size; + + // report invalid argument not found (N is out of bounds) + BOOST_SPIRIT_ASSERT_MSG( + (N < sequence_size::value), + index_is_out_of_bounds, ()); + + typedef typename + fusion::result_of::at_c<Sequence, N>::type + type; + + static type call(Sequence& seq) + { + return fusion::at_c<N>(seq); + } + }; + + template <typename Sequence, int N> + struct get_arg<Sequence&, N> : get_arg<Sequence, N> + { + }; + } + + template <int N, typename T> + typename result_of::get_arg<T, N>::type + get_arg(T& val) + { + return result_of::get_arg<T, N>::call(val); + } + + template <typename> + struct attribute_context + { + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result + { + // FIXME: is this remove_const really necessary? + typedef typename + remove_const< + typename mpl::at_c<typename Env::args_type, 0>::type + >::type + type; + }; + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + return fusion::at_c<0>(env.args()); + } + }; + + template <int N> + struct argument + { + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result + { + typedef typename + mpl::at_c<typename Env::args_type, 0>::type + arg_type; + + typedef typename result_of::get_arg<arg_type, N>::type type; + }; + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + return get_arg<N>(fusion::at_c<0>(env.args())); + } + }; + + // _0 refers to the whole attribute as generated by the lhs parser + typedef phoenix::actor<attribute_context<void> > _0_type; +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + _0_type const _0 = _0_type(); +#endif + + // _1, _2, ... refer to the attributes of the single components the lhs + // parser is composed of + typedef phoenix::actor<argument<0> > _1_type; + typedef phoenix::actor<argument<1> > _2_type; + typedef phoenix::actor<argument<2> > _3_type; + +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + _1_type const _1 = _1_type(); + _2_type const _2 = _2_type(); + _3_type const _3 = _3_type(); +#endif + + // '_pass' may be used to make a match fail in retrospective + typedef phoenix::arg_names::_3_type _pass_type; +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + _pass_type const _pass = _pass_type(); +#endif + + // Bring in the rest of the arguments and attributes (_4 .. _N+1), using PP + BOOST_PP_REPEAT_FROM_TO( + 3, SPIRIT_ARGUMENTS_LIMIT, SPIRIT_DECLARE_ARG, _) + +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + // You can bring these in with the using directive + // without worrying about bringing in too much. + namespace labels + { + BOOST_PP_REPEAT(SPIRIT_ARGUMENTS_LIMIT, SPIRIT_USING_ARGUMENT, _) + } +#endif + +}} + +#undef SPIRIT_DECLARE_ARG +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/assert_msg.hpp b/3rdParty/Boost/src/boost/spirit/home/support/assert_msg.hpp new file mode 100644 index 0000000..db36072 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/assert_msg.hpp @@ -0,0 +1,31 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_ASSERT_MSG_JUN_23_2009_0836AM) +#define BOOST_SPIRIT_ASSERT_MSG_JUN_23_2009_0836AM + +#if defined(_MSC_VER) +#pragma once +#endif + +// Allow to work around the MPL problem in BOOST_MPL_ASSERT_MSG generating +// multiple definition linker errors for certain compilers (VC++) +#if BOOST_SPIRIT_DONT_USE_MPL_ASSERT_MSG != 0 +#include <boost/static_assert.hpp> +#define BOOST_SPIRIT_ASSERT_MSG(Cond, Msg, Types) \ + BOOST_STATIC_ASSERT(Cond) +#else +#include <boost/mpl/assert.hpp> +#define BOOST_SPIRIT_ASSERT_MSG(Cond, Msg, Types) \ + BOOST_MPL_ASSERT_MSG(Cond, Msg, Types) +#endif + +#define BOOST_SPIRIT_ASSERT_MATCH(Domain, Expr) \ + BOOST_SPIRIT_ASSERT_MSG(( \ + boost::spirit::traits::matches<Domain, Expr>::value \ + ), error_invalid_expression, (Expr)) + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/support/attributes.hpp b/3rdParty/Boost/src/boost/spirit/home/support/attributes.hpp new file mode 100644 index 0000000..48bff06 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/attributes.hpp @@ -0,0 +1,1358 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + + 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_ATTRIBUTES_JANUARY_29_2007_0954AM) +#define BOOST_SPIRIT_ATTRIBUTES_JANUARY_29_2007_0954AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/unused.hpp> +#include <boost/spirit/home/support/has_semantic_action.hpp> +#include <boost/spirit/home/support/attributes_fwd.hpp> +#include <boost/spirit/home/support/container.hpp> +#include <boost/spirit/home/support/detail/hold_any.hpp> +#include <boost/spirit/home/support/detail/as_variant.hpp> +#include <boost/optional/optional.hpp> +#include <boost/fusion/include/transform.hpp> +#include <boost/fusion/include/filter_if.hpp> +#include <boost/fusion/include/as_vector.hpp> +#include <boost/fusion/include/push_front.hpp> +#include <boost/fusion/include/pop_front.hpp> +#include <boost/fusion/include/is_sequence.hpp> +#include <boost/fusion/include/for_each.hpp> +#include <boost/fusion/include/is_view.hpp> +#include <boost/fusion/include/mpl.hpp> +#include <boost/foreach.hpp> +#include <boost/utility/value_init.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/is_convertible.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/end.hpp> +#include <boost/mpl/find_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/deref.hpp> +#include <boost/mpl/distance.hpp> +#include <boost/mpl/or.hpp> +#include <boost/mpl/has_xxx.hpp> +#include <boost/mpl/equal.hpp> +#include <boost/proto/proto_fwd.hpp> +#include <boost/utility/enable_if.hpp> +#include <boost/variant.hpp> +#include <boost/range/iterator_range.hpp> +#include <boost/config.hpp> +#include <vector> +#include <utility> +#include <ios> + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + // This file deals with attribute related functions and meta-functions + // including generalized attribute transformation utilities for Spirit + // components. + /////////////////////////////////////////////////////////////////////////// + + /////////////////////////////////////////////////////////////////////////// + // Find out if T can be a (strong) substitute for Expected attribute + namespace detail + { + template <typename T, typename Expected> + struct value_type_is_substitute + : is_substitute< + typename container_value<T>::type + , typename container_value<Expected>::type> + {}; + + template <typename T, typename Expected, typename Enable = void> + struct is_substitute_impl : is_same<T, Expected> {}; + + template <typename T, typename Expected> + struct is_substitute_impl<T, Expected, + typename enable_if< + mpl::and_< + fusion::traits::is_sequence<T>, + fusion::traits::is_sequence<Expected>, + mpl::equal<T, Expected, is_substitute<mpl::_1, mpl::_2> > + > + >::type> + : mpl::true_ {}; + + template <typename T, typename Expected> + struct is_substitute_impl<T, Expected, + typename enable_if< + mpl::and_< + is_container<T>, + is_container<Expected>, + detail::value_type_is_substitute<T, Expected> + > + >::type> + : mpl::true_ {}; + } + + template <typename T, typename Expected, typename Enable /*= void*/> + struct is_substitute + : detail::is_substitute_impl<T, Expected> {}; + + template <typename T, typename Expected> + struct is_substitute<optional<T>, optional<Expected> > + : is_substitute<T, Expected> {}; + + template <typename T> + struct is_substitute<T, T + , typename enable_if<not_is_optional<T> >::type> + : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + // Find out if T can be a weak substitute for Expected attribute + namespace detail + { + // A type, which is convertible to the attribute is at the same time + // usable as its weak substitute. + template <typename T, typename Expected, typename Enable = void> + struct is_weak_substitute_impl : is_convertible<T, Expected> {}; + +// // An exposed attribute is a weak substitute for a supplied container +// // attribute if it is a weak substitute for its value_type. This is +// // true as all character parsers are compatible with a container +// // attribute having the corresponding character type as its value_type. +// template <typename T, typename Expected> +// struct is_weak_substitute_for_value_type +// : is_weak_substitute<T, typename container_value<Expected>::type> +// {}; +// +// template <typename T, typename Expected> +// struct is_weak_substitute_impl<T, Expected, +// typename enable_if< +// mpl::and_< +// mpl::not_<is_string<T> > +// , is_string<Expected> +// , is_weak_substitute_for_value_type<T, Expected> > +// >::type> +// : mpl::true_ +// {}; + + // An exposed container attribute is a weak substitute for a supplied + // container attribute if and only if their value_types are weak + // substitutes. + template <typename T, typename Expected> + struct value_type_is_weak_substitute + : is_weak_substitute< + typename container_value<T>::type + , typename container_value<Expected>::type> + {}; + + template <typename T, typename Expected> + struct is_weak_substitute_impl<T, Expected, + typename enable_if< + mpl::and_< + is_container<T> + , is_container<Expected> + , value_type_is_weak_substitute<T, Expected> > + >::type> + : mpl::true_ {}; + + // Two fusion sequences are weak substitutes if and only if their + // elements are pairwise weak substitutes. + template <typename T, typename Expected> + struct is_weak_substitute_impl<T, Expected, + typename enable_if< + mpl::and_< + fusion::traits::is_sequence<T> + , fusion::traits::is_sequence<Expected> + , mpl::equal<T, Expected, is_weak_substitute<mpl::_1, mpl::_2> > > + >::type> + : mpl::true_ {}; + + // If this is not defined, the main template definition above will return + // true if T is convertible to the first type in a fusion::vector. We + // globally declare any non-Fusion sequence T as not compatible with any + // Fusion sequence 'Expected'. + template <typename T, typename Expected> + struct is_weak_substitute_impl<T, Expected, + typename enable_if< + mpl::and_< + mpl::not_<fusion::traits::is_sequence<T> > + , fusion::traits::is_sequence<Expected> > + >::type> + : mpl::false_ {}; + } + + // main template forwards to detail namespace, this helps older compilers + // to disambiguate things + template <typename T, typename Expected, typename Enable /*= void*/> + struct is_weak_substitute + : detail::is_weak_substitute_impl<T, Expected> {}; + + template <typename T, typename Expected> + struct is_weak_substitute<optional<T>, optional<Expected> > + : is_weak_substitute<T, Expected> {}; + + template <typename T, typename Expected> + struct is_weak_substitute<optional<T>, Expected> + : is_weak_substitute<T, Expected> {}; + + template <typename T, typename Expected> + struct is_weak_substitute<T, optional<Expected> > + : is_weak_substitute<T, Expected> {}; + +#define BOOST_SPIRIT_IS_WEAK_SUBSTITUTE(z, N, _) \ + is_weak_substitute<BOOST_PP_CAT(T, N), Expected>::type::value && \ + /***/ + + // make sure unused variant parameters do not affect the outcome + template <typename Expected> + struct is_weak_substitute<boost::detail::variant::void_, Expected> + : mpl::true_ + {}; + + template <BOOST_VARIANT_ENUM_PARAMS(typename T), typename Expected> + struct is_weak_substitute< + boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Expected> + : mpl::bool_<BOOST_PP_REPEAT(BOOST_VARIANT_LIMIT_TYPES + , BOOST_SPIRIT_IS_WEAK_SUBSTITUTE, _) true> + {}; + +#undef BOOST_SPIRIT_IS_WEAK_SUBSTITUTE + + template <typename T> + struct is_weak_substitute<T, T + , typename enable_if< + mpl::and_<not_is_optional<T>, not_is_variant<T> > + >::type> + : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Enable/* = void*/> + struct is_proxy : mpl::false_ {}; + + template <typename T> + struct is_proxy<T, + typename enable_if< + mpl::and_< + fusion::traits::is_sequence<T>, + fusion::traits::is_view<T> + > + >::type> + : mpl::true_ {}; + + namespace detail + { + // By declaring a nested struct in your class/struct, you tell + // spirit that it is regarded as a variant type. The minimum + // required interface for such a variant is that it has constructors + // for various types supported by your variant and a typedef 'types' + // which is an mpl sequence of the contained types. + // + // This is an intrusive interface. For a non-intrusive interface, + // use the not_is_variant trait. + BOOST_MPL_HAS_XXX_TRAIT_DEF(adapted_variant_tag) + } + + template <typename T, typename Domain, typename Enable/* = void*/> + struct not_is_variant + : mpl::not_<detail::has_adapted_variant_tag<T> > + {}; + + template <BOOST_VARIANT_ENUM_PARAMS(typename T), typename Domain> + struct not_is_variant<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Domain> + : mpl::false_ + {}; + + template <typename T, typename Domain> + struct not_is_variant<boost::optional<T>, Domain> + : not_is_variant<T, Domain> + {}; + + // we treat every type as if it where the variant (as this meta function is + // invoked for variant types only) + template <typename T> + struct variant_type + : mpl::identity<T> + {}; + + template <typename T> + struct variant_type<boost::optional<T> > + : variant_type<T> + {}; + + /////////////////////////////////////////////////////////////////////////// + // The compute_compatible_component_variant + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + // A component is compatible to a given Attribute type if the + // Attribute is the same as the expected type of the component or if + // it is convertible to the expected type. + template <typename Expected, typename Attribute> + struct attribute_is_compatible + : is_convertible<Attribute, Expected> + {}; + + template <typename Expected, typename Attribute> + struct attribute_is_compatible<Expected, boost::optional<Attribute> > + : is_convertible<Attribute, Expected> + {}; + + template <typename Container> + struct is_hold_any_container + : traits::is_hold_any<typename traits::container_value<Container>::type> + {}; + } + + template <typename Attribute, typename Expected + , typename IsNotVariant = mpl::false_, typename Enable = void> + struct compute_compatible_component_variant + : mpl::or_< + traits::detail::attribute_is_compatible<Expected, Attribute> + , traits::is_hold_any<Expected> + , mpl::eval_if< + is_container<Expected> + , traits::detail::is_hold_any_container<Expected> + , mpl::false_> > + {}; + + namespace detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(types) + } + + template <typename Variant, typename Expected> + struct compute_compatible_component_variant<Variant, Expected, mpl::false_ + , typename enable_if<detail::has_types<Variant> >::type> + { + typedef typename traits::variant_type<Variant>::type variant_type; + typedef typename variant_type::types types; + typedef typename mpl::end<types>::type end; + + typedef typename + mpl::find_if<types, is_same<Expected, mpl::_1> >::type + iter; + + typedef typename mpl::distance< + typename mpl::begin<types>::type, iter + >::type distance; + + // true_ if the attribute matches one of the types in the variant + typedef typename mpl::not_<is_same<iter, end> >::type type; + enum { value = type::value }; + + // return the type in the variant the attribute is compatible with + typedef typename + mpl::eval_if<type, mpl::deref<iter>, mpl::identity<unused_type> >::type + compatible_type; + + // return whether the given type is compatible with the Expected type + static bool is_compatible(int which) + { + return which == distance::value; + } + }; + + template <typename Expected, typename Attribute, typename Domain> + struct compute_compatible_component + : compute_compatible_component_variant<Attribute, Expected + , typename spirit::traits::not_is_variant<Attribute, Domain>::type> {}; + + template <typename Expected, typename Domain> + struct compute_compatible_component<Expected, unused_type, Domain> + : mpl::false_ {}; + + template <typename Attribute, typename Domain> + struct compute_compatible_component<unused_type, Attribute, Domain> + : mpl::false_ {}; + + template <typename Domain> + struct compute_compatible_component<unused_type, unused_type, Domain> + : mpl::false_ {}; + + /////////////////////////////////////////////////////////////////////////// + // return the type currently stored in the given variant + template <BOOST_VARIANT_ENUM_PARAMS(typename T)> + struct variant_which<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> > + { + static int call(boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> const& v) + { + return v.which(); + } + }; + + template <typename T> + int which(T const& v) + { + return variant_which<T>::call(v); + } + + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Domain, typename Enable/* = void*/> + struct not_is_optional + : mpl::true_ + {}; + + template <typename T, typename Domain> + struct not_is_optional<boost::optional<T>, Domain> + : mpl::false_ + {}; + + /////////////////////////////////////////////////////////////////////////// + // attribute_of + // + // Get the component's attribute + /////////////////////////////////////////////////////////////////////////// + template <typename Component + , typename Context = unused_type, typename Iterator = unused_type> + struct attribute_of + { + typedef typename Component::template + attribute<Context, Iterator>::type type; + }; + + /////////////////////////////////////////////////////////////////////////// + // attribute_not_unused + // + // An mpl meta-function class that determines whether a component's + // attribute is not unused. + /////////////////////////////////////////////////////////////////////////// + template <typename Context, typename Iterator = unused_type> + struct attribute_not_unused + { + template <typename Component> + struct apply + : not_is_unused<typename + attribute_of<Component, Context, Iterator>::type> + {}; + }; + + /////////////////////////////////////////////////////////////////////////// + // Retrieve the attribute type to use from the given type + // + // This is needed to extract the correct attribute type from proxy classes + // as utilized in FUSION_ADAPT_ADT et. al. + /////////////////////////////////////////////////////////////////////////// + template <typename Attribute, typename Enable/* = void*/> + struct attribute_type : mpl::identity<Attribute> {}; + + /////////////////////////////////////////////////////////////////////////// + // Retrieve the size of a fusion sequence (compile time) + /////////////////////////////////////////////////////////////////////////// + template <typename T> + struct sequence_size + : fusion::result_of::size<T> + {}; + + template <> + struct sequence_size<unused_type> + : mpl::int_<0> + {}; + + /////////////////////////////////////////////////////////////////////////// + // Retrieve the size of an attribute (runtime) + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + template <typename Attribute, typename Enable = void> + struct attribute_size_impl + { + typedef std::size_t type; + + static type call(Attribute const&) + { + return 1; + } + }; + + template <typename Attribute> + struct attribute_size_impl<Attribute + , typename enable_if< + mpl::and_< + fusion::traits::is_sequence<Attribute> + , mpl::not_<traits::is_container<Attribute> > + > + >::type> + { + typedef typename fusion::result_of::size<Attribute>::value_type type; + + static type call(Attribute const& attr) + { + return fusion::size(attr); + } + }; + + template <typename Attribute> + struct attribute_size_impl<Attribute + , typename enable_if< + mpl::and_< + traits::is_container<Attribute> + , mpl::not_<traits::is_iterator_range<Attribute> > + > + >::type> + { + typedef typename Attribute::size_type type; + + static type call(Attribute const& attr) + { + return attr.size(); + } + }; + } + + template <typename Attribute, typename Enable/* = void*/> + struct attribute_size + : detail::attribute_size_impl<Attribute> + {}; + + template <typename Attribute> + struct attribute_size<optional<Attribute> > + { + typedef typename attribute_size<Attribute>::type type; + + static type call(optional<Attribute> const& val) + { + if (!val) + return 0; + return val.get(); + } + }; + + template <typename Iterator> + struct attribute_size<iterator_range<Iterator> > + { + typedef typename boost::detail::iterator_traits<Iterator>:: + difference_type type; + + static type call(iterator_range<Iterator> const& r) + { + return boost::detail::distance(r.begin(), r.end()); + } + }; + + template <> + struct attribute_size<unused_type> + { + typedef std::size_t type; + + static type call(unused_type) + { + return 0; + } + }; + + template <typename Attribute> + typename attribute_size<Attribute>::type + size (Attribute const& attr) + { + return attribute_size<Attribute>::call(attr); + } + + /////////////////////////////////////////////////////////////////////////// + // pass_attribute + // + // Determines how we pass attributes to semantic actions. This + // may be specialized. By default, all attributes are wrapped in + // a fusion sequence, because the attribute has to be treated as being + // a single value in any case (even if it actually already is a fusion + // sequence in its own). + /////////////////////////////////////////////////////////////////////////// + template <typename Component, typename Attribute, typename Enable/* = void*/> + struct pass_attribute + { + typedef fusion::vector1<Attribute&> type; + }; + + /////////////////////////////////////////////////////////////////////////// + // Subclass a pass_attribute specialization from this to wrap + // the attribute in a tuple only IFF it is not already a fusion tuple. + /////////////////////////////////////////////////////////////////////////// + template <typename Attribute, typename Force = mpl::false_> + struct wrap_if_not_tuple + : mpl::if_< + fusion::traits::is_sequence<Attribute> + , Attribute&, fusion::vector1<Attribute&> > + {}; + + template <typename Attribute> + struct wrap_if_not_tuple<Attribute, mpl::true_> + { + typedef fusion::vector1<Attribute&> type; + }; + + template <> + struct wrap_if_not_tuple<unused_type, mpl::false_> + { + typedef unused_type type; + }; + + template <> + struct wrap_if_not_tuple<unused_type const, mpl::false_> + { + typedef unused_type type; + }; + + /////////////////////////////////////////////////////////////////////////// + // build_optional + // + // Build a boost::optional from T. Return unused_type if T is unused_type. + /////////////////////////////////////////////////////////////////////////// + template <typename T> + struct build_optional + { + typedef boost::optional<T> type; + }; + + template <typename T> + struct build_optional<boost::optional<T> > + { + typedef boost::optional<T> type; + }; + + template <> + struct build_optional<unused_type> + { + typedef unused_type type; + }; + + /////////////////////////////////////////////////////////////////////////// + // build_std_vector + // + // Build a std::vector from T. Return unused_type if T is unused_type. + /////////////////////////////////////////////////////////////////////////// + template <typename T> + struct build_std_vector + { + typedef std::vector<T> type; + }; + + template <> + struct build_std_vector<unused_type> + { + typedef unused_type type; + }; + + /////////////////////////////////////////////////////////////////////////// + // filter_unused_attributes + // + // Remove unused_types from a sequence + /////////////////////////////////////////////////////////////////////////// + + // Compute the list of all *used* attributes of sub-components + // (filter all unused attributes from the list) + template <typename Sequence> + struct filter_unused_attributes + : fusion::result_of::filter_if<Sequence, not_is_unused<mpl::_> > + {}; + + /////////////////////////////////////////////////////////////////////////// + // sequence_attribute_transform + // + // This transform is invoked for every attribute in a sequence allowing + // to modify the attribute type exposed by a component to the enclosing + // sequence component. By default no transformation is performed. + /////////////////////////////////////////////////////////////////////////// + template <typename Attribute, typename Domain> + struct sequence_attribute_transform + : mpl::identity<Attribute> + {}; + + /////////////////////////////////////////////////////////////////////////// + // permutation_attribute_transform + // + // This transform is invoked for every attribute in a sequence allowing + // to modify the attribute type exposed by a component to the enclosing + // permutation component. By default a build_optional transformation is + // performed. + /////////////////////////////////////////////////////////////////////////// + template <typename Attribute, typename Domain> + struct permutation_attribute_transform + : traits::build_optional<Attribute> + {}; + + /////////////////////////////////////////////////////////////////////////// + // sequential_or_attribute_transform + // + // This transform is invoked for every attribute in a sequential_or allowing + // to modify the attribute type exposed by a component to the enclosing + // sequential_or component. By default a build_optional transformation is + // performed. + /////////////////////////////////////////////////////////////////////////// + template <typename Attribute, typename Domain> + struct sequential_or_attribute_transform + : traits::build_optional<Attribute> + {}; + + /////////////////////////////////////////////////////////////////////////// + // build_fusion_vector + // + // Build a fusion vector from a fusion sequence. All unused attributes + // are filtered out. If the result is empty after the removal of unused + // types, return unused_type. If the input sequence is an unused_type, + // also return unused_type. + /////////////////////////////////////////////////////////////////////////// + template <typename Sequence> + struct build_fusion_vector + { + // Remove all unused attributes + typedef typename + filter_unused_attributes<Sequence>::type + filtered_attributes; + + // Build a fusion vector from a fusion sequence (Sequence), + // But *only if* the sequence is not empty. i.e. if the + // sequence is empty, our result will be unused_type. + + typedef typename + mpl::eval_if< + fusion::result_of::empty<filtered_attributes> + , mpl::identity<unused_type> + , fusion::result_of::as_vector<filtered_attributes> + >::type + type; + }; + + template <> + struct build_fusion_vector<unused_type> + { + typedef unused_type type; + }; + + /////////////////////////////////////////////////////////////////////////// + // build_attribute_sequence + // + // Build a fusion sequence attribute sequence from a sequence of + // components. Transform<T>::type is called on each element. + /////////////////////////////////////////////////////////////////////////// + template <typename Sequence, typename Context + , template <typename T, typename D> class Transform + , typename Iterator = unused_type, typename Domain = unused_type> + struct build_attribute_sequence + { + struct element_attribute + { + template <typename T> + struct result; + + template <typename F, typename Element> + struct result<F(Element)> + { + typedef typename + Transform< + typename attribute_of<Element, Context, Iterator>::type + , Domain + >::type + type; + }; + + // never called, but needed for decltype-based result_of (C++0x) +#ifndef BOOST_NO_RVALUE_REFERENCES + template <typename Element> + typename result<element_attribute(Element)>::type + operator()(Element&&) const; +#endif + }; + + // Compute the list of attributes of all sub-components + typedef typename + fusion::result_of::transform<Sequence, element_attribute>::type + type; + }; + + /////////////////////////////////////////////////////////////////////////// + // has_no_unused + // + // Test if there are no unused attributes in Sequence + /////////////////////////////////////////////////////////////////////////// + template <typename Sequence> + struct has_no_unused + : is_same< + typename mpl::find_if<Sequence, is_same<mpl::_, unused_type> >::type + , typename mpl::end<Sequence>::type> + {}; + + namespace detail + { + template <typename Sequence, bool no_unused + , int size = mpl::size<Sequence>::value> + struct build_collapsed_variant; + + // N element case, no unused + template <typename Sequence, int size> + struct build_collapsed_variant<Sequence, true, size> + : spirit::detail::as_variant<Sequence> {}; + + // N element case with unused + template <typename Sequence, int size> + struct build_collapsed_variant<Sequence, false, size> + { + typedef boost::optional< + typename spirit::detail::as_variant< + typename fusion::result_of::pop_front<Sequence>::type + >::type + > type; + }; + + // 1 element case, no unused + template <typename Sequence> + struct build_collapsed_variant<Sequence, true, 1> + : mpl::front<Sequence> {}; + + // 1 element case, with unused + template <typename Sequence> + struct build_collapsed_variant<Sequence, false, 1> + : mpl::front<Sequence> {}; + + // 2 element case, no unused + template <typename Sequence> + struct build_collapsed_variant<Sequence, true, 2> + : spirit::detail::as_variant<Sequence> {}; + + // 2 element case, with unused + template <typename Sequence> + struct build_collapsed_variant<Sequence, false, 2> + { + typedef boost::optional< + typename mpl::deref< + typename mpl::next< + typename mpl::begin<Sequence>::type + >::type + >::type + > + type; + }; + } + + /////////////////////////////////////////////////////////////////////////// + // alternative_attribute_transform + // + // This transform is invoked for every attribute in an alternative allowing + // to modify the attribute type exposed by a component to the enclosing + // alternative component. By default no transformation is performed. + /////////////////////////////////////////////////////////////////////////// + template <typename Attribute, typename Domain> + struct alternative_attribute_transform + : mpl::identity<Attribute> + {}; + + /////////////////////////////////////////////////////////////////////////// + // build_variant + // + // Build a boost::variant from a fusion sequence. build_variant makes sure + // that 1) all attributes in the variant are unique 2) puts the unused + // attribute, if there is any, to the front and 3) collapses single element + // variants, variant<T> to T. + /////////////////////////////////////////////////////////////////////////// + template <typename Sequence> + struct build_variant + { + // Remove all unused attributes. + typedef typename + filter_unused_attributes<Sequence>::type + filtered_attributes; + + typedef has_no_unused<Sequence> no_unused; + + // If the original attribute list does not contain any unused + // attributes, it is used, otherwise a single unused_type is + // pushed to the front of the list. This is to make sure that if + // there is an unused_type in the list, it is the first one. + typedef typename + mpl::eval_if< + no_unused, + mpl::identity<Sequence>, + fusion::result_of::push_front<filtered_attributes, unused_type> + >::type + attribute_sequence; + + // Make sure each of the types occur only once in the type list + typedef typename + mpl::fold< + attribute_sequence, mpl::vector<>, + mpl::if_< + mpl::contains<mpl::_1, mpl::_2>, + mpl::_1, mpl::push_back<mpl::_1, mpl::_2> + > + >::type + no_duplicates; + + // If there is only one type in the list of types we strip off the + // variant. IOTW, collapse single element variants, variant<T> to T. + // Take note that this also collapses variant<unused_type, T> to T. + typedef typename + traits::detail::build_collapsed_variant< + no_duplicates, no_unused::value>::type + type; + }; + + /////////////////////////////////////////////////////////////////////////// + // transform_attribute + // + // Sometimes the user needs to transform the attribute types for certain + // attributes. This template can be used as a customization point, where + // the user is able specify specific transformation rules for any attribute + // type. + /////////////////////////////////////////////////////////////////////////// + template <typename Exposed, typename Transformed, typename Domain + , typename Enable/* = void*/> + struct transform_attribute; + + /////////////////////////////////////////////////////////////////////////// + template <typename Domain, typename Transformed, typename Exposed> + typename spirit::result_of::pre_transform<Exposed, Transformed, Domain>::type + pre_transform(Exposed& attr BOOST_PROTO_DISABLE_IF_IS_CONST(Exposed)) + { + return transform_attribute<Exposed, Transformed, Domain>::pre(attr); + } + + template <typename Domain, typename Transformed, typename Exposed> + typename spirit::result_of::pre_transform<Exposed const, Transformed, Domain>::type + pre_transform(Exposed const& attr) + { + return transform_attribute<Exposed const, Transformed, Domain>::pre(attr); + } + + /////////////////////////////////////////////////////////////////////////// + // make_attribute + // + // All parsers and generators have specific attribute types. + // Spirit parsers and generators are passed an attribute; these are either + // references to the expected type, or an unused_type -- to flag that we do + // not care about the attribute. For semantic actions, however, we need to + // have a real value to pass to the semantic action. If the client did not + // provide one, we will have to synthesize the value. This class takes care + // of that. *Note that this behavior has changed. From Boost 1.47, semantic + // actions always take in the passed attribute as-is if the PP constant: + // BOOST_SPIRIT_ACTIONS_ALLOW_ATTR_COMPAT is defined. + /////////////////////////////////////////////////////////////////////////// + template <typename Attribute, typename ActualAttribute> + struct make_attribute + { + typedef typename remove_const<Attribute>::type attribute_type; + typedef typename + mpl::if_< + is_same<typename remove_const<ActualAttribute>::type, unused_type> + , attribute_type + , ActualAttribute&>::type + type; + + typedef typename + mpl::if_< + is_same<typename remove_const<ActualAttribute>::type, unused_type> + , attribute_type + , ActualAttribute>::type + value_type; + + static Attribute call(unused_type) + { + // synthesize the attribute/parameter + return boost::get(value_initialized<attribute_type>()); + } + + template <typename T> + static T& call(T& value) + { + return value; // just pass the one provided + } + }; + + template <typename Attribute, typename ActualAttribute> + struct make_attribute<Attribute&, ActualAttribute> + : make_attribute<Attribute, ActualAttribute> + {}; + + template <typename Attribute, typename ActualAttribute> + struct make_attribute<Attribute const&, ActualAttribute> + : make_attribute<Attribute const, ActualAttribute> + {}; + + template <typename ActualAttribute> + struct make_attribute<unused_type, ActualAttribute> + { + typedef unused_type type; + typedef unused_type value_type; + static unused_type call(unused_type) + { + return unused; + } + }; + + /////////////////////////////////////////////////////////////////////////// + // swap_impl + // + // Swap (with proper handling of unused_types) + /////////////////////////////////////////////////////////////////////////// + template <typename A, typename B> + void swap_impl(A& a, B& b) + { + A temp = a; + a = b; + b = temp; + } + + template <typename T> + void swap_impl(T& a, T& b) + { + using namespace std; + swap(a, b); + } + + template <typename A> + void swap_impl(A&, unused_type) + { + } + + template <typename A> + void swap_impl(unused_type, A&) + { + } + + inline void swap_impl(unused_type, unused_type) + { + } + + /////////////////////////////////////////////////////////////////////////// + // Strips single element fusion vectors into its 'naked' + // form: vector<T> --> T + /////////////////////////////////////////////////////////////////////////// + template <typename T> + struct strip_single_element_vector + { + typedef T type; + }; + + template <typename T> + struct strip_single_element_vector<fusion::vector1<T> > + { + typedef T type; + }; + + template <typename T> + struct strip_single_element_vector<fusion::vector<T> > + { + typedef T type; + }; + + /////////////////////////////////////////////////////////////////////////// + // meta function to return whether the argument is a one element fusion + // sequence + /////////////////////////////////////////////////////////////////////////// + template <typename T + , bool IsFusionSeq = fusion::traits::is_sequence<T>::value + , bool IsProtoExpr = proto::is_expr<T>::value> + struct one_element_sequence + : mpl::false_ + {}; + + template <typename T> + struct one_element_sequence<T, true, false> + : mpl::bool_<mpl::size<T>::value == 1> + {}; + + /////////////////////////////////////////////////////////////////////////// + // clear + // + // Clear data efficiently + /////////////////////////////////////////////////////////////////////////// + template <typename T> + void clear(T& val); + + namespace detail + { + // this is used by the variant and fusion sequence dispatch + struct clear_visitor : static_visitor<> + { + template <typename T> + void operator()(T& val) const + { + spirit::traits::clear(val); + } + }; + + // default + template <typename T> + void clear_impl2(T& val, mpl::false_) + { + val = T(); + } + + // for fusion sequences + template <typename T> + void clear_impl2(T& val, mpl::true_) + { + fusion::for_each(val, clear_visitor()); + } + + // dispatch default or fusion sequence + template <typename T> + void clear_impl(T& val, mpl::false_) + { + clear_impl2(val, fusion::traits::is_sequence<T>()); + } + + // STL containers + template <typename T> + void clear_impl(T& val, mpl::true_) + { + val.clear(); + } + } + + template <typename T, typename Enable/* = void*/> + struct clear_value + { + static void call(T& val) + { + detail::clear_impl(val, typename is_container<T>::type()); + } + }; + + // optionals + template <typename T> + struct clear_value<boost::optional<T> > + { + static void call(boost::optional<T>& val) + { + if (val) + val = none_t(); // leave optional uninitialized + } + }; + + // variants + template <BOOST_VARIANT_ENUM_PARAMS(typename T)> + struct clear_value<variant<BOOST_VARIANT_ENUM_PARAMS(T)> > + { + static void call(variant<BOOST_VARIANT_ENUM_PARAMS(T)>& val) + { + apply_visitor(detail::clear_visitor(), val); + } + }; + + // iterator range + template <typename T> + struct clear_value<iterator_range<T> > + { + static void call(iterator_range<T>& val) + { + val = iterator_range<T>(val.end(), val.end()); + } + }; + + // main dispatch + template <typename T> + void clear(T& val) + { + clear_value<T>::call(val); + } + + // for unused + inline void clear(unused_type) + { + } + + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + template <typename Out> + struct print_fusion_sequence + { + print_fusion_sequence(Out& out) + : out(out), is_first(true) {} + + typedef void result_type; + + template <typename T> + void operator()(T const& val) const + { + if (is_first) + is_first = false; + else + out << ", "; + spirit::traits::print_attribute(out, val); + } + + Out& out; + mutable bool is_first; + }; + + // print elements in a variant + template <typename Out> + struct print_visitor : static_visitor<> + { + print_visitor(Out& out) : out(out) {} + + template <typename T> + void operator()(T const& val) const + { + spirit::traits::print_attribute(out, val); + } + + Out& out; + }; + } + + template <typename Out, typename T, typename Enable> + struct print_attribute_debug + { + // for plain data types + template <typename T_> + static void call_impl3(Out& out, T_ const& val, mpl::false_) + { + out << val; + } + + // for fusion data types + template <typename T_> + static void call_impl3(Out& out, T_ const& val, mpl::true_) + { + out << '['; + fusion::for_each(val, detail::print_fusion_sequence<Out>(out)); + out << ']'; + } + + // non-stl container + template <typename T_> + static void call_impl2(Out& out, T_ const& val, mpl::false_) + { + call_impl3(out, val, fusion::traits::is_sequence<T_>()); + } + + // stl container + template <typename T_> + static void call_impl2(Out& out, T_ const& val, mpl::true_) + { + out << '['; + if (!traits::is_empty(val)) + { + bool first = true; + typename container_iterator<T_ const>::type iend = traits::end(val); + for (typename container_iterator<T_ const>::type i = traits::begin(val); + !traits::compare(i, iend); traits::next(i)) + { + if (!first) + out << ", "; + first = false; + spirit::traits::print_attribute(out, traits::deref(i)); + } + } + out << ']'; + } + + // for variant types + template <typename T_> + static void call_impl(Out& out, T_ const& val, mpl::false_) + { + apply_visitor(detail::print_visitor<Out>(out), val); + } + + // for non-variant types + template <typename T_> + static void call_impl(Out& out, T_ const& val, mpl::true_) + { + call_impl2(out, val, is_container<T_>()); + } + + // main entry point + static void call(Out& out, T const& val) + { + call_impl(out, val, not_is_variant<T>()); + } + }; + + template <typename Out, typename T> + struct print_attribute_debug<Out, boost::optional<T> > + { + static void call(Out& out, boost::optional<T> const& val) + { + if (val) + spirit::traits::print_attribute(out, *val); + else + out << "[empty]"; + } + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename Out, typename T> + inline void print_attribute(Out& out, T const& val) + { + print_attribute_debug<Out, T>::call(out, val); + } + + template <typename Out> + inline void print_attribute(Out&, unused_type) + { + } + + /////////////////////////////////////////////////////////////////////////// + // generate debug output for lookahead token (character) stream + namespace detail + { + struct token_printer_debug_for_chars + { + template<typename Out, typename Char> + static void print(Out& o, Char c) + { + using namespace std; // allow for ADL to find the proper iscntrl + + if (c == static_cast<Char>('\a')) + o << "\\a"; + else if (c == static_cast<Char>('\b')) + o << "\\b"; + else if (c == static_cast<Char>('\f')) + o << "\\f"; + else if (c == static_cast<Char>('\n')) + o << "\\n"; + else if (c == static_cast<Char>('\r')) + o << "\\r"; + else if (c == static_cast<Char>('\t')) + o << "\\t"; + else if (c == static_cast<Char>('\v')) + o << "\\v"; + else if (c >= 0 && c < 127 && iscntrl(c)) + o << "\\" << std::oct << 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_debug + { + template<typename Out, typename T> + static void print(Out& o, T const& val) + { + o << val; + } + }; + } + + template <typename T, typename Enable> + struct token_printer_debug + : mpl::if_< + mpl::and_< + is_convertible<T, char>, is_convertible<char, T> > + , detail::token_printer_debug_for_chars + , detail::token_printer_debug>::type + {}; + + template <typename Out, typename T> + inline void print_token(Out& out, T const& val) + { + // allow to customize the token printer routine + token_printer_debug<T>::print(out, val); + } +}}} + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { namespace result_of +{ + template <typename Exposed, typename Transformed, typename Domain> + struct pre_transform + : traits::transform_attribute<Exposed, Transformed, Domain> + {}; +}}} + + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/attributes_fwd.hpp b/3rdParty/Boost/src/boost/spirit/home/support/attributes_fwd.hpp new file mode 100644 index 0000000..6086d37 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/attributes_fwd.hpp @@ -0,0 +1,297 @@ +/*============================================================================= + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2010 Bryce Lelbach + + 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_ATTRIBUTES_FWD_OCT_01_2009_0715AM) +#define BOOST_SPIRIT_ATTRIBUTES_FWD_OCT_01_2009_0715AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/config.hpp> +#if (defined(__GNUC__) && (__GNUC__ < 4)) || \ + (defined(__APPLE__) && defined(__INTEL_COMPILER)) +#include <boost/utility/enable_if.hpp> +#endif +#include <boost/spirit/home/support/unused.hpp> + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { namespace result_of +{ + // forward declaration only + template <typename Exposed, typename Attribute> + struct extract_from; + + template <typename T, typename Attribute> + struct attribute_as; + + template <typename Exposed, typename Transformed, typename Domain> + struct pre_transform; + + template <typename T> + struct optional_value; + + template <typename Container> + struct begin; + + template <typename Container> + struct end; + + template <typename Iterator> + struct deref; +}}} + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + // Find out if T can be a strong substitute for Expected attribute + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Expected, typename Enable = void> + struct is_substitute; + + /////////////////////////////////////////////////////////////////////////// + // Find out if T can be a weak substitute for Expected attribute + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Expected, typename Enable = void> + struct is_weak_substitute; + + /////////////////////////////////////////////////////////////////////////// + // Determine if T is a proxy + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Enable = void> + struct is_proxy; + + /////////////////////////////////////////////////////////////////////////// + // Retrieve the attribute type to use from the given type + // + // This is needed to extract the correct attribute type from proxy classes + // as utilized in FUSION_ADAPT_ADT et. al. + /////////////////////////////////////////////////////////////////////////// + template <typename Attribute, typename Enable = void> + struct attribute_type; + + /////////////////////////////////////////////////////////////////////////// + // Retrieve the size of a fusion sequence (compile time) + /////////////////////////////////////////////////////////////////////////// + template <typename T> + struct sequence_size; + + /////////////////////////////////////////////////////////////////////////// + // Retrieve the size of an attribute (runtime) + /////////////////////////////////////////////////////////////////////////// + template <typename Attribute, typename Enable = void> + struct attribute_size; + + template <typename Attribute> + typename attribute_size<Attribute>::type + size(Attribute const& attr); + + /////////////////////////////////////////////////////////////////////////// + // Determines how we pass attributes to semantic actions. This + // may be specialized. By default, all attributes are wrapped in + // a fusion sequence, because the attribute has to be treated as being + // a single value in any case (even if it actually already is a fusion + // sequence in its own). + /////////////////////////////////////////////////////////////////////////// + template <typename Component, typename Attribute, typename Enable = void> + struct pass_attribute; + + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Enable = void> + struct optional_attribute; + + /////////////////////////////////////////////////////////////////////////// + // Sometimes the user needs to transform the attribute types for certain + // attributes. This template can be used as a customization point, where + // the user is able specify specific transformation rules for any attribute + // type. + /////////////////////////////////////////////////////////////////////////// + template <typename Exposed, typename Transformed, typename Domain + , typename Enable = void> + struct transform_attribute; + + /////////////////////////////////////////////////////////////////////////// + // Qi only + template <typename Attribute, typename Iterator, typename Enable = void> + struct assign_to_attribute_from_iterators; + + template <typename Iterator, typename Attribute> + void assign_to(Iterator const& first, Iterator const& last, Attribute& attr); + + template <typename Iterator> + void assign_to(Iterator const&, Iterator const&, unused_type); + + template <typename Attribute, typename T, typename Enable = void> + struct assign_to_attribute_from_value; + + template <typename Attribute, typename T, typename Enable = void> + struct assign_to_container_from_value; + + template <typename T, typename Attribute> + void assign_to(T const& val, Attribute& attr); + + template <typename T> + void assign_to(T const&, unused_type); + + /////////////////////////////////////////////////////////////////////////// + // Karma only + template <typename Attribute, typename Exposed, typename Enable = void> + struct extract_from_attribute; + + template <typename Attribute, typename Exposed, typename Enable = void> + struct extract_from_container; + + template <typename Exposed, typename Attribute, typename Context> + typename spirit::result_of::extract_from<Exposed, Attribute>::type + extract_from(Attribute const& attr, Context& ctx +#if (defined(__GNUC__) && (__GNUC__ < 4)) || \ + (defined(__APPLE__) && defined(__INTEL_COMPILER)) + , typename enable_if<traits::not_is_unused<Attribute> >::type* = NULL +#endif + ); + + /////////////////////////////////////////////////////////////////////////// + // Karma only + template <typename T, typename Attribute, typename Enable = void> + struct attribute_as; + + template <typename T, typename Attribute> + typename spirit::result_of::attribute_as<T, Attribute>::type + as(Attribute const& attr); + + template <typename T, typename Attribute> + bool valid_as(Attribute const& attr); + + /////////////////////////////////////////////////////////////////////////// + // return the type currently stored in the given variant + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Enable = void> + struct variant_which; + + template <typename T> + int which(T const& v); + + /////////////////////////////////////////////////////////////////////////// + // Determine, whether T is a variant like type + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Domain = unused_type, typename Enable = void> + struct not_is_variant; + + /////////////////////////////////////////////////////////////////////////// + // Determine, whether T is a variant like type + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Domain = unused_type, typename Enable = void> + struct not_is_optional; + + /////////////////////////////////////////////////////////////////////////// + // Clear data efficiently + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Enable = void> + struct clear_value; + + /////////////////////////////////////////////////////////////////////// + // Determine the value type of the given container type + /////////////////////////////////////////////////////////////////////// + template <typename Container, typename Enable = void> + struct container_value; + + template <typename Container, typename Enable = void> + struct container_iterator; + + template <typename T, typename Enable = void> + struct is_container; + + template <typename T, typename Enable = void> + struct is_iterator_range; + + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Attribute, typename Context = unused_type + , typename Iterator = unused_type, typename Enable = void> + struct handles_container; + + template <typename Container, typename ValueType, typename Attribute + , typename Sequence, typename Domain, typename Enable = void> + struct pass_through_container; + + /////////////////////////////////////////////////////////////////////////// + // Qi only + template <typename Container, typename T, typename Enable = void> + struct push_back_container; + + template <typename Container, typename Enable = void> + struct is_empty_container; + + template <typename Container, typename Enable = void> + struct make_container_attribute; + + /////////////////////////////////////////////////////////////////////// + // Determine the iterator type of the given container type + // Karma only + /////////////////////////////////////////////////////////////////////// + template <typename Container, typename Enable = void> + struct begin_container; + + template <typename Container, typename Enable = void> + struct end_container; + + template <typename Iterator, typename Enable = void> + struct deref_iterator; + + template <typename Iterator, typename Enable = void> + struct next_iterator; + + template <typename Iterator, typename Enable = void> + struct compare_iterators; + + /////////////////////////////////////////////////////////////////////////// + // Print the given attribute of type T to the stream given as Out + /////////////////////////////////////////////////////////////////////////// + template <typename Out, typename T, typename Enable = void> + struct print_attribute_debug; + + template <typename Out, typename T> + void print_attribute(Out&, T const&); + + template <typename Out> + void print_attribute(Out&, unused_type); + + /////////////////////////////////////////////////////////////////////////// + template <typename Char, typename Enable = void> + struct token_printer_debug; + + template<typename Out, typename T> + void print_token(Out&, T const&); + + /////////////////////////////////////////////////////////////////////////// + // Access attributes from a karma symbol table + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Attribute, typename Enable = void> + struct symbols_lookup; + + template <typename Attribute, typename T, typename Enable = void> + struct symbols_value; + + /////////////////////////////////////////////////////////////////////////// + // transform attribute types exposed from compound operator components + /////////////////////////////////////////////////////////////////////////// + template <typename Attribute, typename Domain> + struct alternative_attribute_transform; + + template <typename Attribute, typename Domain> + struct sequence_attribute_transform; + + template <typename Attribute, typename Domain> + struct permutation_attribute_transform; + + template <typename Attribute, typename Domain> + struct sequential_or_attribute_transform; +}}} + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/support/char_class.hpp b/3rdParty/Boost/src/boost/spirit/home/support/char_class.hpp new file mode 100644 index 0000000..574a25e --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/char_class.hpp @@ -0,0 +1,797 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + + 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_CHAR_CLASS_NOVEMBER_10_2006_0907AM) +#define BOOST_SPIRIT_CHAR_CLASS_NOVEMBER_10_2006_0907AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <string> + +#include <boost/spirit/include/phoenix_limits.hpp> // needs to be included before proto +#include <boost/proto/proto.hpp> +#include <boost/config.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/spirit/home/support/unused.hpp> +#include <boost/spirit/home/support/detail/is_spirit_tag.hpp> +#include <boost/type_traits/is_signed.hpp> +#include <boost/type_traits/make_unsigned.hpp> +#include <boost/type_traits/make_signed.hpp> + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable: 4800) // 'int' : forcing value to bool 'true' or 'false' warning +#endif + +namespace boost { namespace spirit { namespace detail +{ + // Here's the thing... typical encodings (except ASCII) deal with unsigned + // integers > 127. ASCII uses only 127. Yet, most char and wchar_t are signed. + // Thus, a char with value > 127 is negative (e.g. char 233 is -23). When you + // cast this to an unsigned int with 32 bits, you get 4294967273! + // + // The trick is to cast to an unsigned version of the source char first + // before casting to the target. {P.S. Don't worry about the code, the + // optimizer will optimize the if-else branches} + + template <typename TargetChar, typename SourceChar> + TargetChar cast_char(SourceChar ch) + { + if (is_signed<TargetChar>::value != is_signed<SourceChar>::value) + { + if (is_signed<SourceChar>::value) + { + // source is signed, target is unsigned + typedef typename make_unsigned<SourceChar>::type USourceChar; + return TargetChar(USourceChar(ch)); + } + else + { + // source is unsigned, target is signed + typedef typename make_signed<SourceChar>::type SSourceChar; + return TargetChar(SSourceChar(ch)); + } + } + else + { + // source and target has same signedness + return TargetChar(ch); // just cast + } + } +}}} + +namespace boost { namespace spirit { namespace tag +{ + struct char_ { BOOST_SPIRIT_IS_TAG() }; + struct string { BOOST_SPIRIT_IS_TAG() }; + + /////////////////////////////////////////////////////////////////////////// + // classification tags + struct alnum { BOOST_SPIRIT_IS_TAG() }; + struct alpha { BOOST_SPIRIT_IS_TAG() }; + struct digit { BOOST_SPIRIT_IS_TAG() }; + struct xdigit { BOOST_SPIRIT_IS_TAG() }; + struct cntrl { BOOST_SPIRIT_IS_TAG() }; + struct graph { BOOST_SPIRIT_IS_TAG() }; + struct print { BOOST_SPIRIT_IS_TAG() }; + struct punct { BOOST_SPIRIT_IS_TAG() }; + struct space { BOOST_SPIRIT_IS_TAG() }; + struct blank { BOOST_SPIRIT_IS_TAG() }; + + /////////////////////////////////////////////////////////////////////////// + // classification/conversion tags + struct no_case { BOOST_SPIRIT_IS_TAG() }; + struct lower { BOOST_SPIRIT_IS_TAG() }; + struct upper { BOOST_SPIRIT_IS_TAG() }; + struct lowernum { BOOST_SPIRIT_IS_TAG() }; + struct uppernum { BOOST_SPIRIT_IS_TAG() }; + struct ucs4 { BOOST_SPIRIT_IS_TAG() }; + struct encoding { BOOST_SPIRIT_IS_TAG() }; + +#if defined(BOOST_SPIRIT_UNICODE) +/////////////////////////////////////////////////////////////////////////// +// Unicode Major Categories +/////////////////////////////////////////////////////////////////////////// + struct letter { BOOST_SPIRIT_IS_TAG() }; + struct mark { BOOST_SPIRIT_IS_TAG() }; + struct number { BOOST_SPIRIT_IS_TAG() }; + struct separator { BOOST_SPIRIT_IS_TAG() }; + struct other { BOOST_SPIRIT_IS_TAG() }; + struct punctuation { BOOST_SPIRIT_IS_TAG() }; + struct symbol { BOOST_SPIRIT_IS_TAG() }; + +/////////////////////////////////////////////////////////////////////////// +// Unicode General Categories +/////////////////////////////////////////////////////////////////////////// + struct uppercase_letter { BOOST_SPIRIT_IS_TAG() }; + struct lowercase_letter { BOOST_SPIRIT_IS_TAG() }; + struct titlecase_letter { BOOST_SPIRIT_IS_TAG() }; + struct modifier_letter { BOOST_SPIRIT_IS_TAG() }; + struct other_letter { BOOST_SPIRIT_IS_TAG() }; + + struct nonspacing_mark { BOOST_SPIRIT_IS_TAG() }; + struct enclosing_mark { BOOST_SPIRIT_IS_TAG() }; + struct spacing_mark { BOOST_SPIRIT_IS_TAG() }; + + struct decimal_number { BOOST_SPIRIT_IS_TAG() }; + struct letter_number { BOOST_SPIRIT_IS_TAG() }; + struct other_number { BOOST_SPIRIT_IS_TAG() }; + + struct space_separator { BOOST_SPIRIT_IS_TAG() }; + struct line_separator { BOOST_SPIRIT_IS_TAG() }; + struct paragraph_separator { BOOST_SPIRIT_IS_TAG() }; + + struct control { BOOST_SPIRIT_IS_TAG() }; + struct format { BOOST_SPIRIT_IS_TAG() }; + struct private_use { BOOST_SPIRIT_IS_TAG() }; + struct surrogate { BOOST_SPIRIT_IS_TAG() }; + struct unassigned { BOOST_SPIRIT_IS_TAG() }; + + struct dash_punctuation { BOOST_SPIRIT_IS_TAG() }; + struct open_punctuation { BOOST_SPIRIT_IS_TAG() }; + struct close_punctuation { BOOST_SPIRIT_IS_TAG() }; + struct connector_punctuation { BOOST_SPIRIT_IS_TAG() }; + struct other_punctuation { BOOST_SPIRIT_IS_TAG() }; + struct initial_punctuation { BOOST_SPIRIT_IS_TAG() }; + struct final_punctuation { BOOST_SPIRIT_IS_TAG() }; + + struct math_symbol { BOOST_SPIRIT_IS_TAG() }; + struct currency_symbol { BOOST_SPIRIT_IS_TAG() }; + struct modifier_symbol { BOOST_SPIRIT_IS_TAG() }; + struct other_symbol { BOOST_SPIRIT_IS_TAG() }; + +/////////////////////////////////////////////////////////////////////////// +// Unicode Derived Categories +/////////////////////////////////////////////////////////////////////////// + struct alphabetic { BOOST_SPIRIT_IS_TAG() }; + struct uppercase { BOOST_SPIRIT_IS_TAG() }; + struct lowercase { BOOST_SPIRIT_IS_TAG() }; + struct white_space { BOOST_SPIRIT_IS_TAG() }; + struct hex_digit { BOOST_SPIRIT_IS_TAG() }; + struct noncharacter_code_point { BOOST_SPIRIT_IS_TAG() }; + struct default_ignorable_code_point { BOOST_SPIRIT_IS_TAG() }; + +/////////////////////////////////////////////////////////////////////////// +// Unicode Scripts +/////////////////////////////////////////////////////////////////////////// + struct arabic { BOOST_SPIRIT_IS_TAG() }; + struct imperial_aramaic { BOOST_SPIRIT_IS_TAG() }; + struct armenian { BOOST_SPIRIT_IS_TAG() }; + struct avestan { BOOST_SPIRIT_IS_TAG() }; + struct balinese { BOOST_SPIRIT_IS_TAG() }; + struct bamum { BOOST_SPIRIT_IS_TAG() }; + struct bengali { BOOST_SPIRIT_IS_TAG() }; + struct bopomofo { BOOST_SPIRIT_IS_TAG() }; + struct braille { BOOST_SPIRIT_IS_TAG() }; + struct buginese { BOOST_SPIRIT_IS_TAG() }; + struct buhid { BOOST_SPIRIT_IS_TAG() }; + struct canadian_aboriginal { BOOST_SPIRIT_IS_TAG() }; + struct carian { BOOST_SPIRIT_IS_TAG() }; + struct cham { BOOST_SPIRIT_IS_TAG() }; + struct cherokee { BOOST_SPIRIT_IS_TAG() }; + struct coptic { BOOST_SPIRIT_IS_TAG() }; + struct cypriot { BOOST_SPIRIT_IS_TAG() }; + struct cyrillic { BOOST_SPIRIT_IS_TAG() }; + struct devanagari { BOOST_SPIRIT_IS_TAG() }; + struct deseret { BOOST_SPIRIT_IS_TAG() }; + struct egyptian_hieroglyphs { BOOST_SPIRIT_IS_TAG() }; + struct ethiopic { BOOST_SPIRIT_IS_TAG() }; + struct georgian { BOOST_SPIRIT_IS_TAG() }; + struct glagolitic { BOOST_SPIRIT_IS_TAG() }; + struct gothic { BOOST_SPIRIT_IS_TAG() }; + struct greek { BOOST_SPIRIT_IS_TAG() }; + struct gujarati { BOOST_SPIRIT_IS_TAG() }; + struct gurmukhi { BOOST_SPIRIT_IS_TAG() }; + struct hangul { BOOST_SPIRIT_IS_TAG() }; + struct han { BOOST_SPIRIT_IS_TAG() }; + struct hanunoo { BOOST_SPIRIT_IS_TAG() }; + struct hebrew { BOOST_SPIRIT_IS_TAG() }; + struct hiragana { BOOST_SPIRIT_IS_TAG() }; + struct katakana_or_hiragana { BOOST_SPIRIT_IS_TAG() }; + struct old_italic { BOOST_SPIRIT_IS_TAG() }; + struct javanese { BOOST_SPIRIT_IS_TAG() }; + struct kayah_li { BOOST_SPIRIT_IS_TAG() }; + struct katakana { BOOST_SPIRIT_IS_TAG() }; + struct kharoshthi { BOOST_SPIRIT_IS_TAG() }; + struct khmer { BOOST_SPIRIT_IS_TAG() }; + struct kannada { BOOST_SPIRIT_IS_TAG() }; + struct kaithi { BOOST_SPIRIT_IS_TAG() }; + struct tai_tham { BOOST_SPIRIT_IS_TAG() }; + struct lao { BOOST_SPIRIT_IS_TAG() }; + struct latin { BOOST_SPIRIT_IS_TAG() }; + struct lepcha { BOOST_SPIRIT_IS_TAG() }; + struct limbu { BOOST_SPIRIT_IS_TAG() }; + struct linear_b { BOOST_SPIRIT_IS_TAG() }; + struct lisu { BOOST_SPIRIT_IS_TAG() }; + struct lycian { BOOST_SPIRIT_IS_TAG() }; + struct lydian { BOOST_SPIRIT_IS_TAG() }; + struct malayalam { BOOST_SPIRIT_IS_TAG() }; + struct mongolian { BOOST_SPIRIT_IS_TAG() }; + struct meetei_mayek { BOOST_SPIRIT_IS_TAG() }; + struct myanmar { BOOST_SPIRIT_IS_TAG() }; + struct nko { BOOST_SPIRIT_IS_TAG() }; + struct ogham { BOOST_SPIRIT_IS_TAG() }; + struct ol_chiki { BOOST_SPIRIT_IS_TAG() }; + struct old_turkic { BOOST_SPIRIT_IS_TAG() }; + struct oriya { BOOST_SPIRIT_IS_TAG() }; + struct osmanya { BOOST_SPIRIT_IS_TAG() }; + struct phags_pa { BOOST_SPIRIT_IS_TAG() }; + struct inscriptional_pahlavi { BOOST_SPIRIT_IS_TAG() }; + struct phoenician { BOOST_SPIRIT_IS_TAG() }; + struct inscriptional_parthian { BOOST_SPIRIT_IS_TAG() }; + struct rejang { BOOST_SPIRIT_IS_TAG() }; + struct runic { BOOST_SPIRIT_IS_TAG() }; + struct samaritan { BOOST_SPIRIT_IS_TAG() }; + struct old_south_arabian { BOOST_SPIRIT_IS_TAG() }; + struct saurashtra { BOOST_SPIRIT_IS_TAG() }; + struct shavian { BOOST_SPIRIT_IS_TAG() }; + struct sinhala { BOOST_SPIRIT_IS_TAG() }; + struct sundanese { BOOST_SPIRIT_IS_TAG() }; + struct syloti_nagri { BOOST_SPIRIT_IS_TAG() }; + struct syriac { BOOST_SPIRIT_IS_TAG() }; + struct tagbanwa { BOOST_SPIRIT_IS_TAG() }; + struct tai_le { BOOST_SPIRIT_IS_TAG() }; + struct new_tai_lue { BOOST_SPIRIT_IS_TAG() }; + struct tamil { BOOST_SPIRIT_IS_TAG() }; + struct tai_viet { BOOST_SPIRIT_IS_TAG() }; + struct telugu { BOOST_SPIRIT_IS_TAG() }; + struct tifinagh { BOOST_SPIRIT_IS_TAG() }; + struct tagalog { BOOST_SPIRIT_IS_TAG() }; + struct thaana { BOOST_SPIRIT_IS_TAG() }; + struct thai { BOOST_SPIRIT_IS_TAG() }; + struct tibetan { BOOST_SPIRIT_IS_TAG() }; + struct ugaritic { BOOST_SPIRIT_IS_TAG() }; + struct vai { BOOST_SPIRIT_IS_TAG() }; + struct old_persian { BOOST_SPIRIT_IS_TAG() }; + struct cuneiform { BOOST_SPIRIT_IS_TAG() }; + struct yi { BOOST_SPIRIT_IS_TAG() }; + struct inherited { BOOST_SPIRIT_IS_TAG() }; + struct common { BOOST_SPIRIT_IS_TAG() }; + struct unknown { BOOST_SPIRIT_IS_TAG() }; +#endif + + /////////////////////////////////////////////////////////////////////////// + // This composite tag type encodes both the character + // set and the specific char tag (used for classification + // or conversion). char_code_base and char_encoding_base + // can be used to test for modifier membership (see modifier.hpp) + template <typename CharClass> + struct char_code_base {}; + + template <typename CharEncoding> + struct char_encoding_base {}; + + template <typename CharClass, typename CharEncoding> + struct char_code + : char_code_base<CharClass>, char_encoding_base<CharEncoding> + { + BOOST_SPIRIT_IS_TAG() + typedef CharEncoding char_encoding; // e.g. ascii + typedef CharClass char_class; // e.g. tag::alnum + }; +}}} + +namespace boost { namespace spirit { namespace char_class +{ + /////////////////////////////////////////////////////////////////////////// + // Test characters for classification + template <typename CharEncoding> + struct classify + { + typedef typename CharEncoding::char_type char_type; + +#define BOOST_SPIRIT_CLASSIFY(name, isname) \ + template <typename Char> \ + static bool \ + is(tag::name, Char ch) \ + { \ + return CharEncoding::isname \ + BOOST_PREVENT_MACRO_SUBSTITUTION \ + (detail::cast_char<char_type>(ch)); \ + } \ + /***/ + + BOOST_SPIRIT_CLASSIFY(char_, ischar) + BOOST_SPIRIT_CLASSIFY(alnum, isalnum) + BOOST_SPIRIT_CLASSIFY(alpha, isalpha) + BOOST_SPIRIT_CLASSIFY(digit, isdigit) + BOOST_SPIRIT_CLASSIFY(xdigit, isxdigit) + BOOST_SPIRIT_CLASSIFY(cntrl, iscntrl) + BOOST_SPIRIT_CLASSIFY(graph, isgraph) + BOOST_SPIRIT_CLASSIFY(lower, islower) + BOOST_SPIRIT_CLASSIFY(print, isprint) + BOOST_SPIRIT_CLASSIFY(punct, ispunct) + BOOST_SPIRIT_CLASSIFY(space, isspace) + BOOST_SPIRIT_CLASSIFY(blank, isblank) + BOOST_SPIRIT_CLASSIFY(upper, isupper) + +#undef BOOST_SPIRIT_CLASSIFY + + template <typename Char> + static bool + is(tag::lowernum, Char ch) + { + return CharEncoding::islower(detail::cast_char<char_type>(ch)) || + CharEncoding::isdigit(detail::cast_char<char_type>(ch)); + } + + template <typename Char> + static bool + is(tag::uppernum, Char ch) + { + return CharEncoding::isupper(detail::cast_char<char_type>(ch)) || + CharEncoding::isdigit(detail::cast_char<char_type>(ch)); + } + +#if defined(BOOST_SPIRIT_UNICODE) + +#define BOOST_SPIRIT_UNICODE_CLASSIFY(name) \ + template <typename Char> \ + static bool \ + is(tag::name, Char ch) \ + { \ + return CharEncoding::is_##name(detail::cast_char<char_type>(ch)); \ + } \ + /***/ + +/////////////////////////////////////////////////////////////////////////// +// Unicode Major Categories +/////////////////////////////////////////////////////////////////////////// + BOOST_SPIRIT_UNICODE_CLASSIFY(letter) + BOOST_SPIRIT_UNICODE_CLASSIFY(mark) + BOOST_SPIRIT_UNICODE_CLASSIFY(number) + BOOST_SPIRIT_UNICODE_CLASSIFY(separator) + BOOST_SPIRIT_UNICODE_CLASSIFY(other) + BOOST_SPIRIT_UNICODE_CLASSIFY(punctuation) + BOOST_SPIRIT_UNICODE_CLASSIFY(symbol) + +/////////////////////////////////////////////////////////////////////////// +// Unicode General Categories +/////////////////////////////////////////////////////////////////////////// + BOOST_SPIRIT_UNICODE_CLASSIFY(uppercase_letter) + BOOST_SPIRIT_UNICODE_CLASSIFY(lowercase_letter) + BOOST_SPIRIT_UNICODE_CLASSIFY(titlecase_letter) + BOOST_SPIRIT_UNICODE_CLASSIFY(modifier_letter) + BOOST_SPIRIT_UNICODE_CLASSIFY(other_letter) + + BOOST_SPIRIT_UNICODE_CLASSIFY(nonspacing_mark) + BOOST_SPIRIT_UNICODE_CLASSIFY(enclosing_mark) + BOOST_SPIRIT_UNICODE_CLASSIFY(spacing_mark) + + BOOST_SPIRIT_UNICODE_CLASSIFY(decimal_number) + BOOST_SPIRIT_UNICODE_CLASSIFY(letter_number) + BOOST_SPIRIT_UNICODE_CLASSIFY(other_number) + + BOOST_SPIRIT_UNICODE_CLASSIFY(space_separator) + BOOST_SPIRIT_UNICODE_CLASSIFY(line_separator) + BOOST_SPIRIT_UNICODE_CLASSIFY(paragraph_separator) + + BOOST_SPIRIT_UNICODE_CLASSIFY(control) + BOOST_SPIRIT_UNICODE_CLASSIFY(format) + BOOST_SPIRIT_UNICODE_CLASSIFY(private_use) + BOOST_SPIRIT_UNICODE_CLASSIFY(surrogate) + BOOST_SPIRIT_UNICODE_CLASSIFY(unassigned) + + BOOST_SPIRIT_UNICODE_CLASSIFY(dash_punctuation) + BOOST_SPIRIT_UNICODE_CLASSIFY(open_punctuation) + BOOST_SPIRIT_UNICODE_CLASSIFY(close_punctuation) + BOOST_SPIRIT_UNICODE_CLASSIFY(connector_punctuation) + BOOST_SPIRIT_UNICODE_CLASSIFY(other_punctuation) + BOOST_SPIRIT_UNICODE_CLASSIFY(initial_punctuation) + BOOST_SPIRIT_UNICODE_CLASSIFY(final_punctuation) + + BOOST_SPIRIT_UNICODE_CLASSIFY(math_symbol) + BOOST_SPIRIT_UNICODE_CLASSIFY(currency_symbol) + BOOST_SPIRIT_UNICODE_CLASSIFY(modifier_symbol) + BOOST_SPIRIT_UNICODE_CLASSIFY(other_symbol) + +/////////////////////////////////////////////////////////////////////////// +// Unicode Derived Categories +/////////////////////////////////////////////////////////////////////////// + BOOST_SPIRIT_UNICODE_CLASSIFY(alphabetic) + BOOST_SPIRIT_UNICODE_CLASSIFY(uppercase) + BOOST_SPIRIT_UNICODE_CLASSIFY(lowercase) + BOOST_SPIRIT_UNICODE_CLASSIFY(white_space) + BOOST_SPIRIT_UNICODE_CLASSIFY(hex_digit) + BOOST_SPIRIT_UNICODE_CLASSIFY(noncharacter_code_point) + BOOST_SPIRIT_UNICODE_CLASSIFY(default_ignorable_code_point) + +/////////////////////////////////////////////////////////////////////////// +// Unicode Scripts +/////////////////////////////////////////////////////////////////////////// + BOOST_SPIRIT_UNICODE_CLASSIFY(arabic) + BOOST_SPIRIT_UNICODE_CLASSIFY(imperial_aramaic) + BOOST_SPIRIT_UNICODE_CLASSIFY(armenian) + BOOST_SPIRIT_UNICODE_CLASSIFY(avestan) + BOOST_SPIRIT_UNICODE_CLASSIFY(balinese) + BOOST_SPIRIT_UNICODE_CLASSIFY(bamum) + BOOST_SPIRIT_UNICODE_CLASSIFY(bengali) + BOOST_SPIRIT_UNICODE_CLASSIFY(bopomofo) + BOOST_SPIRIT_UNICODE_CLASSIFY(braille) + BOOST_SPIRIT_UNICODE_CLASSIFY(buginese) + BOOST_SPIRIT_UNICODE_CLASSIFY(buhid) + BOOST_SPIRIT_UNICODE_CLASSIFY(canadian_aboriginal) + BOOST_SPIRIT_UNICODE_CLASSIFY(carian) + BOOST_SPIRIT_UNICODE_CLASSIFY(cham) + BOOST_SPIRIT_UNICODE_CLASSIFY(cherokee) + BOOST_SPIRIT_UNICODE_CLASSIFY(coptic) + BOOST_SPIRIT_UNICODE_CLASSIFY(cypriot) + BOOST_SPIRIT_UNICODE_CLASSIFY(cyrillic) + BOOST_SPIRIT_UNICODE_CLASSIFY(devanagari) + BOOST_SPIRIT_UNICODE_CLASSIFY(deseret) + BOOST_SPIRIT_UNICODE_CLASSIFY(egyptian_hieroglyphs) + BOOST_SPIRIT_UNICODE_CLASSIFY(ethiopic) + BOOST_SPIRIT_UNICODE_CLASSIFY(georgian) + BOOST_SPIRIT_UNICODE_CLASSIFY(glagolitic) + BOOST_SPIRIT_UNICODE_CLASSIFY(gothic) + BOOST_SPIRIT_UNICODE_CLASSIFY(greek) + BOOST_SPIRIT_UNICODE_CLASSIFY(gujarati) + BOOST_SPIRIT_UNICODE_CLASSIFY(gurmukhi) + BOOST_SPIRIT_UNICODE_CLASSIFY(hangul) + BOOST_SPIRIT_UNICODE_CLASSIFY(han) + BOOST_SPIRIT_UNICODE_CLASSIFY(hanunoo) + BOOST_SPIRIT_UNICODE_CLASSIFY(hebrew) + BOOST_SPIRIT_UNICODE_CLASSIFY(hiragana) + BOOST_SPIRIT_UNICODE_CLASSIFY(katakana_or_hiragana) + BOOST_SPIRIT_UNICODE_CLASSIFY(old_italic) + BOOST_SPIRIT_UNICODE_CLASSIFY(javanese) + BOOST_SPIRIT_UNICODE_CLASSIFY(kayah_li) + BOOST_SPIRIT_UNICODE_CLASSIFY(katakana) + BOOST_SPIRIT_UNICODE_CLASSIFY(kharoshthi) + BOOST_SPIRIT_UNICODE_CLASSIFY(khmer) + BOOST_SPIRIT_UNICODE_CLASSIFY(kannada) + BOOST_SPIRIT_UNICODE_CLASSIFY(kaithi) + BOOST_SPIRIT_UNICODE_CLASSIFY(tai_tham) + BOOST_SPIRIT_UNICODE_CLASSIFY(lao) + BOOST_SPIRIT_UNICODE_CLASSIFY(latin) + BOOST_SPIRIT_UNICODE_CLASSIFY(lepcha) + BOOST_SPIRIT_UNICODE_CLASSIFY(limbu) + BOOST_SPIRIT_UNICODE_CLASSIFY(linear_b) + BOOST_SPIRIT_UNICODE_CLASSIFY(lisu) + BOOST_SPIRIT_UNICODE_CLASSIFY(lycian) + BOOST_SPIRIT_UNICODE_CLASSIFY(lydian) + BOOST_SPIRIT_UNICODE_CLASSIFY(malayalam) + BOOST_SPIRIT_UNICODE_CLASSIFY(mongolian) + BOOST_SPIRIT_UNICODE_CLASSIFY(meetei_mayek) + BOOST_SPIRIT_UNICODE_CLASSIFY(myanmar) + BOOST_SPIRIT_UNICODE_CLASSIFY(nko) + BOOST_SPIRIT_UNICODE_CLASSIFY(ogham) + BOOST_SPIRIT_UNICODE_CLASSIFY(ol_chiki) + BOOST_SPIRIT_UNICODE_CLASSIFY(old_turkic) + BOOST_SPIRIT_UNICODE_CLASSIFY(oriya) + BOOST_SPIRIT_UNICODE_CLASSIFY(osmanya) + BOOST_SPIRIT_UNICODE_CLASSIFY(phags_pa) + BOOST_SPIRIT_UNICODE_CLASSIFY(inscriptional_pahlavi) + BOOST_SPIRIT_UNICODE_CLASSIFY(phoenician) + BOOST_SPIRIT_UNICODE_CLASSIFY(inscriptional_parthian) + BOOST_SPIRIT_UNICODE_CLASSIFY(rejang) + BOOST_SPIRIT_UNICODE_CLASSIFY(runic) + BOOST_SPIRIT_UNICODE_CLASSIFY(samaritan) + BOOST_SPIRIT_UNICODE_CLASSIFY(old_south_arabian) + BOOST_SPIRIT_UNICODE_CLASSIFY(saurashtra) + BOOST_SPIRIT_UNICODE_CLASSIFY(shavian) + BOOST_SPIRIT_UNICODE_CLASSIFY(sinhala) + BOOST_SPIRIT_UNICODE_CLASSIFY(sundanese) + BOOST_SPIRIT_UNICODE_CLASSIFY(syloti_nagri) + BOOST_SPIRIT_UNICODE_CLASSIFY(syriac) + BOOST_SPIRIT_UNICODE_CLASSIFY(tagbanwa) + BOOST_SPIRIT_UNICODE_CLASSIFY(tai_le) + BOOST_SPIRIT_UNICODE_CLASSIFY(new_tai_lue) + BOOST_SPIRIT_UNICODE_CLASSIFY(tamil) + BOOST_SPIRIT_UNICODE_CLASSIFY(tai_viet) + BOOST_SPIRIT_UNICODE_CLASSIFY(telugu) + BOOST_SPIRIT_UNICODE_CLASSIFY(tifinagh) + BOOST_SPIRIT_UNICODE_CLASSIFY(tagalog) + BOOST_SPIRIT_UNICODE_CLASSIFY(thaana) + BOOST_SPIRIT_UNICODE_CLASSIFY(thai) + BOOST_SPIRIT_UNICODE_CLASSIFY(tibetan) + BOOST_SPIRIT_UNICODE_CLASSIFY(ugaritic) + BOOST_SPIRIT_UNICODE_CLASSIFY(vai) + BOOST_SPIRIT_UNICODE_CLASSIFY(old_persian) + BOOST_SPIRIT_UNICODE_CLASSIFY(cuneiform) + BOOST_SPIRIT_UNICODE_CLASSIFY(yi) + BOOST_SPIRIT_UNICODE_CLASSIFY(inherited) + BOOST_SPIRIT_UNICODE_CLASSIFY(common) + BOOST_SPIRIT_UNICODE_CLASSIFY(unknown) + +#undef BOOST_SPIRIT_UNICODE_CLASSIFY +#endif + + }; + + /////////////////////////////////////////////////////////////////////////// + // Convert characters + template <typename CharEncoding> + struct convert + { + typedef typename CharEncoding::char_type char_type; + + template <typename Char> + static Char + to(tag::lower, Char ch) + { + return static_cast<Char>( + CharEncoding::tolower(detail::cast_char<char_type>(ch))); + } + + template <typename Char> + static Char + to(tag::upper, Char ch) + { + return static_cast<Char>( + CharEncoding::toupper(detail::cast_char<char_type>(ch))); + } + + template <typename Char> + static Char + to(tag::ucs4, Char ch) + { + return static_cast<Char>( + CharEncoding::toucs4(detail::cast_char<char_type>(ch))); + } + + template <typename Char> + static Char + to(unused_type, Char ch) + { + return ch; + } + }; + + /////////////////////////////////////////////////////////////////////////// + // Info on character classification + template <typename CharEncoding> + struct what + { +#define BOOST_SPIRIT_CLASSIFY_WHAT(name, isname) \ + static char const* is(tag::name) \ + { \ + return isname; \ + } \ + /***/ + + BOOST_SPIRIT_CLASSIFY_WHAT(char_, "char") + BOOST_SPIRIT_CLASSIFY_WHAT(alnum, "alnum") + BOOST_SPIRIT_CLASSIFY_WHAT(alpha, "alpha") + BOOST_SPIRIT_CLASSIFY_WHAT(digit, "digit") + BOOST_SPIRIT_CLASSIFY_WHAT(xdigit, "xdigit") + BOOST_SPIRIT_CLASSIFY_WHAT(cntrl, "cntrl") + BOOST_SPIRIT_CLASSIFY_WHAT(graph, "graph") + BOOST_SPIRIT_CLASSIFY_WHAT(lower, "lower") + BOOST_SPIRIT_CLASSIFY_WHAT(lowernum, "lowernum") + BOOST_SPIRIT_CLASSIFY_WHAT(print, "print") + BOOST_SPIRIT_CLASSIFY_WHAT(punct, "punct") + BOOST_SPIRIT_CLASSIFY_WHAT(space, "space") + BOOST_SPIRIT_CLASSIFY_WHAT(blank, "blank") + BOOST_SPIRIT_CLASSIFY_WHAT(upper, "upper") + BOOST_SPIRIT_CLASSIFY_WHAT(uppernum, "uppernum") + BOOST_SPIRIT_CLASSIFY_WHAT(ucs4, "ucs4") + +#undef BOOST_SPIRIT_CLASSIFY_WHAT + +#if defined(BOOST_SPIRIT_UNICODE) + +#define BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(name) \ + static char const* is(tag::name) \ + { \ + return BOOST_PP_STRINGIZE(name); \ + } \ + /***/ + +/////////////////////////////////////////////////////////////////////////// +// Unicode Major Categories +/////////////////////////////////////////////////////////////////////////// + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(letter) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(mark) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(number) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(separator) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(other) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(punctuation) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(symbol) + +/////////////////////////////////////////////////////////////////////////// +// Unicode General Categories +/////////////////////////////////////////////////////////////////////////// + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(uppercase_letter) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(lowercase_letter) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(titlecase_letter) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(modifier_letter) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(other_letter) + + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(nonspacing_mark) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(enclosing_mark) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(spacing_mark) + + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(decimal_number) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(letter_number) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(other_number) + + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(space_separator) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(line_separator) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(paragraph_separator) + + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(control) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(format) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(private_use) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(surrogate) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(unassigned) + + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(dash_punctuation) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(open_punctuation) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(close_punctuation) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(connector_punctuation) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(other_punctuation) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(initial_punctuation) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(final_punctuation) + + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(math_symbol) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(currency_symbol) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(modifier_symbol) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(other_symbol) + +/////////////////////////////////////////////////////////////////////////// +// Unicode Derived Categories +/////////////////////////////////////////////////////////////////////////// + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(alphabetic) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(uppercase) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(lowercase) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(white_space) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(hex_digit) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(noncharacter_code_point) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(default_ignorable_code_point) + +/////////////////////////////////////////////////////////////////////////// +// Unicode Scripts +/////////////////////////////////////////////////////////////////////////// + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(arabic) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(imperial_aramaic) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(armenian) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(avestan) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(balinese) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(bamum) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(bengali) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(bopomofo) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(braille) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(buginese) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(buhid) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(canadian_aboriginal) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(carian) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(cham) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(cherokee) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(coptic) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(cypriot) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(cyrillic) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(devanagari) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(deseret) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(egyptian_hieroglyphs) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(ethiopic) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(georgian) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(glagolitic) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(gothic) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(greek) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(gujarati) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(gurmukhi) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(hangul) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(han) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(hanunoo) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(hebrew) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(hiragana) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(katakana_or_hiragana) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(old_italic) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(javanese) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(kayah_li) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(katakana) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(kharoshthi) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(khmer) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(kannada) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(kaithi) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tai_tham) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(lao) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(latin) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(lepcha) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(limbu) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(linear_b) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(lisu) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(lycian) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(lydian) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(malayalam) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(mongolian) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(meetei_mayek) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(myanmar) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(nko) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(ogham) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(ol_chiki) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(old_turkic) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(oriya) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(osmanya) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(phags_pa) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(inscriptional_pahlavi) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(phoenician) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(inscriptional_parthian) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(rejang) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(runic) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(samaritan) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(old_south_arabian) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(saurashtra) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(shavian) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(sinhala) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(sundanese) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(syloti_nagri) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(syriac) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tagbanwa) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tai_le) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(new_tai_lue) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tamil) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tai_viet) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(telugu) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tifinagh) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tagalog) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(thaana) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(thai) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(tibetan) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(ugaritic) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(vai) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(old_persian) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(cuneiform) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(yi) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(inherited) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(common) + BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT(unknown) + +#undef BOOST_SPIRIT_UNICODE_CLASSIFY_WHAT +#endif + + }; +}}} + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + // This meta-function evaluates to mpl::true_ if the function + // char_encoding::ischar() needs to be called to ensure correct matching. + // This happens mainly if the character type returned from the underlying + // iterator is larger than the character type of the used character + // encoding. Additionally, this meta-function provides a customization + // point for the lexer library to enforce this behavior while parsing + // a token stream. + template <typename Char, typename BaseChar> + struct mustcheck_ischar + : mpl::bool_<(sizeof(Char) > sizeof(BaseChar)) ? true : false> {}; + + /////////////////////////////////////////////////////////////////////////// + // The following template calls char_encoding::ischar, if necessary + template <typename CharParam, typename CharEncoding + , bool MustCheck = mustcheck_ischar< + CharParam, typename CharEncoding::char_type>::value> + struct ischar + { + static bool call(CharParam) + { + return true; + } + }; + + template <typename CharParam, typename CharEncoding> + struct ischar<CharParam, CharEncoding, true> + { + static bool call(CharParam const& ch) + { + return CharEncoding::ischar(int(ch)); + } + }; + +}}} + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif + + diff --git a/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/ascii.hpp b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/ascii.hpp new file mode 100644 index 0000000..9b8a72f --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/ascii.hpp @@ -0,0 +1,313 @@ +/*============================================================================= + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + + 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_ASCII_APRIL_26_2006_1106PM) +#define BOOST_SPIRIT_ASCII_APRIL_26_2006_1106PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <climits> +#include <boost/assert.hpp> +#include <boost/cstdint.hpp> + +/////////////////////////////////////////////////////////////////////////////// +// constants used to classify the single characters +/////////////////////////////////////////////////////////////////////////////// +#define BOOST_CC_DIGIT 0x0001 +#define BOOST_CC_XDIGIT 0x0002 +#define BOOST_CC_ALPHA 0x0004 +#define BOOST_CC_CTRL 0x0008 +#define BOOST_CC_LOWER 0x0010 +#define BOOST_CC_UPPER 0x0020 +#define BOOST_CC_SPACE 0x0040 +#define BOOST_CC_PUNCT 0x0080 + +namespace boost { namespace spirit { namespace char_encoding +{ + // The detection of isgraph(), isprint() and isblank() is done programmatically + // to keep the character type table small. Additionally, these functions are + // rather seldom used and the programmatic detection is very simple. + + /////////////////////////////////////////////////////////////////////////// + // ASCII character classification table + /////////////////////////////////////////////////////////////////////////// + const unsigned char ascii_char_types[] = + { + /* NUL 0 0 */ BOOST_CC_CTRL, + /* SOH 1 1 */ BOOST_CC_CTRL, + /* STX 2 2 */ BOOST_CC_CTRL, + /* ETX 3 3 */ BOOST_CC_CTRL, + /* EOT 4 4 */ BOOST_CC_CTRL, + /* ENQ 5 5 */ BOOST_CC_CTRL, + /* ACK 6 6 */ BOOST_CC_CTRL, + /* BEL 7 7 */ BOOST_CC_CTRL, + /* BS 8 8 */ BOOST_CC_CTRL, + /* HT 9 9 */ BOOST_CC_CTRL|BOOST_CC_SPACE, + /* NL 10 a */ BOOST_CC_CTRL|BOOST_CC_SPACE, + /* VT 11 b */ BOOST_CC_CTRL|BOOST_CC_SPACE, + /* NP 12 c */ BOOST_CC_CTRL|BOOST_CC_SPACE, + /* CR 13 d */ BOOST_CC_CTRL|BOOST_CC_SPACE, + /* SO 14 e */ BOOST_CC_CTRL, + /* SI 15 f */ BOOST_CC_CTRL, + /* DLE 16 10 */ BOOST_CC_CTRL, + /* DC1 17 11 */ BOOST_CC_CTRL, + /* DC2 18 12 */ BOOST_CC_CTRL, + /* DC3 19 13 */ BOOST_CC_CTRL, + /* DC4 20 14 */ BOOST_CC_CTRL, + /* NAK 21 15 */ BOOST_CC_CTRL, + /* SYN 22 16 */ BOOST_CC_CTRL, + /* ETB 23 17 */ BOOST_CC_CTRL, + /* CAN 24 18 */ BOOST_CC_CTRL, + /* EM 25 19 */ BOOST_CC_CTRL, + /* SUB 26 1a */ BOOST_CC_CTRL, + /* ESC 27 1b */ BOOST_CC_CTRL, + /* FS 28 1c */ BOOST_CC_CTRL, + /* GS 29 1d */ BOOST_CC_CTRL, + /* RS 30 1e */ BOOST_CC_CTRL, + /* US 31 1f */ BOOST_CC_CTRL, + /* SP 32 20 */ BOOST_CC_SPACE, + /* ! 33 21 */ BOOST_CC_PUNCT, + /* " 34 22 */ BOOST_CC_PUNCT, + /* # 35 23 */ BOOST_CC_PUNCT, + /* $ 36 24 */ BOOST_CC_PUNCT, + /* % 37 25 */ BOOST_CC_PUNCT, + /* & 38 26 */ BOOST_CC_PUNCT, + /* ' 39 27 */ BOOST_CC_PUNCT, + /* ( 40 28 */ BOOST_CC_PUNCT, + /* ) 41 29 */ BOOST_CC_PUNCT, + /* * 42 2a */ BOOST_CC_PUNCT, + /* + 43 2b */ BOOST_CC_PUNCT, + /* , 44 2c */ BOOST_CC_PUNCT, + /* - 45 2d */ BOOST_CC_PUNCT, + /* . 46 2e */ BOOST_CC_PUNCT, + /* / 47 2f */ BOOST_CC_PUNCT, + /* 0 48 30 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 1 49 31 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 2 50 32 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 3 51 33 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 4 52 34 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 5 53 35 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 6 54 36 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 7 55 37 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 8 56 38 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 9 57 39 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* : 58 3a */ BOOST_CC_PUNCT, + /* ; 59 3b */ BOOST_CC_PUNCT, + /* < 60 3c */ BOOST_CC_PUNCT, + /* = 61 3d */ BOOST_CC_PUNCT, + /* > 62 3e */ BOOST_CC_PUNCT, + /* ? 63 3f */ BOOST_CC_PUNCT, + /* @ 64 40 */ BOOST_CC_PUNCT, + /* A 65 41 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_UPPER, + /* B 66 42 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_UPPER, + /* C 67 43 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_UPPER, + /* D 68 44 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_UPPER, + /* E 69 45 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_UPPER, + /* F 70 46 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_UPPER, + /* G 71 47 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* H 72 48 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* I 73 49 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* J 74 4a */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* K 75 4b */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* L 76 4c */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* M 77 4d */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* N 78 4e */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* O 79 4f */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* P 80 50 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Q 81 51 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* R 82 52 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* S 83 53 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* T 84 54 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* U 85 55 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* V 86 56 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* W 87 57 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* X 88 58 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Y 89 59 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Z 90 5a */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* [ 91 5b */ BOOST_CC_PUNCT, + /* \ 92 5c */ BOOST_CC_PUNCT, + /* ] 93 5d */ BOOST_CC_PUNCT, + /* ^ 94 5e */ BOOST_CC_PUNCT, + /* _ 95 5f */ BOOST_CC_PUNCT, + /* ` 96 60 */ BOOST_CC_PUNCT, + /* a 97 61 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_LOWER, + /* b 98 62 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_LOWER, + /* c 99 63 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_LOWER, + /* d 100 64 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_LOWER, + /* e 101 65 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_LOWER, + /* f 102 66 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_LOWER, + /* g 103 67 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* h 104 68 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* i 105 69 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* j 106 6a */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* k 107 6b */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* l 108 6c */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* m 109 6d */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* n 110 6e */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* o 111 6f */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* p 112 70 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* q 113 71 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* r 114 72 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* s 115 73 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* t 116 74 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* u 117 75 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* v 118 76 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* w 119 77 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* x 120 78 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* y 121 79 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* z 122 7a */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* { 123 7b */ BOOST_CC_PUNCT, + /* | 124 7c */ BOOST_CC_PUNCT, + /* } 125 7d */ BOOST_CC_PUNCT, + /* ~ 126 7e */ BOOST_CC_PUNCT, + /* DEL 127 7f */ BOOST_CC_CTRL, + }; + + /////////////////////////////////////////////////////////////////////////// + // Test characters for specified conditions (using ASCII) + /////////////////////////////////////////////////////////////////////////// + struct ascii + { + typedef char char_type; + + static bool + isascii_(int ch) + { + return 0 == (ch & ~0x7f); + } + + static bool + ischar(int ch) + { + return isascii_(ch); + } + + static int + isalnum(int ch) + { + BOOST_ASSERT(isascii_(ch)); + return (ascii_char_types[ch] & BOOST_CC_ALPHA) + || (ascii_char_types[ch] & BOOST_CC_DIGIT); + } + + static int + isalpha(int ch) + { + BOOST_ASSERT(isascii_(ch)); + return (ascii_char_types[ch] & BOOST_CC_ALPHA); + } + + static int + isdigit(int ch) + { + BOOST_ASSERT(isascii_(ch)); + return (ascii_char_types[ch] & BOOST_CC_DIGIT); + } + + static int + isxdigit(int ch) + { + BOOST_ASSERT(isascii_(ch)); + return (ascii_char_types[ch] & BOOST_CC_XDIGIT); + } + + static int + iscntrl(int ch) + { + BOOST_ASSERT(isascii_(ch)); + return (ascii_char_types[ch] & BOOST_CC_CTRL); + } + + static int + isgraph(int ch) + { + return ('\x21' <= ch && ch <= '\x7e'); + } + + static int + islower(int ch) + { + BOOST_ASSERT(isascii_(ch)); + return (ascii_char_types[ch] & BOOST_CC_LOWER); + } + + static int + isprint(int ch) + { + return ('\x20' <= ch && ch <= '\x7e'); + } + + static int + ispunct(int ch) + { + BOOST_ASSERT(isascii_(ch)); + return (ascii_char_types[ch] & BOOST_CC_PUNCT); + } + + static int + isspace(int ch) + { + BOOST_ASSERT(isascii_(ch)); + return (ascii_char_types[ch] & BOOST_CC_SPACE); + } + + static int + isblank BOOST_PREVENT_MACRO_SUBSTITUTION (int ch) + { + return ('\x09' == ch || '\x20' == ch); + } + + static int + isupper(int ch) + { + BOOST_ASSERT(isascii_(ch)); + return (ascii_char_types[ch] & BOOST_CC_UPPER); + } + + /////////////////////////////////////////////////////////////////////// + // Simple character conversions + /////////////////////////////////////////////////////////////////////// + + static int + tolower(int ch) + { + BOOST_ASSERT(isascii_(ch)); + return isupper(ch) ? (ch - 'A' + 'a') : ch; + } + + static int + toupper(int ch) + { + BOOST_ASSERT(isascii_(ch)); + return islower(ch) ? (ch - 'a' + 'A') : ch; + } + + static ::boost::uint32_t + toucs4(int ch) + { + return ch; + } + }; + +}}} + +/////////////////////////////////////////////////////////////////////////////// +// undefine macros +/////////////////////////////////////////////////////////////////////////////// +#undef BOOST_CC_DIGIT +#undef BOOST_CC_XDIGIT +#undef BOOST_CC_ALPHA +#undef BOOST_CC_CTRL +#undef BOOST_CC_LOWER +#undef BOOST_CC_UPPER +#undef BOOST_CC_PUNCT +#undef BOOST_CC_SPACE + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/iso8859_1.hpp b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/iso8859_1.hpp new file mode 100644 index 0000000..37d2e6f --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/iso8859_1.hpp @@ -0,0 +1,711 @@ +/*============================================================================= + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + + 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_ISO8859_1_APRIL_26_2006_1106PM) +#define BOOST_SPIRIT_ISO8859_1_APRIL_26_2006_1106PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <climits> +#include <boost/assert.hpp> +#include <boost/cstdint.hpp> + +/////////////////////////////////////////////////////////////////////////////// +// constants used to classify the single characters +/////////////////////////////////////////////////////////////////////////////// +#define BOOST_CC_DIGIT 0x0001 +#define BOOST_CC_XDIGIT 0x0002 +#define BOOST_CC_ALPHA 0x0004 +#define BOOST_CC_CTRL 0x0008 +#define BOOST_CC_LOWER 0x0010 +#define BOOST_CC_UPPER 0x0020 +#define BOOST_CC_SPACE 0x0040 +#define BOOST_CC_PUNCT 0x0080 + +namespace boost { namespace spirit { namespace char_encoding +{ + // The detection of isgraph(), isprint() and isblank() is done programmatically + // to keep the character type table small. Additionally, these functions are + // rather seldom used and the programmatic detection is very simple. + + /////////////////////////////////////////////////////////////////////////// + // ISO 8859-1 character classification table + // + // the comments intentionally contain non-ascii characters + // boostinspect:noascii + /////////////////////////////////////////////////////////////////////////// + const unsigned char iso8859_1_char_types[] = + { + /* NUL 0 0 */ BOOST_CC_CTRL, + /* SOH 1 1 */ BOOST_CC_CTRL, + /* STX 2 2 */ BOOST_CC_CTRL, + /* ETX 3 3 */ BOOST_CC_CTRL, + /* EOT 4 4 */ BOOST_CC_CTRL, + /* ENQ 5 5 */ BOOST_CC_CTRL, + /* ACK 6 6 */ BOOST_CC_CTRL, + /* BEL 7 7 */ BOOST_CC_CTRL, + /* BS 8 8 */ BOOST_CC_CTRL, + /* HT 9 9 */ BOOST_CC_CTRL|BOOST_CC_SPACE, + /* NL 10 a */ BOOST_CC_CTRL|BOOST_CC_SPACE, + /* VT 11 b */ BOOST_CC_CTRL|BOOST_CC_SPACE, + /* NP 12 c */ BOOST_CC_CTRL|BOOST_CC_SPACE, + /* CR 13 d */ BOOST_CC_CTRL|BOOST_CC_SPACE, + /* SO 14 e */ BOOST_CC_CTRL, + /* SI 15 f */ BOOST_CC_CTRL, + /* DLE 16 10 */ BOOST_CC_CTRL, + /* DC1 17 11 */ BOOST_CC_CTRL, + /* DC2 18 12 */ BOOST_CC_CTRL, + /* DC3 19 13 */ BOOST_CC_CTRL, + /* DC4 20 14 */ BOOST_CC_CTRL, + /* NAK 21 15 */ BOOST_CC_CTRL, + /* SYN 22 16 */ BOOST_CC_CTRL, + /* ETB 23 17 */ BOOST_CC_CTRL, + /* CAN 24 18 */ BOOST_CC_CTRL, + /* EM 25 19 */ BOOST_CC_CTRL, + /* SUB 26 1a */ BOOST_CC_CTRL, + /* ESC 27 1b */ BOOST_CC_CTRL, + /* FS 28 1c */ BOOST_CC_CTRL, + /* GS 29 1d */ BOOST_CC_CTRL, + /* RS 30 1e */ BOOST_CC_CTRL, + /* US 31 1f */ BOOST_CC_CTRL, + /* SP 32 20 */ BOOST_CC_SPACE, + /* ! 33 21 */ BOOST_CC_PUNCT, + /* " 34 22 */ BOOST_CC_PUNCT, + /* # 35 23 */ BOOST_CC_PUNCT, + /* $ 36 24 */ BOOST_CC_PUNCT, + /* % 37 25 */ BOOST_CC_PUNCT, + /* & 38 26 */ BOOST_CC_PUNCT, + /* ' 39 27 */ BOOST_CC_PUNCT, + /* ( 40 28 */ BOOST_CC_PUNCT, + /* ) 41 29 */ BOOST_CC_PUNCT, + /* * 42 2a */ BOOST_CC_PUNCT, + /* + 43 2b */ BOOST_CC_PUNCT, + /* , 44 2c */ BOOST_CC_PUNCT, + /* - 45 2d */ BOOST_CC_PUNCT, + /* . 46 2e */ BOOST_CC_PUNCT, + /* / 47 2f */ BOOST_CC_PUNCT, + /* 0 48 30 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 1 49 31 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 2 50 32 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 3 51 33 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 4 52 34 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 5 53 35 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 6 54 36 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 7 55 37 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 8 56 38 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* 9 57 39 */ BOOST_CC_DIGIT|BOOST_CC_XDIGIT, + /* : 58 3a */ BOOST_CC_PUNCT, + /* ; 59 3b */ BOOST_CC_PUNCT, + /* < 60 3c */ BOOST_CC_PUNCT, + /* = 61 3d */ BOOST_CC_PUNCT, + /* > 62 3e */ BOOST_CC_PUNCT, + /* ? 63 3f */ BOOST_CC_PUNCT, + /* @ 64 40 */ BOOST_CC_PUNCT, + /* A 65 41 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_UPPER, + /* B 66 42 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_UPPER, + /* C 67 43 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_UPPER, + /* D 68 44 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_UPPER, + /* E 69 45 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_UPPER, + /* F 70 46 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_UPPER, + /* G 71 47 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* H 72 48 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* I 73 49 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* J 74 4a */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* K 75 4b */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* L 76 4c */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* M 77 4d */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* N 78 4e */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* O 79 4f */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* P 80 50 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Q 81 51 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* R 82 52 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* S 83 53 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* T 84 54 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* U 85 55 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* V 86 56 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* W 87 57 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* X 88 58 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Y 89 59 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Z 90 5a */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* [ 91 5b */ BOOST_CC_PUNCT, + /* \ 92 5c */ BOOST_CC_PUNCT, + /* ] 93 5d */ BOOST_CC_PUNCT, + /* ^ 94 5e */ BOOST_CC_PUNCT, + /* _ 95 5f */ BOOST_CC_PUNCT, + /* ` 96 60 */ BOOST_CC_PUNCT, + /* a 97 61 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_LOWER, + /* b 98 62 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_LOWER, + /* c 99 63 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_LOWER, + /* d 100 64 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_LOWER, + /* e 101 65 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_LOWER, + /* f 102 66 */ BOOST_CC_ALPHA|BOOST_CC_XDIGIT|BOOST_CC_LOWER, + /* g 103 67 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* h 104 68 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* i 105 69 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* j 106 6a */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* k 107 6b */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* l 108 6c */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* m 109 6d */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* n 110 6e */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* o 111 6f */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* p 112 70 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* q 113 71 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* r 114 72 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* s 115 73 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* t 116 74 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* u 117 75 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* v 118 76 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* w 119 77 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* x 120 78 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* y 121 79 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* z 122 7a */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* { 123 7b */ BOOST_CC_PUNCT, + /* | 124 7c */ BOOST_CC_PUNCT, + /* } 125 7d */ BOOST_CC_PUNCT, + /* ~ 126 7e */ BOOST_CC_PUNCT, + /* DEL 127 7f */ BOOST_CC_CTRL, + /* -- 128 80 */ BOOST_CC_CTRL, + /* -- 129 81 */ BOOST_CC_CTRL, + /* -- 130 82 */ BOOST_CC_CTRL, + /* -- 131 83 */ BOOST_CC_CTRL, + /* -- 132 84 */ BOOST_CC_CTRL, + /* -- 133 85 */ BOOST_CC_CTRL, + /* -- 134 86 */ BOOST_CC_CTRL, + /* -- 135 87 */ BOOST_CC_CTRL, + /* -- 136 88 */ BOOST_CC_CTRL, + /* -- 137 89 */ BOOST_CC_CTRL, + /* -- 138 8a */ BOOST_CC_CTRL, + /* -- 139 8b */ BOOST_CC_CTRL, + /* -- 140 8c */ BOOST_CC_CTRL, + /* -- 141 8d */ BOOST_CC_CTRL, + /* -- 142 8e */ BOOST_CC_CTRL, + /* -- 143 8f */ BOOST_CC_CTRL, + /* -- 144 90 */ BOOST_CC_CTRL, + /* -- 145 91 */ BOOST_CC_CTRL, + /* -- 146 92 */ BOOST_CC_CTRL, + /* -- 147 93 */ BOOST_CC_CTRL, + /* -- 148 94 */ BOOST_CC_CTRL, + /* -- 149 95 */ BOOST_CC_CTRL, + /* -- 150 96 */ BOOST_CC_CTRL, + /* -- 151 97 */ BOOST_CC_CTRL, + /* -- 152 98 */ BOOST_CC_CTRL, + /* -- 153 99 */ BOOST_CC_CTRL, + /* -- 154 9a */ BOOST_CC_CTRL, + /* -- 155 9b */ BOOST_CC_CTRL, + /* -- 156 9c */ BOOST_CC_CTRL, + /* -- 157 9d */ BOOST_CC_CTRL, + /* -- 158 9e */ BOOST_CC_CTRL, + /* -- 159 9f */ BOOST_CC_CTRL, + /* 160 a0 */ BOOST_CC_SPACE, + /* ¡ 161 a1 */ BOOST_CC_PUNCT, + /* ¢ 162 a2 */ BOOST_CC_PUNCT, + /* £ 163 a3 */ BOOST_CC_PUNCT, + /* ¤ 164 a4 */ BOOST_CC_PUNCT, + /* ¥ 165 a5 */ BOOST_CC_PUNCT, + /* ¦ 166 a6 */ BOOST_CC_PUNCT, + /* § 167 a7 */ BOOST_CC_PUNCT, + /* ¨ 168 a8 */ BOOST_CC_PUNCT, + /* © 169 a9 */ BOOST_CC_PUNCT, + /* ª 170 aa */ BOOST_CC_PUNCT, + /* « 171 ab */ BOOST_CC_PUNCT, + /* ¬ 172 ac */ BOOST_CC_PUNCT, + /* 173 ad */ BOOST_CC_PUNCT, + /* ® 174 ae */ BOOST_CC_PUNCT, + /* ¯ 175 af */ BOOST_CC_PUNCT, + /* ° 176 b0 */ BOOST_CC_PUNCT, + /* ± 177 b1 */ BOOST_CC_PUNCT, + /* ² 178 b2 */ BOOST_CC_DIGIT|BOOST_CC_PUNCT, + /* ³ 179 b3 */ BOOST_CC_DIGIT|BOOST_CC_PUNCT, + /* ´ 180 b4 */ BOOST_CC_PUNCT, + /* µ 181 b5 */ BOOST_CC_PUNCT, + /* ¶ 182 b6 */ BOOST_CC_PUNCT, + /* · 183 b7 */ BOOST_CC_PUNCT, + /* ¸ 184 b8 */ BOOST_CC_PUNCT, + /* ¹ 185 b9 */ BOOST_CC_DIGIT|BOOST_CC_PUNCT, + /* º 186 ba */ BOOST_CC_PUNCT, + /* » 187 bb */ BOOST_CC_PUNCT, + /* ¼ 188 bc */ BOOST_CC_PUNCT, + /* ½ 189 bd */ BOOST_CC_PUNCT, + /* ¾ 190 be */ BOOST_CC_PUNCT, + /* ¿ 191 bf */ BOOST_CC_PUNCT, + /* À 192 c0 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Á 193 c1 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Â 194 c2 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ã 195 c3 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ä 196 c4 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Å 197 c5 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Æ 198 c6 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ç 199 c7 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* È 200 c8 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* É 201 c9 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ê 202 ca */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ë 203 cb */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ì 204 cc */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Í 205 cd */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Î 206 ce */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ï 207 cf */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ð 208 d0 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ñ 209 d1 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ò 210 d2 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ó 211 d3 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ô 212 d4 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Õ 213 d5 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ö 214 d6 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* × 215 d7 */ BOOST_CC_PUNCT, + /* Ø 216 d8 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ù 217 d9 */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ú 218 da */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Û 219 db */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ü 220 dc */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Ý 221 dd */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* Þ 222 de */ BOOST_CC_ALPHA|BOOST_CC_UPPER, + /* ß 223 df */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* à 224 e0 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* á 225 e1 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* â 226 e2 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ã 227 e3 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ä 228 e4 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* å 229 e5 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* æ 230 e6 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ç 231 e7 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* è 232 e8 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* é 233 e9 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ê 234 ea */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ë 235 eb */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ì 236 ec */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* í 237 ed */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* î 238 ee */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ï 239 ef */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ð 240 f0 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ñ 241 f1 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ò 242 f2 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ó 243 f3 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ô 244 f4 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* õ 245 f5 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ö 246 f6 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ÷ 247 f7 */ BOOST_CC_PUNCT, + /* ø 248 f8 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ù 249 f9 */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ú 250 fa */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* û 251 fb */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ü 252 fc */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ý 253 fd */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* þ 254 fe */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + /* ÿ 255 ff */ BOOST_CC_ALPHA|BOOST_CC_LOWER, + }; + + /////////////////////////////////////////////////////////////////////////// + // ISO 8859-1 character conversion table + /////////////////////////////////////////////////////////////////////////// + const unsigned char iso8859_1_char_conversion[] = + { + /* NUL 0 0 */ '\0', + /* SOH 1 1 */ '\0', + /* STX 2 2 */ '\0', + /* ETX 3 3 */ '\0', + /* EOT 4 4 */ '\0', + /* ENQ 5 5 */ '\0', + /* ACK 6 6 */ '\0', + /* BEL 7 7 */ '\0', + /* BS 8 8 */ '\0', + /* HT 9 9 */ '\0', + /* NL 10 a */ '\0', + /* VT 11 b */ '\0', + /* NP 12 c */ '\0', + /* CR 13 d */ '\0', + /* SO 14 e */ '\0', + /* SI 15 f */ '\0', + /* DLE 16 10 */ '\0', + /* DC1 17 11 */ '\0', + /* DC2 18 12 */ '\0', + /* DC3 19 13 */ '\0', + /* DC4 20 14 */ '\0', + /* NAK 21 15 */ '\0', + /* SYN 22 16 */ '\0', + /* ETB 23 17 */ '\0', + /* CAN 24 18 */ '\0', + /* EM 25 19 */ '\0', + /* SUB 26 1a */ '\0', + /* ESC 27 1b */ '\0', + /* FS 28 1c */ '\0', + /* GS 29 1d */ '\0', + /* RS 30 1e */ '\0', + /* US 31 1f */ '\0', + /* SP 32 20 */ '\0', + /* ! 33 21 */ '\0', + /* " 34 22 */ '\0', + /* # 35 23 */ '\0', + /* $ 36 24 */ '\0', + /* % 37 25 */ '\0', + /* & 38 26 */ '\0', + /* ' 39 27 */ '\0', + /* ( 40 28 */ '\0', + /* ) 41 29 */ '\0', + /* * 42 2a */ '\0', + /* + 43 2b */ '\0', + /* , 44 2c */ '\0', + /* - 45 2d */ '\0', + /* . 46 2e */ '\0', + /* / 47 2f */ '\0', + /* 0 48 30 */ '\0', + /* 1 49 31 */ '\0', + /* 2 50 32 */ '\0', + /* 3 51 33 */ '\0', + /* 4 52 34 */ '\0', + /* 5 53 35 */ '\0', + /* 6 54 36 */ '\0', + /* 7 55 37 */ '\0', + /* 8 56 38 */ '\0', + /* 9 57 39 */ '\0', + /* : 58 3a */ '\0', + /* ; 59 3b */ '\0', + /* < 60 3c */ '\0', + /* = 61 3d */ '\0', + /* > 62 3e */ '\0', + /* ? 63 3f */ '\0', + /* @ 64 40 */ '\0', + /* A 65 41 */ 'a', + /* B 66 42 */ 'b', + /* C 67 43 */ 'c', + /* D 68 44 */ 'd', + /* E 69 45 */ 'e', + /* F 70 46 */ 'f', + /* G 71 47 */ 'g', + /* H 72 48 */ 'h', + /* I 73 49 */ 'i', + /* J 74 4a */ 'j', + /* K 75 4b */ 'k', + /* L 76 4c */ 'l', + /* M 77 4d */ 'm', + /* N 78 4e */ 'n', + /* O 79 4f */ 'o', + /* P 80 50 */ 'p', + /* Q 81 51 */ 'q', + /* R 82 52 */ 'r', + /* S 83 53 */ 's', + /* T 84 54 */ 't', + /* U 85 55 */ 'u', + /* V 86 56 */ 'v', + /* W 87 57 */ 'w', + /* X 88 58 */ 'x', + /* Y 89 59 */ 'y', + /* Z 90 5a */ 'z', + /* [ 91 5b */ '\0', + /* \ 92 5c */ '\0', + /* ] 93 5d */ '\0', + /* ^ 94 5e */ '\0', + /* _ 95 5f */ '\0', + /* ` 96 60 */ '\0', + /* a 97 61 */ 'A', + /* b 98 62 */ 'B', + /* c 99 63 */ 'C', + /* d 100 64 */ 'D', + /* e 101 65 */ 'E', + /* f 102 66 */ 'F', + /* g 103 67 */ 'G', + /* h 104 68 */ 'H', + /* i 105 69 */ 'I', + /* j 106 6a */ 'J', + /* k 107 6b */ 'K', + /* l 108 6c */ 'L', + /* m 109 6d */ 'M', + /* n 110 6e */ 'N', + /* o 111 6f */ 'O', + /* p 112 70 */ 'P', + /* q 113 71 */ 'Q', + /* r 114 72 */ 'R', + /* s 115 73 */ 'S', + /* t 116 74 */ 'T', + /* u 117 75 */ 'U', + /* v 118 76 */ 'V', + /* w 119 77 */ 'W', + /* x 120 78 */ 'X', + /* y 121 79 */ 'Y', + /* z 122 7a */ 'Z', + /* { 123 7b */ '\0', + /* | 124 7c */ '\0', + /* } 125 7d */ '\0', + /* ~ 126 7e */ '\0', + /* DEL 127 7f */ '\0', + /* -- 128 80 */ '\0', + /* -- 129 81 */ '\0', + /* -- 130 82 */ '\0', + /* -- 131 83 */ '\0', + /* -- 132 84 */ '\0', + /* -- 133 85 */ '\0', + /* -- 134 86 */ '\0', + /* -- 135 87 */ '\0', + /* -- 136 88 */ '\0', + /* -- 137 89 */ '\0', + /* -- 138 8a */ '\0', + /* -- 139 8b */ '\0', + /* -- 140 8c */ '\0', + /* -- 141 8d */ '\0', + /* -- 142 8e */ '\0', + /* -- 143 8f */ '\0', + /* -- 144 90 */ '\0', + /* -- 145 91 */ '\0', + /* -- 146 92 */ '\0', + /* -- 147 93 */ '\0', + /* -- 148 94 */ '\0', + /* -- 149 95 */ '\0', + /* -- 150 96 */ '\0', + /* -- 151 97 */ '\0', + /* -- 152 98 */ '\0', + /* -- 153 99 */ '\0', + /* -- 154 9a */ '\0', + /* -- 155 9b */ '\0', + /* -- 156 9c */ '\0', + /* -- 157 9d */ '\0', + /* -- 158 9e */ '\0', + /* -- 159 9f */ '\0', + /* 160 a0 */ '\0', + /* ¡ 161 a1 */ '\0', + /* ¢ 162 a2 */ '\0', + /* £ 163 a3 */ '\0', + /* ¤ 164 a4 */ '\0', + /* ¥ 165 a5 */ '\0', + /* ¦ 166 a6 */ '\0', + /* § 167 a7 */ '\0', + /* ¨ 168 a8 */ '\0', + /* © 169 a9 */ '\0', + /* ª 170 aa */ '\0', + /* « 171 ab */ '\0', + /* ¬ 172 ac */ '\0', + /* 173 ad */ '\0', + /* ® 174 ae */ '\0', + /* ¯ 175 af */ '\0', + /* ° 176 b0 */ '\0', + /* ± 177 b1 */ '\0', + /* ² 178 b2 */ '\0', + /* ³ 179 b3 */ '\0', + /* ´ 180 b4 */ '\0', + /* µ 181 b5 */ '\0', + /* ¶ 182 b6 */ '\0', + /* · 183 b7 */ '\0', + /* ¸ 184 b8 */ '\0', + /* ¹ 185 b9 */ '\0', + /* º 186 ba */ '\0', + /* » 187 bb */ '\0', + /* ¼ 188 bc */ '\0', + /* ½ 189 bd */ '\0', + /* ¾ 190 be */ '\0', + /* ¿ 191 bf */ '\0', + /* à 192 c0 */ 0xe0, + /* á 193 c1 */ 0xe1, + /* â 194 c2 */ 0xe2, + /* ã 195 c3 */ 0xe3, + /* ä 196 c4 */ 0xe4, + /* å 197 c5 */ 0xe5, + /* æ 198 c6 */ 0xe6, + /* ç 199 c7 */ 0xe7, + /* è 200 c8 */ 0xe8, + /* é 201 c9 */ 0xe9, + /* ê 202 ca */ 0xea, + /* ë 203 cb */ 0xeb, + /* ì 204 cc */ 0xec, + /* í 205 cd */ 0xed, + /* î 206 ce */ 0xee, + /* ï 207 cf */ 0xef, + /* ð 208 d0 */ 0xf0, + /* ñ 209 d1 */ 0xf1, + /* ò 210 d2 */ 0xf2, + /* ó 211 d3 */ 0xf3, + /* ô 212 d4 */ 0xf4, + /* õ 213 d5 */ 0xf5, + /* ö 214 d6 */ 0xf6, + /* × 215 d7 */ '\0', + /* ø 216 d8 */ 0xf8, + /* ù 217 d9 */ 0xf9, + /* ú 218 da */ 0xfa, + /* û 219 db */ 0xfb, + /* ü 220 dc */ 0xfc, + /* ý 221 dd */ 0xfd, + /* þ 222 de */ 0xfe, + /* ß 223 df */ '\0', + /* À 224 e0 */ 0xc0, + /* Á 225 e1 */ 0xc1, + /* Â 226 e2 */ 0xc2, + /* Ã 227 e3 */ 0xc3, + /* Ä 228 e4 */ 0xc4, + /* Å 229 e5 */ 0xc5, + /* Æ 230 e6 */ 0xc6, + /* Ç 231 e7 */ 0xc7, + /* È 232 e8 */ 0xc8, + /* É 233 e9 */ 0xc9, + /* Ê 234 ea */ 0xca, + /* Ë 235 eb */ 0xcb, + /* Ì 236 ec */ 0xcc, + /* Í 237 ed */ 0xcd, + /* Î 238 ee */ 0xce, + /* Ï 239 ef */ 0xcf, + /* Ð 240 f0 */ 0xd0, + /* Ñ 241 f1 */ 0xd1, + /* Ò 242 f2 */ 0xd2, + /* Ó 243 f3 */ 0xd3, + /* Ô 244 f4 */ 0xd4, + /* Õ 245 f5 */ 0xd5, + /* Ö 246 f6 */ 0xd6, + /* ÷ 247 f7 */ '\0', + /* Ø 248 f8 */ 0xd8, + /* Ù 249 f9 */ 0xd9, + /* Ú 250 fa */ 0xda, + /* Û 251 fb */ 0xdb, + /* Ü 252 fc */ 0xdc, + /* Ý 253 fd */ 0xdd, + /* Þ 254 fe */ 0xde, + /* ÿ 255 ff */ '\0', + }; + + /////////////////////////////////////////////////////////////////////////// + // Test characters for specified conditions (using iso8859-1) + /////////////////////////////////////////////////////////////////////////// + struct iso8859_1 + { + typedef unsigned char char_type; + + static bool + isascii_(int ch) + { + return 0 == (ch & ~0x7f); + } + + static bool + ischar(int ch) + { + // iso8859.1 uses all 8 bits + // we have to watch out for sign extensions + return (0 == (ch & ~0xff) || ~0 == (ch | 0xff)) ? true : false; + } + + static int + isalnum(int ch) + { + BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + return (iso8859_1_char_types[ch] & BOOST_CC_ALPHA) + || (iso8859_1_char_types[ch] & BOOST_CC_DIGIT); + } + + static int + isalpha(int ch) + { + BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + return (iso8859_1_char_types[ch] & BOOST_CC_ALPHA); + } + + static int + isdigit(int ch) + { + BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + return (iso8859_1_char_types[ch] & BOOST_CC_DIGIT); + } + + static int + isxdigit(int ch) + { + BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + return (iso8859_1_char_types[ch] & BOOST_CC_XDIGIT); + } + + static int + iscntrl(int ch) + { + BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + return (iso8859_1_char_types[ch] & BOOST_CC_CTRL); + } + + static int + isgraph(int ch) + { + return ('\x21' <= ch && ch <= '\x7e') || ('\xa1' <= ch && ch <= '\xff'); + } + + static int + islower(int ch) + { + BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + return (iso8859_1_char_types[ch] & BOOST_CC_LOWER); + } + + static int + isprint(int ch) + { + return ('\x20' <= ch && ch <= '\x7e') || ('\xa0' <= ch && ch <= '\xff'); + } + + static int + ispunct(int ch) + { + BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + return (iso8859_1_char_types[ch] & BOOST_CC_PUNCT); + } + + static int + isspace(int ch) + { + BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + return (iso8859_1_char_types[ch] & BOOST_CC_SPACE); + } + + static int + isblank BOOST_PREVENT_MACRO_SUBSTITUTION (int ch) + { + return ('\x09' == ch || '\x20' == ch || '\xa0' == ch); + } + + static int + isupper(int ch) + { + BOOST_ASSERT(0 == (ch & ~UCHAR_MAX)); + return (iso8859_1_char_types[ch] & BOOST_CC_UPPER); + } + + /////////////////////////////////////////////////////////////////////////// + // Simple character conversions + /////////////////////////////////////////////////////////////////////////// + + static int + tolower(int ch) + { + return isupper(ch) && '\0' != iso8859_1_char_conversion[ch] ? + iso8859_1_char_conversion[ch] : ch; + } + + static int + toupper(int ch) + { + return islower(ch) && '\0' != iso8859_1_char_conversion[ch] ? + iso8859_1_char_conversion[ch] : ch; + } + + static ::boost::uint32_t + toucs4(int ch) + { + // The first 256 characters in Unicode and the UCS are + // identical to those in ISO/IEC-8859-1. + return ch; + } + }; + +}}} + +/////////////////////////////////////////////////////////////////////////////// +// undefine macros +/////////////////////////////////////////////////////////////////////////////// +#undef BOOST_CC_DIGIT +#undef BOOST_CC_XDIGIT +#undef BOOST_CC_ALPHA +#undef BOOST_CC_CTRL +#undef BOOST_CC_LOWER +#undef BOOST_CC_UPPER +#undef BOOST_CC_PUNCT +#undef BOOST_CC_SPACE + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/standard.hpp b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/standard.hpp new file mode 100644 index 0000000..c32a9e7 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/standard.hpp @@ -0,0 +1,137 @@ +/*============================================================================= + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + + 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_STANDARD_APRIL_26_2006_1106PM) +#define BOOST_SPIRIT_STANDARD_APRIL_26_2006_1106PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <cctype> +#include <boost/cstdint.hpp> + +namespace boost { namespace spirit { namespace char_encoding +{ + /////////////////////////////////////////////////////////////////////////// + // Test characters for specified conditions (using std functions) + /////////////////////////////////////////////////////////////////////////// + struct standard + { + typedef char char_type; + + static bool + isascii_(int ch) + { + return 0 == (ch & ~0x7f); + } + + static bool + ischar(int ch) + { + // uses all 8 bits + // we have to watch out for sign extensions + return (0 == (ch & ~0xff) || ~0 == (ch | 0xff)) ? true : false; + } + + static int + isalnum(int ch) + { + return std::isalnum(ch); + } + + static int + isalpha(int ch) + { + return std::isalpha(ch); + } + + static int + isdigit(int ch) + { + return std::isdigit(ch); + } + + static int + isxdigit(int ch) + { + return std::isxdigit(ch); + } + + static int + iscntrl(int ch) + { + return std::iscntrl(ch); + } + + static int + isgraph(int ch) + { + return std::isgraph(ch); + } + + static int + islower(int ch) + { + return std::islower(ch); + } + + static int + isprint(int ch) + { + return std::isprint(ch); + } + + static int + ispunct(int ch) + { + return std::ispunct(ch); + } + + static int + isspace(int ch) + { + return std::isspace(ch); + } + + static int + isblank BOOST_PREVENT_MACRO_SUBSTITUTION (int ch) + { + return (ch == ' ' || ch == '\t'); + } + + static int + isupper(int ch) + { + return std::isupper(ch); + } + + /////////////////////////////////////////////////////////////////////////////// + // Simple character conversions + /////////////////////////////////////////////////////////////////////////////// + static int + tolower(int ch) + { + return std::tolower(ch); + } + + static int + toupper(int ch) + { + return std::toupper(ch); + } + + static ::boost::uint32_t + toucs4(int ch) + { + return ch; + } + }; +}}} + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/standard_wide.hpp b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/standard_wide.hpp new file mode 100644 index 0000000..99c918c --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/standard_wide.hpp @@ -0,0 +1,182 @@ +/*============================================================================= + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + + 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_STANDARD_WIDE_NOVEMBER_10_2006_0913AM) +#define BOOST_SPIRIT_STANDARD_WIDE_NOVEMBER_10_2006_0913AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <cwctype> +#include <string> + +#include <boost/cstdint.hpp> +#include <boost/spirit/home/support/assert_msg.hpp> + +namespace boost { namespace spirit { namespace traits +{ + template <std::size_t N> + struct wchar_t_size + { + BOOST_SPIRIT_ASSERT_MSG(N == 1 || N == 2 || N == 4, + not_supported_size_of_wchar_t, ()); + }; + + template <> struct wchar_t_size<1> { enum { mask = 0xff }; }; + template <> struct wchar_t_size<2> { enum { mask = 0xffff }; }; + template <> struct wchar_t_size<4> { enum { mask = 0xffffffff }; }; + +}}} + +namespace boost { namespace spirit { namespace char_encoding +{ + /////////////////////////////////////////////////////////////////////////// + // Test characters for specified conditions (using std wchar_t functions) + /////////////////////////////////////////////////////////////////////////// + + struct standard_wide + { + typedef wchar_t char_type; + + template <typename Char> + static typename std::char_traits<Char>::int_type + to_int_type(Char ch) + { + return std::char_traits<Char>::to_int_type(ch); + } + + template <typename Char> + static Char + to_char_type(typename std::char_traits<Char>::int_type ch) + { + return std::char_traits<Char>::to_char_type(ch); + } + + static bool + ischar(int ch) + { + // we have to watch out for sign extensions (casting is there to + // silence certain compilers complaining about signed/unsigned + // mismatch) + return ( + std::size_t(0) == + std::size_t(ch & ~traits::wchar_t_size<sizeof(wchar_t)>::mask) || + std::size_t(~0) == + std::size_t(ch | traits::wchar_t_size<sizeof(wchar_t)>::mask) + ) ? true : false; // any wchar_t, but no other bits set + } + + static bool + isalnum(wchar_t ch) + { + using namespace std; + return iswalnum(to_int_type(ch)) ? true : false; + } + + static bool + isalpha(wchar_t ch) + { + using namespace std; + return iswalpha(to_int_type(ch)) ? true : false; + } + + static bool + iscntrl(wchar_t ch) + { + using namespace std; + return iswcntrl(to_int_type(ch)) ? true : false; + } + + static bool + isdigit(wchar_t ch) + { + using namespace std; + return iswdigit(to_int_type(ch)) ? true : false; + } + + static bool + isgraph(wchar_t ch) + { + using namespace std; + return iswgraph(to_int_type(ch)) ? true : false; + } + + static bool + islower(wchar_t ch) + { + using namespace std; + return iswlower(to_int_type(ch)) ? true : false; + } + + static bool + isprint(wchar_t ch) + { + using namespace std; + return iswprint(to_int_type(ch)) ? true : false; + } + + static bool + ispunct(wchar_t ch) + { + using namespace std; + return iswpunct(to_int_type(ch)) ? true : false; + } + + static bool + isspace(wchar_t ch) + { + using namespace std; + return iswspace(to_int_type(ch)) ? true : false; + } + + static bool + isupper(wchar_t ch) + { + using namespace std; + return iswupper(to_int_type(ch)) ? true : false; + } + + static bool + isxdigit(wchar_t ch) + { + using namespace std; + return iswxdigit(to_int_type(ch)) ? true : false; + } + + static bool + isblank BOOST_PREVENT_MACRO_SUBSTITUTION (wchar_t ch) + { + return (ch == L' ' || ch == L'\t'); + } + + static wchar_t + tolower(wchar_t ch) + { + using namespace std; + return isupper(ch) ? + to_char_type<wchar_t>(towlower(to_int_type(ch))) : ch; + } + + static wchar_t + toupper(wchar_t ch) + { + using namespace std; + return islower(ch) ? + to_char_type<wchar_t>(towupper(to_int_type(ch))) : ch; + } + + static ::boost::uint32_t + toucs4(int ch) + { + return ch; + } + }; +}}} + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode.hpp b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode.hpp new file mode 100644 index 0000000..9febf7e --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode.hpp @@ -0,0 +1,339 @@ +/*============================================================================= + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2001-2011 Joel de Guzman + + 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_UNICODE_1_JANUARY_12_2010_0728PM) +#define BOOST_SPIRIT_UNICODE_1_JANUARY_12_2010_0728PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/cstdint.hpp> +#include <boost/spirit/home/support/char_encoding/unicode/query.hpp> + +namespace boost { namespace spirit { namespace char_encoding +{ + /////////////////////////////////////////////////////////////////////////// + // Test characters for specified conditions (using iso8859-1) + /////////////////////////////////////////////////////////////////////////// + struct unicode + { + typedef ::boost::uint32_t char_type; + + /////////////////////////////////////////////////////////////////////////// + // Posix stuff + /////////////////////////////////////////////////////////////////////////// + static bool + isascii_(char_type ch) + { + return 0 == (ch & ~0x7f); + } + + static bool + ischar(char_type ch) + { + // unicode code points in the range 0x00 to 0x10FFFF + return ch <= 0x10FFFF; + } + + static bool + isalnum(char_type ch) + { + return ucd::is_alphanumeric(ch); + } + + static bool + isalpha(char_type ch) + { + return ucd::is_alphabetic(ch); + } + + static bool + isdigit(char_type ch) + { + return ucd::is_decimal_number(ch); + } + + static bool + isxdigit(char_type ch) + { + return ucd::is_hex_digit(ch); + } + + static bool + iscntrl(char_type ch) + { + return ucd::is_control(ch); + } + + static bool + isgraph(char_type ch) + { + return ucd::is_graph(ch); + } + + static bool + islower(char_type ch) + { + return ucd::is_lowercase(ch); + } + + static bool + isprint(char_type ch) + { + return ucd::is_print(ch); + } + + static bool + ispunct(char_type ch) + { + return ucd::is_punctuation(ch); + } + + static bool + isspace(char_type ch) + { + return ucd::is_white_space(ch); + } + + static int + isblank BOOST_PREVENT_MACRO_SUBSTITUTION (char_type ch) + { + return ucd::is_blank(ch); + } + + static bool + isupper(char_type ch) + { + return ucd::is_uppercase(ch); + } + + /////////////////////////////////////////////////////////////////////////// + // Simple character conversions + /////////////////////////////////////////////////////////////////////////// + + static char_type + tolower(char_type ch) + { + return ucd::to_lowercase(ch); + } + + static char_type + toupper(char_type ch) + { + return ucd::to_uppercase(ch); + } + + static ::boost::uint32_t + toucs4(char_type ch) + { + return ch; + } + + /////////////////////////////////////////////////////////////////////////// + // Major Categories + /////////////////////////////////////////////////////////////////////////// +#define BOOST_SPIRIT_MAJOR_CATEGORY(name) \ + static bool \ + is_##name(char_type ch) \ + { \ + return ucd::get_major_category(ch) == ucd::properties::name; \ + } \ + /***/ + + BOOST_SPIRIT_MAJOR_CATEGORY(letter) + BOOST_SPIRIT_MAJOR_CATEGORY(mark) + BOOST_SPIRIT_MAJOR_CATEGORY(number) + BOOST_SPIRIT_MAJOR_CATEGORY(separator) + BOOST_SPIRIT_MAJOR_CATEGORY(other) + BOOST_SPIRIT_MAJOR_CATEGORY(punctuation) + BOOST_SPIRIT_MAJOR_CATEGORY(symbol) + + /////////////////////////////////////////////////////////////////////////// + // General Categories + /////////////////////////////////////////////////////////////////////////// +#define BOOST_SPIRIT_CATEGORY(name) \ + static bool \ + is_##name(char_type ch) \ + { \ + return ucd::get_category(ch) == ucd::properties::name; \ + } \ + /***/ + + BOOST_SPIRIT_CATEGORY(uppercase_letter) + BOOST_SPIRIT_CATEGORY(lowercase_letter) + BOOST_SPIRIT_CATEGORY(titlecase_letter) + BOOST_SPIRIT_CATEGORY(modifier_letter) + BOOST_SPIRIT_CATEGORY(other_letter) + + BOOST_SPIRIT_CATEGORY(nonspacing_mark) + BOOST_SPIRIT_CATEGORY(enclosing_mark) + BOOST_SPIRIT_CATEGORY(spacing_mark) + + BOOST_SPIRIT_CATEGORY(decimal_number) + BOOST_SPIRIT_CATEGORY(letter_number) + BOOST_SPIRIT_CATEGORY(other_number) + + BOOST_SPIRIT_CATEGORY(space_separator) + BOOST_SPIRIT_CATEGORY(line_separator) + BOOST_SPIRIT_CATEGORY(paragraph_separator) + + BOOST_SPIRIT_CATEGORY(control) + BOOST_SPIRIT_CATEGORY(format) + BOOST_SPIRIT_CATEGORY(private_use) + BOOST_SPIRIT_CATEGORY(surrogate) + BOOST_SPIRIT_CATEGORY(unassigned) + + BOOST_SPIRIT_CATEGORY(dash_punctuation) + BOOST_SPIRIT_CATEGORY(open_punctuation) + BOOST_SPIRIT_CATEGORY(close_punctuation) + BOOST_SPIRIT_CATEGORY(connector_punctuation) + BOOST_SPIRIT_CATEGORY(other_punctuation) + BOOST_SPIRIT_CATEGORY(initial_punctuation) + BOOST_SPIRIT_CATEGORY(final_punctuation) + + BOOST_SPIRIT_CATEGORY(math_symbol) + BOOST_SPIRIT_CATEGORY(currency_symbol) + BOOST_SPIRIT_CATEGORY(modifier_symbol) + BOOST_SPIRIT_CATEGORY(other_symbol) + + /////////////////////////////////////////////////////////////////////////// + // Derived Categories + /////////////////////////////////////////////////////////////////////////// +#define BOOST_SPIRIT_DERIVED_CATEGORY(name) \ + static bool \ + is_##name(char_type ch) \ + { \ + return ucd::is_##name(ch); \ + } \ + /***/ + + BOOST_SPIRIT_DERIVED_CATEGORY(alphabetic) + BOOST_SPIRIT_DERIVED_CATEGORY(uppercase) + BOOST_SPIRIT_DERIVED_CATEGORY(lowercase) + BOOST_SPIRIT_DERIVED_CATEGORY(white_space) + BOOST_SPIRIT_DERIVED_CATEGORY(hex_digit) + BOOST_SPIRIT_DERIVED_CATEGORY(noncharacter_code_point) + BOOST_SPIRIT_DERIVED_CATEGORY(default_ignorable_code_point) + + /////////////////////////////////////////////////////////////////////////// + // Scripts + /////////////////////////////////////////////////////////////////////////// +#define BOOST_SPIRIT_SCRIPT(name) \ + static bool \ + is_##name(char_type ch) \ + { \ + return ucd::get_script(ch) == ucd::properties::name; \ + } \ + /***/ + + BOOST_SPIRIT_SCRIPT(arabic) + BOOST_SPIRIT_SCRIPT(imperial_aramaic) + BOOST_SPIRIT_SCRIPT(armenian) + BOOST_SPIRIT_SCRIPT(avestan) + BOOST_SPIRIT_SCRIPT(balinese) + BOOST_SPIRIT_SCRIPT(bamum) + BOOST_SPIRIT_SCRIPT(bengali) + BOOST_SPIRIT_SCRIPT(bopomofo) + BOOST_SPIRIT_SCRIPT(braille) + BOOST_SPIRIT_SCRIPT(buginese) + BOOST_SPIRIT_SCRIPT(buhid) + BOOST_SPIRIT_SCRIPT(canadian_aboriginal) + BOOST_SPIRIT_SCRIPT(carian) + BOOST_SPIRIT_SCRIPT(cham) + BOOST_SPIRIT_SCRIPT(cherokee) + BOOST_SPIRIT_SCRIPT(coptic) + BOOST_SPIRIT_SCRIPT(cypriot) + BOOST_SPIRIT_SCRIPT(cyrillic) + BOOST_SPIRIT_SCRIPT(devanagari) + BOOST_SPIRIT_SCRIPT(deseret) + BOOST_SPIRIT_SCRIPT(egyptian_hieroglyphs) + BOOST_SPIRIT_SCRIPT(ethiopic) + BOOST_SPIRIT_SCRIPT(georgian) + BOOST_SPIRIT_SCRIPT(glagolitic) + BOOST_SPIRIT_SCRIPT(gothic) + BOOST_SPIRIT_SCRIPT(greek) + BOOST_SPIRIT_SCRIPT(gujarati) + BOOST_SPIRIT_SCRIPT(gurmukhi) + BOOST_SPIRIT_SCRIPT(hangul) + BOOST_SPIRIT_SCRIPT(han) + BOOST_SPIRIT_SCRIPT(hanunoo) + BOOST_SPIRIT_SCRIPT(hebrew) + BOOST_SPIRIT_SCRIPT(hiragana) + BOOST_SPIRIT_SCRIPT(katakana_or_hiragana) + BOOST_SPIRIT_SCRIPT(old_italic) + BOOST_SPIRIT_SCRIPT(javanese) + BOOST_SPIRIT_SCRIPT(kayah_li) + BOOST_SPIRIT_SCRIPT(katakana) + BOOST_SPIRIT_SCRIPT(kharoshthi) + BOOST_SPIRIT_SCRIPT(khmer) + BOOST_SPIRIT_SCRIPT(kannada) + BOOST_SPIRIT_SCRIPT(kaithi) + BOOST_SPIRIT_SCRIPT(tai_tham) + BOOST_SPIRIT_SCRIPT(lao) + BOOST_SPIRIT_SCRIPT(latin) + BOOST_SPIRIT_SCRIPT(lepcha) + BOOST_SPIRIT_SCRIPT(limbu) + BOOST_SPIRIT_SCRIPT(linear_b) + BOOST_SPIRIT_SCRIPT(lisu) + BOOST_SPIRIT_SCRIPT(lycian) + BOOST_SPIRIT_SCRIPT(lydian) + BOOST_SPIRIT_SCRIPT(malayalam) + BOOST_SPIRIT_SCRIPT(mongolian) + BOOST_SPIRIT_SCRIPT(meetei_mayek) + BOOST_SPIRIT_SCRIPT(myanmar) + BOOST_SPIRIT_SCRIPT(nko) + BOOST_SPIRIT_SCRIPT(ogham) + BOOST_SPIRIT_SCRIPT(ol_chiki) + BOOST_SPIRIT_SCRIPT(old_turkic) + BOOST_SPIRIT_SCRIPT(oriya) + BOOST_SPIRIT_SCRIPT(osmanya) + BOOST_SPIRIT_SCRIPT(phags_pa) + BOOST_SPIRIT_SCRIPT(inscriptional_pahlavi) + BOOST_SPIRIT_SCRIPT(phoenician) + BOOST_SPIRIT_SCRIPT(inscriptional_parthian) + BOOST_SPIRIT_SCRIPT(rejang) + BOOST_SPIRIT_SCRIPT(runic) + BOOST_SPIRIT_SCRIPT(samaritan) + BOOST_SPIRIT_SCRIPT(old_south_arabian) + BOOST_SPIRIT_SCRIPT(saurashtra) + BOOST_SPIRIT_SCRIPT(shavian) + BOOST_SPIRIT_SCRIPT(sinhala) + BOOST_SPIRIT_SCRIPT(sundanese) + BOOST_SPIRIT_SCRIPT(syloti_nagri) + BOOST_SPIRIT_SCRIPT(syriac) + BOOST_SPIRIT_SCRIPT(tagbanwa) + BOOST_SPIRIT_SCRIPT(tai_le) + BOOST_SPIRIT_SCRIPT(new_tai_lue) + BOOST_SPIRIT_SCRIPT(tamil) + BOOST_SPIRIT_SCRIPT(tai_viet) + BOOST_SPIRIT_SCRIPT(telugu) + BOOST_SPIRIT_SCRIPT(tifinagh) + BOOST_SPIRIT_SCRIPT(tagalog) + BOOST_SPIRIT_SCRIPT(thaana) + BOOST_SPIRIT_SCRIPT(thai) + BOOST_SPIRIT_SCRIPT(tibetan) + BOOST_SPIRIT_SCRIPT(ugaritic) + BOOST_SPIRIT_SCRIPT(vai) + BOOST_SPIRIT_SCRIPT(old_persian) + BOOST_SPIRIT_SCRIPT(cuneiform) + BOOST_SPIRIT_SCRIPT(yi) + BOOST_SPIRIT_SCRIPT(inherited) + BOOST_SPIRIT_SCRIPT(common) + BOOST_SPIRIT_SCRIPT(unknown) + +#undef BOOST_SPIRIT_MAJOR_CATEGORY +#undef BOOST_SPIRIT_CATEGORY +#undef BOOST_SPIRIT_DERIVED_CATEGORY +#undef BOOST_SPIRIT_SCRIPT + + }; + +}}} + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode/category_table.hpp b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode/category_table.hpp new file mode 100644 index 0000000..1b262a1 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode/category_table.hpp @@ -0,0 +1,2216 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) + + AUTOGENERATED. DO NOT EDIT!!! +==============================================================================*/ +#include <boost/cstdint.hpp> + +namespace boost { namespace spirit { namespace ucd { namespace detail +{ + static const ::boost::uint8_t category_stage1[] = { + + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 34, 42, 43, 44, 45, 46, + 47, 48, 49, 40, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 50, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 51, + 52, 21, 21, 21, 53, 21, 54, 55, 56, 57, 58, 59, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 60, 61, 61, 61, 61, 61, 61, 61, 61, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 21, 63, 64, 21, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 73, 73, 74, 75, 76, 77, 78, 73, 73, 73, + 79, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 21, 21, 21, 80, 81, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 82, 82, 82, 82, 83, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 84, 85, 86, 87, 88, 89, 90, 91, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 92, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 93, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 94, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 95, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 21, 21, 96, 73, 73, 73, 73, 93, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 93, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 93, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 93, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 93, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 93, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 93, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 93, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 93, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 93, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 93, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 93, + 97, 98, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 93, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 100, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 100 + }; + + static const ::boost::uint16_t category_stage2[] = { + + // block 0 + 32, 32, 32, 32, 32, 32, 32, 32, 32, 544, 544, 544, 544, 544, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 536, 44, 44, 44, 49, 44, 44, 44, 41, 42, 44, 48, 44, 40, 44, 44, + 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 44, 44, 48, 48, 48, 44, + 44, 1216, 1216, 1216, 1216, 1216, 1216, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 41, 44, 42, 50, 43, + 50, 1345, 1345, 1345, 1345, 1345, 1345, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 41, 48, 42, 48, 32, + 32, 32, 32, 32, 32, 544, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 536, 44, 49, 49, 49, 49, 51, 51, 50, 51, 321, 45, 48, 4129, 51, 50, + 51, 48, 18, 18, 50, 321, 51, 44, 50, 18, 321, 46, 18, 18, 18, 44, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 48, 192, 192, 192, 192, 192, 192, 192, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 48, 321, 321, 321, 321, 321, 321, 321, 321, + + + // block 1 + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 321, 192, 321, 192, 321, 192, 321, 192, + 321, 192, 321, 192, 321, 192, 321, 192, 321, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 192, 321, 192, 321, 192, 321, 321, + 321, 192, 192, 321, 192, 321, 192, 192, 321, 192, 192, 192, 321, 321, 192, 192, + 192, 192, 321, 192, 192, 321, 192, 192, 192, 321, 321, 321, 192, 192, 321, 192, + 192, 321, 192, 321, 192, 321, 192, 192, 321, 192, 321, 321, 192, 321, 192, 192, + 321, 192, 192, 192, 321, 192, 321, 192, 192, 321, 321, 68, 192, 321, 321, 321, + 68, 68, 68, 68, 192, 66, 321, 192, 66, 321, 192, 66, 321, 192, 321, 192, + 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 321, 192, 66, 321, 192, 321, 192, 192, 192, 321, 192, 321, 192, 321, 192, 321, + + + // block 2 + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 321, 321, 321, 321, 321, 321, 192, 192, 321, 192, 192, 321, + 321, 192, 321, 192, 192, 192, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 68, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 323, 323, 323, 323, 323, 323, 323, 323, 323, 67, 67, 67, 67, 67, 67, 67, + 323, 323, 50, 50, 50, 50, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 323, 323, 323, 323, 323, 50, 50, 50, 50, 50, 50, 50, 67, 50, 67, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + + + // block 3 + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 328, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4104, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 192, 321, 192, 321, 67, 50, 192, 321, 0, 0, 323, 321, 321, 321, 44, 0, + 0, 0, 0, 0, 50, 50, 192, 44, 192, 192, 192, 0, 192, 0, 192, 192, + 321, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 0, 192, 192, 192, 192, 192, 192, 192, 192, 192, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 192, + 321, 321, 192, 192, 192, 321, 321, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 321, 321, 321, 321, 192, 321, 48, 192, 321, 192, 192, 321, 321, 192, 192, 192, + + + // block 4 + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 51, 8, 8, 8, 8, 8, 9, 9, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + + + // block 5 + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 320, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 0, 0, 67, 44, 44, 44, 44, 44, 44, + 0, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 0, 44, 40, 0, 0, 0, 0, 0, + 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 40, 72, + 44, 72, 72, 44, 72, 72, 44, 72, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, 0, 0, + 68, 68, 68, 44, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 6 + 33, 33, 33, 33, 0, 0, 48, 48, 48, 44, 44, 49, 44, 44, 51, 51, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 44, 0, 0, 44, 44, + 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 8, 72, 72, 72, 72, 72, 72, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 44, 44, 44, 44, 68, 68, + 72, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 44, 68, 72, 72, 72, 72, 72, 72, 72, 33, 9, 8, + 8, 72, 72, 72, 72, 67, 67, 72, 72, 51, 8, 8, 8, 72, 68, 68, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 68, 68, 68, 51, 51, 68, + + + // block 7 + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 0, 33, + 68, 72, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 67, 67, 51, 44, 44, 44, 67, 0, 0, 0, 0, 0, + + + // block 8 + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 0, 0, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 9 + 64, 72, 72, 74, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 8, 68, 74, 74, + 74, 72, 72, 72, 72, 72, 72, 72, 72, 74, 74, 74, 74, 8, 64, 0, + 68, 8, 8, 8, 8, 64, 0, 0, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 72, 72, 44, 44, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 44, 67, 68, 0, 0, 0, 0, 0, 0, 64, 64, 68, 68, 68, 68, 68, + 0, 72, 74, 74, 0, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 68, + 68, 0, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, + 68, 0, 68, 0, 0, 0, 68, 68, 68, 68, 0, 0, 8, 68, 74, 74, + 74, 72, 72, 72, 72, 0, 0, 74, 74, 0, 0, 74, 74, 8, 68, 0, + 0, 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 68, 68, 0, 68, + 68, 68, 72, 72, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 68, 68, 49, 49, 18, 18, 18, 18, 18, 18, 51, 0, 0, 0, 0, 0, + + + // block 10 + 0, 72, 72, 74, 0, 68, 68, 68, 68, 68, 68, 0, 0, 0, 0, 68, + 68, 0, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, + 68, 0, 68, 68, 0, 68, 68, 0, 68, 68, 0, 0, 8, 0, 74, 74, + 74, 72, 72, 0, 0, 0, 0, 72, 72, 0, 0, 72, 72, 8, 0, 0, + 0, 72, 0, 0, 0, 0, 0, 0, 0, 68, 68, 68, 68, 0, 68, 0, + 0, 0, 0, 0, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 72, 72, 68, 68, 68, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 72, 72, 74, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, + 68, 68, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, + 68, 0, 68, 68, 0, 68, 68, 68, 68, 68, 0, 0, 8, 68, 74, 74, + 74, 72, 72, 72, 72, 72, 0, 72, 72, 74, 0, 74, 74, 8, 0, 0, + 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 72, 72, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 11 + 0, 72, 74, 74, 0, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 68, + 68, 0, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, + 68, 0, 68, 68, 0, 68, 68, 68, 68, 68, 0, 0, 8, 68, 74, 72, + 74, 72, 72, 72, 72, 0, 0, 74, 74, 0, 0, 74, 74, 8, 0, 0, + 0, 0, 0, 0, 0, 0, 72, 74, 0, 0, 0, 0, 68, 68, 0, 68, + 68, 68, 72, 72, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 51, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 72, 68, 0, 68, 68, 68, 68, 68, 68, 0, 0, 0, 68, 68, + 68, 0, 68, 68, 68, 68, 0, 0, 0, 68, 68, 0, 68, 0, 68, 68, + 0, 0, 0, 68, 68, 0, 0, 0, 68, 68, 68, 0, 0, 0, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, 0, 74, 74, + 72, 74, 74, 0, 0, 0, 74, 74, 74, 0, 74, 74, 74, 8, 0, 0, + 68, 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 18, 18, 18, 51, 51, 51, 51, 51, 51, 49, 51, 0, 0, 0, 0, 0, + + + // block 12 + 0, 74, 74, 74, 0, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, + 68, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 0, 0, 0, 68, 72, 72, + 72, 74, 74, 74, 74, 0, 72, 72, 72, 0, 72, 72, 72, 8, 0, 0, + 0, 0, 0, 0, 0, 72, 72, 0, 68, 68, 0, 0, 0, 0, 0, 0, + 68, 68, 72, 72, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 0, 0, 0, 0, 0, 0, 0, 0, 18, 18, 18, 18, 18, 18, 18, 51, + 0, 0, 74, 74, 0, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, + 68, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 0, 0, 8, 68, 74, 72, + 74, 74, 74, 74, 74, 0, 72, 74, 74, 0, 74, 74, 72, 8, 0, 0, + 0, 0, 0, 0, 0, 74, 74, 0, 0, 0, 0, 0, 0, 0, 68, 0, + 68, 68, 72, 72, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 0, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 13 + 0, 0, 74, 74, 0, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, + 68, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, 68, 74, 74, + 74, 72, 72, 72, 72, 0, 74, 74, 74, 0, 74, 74, 74, 8, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 72, 72, 0, 0, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 18, 18, 18, 18, 18, 18, 0, 0, 0, 51, 68, 68, 68, 68, 68, 68, + 0, 0, 74, 74, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, 8, 0, 0, 0, 0, 74, + 74, 74, 72, 72, 72, 0, 72, 0, 74, 74, 74, 74, 74, 74, 74, 74, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 74, 74, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 14 + 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 72, 68, 68, 72, 72, 72, 72, 72, 72, 72, 0, 0, 0, 0, 49, + 68, 68, 68, 68, 68, 68, 67, 8, 8, 8, 8, 8, 8, 72, 8, 44, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 44, 44, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 68, 68, 0, 68, 0, 0, 68, 68, 0, 68, 0, 0, 68, 0, 0, + 0, 0, 0, 0, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, 68, + 0, 68, 68, 68, 0, 68, 0, 68, 0, 0, 68, 68, 0, 68, 68, 68, + 68, 72, 68, 68, 72, 72, 72, 72, 72, 72, 0, 72, 72, 68, 0, 0, + 68, 68, 68, 68, 68, 0, 67, 0, 8, 8, 8, 8, 8, 72, 0, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 68, 68, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 15 + 68, 51, 51, 51, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 51, 51, 51, 51, 51, 8, 8, 51, 51, 51, 51, 51, 51, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 51, 8, 51, 8, 51, 8, 41, 42, 41, 42, 10, 10, + 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, + 0, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 74, + 72, 72, 8, 8, 8, 44, 8, 8, 68, 68, 68, 68, 0, 0, 0, 0, + 72, 72, 72, 72, 72, 72, 72, 72, 0, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 0, 51, 51, + 51, 51, 51, 51, 51, 51, 8, 51, 51, 51, 51, 51, 51, 0, 51, 51, + 44, 44, 44, 44, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 16 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 74, 74, 72, 72, 72, + 72, 74, 72, 72, 72, 72, 72, 8, 74, 8, 8, 74, 74, 72, 72, 68, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 44, 44, 44, 44, 44, 44, + 68, 68, 68, 68, 68, 68, 74, 74, 72, 72, 68, 68, 68, 68, 72, 72, + 72, 68, 74, 10, 10, 68, 68, 74, 74, 10, 10, 10, 10, 10, 68, 68, + 68, 72, 72, 72, 72, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 72, 74, 74, 72, 72, 10, 10, 10, 10, 10, 10, 8, 68, 10, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 64, 64, 51, 51, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 44, 67, 0, 0, 0, + + + // block 17 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 64, 64, 64, 64, 64, 4164, + 4164, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 64, 64, 64, 64, 64, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 64, 64, 64, 64, 64, 64, + + + // block 18 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 0, 68, 0, 68, 68, 68, 68, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 0, 68, 68, 68, 68, 0, 0, 68, 68, 68, 68, 68, 68, 68, 0, + 68, 0, 68, 68, 68, 68, 0, 0, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + + + // block 19 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 0, 68, 68, 68, 68, 0, 0, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, 0, 72, + 51, 44, 44, 44, 44, 44, 44, 44, 44, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 20 + 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + + + // block 21 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + + + // block 22 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 44, 44, 68, + 68, 68, 68, 68, 68, 68, 68, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 536, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 41, 42, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 44, 44, 44, 81, 81, + 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 23 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, + 68, 68, 72, 72, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 72, 72, 8, 44, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 72, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, + 68, 0, 72, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 4129, 4129, 74, 72, 72, 72, 72, 72, 72, 72, 74, 74, + 74, 74, 74, 74, 74, 74, 72, 74, 74, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 44, 44, 44, 67, 44, 44, 44, 49, 68, 8, 0, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0, 0, 0, 0, + + + // block 24 + 44, 44, 44, 44, 44, 44, 40, 44, 44, 44, 44, 4104, 4104, 4104, 536, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 72, 68, 0, 0, 0, 0, 0, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 25 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, + 72, 72, 72, 74, 74, 74, 74, 72, 72, 74, 74, 74, 0, 0, 0, 0, + 74, 74, 72, 74, 74, 74, 74, 74, 74, 8, 8, 8, 0, 0, 0, 0, + 51, 0, 0, 0, 44, 44, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, + 68, 68, 68, 68, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 64, 64, 0, 0, 0, 0, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 68, 68, 68, 68, 68, 68, 68, 74, 74, 0, 0, 0, 0, 0, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 44, 44, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + + + // block 26 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 72, 72, 74, 74, 74, 0, 0, 44, 44, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, + 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 27 + 72, 72, 72, 72, 74, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 8, 74, 72, 72, 72, 72, 72, 74, 72, 74, 74, 74, + 74, 74, 72, 74, 10, 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 44, 44, 44, 44, 44, 44, + 44, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, + 72, 72, 74, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 74, 72, 72, 72, 72, 74, 74, 72, 72, 10, 0, 0, 0, 68, 68, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 28 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 74, 74, 74, 74, 74, 74, 74, 74, 72, 72, 72, 72, + 72, 72, 72, 72, 74, 74, 8, 8, 0, 0, 0, 44, 44, 44, 44, 44, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 68, 68, 68, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 67, 67, 67, 67, 67, 67, 44, 44, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 64, 0, 64, 64, + 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 29 + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 323, 323, 323, 323, + 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, + 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, + 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, + 323, 323, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 323, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 323, 323, 323, 323, 323, + 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, + 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, 323, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, + + + // block 30 + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 321, 321, 321, 321, 321, 321, 321, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + + + // block 31 + 321, 321, 321, 321, 321, 321, 321, 321, 192, 192, 192, 192, 192, 192, 192, 192, + 321, 321, 321, 321, 321, 321, 0, 0, 192, 192, 192, 192, 192, 192, 0, 0, + 321, 321, 321, 321, 321, 321, 321, 321, 192, 192, 192, 192, 192, 192, 192, 192, + 321, 321, 321, 321, 321, 321, 321, 321, 192, 192, 192, 192, 192, 192, 192, 192, + 321, 321, 321, 321, 321, 321, 0, 0, 192, 192, 192, 192, 192, 192, 0, 0, + 321, 321, 321, 321, 321, 321, 321, 321, 0, 192, 0, 192, 0, 192, 0, 192, + 321, 321, 321, 321, 321, 321, 321, 321, 192, 192, 192, 192, 192, 192, 192, 192, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 0, 0, + 321, 321, 321, 321, 321, 321, 321, 321, 66, 66, 66, 66, 66, 66, 66, 66, + 321, 321, 321, 321, 321, 321, 321, 321, 66, 66, 66, 66, 66, 66, 66, 66, + 321, 321, 321, 321, 321, 321, 321, 321, 66, 66, 66, 66, 66, 66, 66, 66, + 321, 321, 321, 321, 321, 0, 321, 321, 192, 192, 192, 192, 66, 50, 321, 50, + 50, 50, 321, 321, 321, 0, 321, 321, 192, 192, 192, 192, 66, 50, 50, 50, + 321, 321, 321, 321, 0, 0, 321, 321, 192, 192, 192, 192, 0, 50, 50, 50, + 321, 321, 321, 321, 321, 321, 321, 321, 192, 192, 192, 192, 192, 50, 50, 50, + 0, 0, 321, 321, 321, 0, 321, 321, 192, 192, 192, 192, 66, 50, 50, 0, + + + // block 32 + 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, 536, 4129, 4129, 4129, 4129, 4129, + 40, 40, 40, 40, 40, 40, 44, 44, 45, 46, 41, 45, 45, 46, 41, 45, + 44, 44, 44, 44, 44, 44, 44, 44, 537, 538, 4129, 4129, 4129, 4129, 4129, 536, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 46, 44, 44, 44, 44, 43, + 43, 44, 44, 44, 48, 41, 42, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 48, 44, 43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 536, + 4129, 4129, 4129, 4129, 4129, 4096, 4096, 4096, 4096, 4096, 4129, 4129, 4129, 4129, 4129, 4129, + 18, 65, 0, 0, 18, 18, 18, 18, 18, 18, 48, 48, 48, 41, 42, 65, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 48, 48, 48, 41, 42, 0, + 323, 323, 323, 323, 323, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, + 9, 8, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 33 + 51, 51, 192, 51, 51, 51, 51, 192, 51, 51, 321, 192, 192, 192, 321, 321, + 192, 192, 192, 321, 51, 192, 51, 51, 51, 192, 192, 192, 192, 192, 51, 51, + 51, 51, 51, 51, 192, 51, 192, 51, 192, 51, 192, 192, 192, 192, 51, 321, + 192, 192, 192, 192, 321, 68, 68, 68, 68, 321, 51, 51, 321, 321, 192, 192, + 48, 48, 48, 48, 48, 192, 321, 321, 321, 321, 51, 48, 51, 51, 321, 51, + 0, 0, 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, + 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, + 81, 81, 81, 192, 321, 81, 81, 81, 81, 0, 0, 0, 0, 0, 0, 0, + 48, 48, 48, 48, 48, 51, 51, 51, 51, 51, 48, 48, 51, 51, 51, 51, + 48, 51, 51, 48, 51, 51, 48, 51, 51, 51, 51, 51, 51, 51, 48, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 48, 48, + 51, 51, 48, 51, 48, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + + + // block 34 + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + + + // block 35 + 51, 51, 51, 51, 51, 51, 51, 51, 48, 48, 48, 48, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 48, 48, 51, 51, 51, 51, 51, 51, 51, 41, 42, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 48, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 48, 48, 48, 48, + 48, 48, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 36 + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, + 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, + 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, + 371, 371, 371, 371, 371, 371, 371, 371, 371, 371, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + + + // block 37 + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 48, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 48, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 48, 48, 48, 48, 48, 48, 48, 48, + + + // block 38 + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 48, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, + 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 39 + 0, 51, 51, 51, 51, 0, 51, 51, 51, 51, 0, 0, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 0, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 51, 0, 51, + 51, 51, 51, 0, 0, 0, 51, 0, 51, 51, 51, 51, 51, 51, 51, 0, + 0, 51, 51, 51, 51, 51, 51, 51, 41, 42, 41, 42, 41, 42, 41, 42, + 41, 42, 41, 42, 41, 42, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 51, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, + 48, 48, 48, 48, 48, 41, 42, 48, 48, 48, 48, 0, 48, 0, 0, 0, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + + + // block 40 + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + + + // block 41 + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, + 42, 41, 42, 41, 42, 41, 42, 41, 42, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 41, 42, 41, 42, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 41, 42, 48, 48, + + + // block 42 + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 51, 51, 48, 48, 48, 48, 48, 48, 0, 0, 0, + 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 43 + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 0, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 0, + 192, 321, 192, 192, 192, 321, 321, 192, 321, 192, 321, 192, 321, 192, 192, 192, + 192, 321, 192, 321, 321, 192, 321, 321, 321, 321, 321, 321, 321, 323, 192, 192, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 321, 51, 51, 51, 51, 51, 51, 192, 320, 192, 320, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 44, 44, 44, 18, 44, 44, + + + // block 44 + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, 68, 0, + 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, 68, 0, + 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, 68, 0, + 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, 68, 0, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + + + // block 45 + 44, 44, 45, 46, 45, 46, 44, 44, 44, 45, 46, 44, 45, 46, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 40, 44, 44, 40, 44, 45, 46, 44, 44, + 45, 46, 41, 42, 41, 42, 41, 42, 41, 42, 44, 44, 44, 44, 44, 67, + 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 46 + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, + + + // block 47 + 536, 44, 44, 44, 51, 67, 68, 81, 41, 42, 41, 42, 41, 42, 41, 42, + 41, 42, 51, 51, 41, 42, 41, 42, 41, 42, 41, 42, 40, 41, 42, 42, + 51, 81, 81, 81, 81, 81, 81, 81, 81, 81, 8, 8, 8, 8, 8, 8, + 40, 67, 67, 67, 67, 67, 51, 51, 81, 81, 81, 67, 68, 44, 51, 51, + 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 0, 0, 8, 8, 50, 50, 67, 67, 68, + 40, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 44, 67, 67, 67, 68, + + + // block 48 + 0, 0, 0, 0, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, + 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 4164, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, + 51, 51, 18, 18, 18, 18, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + + + // block 49 + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, + + + // block 50 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + + + // block 51 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 64, 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 52 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + + + // block 53 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 0, + + + // block 54 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 67, 44, 44, 44, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 68, 68, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 0, 0, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 68, 8, + 9, 9, 9, 44, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 44, 67, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 0, 0, 0, 0, 0, 0, 0, 0, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 55 + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 67, 67, 67, 67, 67, 67, 67, 67, 67, + 50, 50, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 321, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, 192, 321, + 323, 321, 321, 321, 321, 321, 321, 321, 321, 192, 321, 192, 321, 192, 192, 321, + 192, 321, 192, 321, 192, 321, 192, 321, 67, 50, 50, 192, 321, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 68, 68, 68, 68, + + + // block 56 + 68, 68, 8, 68, 68, 68, 8, 68, 68, 68, 68, 8, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 74, 74, 72, 72, 74, 51, 51, 51, 51, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 44, 44, 44, 44, 0, 0, 0, 0, 0, 0, 0, 0, + 74, 74, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 44, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 64, 64, 64, 64, 64, 64, 0, 0, 0, 64, 0, 0, 0, 0, + + + // block 57 + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 72, 72, 72, 72, 72, 8, 8, 8, 44, 44, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 74, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 58 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 72, 72, 72, 72, 72, 72, 74, + 74, 72, 72, 74, 74, 72, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 72, 68, 68, 68, 68, 68, 68, 68, 68, 72, 74, 0, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 44, 44, 44, 44, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, 64, 0, 0, 0, 0, 0, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, + 64, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 64, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 59 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 60 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, + + + // block 61 + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + + + // block 62 + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + + + // block 63 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 64, 64, 64, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 64 + 321, 321, 321, 321, 321, 321, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 321, 321, 321, 321, 321, 0, 0, 0, 0, 0, 68, 72, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 48, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 0, 68, 0, + 68, 68, 0, 68, 68, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + + + // block 65 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 41, 42, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 0, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, 0, 0, 0, 0, 0, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 49, 51, 0, 0, + + + // block 66 + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 44, 44, 44, 44, 44, 44, 44, 41, 42, 44, 0, 0, 0, 0, 0, 0, + 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 44, 40, 40, 43, 43, 41, 42, 41, 42, 41, 42, 41, 42, 41, 42, 41, + 42, 41, 42, 41, 42, 44, 44, 41, 42, 44, 44, 44, 44, 43, 43, 43, + 44, 44, 44, 0, 44, 44, 44, 44, 40, 41, 42, 41, 42, 41, 42, 44, + 44, 44, 48, 40, 48, 48, 48, 0, 44, 49, 44, 44, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 4129, + + + // block 67 + 0, 44, 44, 44, 49, 44, 44, 44, 41, 42, 44, 48, 44, 40, 44, 44, + 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 1040, 44, 44, 48, 48, 48, 44, + 44, 1216, 1216, 1216, 1216, 1216, 1216, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 41, 44, 42, 50, 43, + 50, 1345, 1345, 1345, 1345, 1345, 1345, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 41, 48, 42, 48, 41, + 42, 44, 41, 42, 44, 44, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 67, 67, + 4164, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, + 0, 0, 68, 68, 68, 68, 68, 68, 0, 0, 68, 68, 68, 68, 68, 68, + 0, 0, 68, 68, 68, 68, 68, 68, 0, 0, 68, 68, 68, 0, 0, 0, + 49, 49, 48, 50, 51, 49, 49, 0, 51, 48, 48, 48, 48, 51, 51, 0, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 33, 33, 33, 51, 51, 2048, 2048, + + + // block 68 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 68, 68, 0, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, 0, 0, + + + // block 69 + 44, 44, 51, 0, 0, 0, 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 18, 18, 18, 18, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 18, 0, 0, 0, 0, 0, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 8, 0, 0, + + + // block 70 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 71 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, + 18, 18, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 81, 68, 68, 68, 68, 68, 68, 68, 68, 81, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 44, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 0, 0, 0, 0, 68, 68, 68, 68, 68, 68, 68, 68, + 44, 81, 81, 81, 81, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 72 + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 73 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 74 + 68, 68, 68, 68, 68, 68, 0, 0, 68, 0, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 0, 68, 68, 0, 0, 0, 68, 0, 0, 68, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 75 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 18, 18, 18, 18, 0, 0, 0, 0, 0, 44, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, 0, 0, 44, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 76 + 68, 72, 72, 72, 0, 72, 72, 0, 0, 0, 0, 0, 72, 72, 72, 72, + 68, 68, 68, 68, 0, 68, 68, 68, 0, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, + 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 0, 0, 0, 0, 0, 0, 0, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 77 + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 78 + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 79 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 80 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 81 + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 44, 44, 44, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 82 + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + + + // block 83 + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 84 + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 85 + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 0, 0, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 10, 10, 8, 8, 8, 51, 51, 51, 10, 10, 10, + 10, 10, 10, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 8, 8, 8, 8, 8, + 8, 8, 8, 51, 51, 8, 8, 8, 8, 8, 8, 8, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 8, 8, 8, 8, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 86 + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 8, 8, 8, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 87 + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 88 + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 321, 321, + 321, 321, 321, 321, 321, 0, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 192, 0, 192, 192, + 0, 0, 192, 0, 0, 192, 192, 0, 0, 192, 192, 192, 192, 0, 192, 192, + 192, 192, 192, 192, 192, 192, 321, 321, 321, 321, 0, 321, 0, 321, 321, 321, + 321, 321, 321, 321, 0, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + + + // block 89 + 321, 321, 321, 321, 192, 192, 0, 192, 192, 192, 192, 0, 0, 192, 192, 192, + 192, 192, 192, 192, 192, 0, 192, 192, 192, 192, 192, 192, 192, 0, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 192, 192, 0, 192, 192, 192, 192, 0, + 192, 192, 192, 192, 192, 0, 192, 0, 0, 0, 192, 192, 192, 192, 192, 192, + 192, 0, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + + + // block 90 + 321, 321, 321, 321, 321, 321, 321, 321, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 0, 0, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 48, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 48, 321, 321, 321, 321, + 321, 321, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 48, 321, 321, 321, 321, + + + // block 91 + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 48, 321, 321, 321, 321, 321, 321, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 48, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 48, + 321, 321, 321, 321, 321, 321, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 48, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 48, 321, 321, 321, 321, 321, 321, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 192, 192, 192, 48, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, 321, + 321, 321, 321, 48, 321, 321, 321, 321, 321, 321, 192, 321, 0, 0, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + + + // block 92 + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 0, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 93 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2048, 2048, + + + // block 94 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 95 + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 96 + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 97 + 4096, 4129, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, + 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, + 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, + 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, + 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, + 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, 4129, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + + + // block 98 + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, 4104, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + + + // block 99 + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, + + + // block 100 + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 2048, 2048 + }; + + inline ::boost::uint16_t category_lookup(::boost::uint32_t ch) + { + ::boost::uint32_t block_offset = category_stage1[ch / 256] * 256; + return category_stage2[block_offset + ch % 256]; + } + +}}}} // namespace boost::spirit::unicode::detail diff --git a/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode/lowercase_table.hpp b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode/lowercase_table.hpp new file mode 100644 index 0000000..8ccf635 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode/lowercase_table.hpp @@ -0,0 +1,620 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) + + AUTOGENERATED. DO NOT EDIT!!! +==============================================================================*/ +#include <boost/cstdint.hpp> + +namespace boost { namespace spirit { namespace ucd { namespace detail +{ + static const ::boost::uint8_t lowercase_stage1[] = { + + 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 9, + 6, 10, 6, 6, 11, 6, 6, 6, 6, 6, 6, 6, 12, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 13, 14, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 15, + 6, 6, 6, 6, 16, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 + }; + + static const ::boost::uint32_t lowercase_stage2[] = { + + // block 0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 0, 248, 249, 250, 251, 252, 253, 254, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 1 + 257, 0, 259, 0, 261, 0, 263, 0, 265, 0, 267, 0, 269, 0, 271, 0, + 273, 0, 275, 0, 277, 0, 279, 0, 281, 0, 283, 0, 285, 0, 287, 0, + 289, 0, 291, 0, 293, 0, 295, 0, 297, 0, 299, 0, 301, 0, 303, 0, + 105, 0, 307, 0, 309, 0, 311, 0, 0, 314, 0, 316, 0, 318, 0, 320, + 0, 322, 0, 324, 0, 326, 0, 328, 0, 0, 331, 0, 333, 0, 335, 0, + 337, 0, 339, 0, 341, 0, 343, 0, 345, 0, 347, 0, 349, 0, 351, 0, + 353, 0, 355, 0, 357, 0, 359, 0, 361, 0, 363, 0, 365, 0, 367, 0, + 369, 0, 371, 0, 373, 0, 375, 0, 255, 378, 0, 380, 0, 382, 0, 0, + 0, 595, 387, 0, 389, 0, 596, 392, 0, 598, 599, 396, 0, 0, 477, 601, + 603, 402, 0, 608, 611, 0, 617, 616, 409, 0, 0, 0, 623, 626, 0, 629, + 417, 0, 419, 0, 421, 0, 640, 424, 0, 643, 0, 0, 429, 0, 648, 432, + 0, 650, 651, 436, 0, 438, 0, 658, 441, 0, 0, 0, 445, 0, 0, 0, + 0, 0, 0, 0, 454, 454, 0, 457, 457, 0, 460, 460, 0, 462, 0, 464, + 0, 466, 0, 468, 0, 470, 0, 472, 0, 474, 0, 476, 0, 0, 479, 0, + 481, 0, 483, 0, 485, 0, 487, 0, 489, 0, 491, 0, 493, 0, 495, 0, + 0, 499, 499, 0, 501, 0, 405, 447, 505, 0, 507, 0, 509, 0, 511, 0, + + + // block 2 + 513, 0, 515, 0, 517, 0, 519, 0, 521, 0, 523, 0, 525, 0, 527, 0, + 529, 0, 531, 0, 533, 0, 535, 0, 537, 0, 539, 0, 541, 0, 543, 0, + 414, 0, 547, 0, 549, 0, 551, 0, 553, 0, 555, 0, 557, 0, 559, 0, + 561, 0, 563, 0, 0, 0, 0, 0, 0, 0, 11365, 572, 0, 410, 11366, 0, + 0, 578, 0, 384, 649, 652, 583, 0, 585, 0, 587, 0, 589, 0, 591, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 3 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 881, 0, 883, 0, 0, 0, 887, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 940, 0, 941, 942, 943, 0, 972, 0, 973, 974, + 0, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, + 960, 961, 0, 963, 964, 965, 966, 967, 968, 969, 970, 971, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 983, + 0, 0, 0, 0, 0, 0, 0, 0, 985, 0, 987, 0, 989, 0, 991, 0, + 993, 0, 995, 0, 997, 0, 999, 0, 1001, 0, 1003, 0, 1005, 0, 1007, 0, + 0, 0, 0, 0, 952, 0, 0, 1016, 0, 1010, 1019, 0, 0, 891, 892, 893, + + + // block 4 + 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, + 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, + 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1121, 0, 1123, 0, 1125, 0, 1127, 0, 1129, 0, 1131, 0, 1133, 0, 1135, 0, + 1137, 0, 1139, 0, 1141, 0, 1143, 0, 1145, 0, 1147, 0, 1149, 0, 1151, 0, + 1153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1163, 0, 1165, 0, 1167, 0, + 1169, 0, 1171, 0, 1173, 0, 1175, 0, 1177, 0, 1179, 0, 1181, 0, 1183, 0, + 1185, 0, 1187, 0, 1189, 0, 1191, 0, 1193, 0, 1195, 0, 1197, 0, 1199, 0, + 1201, 0, 1203, 0, 1205, 0, 1207, 0, 1209, 0, 1211, 0, 1213, 0, 1215, 0, + 1231, 1218, 0, 1220, 0, 1222, 0, 1224, 0, 1226, 0, 1228, 0, 1230, 0, 0, + 1233, 0, 1235, 0, 1237, 0, 1239, 0, 1241, 0, 1243, 0, 1245, 0, 1247, 0, + 1249, 0, 1251, 0, 1253, 0, 1255, 0, 1257, 0, 1259, 0, 1261, 0, 1263, 0, + 1265, 0, 1267, 0, 1269, 0, 1271, 0, 1273, 0, 1275, 0, 1277, 0, 1279, 0, + + + // block 5 + 1281, 0, 1283, 0, 1285, 0, 1287, 0, 1289, 0, 1291, 0, 1293, 0, 1295, 0, + 1297, 0, 1299, 0, 1301, 0, 1303, 0, 1305, 0, 1307, 0, 1309, 0, 1311, 0, + 1313, 0, 1315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, + 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, + 1408, 1409, 1410, 1411, 1412, 1413, 1414, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 6 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 7 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 11520, 11521, 11522, 11523, 11524, 11525, 11526, 11527, 11528, 11529, 11530, 11531, 11532, 11533, 11534, 11535, + 11536, 11537, 11538, 11539, 11540, 11541, 11542, 11543, 11544, 11545, 11546, 11547, 11548, 11549, 11550, 11551, + 11552, 11553, 11554, 11555, 11556, 11557, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 8 + 7681, 0, 7683, 0, 7685, 0, 7687, 0, 7689, 0, 7691, 0, 7693, 0, 7695, 0, + 7697, 0, 7699, 0, 7701, 0, 7703, 0, 7705, 0, 7707, 0, 7709, 0, 7711, 0, + 7713, 0, 7715, 0, 7717, 0, 7719, 0, 7721, 0, 7723, 0, 7725, 0, 7727, 0, + 7729, 0, 7731, 0, 7733, 0, 7735, 0, 7737, 0, 7739, 0, 7741, 0, 7743, 0, + 7745, 0, 7747, 0, 7749, 0, 7751, 0, 7753, 0, 7755, 0, 7757, 0, 7759, 0, + 7761, 0, 7763, 0, 7765, 0, 7767, 0, 7769, 0, 7771, 0, 7773, 0, 7775, 0, + 7777, 0, 7779, 0, 7781, 0, 7783, 0, 7785, 0, 7787, 0, 7789, 0, 7791, 0, + 7793, 0, 7795, 0, 7797, 0, 7799, 0, 7801, 0, 7803, 0, 7805, 0, 7807, 0, + 7809, 0, 7811, 0, 7813, 0, 7815, 0, 7817, 0, 7819, 0, 7821, 0, 7823, 0, + 7825, 0, 7827, 0, 7829, 0, 0, 0, 0, 0, 0, 0, 0, 0, 223, 0, + 7841, 0, 7843, 0, 7845, 0, 7847, 0, 7849, 0, 7851, 0, 7853, 0, 7855, 0, + 7857, 0, 7859, 0, 7861, 0, 7863, 0, 7865, 0, 7867, 0, 7869, 0, 7871, 0, + 7873, 0, 7875, 0, 7877, 0, 7879, 0, 7881, 0, 7883, 0, 7885, 0, 7887, 0, + 7889, 0, 7891, 0, 7893, 0, 7895, 0, 7897, 0, 7899, 0, 7901, 0, 7903, 0, + 7905, 0, 7907, 0, 7909, 0, 7911, 0, 7913, 0, 7915, 0, 7917, 0, 7919, 0, + 7921, 0, 7923, 0, 7925, 0, 7927, 0, 7929, 0, 7931, 0, 7933, 0, 7935, 0, + + + // block 9 + 0, 0, 0, 0, 0, 0, 0, 0, 7936, 7937, 7938, 7939, 7940, 7941, 7942, 7943, + 0, 0, 0, 0, 0, 0, 0, 0, 7952, 7953, 7954, 7955, 7956, 7957, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 7968, 7969, 7970, 7971, 7972, 7973, 7974, 7975, + 0, 0, 0, 0, 0, 0, 0, 0, 7984, 7985, 7986, 7987, 7988, 7989, 7990, 7991, + 0, 0, 0, 0, 0, 0, 0, 0, 8000, 8001, 8002, 8003, 8004, 8005, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 8017, 0, 8019, 0, 8021, 0, 8023, + 0, 0, 0, 0, 0, 0, 0, 0, 8032, 8033, 8034, 8035, 8036, 8037, 8038, 8039, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 8064, 8065, 8066, 8067, 8068, 8069, 8070, 8071, + 0, 0, 0, 0, 0, 0, 0, 0, 8080, 8081, 8082, 8083, 8084, 8085, 8086, 8087, + 0, 0, 0, 0, 0, 0, 0, 0, 8096, 8097, 8098, 8099, 8100, 8101, 8102, 8103, + 0, 0, 0, 0, 0, 0, 0, 0, 8112, 8113, 8048, 8049, 8115, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 8050, 8051, 8052, 8053, 8131, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 8144, 8145, 8054, 8055, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 8160, 8161, 8058, 8059, 8165, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 8056, 8057, 8060, 8061, 8179, 0, 0, 0, + + + // block 10 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 969, 0, 0, 0, 107, 229, 0, 0, 0, 0, + 0, 0, 8526, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8560, 8561, 8562, 8563, 8564, 8565, 8566, 8567, 8568, 8569, 8570, 8571, 8572, 8573, 8574, 8575, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 8580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 11 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 9424, 9425, 9426, 9427, 9428, 9429, 9430, 9431, 9432, 9433, + 9434, 9435, 9436, 9437, 9438, 9439, 9440, 9441, 9442, 9443, 9444, 9445, 9446, 9447, 9448, 9449, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 12 + 11312, 11313, 11314, 11315, 11316, 11317, 11318, 11319, 11320, 11321, 11322, 11323, 11324, 11325, 11326, 11327, + 11328, 11329, 11330, 11331, 11332, 11333, 11334, 11335, 11336, 11337, 11338, 11339, 11340, 11341, 11342, 11343, + 11344, 11345, 11346, 11347, 11348, 11349, 11350, 11351, 11352, 11353, 11354, 11355, 11356, 11357, 11358, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 11361, 0, 619, 7549, 637, 0, 0, 11368, 0, 11370, 0, 11372, 0, 593, 625, 592, + 0, 0, 11379, 0, 0, 11382, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 11393, 0, 11395, 0, 11397, 0, 11399, 0, 11401, 0, 11403, 0, 11405, 0, 11407, 0, + 11409, 0, 11411, 0, 11413, 0, 11415, 0, 11417, 0, 11419, 0, 11421, 0, 11423, 0, + 11425, 0, 11427, 0, 11429, 0, 11431, 0, 11433, 0, 11435, 0, 11437, 0, 11439, 0, + 11441, 0, 11443, 0, 11445, 0, 11447, 0, 11449, 0, 11451, 0, 11453, 0, 11455, 0, + 11457, 0, 11459, 0, 11461, 0, 11463, 0, 11465, 0, 11467, 0, 11469, 0, 11471, 0, + 11473, 0, 11475, 0, 11477, 0, 11479, 0, 11481, 0, 11483, 0, 11485, 0, 11487, 0, + 11489, 0, 11491, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 13 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 42561, 0, 42563, 0, 42565, 0, 42567, 0, 42569, 0, 42571, 0, 42573, 0, 42575, 0, + 42577, 0, 42579, 0, 42581, 0, 42583, 0, 42585, 0, 42587, 0, 42589, 0, 42591, 0, + 0, 0, 42595, 0, 42597, 0, 42599, 0, 42601, 0, 42603, 0, 42605, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 42625, 0, 42627, 0, 42629, 0, 42631, 0, 42633, 0, 42635, 0, 42637, 0, 42639, 0, + 42641, 0, 42643, 0, 42645, 0, 42647, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 14 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 42787, 0, 42789, 0, 42791, 0, 42793, 0, 42795, 0, 42797, 0, 42799, 0, + 0, 0, 42803, 0, 42805, 0, 42807, 0, 42809, 0, 42811, 0, 42813, 0, 42815, 0, + 42817, 0, 42819, 0, 42821, 0, 42823, 0, 42825, 0, 42827, 0, 42829, 0, 42831, 0, + 42833, 0, 42835, 0, 42837, 0, 42839, 0, 42841, 0, 42843, 0, 42845, 0, 42847, 0, + 42849, 0, 42851, 0, 42853, 0, 42855, 0, 42857, 0, 42859, 0, 42861, 0, 42863, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 42874, 0, 42876, 0, 7545, 42879, 0, + 42881, 0, 42883, 0, 42885, 0, 42887, 0, 0, 0, 0, 42892, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 15 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 65345, 65346, 65347, 65348, 65349, 65350, 65351, 65352, 65353, 65354, 65355, 65356, 65357, 65358, 65359, + 65360, 65361, 65362, 65363, 65364, 65365, 65366, 65367, 65368, 65369, 65370, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 16 + 66600, 66601, 66602, 66603, 66604, 66605, 66606, 66607, 66608, 66609, 66610, 66611, 66612, 66613, 66614, 66615, + 66616, 66617, 66618, 66619, 66620, 66621, 66622, 66623, 66624, 66625, 66626, 66627, 66628, 66629, 66630, 66631, + 66632, 66633, 66634, 66635, 66636, 66637, 66638, 66639, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + + inline ::boost::uint32_t lowercase_lookup(::boost::uint32_t ch) + { + ::boost::uint32_t block_offset = lowercase_stage1[ch / 256] * 256; + return lowercase_stage2[block_offset + ch % 256]; + } + +}}}} // namespace boost::spirit::unicode::detail diff --git a/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode/query.hpp b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode/query.hpp new file mode 100644 index 0000000..3a0526c --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode/query.hpp @@ -0,0 +1,305 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) + + Autogenerated by MultiStageTable.py (Unicode multi-stage + table builder) (c) Peter Kankowski, 2008 +==============================================================================*/ +#if !defined(BOOST_SPIRIT_UNICODE_QUERY_FEBRUARY_2_2010) +#define BOOST_SPIRIT_UNICODE_QUERY_FEBRUARY_2_2010 + +#include <boost/cstdint.hpp> + +# include "category_table.hpp" +# include "script_table.hpp" +# include "lowercase_table.hpp" +# include "uppercase_table.hpp" + +namespace boost { namespace spirit { namespace ucd +{ + // This header provides Basic (Level 1) Unicode Support + // See http://unicode.org/reports/tr18/ for details + + struct properties + { + // bit pattern: xxMMMCCC + // MMM: major_category + // CCC: category + + enum major_category + { + letter, + mark, + number, + separator, + other, + punctuation, + symbol + }; + + enum category + { + uppercase_letter = 0, // [Lu] an uppercase letter + lowercase_letter, // [Ll] a lowercase letter + titlecase_letter, // [Lt] a digraphic character, with first part uppercase + modifier_letter, // [Lm] a modifier letter + other_letter, // [Lo] other letters, including syllables and ideographs + + nonspacing_mark = 8, // [Mn] a nonspacing combining mark (zero advance width) + enclosing_mark, // [Me] an enclosing combining mark + spacing_mark, // [Mc] a spacing combining mark (positive advance width) + + decimal_number = 16, // [Nd] a decimal digit + letter_number, // [Nl] a letterlike numeric character + other_number, // [No] a numeric character of other type + + space_separator = 24, // [Zs] a space character (of various non-zero widths) + line_separator, // [Zl] U+2028 LINE SEPARATOR only + paragraph_separator, // [Zp] U+2029 PARAGRAPH SEPARATOR only + + control = 32, // [Cc] a C0 or C1 control code + format, // [Cf] a format control character + private_use, // [Co] a private-use character + surrogate, // [Cs] a surrogate code point + unassigned, // [Cn] a reserved unassigned code point or a noncharacter + + dash_punctuation = 40, // [Pd] a dash or hyphen punctuation mark + open_punctuation, // [Ps] an opening punctuation mark (of a pair) + close_punctuation, // [Pe] a closing punctuation mark (of a pair) + connector_punctuation, // [Pc] a connecting punctuation mark, like a tie + other_punctuation, // [Po] a punctuation mark of other type + initial_punctuation, // [Pi] an initial quotation mark + final_punctuation, // [Pf] a final quotation mark + + math_symbol = 48, // [Sm] a symbol of primarily mathematical use + currency_symbol, // [Sc] a currency sign + modifier_symbol, // [Sk] a non-letterlike modifier symbol + other_symbol // [So] a symbol of other type + }; + + enum derived_properties + { + alphabetic = 64, + uppercase = 128, + lowercase = 256, + white_space = 512, + hex_digit = 1024, + noncharacter_code_point = 2048, + default_ignorable_code_point = 4096 + }; + + enum script + { + arabic = 0, + imperial_aramaic = 1, + armenian = 2, + avestan = 3, + balinese = 4, + bamum = 5, + bengali = 6, + bopomofo = 7, + braille = 8, + buginese = 9, + buhid = 10, + canadian_aboriginal = 11, + carian = 12, + cham = 13, + cherokee = 14, + coptic = 15, + cypriot = 16, + cyrillic = 17, + devanagari = 18, + deseret = 19, + egyptian_hieroglyphs = 20, + ethiopic = 21, + georgian = 22, + glagolitic = 23, + gothic = 24, + greek = 25, + gujarati = 26, + gurmukhi = 27, + hangul = 28, + han = 29, + hanunoo = 30, + hebrew = 31, + hiragana = 32, + katakana_or_hiragana = 33, + old_italic = 34, + javanese = 35, + kayah_li = 36, + katakana = 37, + kharoshthi = 38, + khmer = 39, + kannada = 40, + kaithi = 41, + tai_tham = 42, + lao = 43, + latin = 44, + lepcha = 45, + limbu = 46, + linear_b = 47, + lisu = 48, + lycian = 49, + lydian = 50, + malayalam = 51, + mongolian = 52, + meetei_mayek = 53, + myanmar = 54, + nko = 55, + ogham = 56, + ol_chiki = 57, + old_turkic = 58, + oriya = 59, + osmanya = 60, + phags_pa = 61, + inscriptional_pahlavi = 62, + phoenician = 63, + inscriptional_parthian = 64, + rejang = 65, + runic = 66, + samaritan = 67, + old_south_arabian = 68, + saurashtra = 69, + shavian = 70, + sinhala = 71, + sundanese = 72, + syloti_nagri = 73, + syriac = 74, + tagbanwa = 75, + tai_le = 76, + new_tai_lue = 77, + tamil = 78, + tai_viet = 79, + telugu = 80, + tifinagh = 81, + tagalog = 82, + thaana = 83, + thai = 84, + tibetan = 85, + ugaritic = 86, + vai = 87, + old_persian = 88, + cuneiform = 89, + yi = 90, + inherited = 91, + common = 92, + unknown = 93 + }; + }; + + inline properties::category get_category(::boost::uint32_t ch) + { + return static_cast<properties::category>(detail::category_lookup(ch) & 0x3F); + } + + inline properties::major_category get_major_category(::boost::uint32_t ch) + { + return static_cast<properties::major_category>(get_category(ch) >> 3); + } + + inline bool is_punctuation(::boost::uint32_t ch) + { + return get_major_category(ch) == properties::punctuation; + } + + inline bool is_decimal_number(::boost::uint32_t ch) + { + return get_category(ch) == properties::decimal_number; + } + + inline bool is_hex_digit(::boost::uint32_t ch) + { + return (detail::category_lookup(ch) & properties::hex_digit) != 0; + } + + inline bool is_control(::boost::uint32_t ch) + { + return get_category(ch) == properties::control; + } + + inline bool is_alphabetic(::boost::uint32_t ch) + { + return (detail::category_lookup(ch) & properties::alphabetic) != 0; + } + + inline bool is_alphanumeric(::boost::uint32_t ch) + { + return is_decimal_number(ch) || is_alphabetic(ch); + } + + inline bool is_uppercase(::boost::uint32_t ch) + { + return (detail::category_lookup(ch) & properties::uppercase) != 0; + } + + inline bool is_lowercase(::boost::uint32_t ch) + { + return (detail::category_lookup(ch) & properties::lowercase) != 0; + } + + inline bool is_white_space(::boost::uint32_t ch) + { + return (detail::category_lookup(ch) & properties::white_space) != 0; + } + + inline bool is_blank(::boost::uint32_t ch) + { + switch (ch) + { + case '\n': case '\v': case '\f': case '\r': + return false; + default: + return is_white_space(ch) + && !( get_category(ch) == properties::line_separator + || get_category(ch) == properties::paragraph_separator + ); + } + } + + inline bool is_graph(::boost::uint32_t ch) + { + return !( is_white_space(ch) + || get_category(ch) == properties::control + || get_category(ch) == properties::surrogate + || get_category(ch) == properties::unassigned + ); + } + + inline bool is_print(::boost::uint32_t ch) + { + return (is_graph(ch) || is_blank(ch)) && !is_control(ch); + } + + inline bool is_noncharacter_code_point(::boost::uint32_t ch) + { + return (detail::category_lookup(ch) & properties::noncharacter_code_point) != 0; + } + + inline bool is_default_ignorable_code_point(::boost::uint32_t ch) + { + return (detail::category_lookup(ch) & properties::default_ignorable_code_point) != 0; + } + + inline properties::script get_script(::boost::uint32_t ch) + { + return static_cast<properties::script>(detail::script_lookup(ch) & 0x3F); + } + + inline ::boost::uint32_t to_lowercase(::boost::uint32_t ch) + { + // The table returns 0 to signal that this code maps to itself + ::boost::uint32_t r = detail::lowercase_lookup(ch); + return (r == 0)? ch : r; + } + + inline ::boost::uint32_t to_uppercase(::boost::uint32_t ch) + { + // The table returns 0 to signal that this code maps to itself + ::boost::uint32_t r = detail::uppercase_lookup(ch); + return (r == 0)? ch : r; + } +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode/script_table.hpp b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode/script_table.hpp new file mode 100644 index 0000000..a4c117c --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode/script_table.hpp @@ -0,0 +1,2159 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) + + AUTOGENERATED. DO NOT EDIT!!! +==============================================================================*/ +#include <boost/cstdint.hpp> + +namespace boost { namespace spirit { namespace ucd { namespace detail +{ + static const ::boost::uint8_t script_stage1[] = { + + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 25, 26, 27, 28, 1, 29, + 30, 31, 32, 33, 34, 32, 35, 36, 37, 32, 32, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 48, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 49, + 50, 50, 50, 50, 51, 52, 53, 54, 55, 56, 57, 58, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 59, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 47, 61, 62, 60, 63, 64, 65, + 66, 67, 68, 69, 70, 60, 60, 60, 71, 72, 73, 74, 75, 60, 60, 60, + 76, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 77, 77, 77, 78, 79, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 80, 80, 80, 80, 81, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 82, 83, 84, 85, 86, 87, 88, 89, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 90, 91, 92, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 93, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 94, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 47, 47, 95, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 96, 97, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60 + }; + + static const ::boost::uint8_t script_stage2[] = { + + // block 0 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 92, 92, 92, 92, 92, + 92, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 44, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 44, 92, 92, 92, 92, 92, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 92, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 92, 44, 44, 44, 44, 44, 44, 44, 44, + + + // block 1 + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + + + // block 2 + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 44, 44, 44, 44, 44, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + + + // block 3 + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 25, 25, 25, 25, 92, 25, 25, 25, 0, 0, 25, 25, 25, 25, 92, 0, + 0, 0, 0, 0, 25, 92, 25, 92, 25, 25, 25, 0, 25, 0, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + + + // block 4 + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 91, 91, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + + + // block 5 + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 0, 92, 2, 0, 0, 0, 0, 0, + 0, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 0, 0, 0, 0, 0, 0, 0, 0, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 0, 0, 0, 0, 0, + 31, 31, 31, 31, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 6 + 92, 92, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 92, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 0, 0, 0, 92, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, 0, 0, + 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 7 + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 0, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, + 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 0, 0, 74, 74, 74, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 0, 0, 0, 0, + + + // block 8 + 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, + 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, + 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 9 + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, + 18, 91, 91, 18, 18, 18, 0, 0, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 92, 92, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 92, 18, 18, 0, 0, 0, 0, 0, 0, 18, 18, 18, 18, 18, 18, 18, + 0, 6, 6, 6, 0, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 6, + 6, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 6, 6, 6, 6, 6, 6, + 6, 0, 6, 0, 0, 0, 6, 6, 6, 6, 0, 0, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 0, 0, 6, 6, 0, 0, 6, 6, 6, 6, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 6, 6, 0, 6, + 6, 6, 6, 6, 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, + + + // block 10 + 0, 27, 27, 27, 0, 27, 27, 27, 27, 27, 27, 0, 0, 0, 0, 27, + 27, 0, 0, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 27, 27, 27, 0, 27, 27, 27, 27, 27, 27, + 27, 0, 27, 27, 0, 27, 27, 0, 27, 27, 0, 0, 27, 0, 27, 27, + 27, 27, 27, 0, 0, 0, 0, 27, 27, 0, 0, 27, 27, 27, 0, 0, + 0, 27, 0, 0, 0, 0, 0, 0, 0, 27, 27, 27, 27, 0, 27, 0, + 0, 0, 0, 0, 0, 0, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, + 27, 27, 27, 27, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 26, 26, 26, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 26, + 26, 26, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 26, 26, 26, 26, 26, 26, + 26, 0, 26, 26, 0, 26, 26, 26, 26, 26, 0, 0, 26, 26, 26, 26, + 26, 26, 26, 26, 26, 26, 0, 26, 26, 26, 0, 26, 26, 26, 0, 0, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 26, 26, 26, 26, 0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, + 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 11 + 0, 59, 59, 59, 0, 59, 59, 59, 59, 59, 59, 59, 59, 0, 0, 59, + 59, 0, 0, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 0, 59, 59, 59, 59, 59, 59, + 59, 0, 59, 59, 0, 59, 59, 59, 59, 59, 0, 0, 59, 59, 59, 59, + 59, 59, 59, 59, 59, 0, 0, 59, 59, 0, 0, 59, 59, 59, 0, 0, + 0, 0, 0, 0, 0, 0, 59, 59, 0, 0, 0, 0, 59, 59, 0, 59, + 59, 59, 59, 59, 0, 0, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, + 59, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 78, 78, 0, 78, 78, 78, 78, 78, 78, 0, 0, 0, 78, 78, + 78, 0, 78, 78, 78, 78, 0, 0, 0, 78, 78, 0, 78, 0, 78, 78, + 0, 0, 0, 78, 78, 0, 0, 0, 78, 78, 78, 0, 0, 0, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 0, 0, 0, 0, 78, 78, + 78, 78, 78, 0, 0, 0, 78, 78, 78, 0, 78, 78, 78, 78, 0, 0, + 78, 0, 0, 0, 0, 0, 0, 78, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 0, 0, 0, 0, 0, + + + // block 12 + 0, 80, 80, 80, 0, 80, 80, 80, 80, 80, 80, 80, 80, 0, 80, 80, + 80, 0, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 0, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 0, 80, 80, 80, 80, 80, 0, 0, 0, 80, 80, 80, + 80, 80, 80, 80, 80, 0, 80, 80, 80, 0, 80, 80, 80, 80, 0, 0, + 0, 0, 0, 0, 0, 80, 80, 0, 80, 80, 0, 0, 0, 0, 0, 0, + 80, 80, 80, 80, 0, 0, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 0, 0, 0, 0, 0, 0, 0, 0, 80, 80, 80, 80, 80, 80, 80, 80, + 0, 0, 40, 40, 0, 40, 40, 40, 40, 40, 40, 40, 40, 0, 40, 40, + 40, 0, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 0, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 0, 40, 40, 40, 40, 40, 0, 0, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 0, 40, 40, 40, 0, 40, 40, 40, 40, 0, 0, + 0, 0, 0, 0, 0, 40, 40, 0, 0, 0, 0, 0, 0, 0, 40, 0, + 40, 40, 40, 40, 0, 0, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 0, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 13 + 0, 0, 51, 51, 0, 51, 51, 51, 51, 51, 51, 51, 51, 0, 51, 51, + 51, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 0, 0, 0, 51, 51, 51, + 51, 51, 51, 51, 51, 0, 51, 51, 51, 0, 51, 51, 51, 51, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 51, 51, 51, 0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 0, 0, 0, 51, 51, 51, 51, 51, 51, 51, + 0, 0, 71, 71, 0, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 0, 0, 0, 71, 71, 71, 71, 71, 71, + 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, + 71, 71, 0, 71, 71, 71, 71, 71, 71, 71, 71, 71, 0, 71, 0, 0, + 71, 71, 71, 71, 71, 71, 71, 0, 0, 0, 71, 0, 0, 0, 0, 71, + 71, 71, 71, 71, 71, 0, 71, 0, 71, 71, 71, 71, 71, 71, 71, 71, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 71, 71, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 14 + 0, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 0, 0, 0, 0, 92, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 43, 43, 0, 43, 0, 0, 43, 43, 0, 43, 0, 0, 43, 0, 0, + 0, 0, 0, 0, 43, 43, 43, 43, 0, 43, 43, 43, 43, 43, 43, 43, + 0, 43, 43, 43, 0, 43, 0, 43, 0, 0, 43, 43, 0, 43, 43, 43, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 0, 43, 43, 43, 0, 0, + 43, 43, 43, 43, 43, 0, 43, 0, 43, 43, 43, 43, 43, 43, 0, 0, + 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 0, 0, 43, 43, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 15 + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 0, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 0, 0, 0, + 0, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 0, 0, 0, 0, + 85, 85, 85, 85, 85, 85, 85, 85, 0, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 0, 85, 85, + 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, 0, 85, 85, + 85, 85, 85, 85, 85, 92, 92, 92, 92, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 16 + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 92, 22, 0, 0, 0, + + + // block 17 + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + + + // block 18 + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 0, 21, 21, 21, 21, 0, 0, + 21, 21, 21, 21, 21, 21, 21, 0, 21, 0, 21, 21, 21, 21, 0, 0, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 0, 21, 21, 21, 21, 0, 0, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 0, 21, 21, 21, 21, 0, 0, 21, 21, 21, 21, 21, 21, 21, 0, + 21, 0, 21, 21, 21, 21, 0, 0, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 0, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + + + // block 19 + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 0, 21, 21, 21, 21, 0, 0, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 0, 0, 0, 0, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 0, 0, 0, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 0, 0, 0, 0, 0, 0, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 20 + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + + + // block 21 + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 0, 0, 0, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 92, 92, 92, 66, 66, + 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 22 + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 0, 82, 82, + 82, 82, 82, 82, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 0, 75, 75, + 75, 0, 75, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 0, 0, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 0, 0, 0, 0, 0, 0, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 0, 0, 0, 0, 0, 0, + + + // block 23 + 52, 52, 92, 92, 52, 92, 52, 52, 52, 52, 52, 52, 52, 52, 52, 0, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 0, 0, 0, 0, 0, 0, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 0, 0, 0, 0, 0, 0, 0, 0, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, + 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 0, 0, 0, 0, 0, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 24 + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 0, 0, 0, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 0, 0, 0, 0, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 0, 0, 0, 0, + 46, 0, 0, 0, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, + 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 0, 0, + 76, 76, 76, 76, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 0, 0, 0, 0, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 0, 0, 0, 0, 0, 0, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 0, 0, 0, 77, 77, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, + + + // block 25 + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 0, 9, 9, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 42, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, 0, 0, 0, 0, + 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 26 + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 0, 0, 0, 72, 72, + 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 27 + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 0, 0, 0, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 0, 0, 0, 45, 45, 45, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 91, 91, 91, 92, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 92, 91, 91, 91, 91, 91, 91, 91, 92, 92, 92, 92, 91, 92, 92, + 92, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 28 + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 25, 25, 25, 25, 25, 17, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 25, 25, 25, + 25, 25, 44, 44, 44, 44, 25, 25, 25, 25, 25, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 17, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 25, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 91, 91, + + + // block 29 + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 0, 0, 25, 25, 25, 25, 25, 25, 0, 0, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 0, 0, 25, 25, 25, 25, 25, 25, 0, 0, + 25, 25, 25, 25, 25, 25, 25, 25, 0, 25, 0, 25, 0, 25, 0, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 0, 0, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 0, 0, 25, 25, 25, 25, 25, 25, 0, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 0, 0, 25, 25, 25, 0, 25, 25, 25, 25, 25, 25, 25, 25, 25, 0, + + + // block 30 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 91, 91, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 0, 0, 0, 0, 0, 92, 92, 92, 92, 92, 92, + 92, 44, 0, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 44, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, + 44, 44, 44, 44, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 31 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 25, 92, 92, 92, 44, 44, 92, 92, 92, 92, + 92, 92, 44, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 44, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 92, 0, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + + + // block 32 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + + + // block 33 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 34 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + + + // block 35 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 0, 92, 0, 0, 0, 0, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + + + // block 36 + 0, 92, 92, 92, 92, 0, 92, 92, 92, 92, 0, 0, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 0, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 92, 0, 92, + 92, 92, 92, 0, 0, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, + 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 0, 0, 0, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 92, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + + + // block 37 + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + + + // block 38 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 39 + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 0, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 0, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, + 15, 15, 0, 0, 0, 0, 0, 0, 0, 15, 15, 15, 15, 15, 15, 15, + + + // block 40 + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 21, 21, 21, 21, 21, 21, 21, 0, 21, 21, 21, 21, 21, 21, 21, 0, + 21, 21, 21, 21, 21, 21, 21, 0, 21, 21, 21, 21, 21, 21, 21, 0, + 21, 21, 21, 21, 21, 21, 21, 0, 21, 21, 21, 21, 21, 21, 21, 0, + 21, 21, 21, 21, 21, 21, 21, 0, 21, 21, 21, 21, 21, 21, 21, 0, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + + + // block 41 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 0, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 42 + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, + + + // block 43 + 92, 92, 92, 92, 92, 29, 92, 29, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 29, 29, 29, 29, 29, 29, 29, 29, 29, 91, 91, 91, 91, 91, 91, + 92, 92, 92, 92, 92, 92, 92, 92, 29, 29, 29, 29, 92, 92, 92, 92, + 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 0, 0, 91, 91, 92, 92, 32, 32, 32, + 92, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 92, 92, 37, 37, 37, + + + // block 44 + 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, + 0, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + + + // block 45 + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 0, + + + // block 46 + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + + + // block 47 + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + + + // block 48 + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + + + // block 49 + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 50 + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + + + // block 51 + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 0, 0, 0, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, + 90, 90, 90, 90, 90, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + + + // block 52 + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + + + // block 53 + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 54 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 92, 92, 92, 44, 44, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 44, 44, 44, 44, + + + // block 55 + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, 0, 0, + 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, + 61, 61, 61, 61, 61, 61, 61, 61, 0, 0, 0, 0, 0, 0, 0, 0, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 0, 0, 0, 0, 0, 0, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, + 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 0, 0, 0, 0, + + + // block 56 + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, 0, 0, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 0, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 0, 0, 0, 0, 35, 35, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 57 + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 0, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 0, 13, 13, 13, 13, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 0, 0, 0, 0, + 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 79, 79, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 79, 79, 79, 79, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 58 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 0, 0, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 0, 0, 0, 0, 0, 0, + + + // block 59 + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 0, 0, 0, 0, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, 0, 0, 0, + + + // block 60 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 61 + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 0, 0, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 0, 0, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 62 + 44, 44, 44, 44, 44, 44, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 0, 31, 31, 31, 31, 31, 0, 31, 0, + 31, 31, 0, 31, 31, 0, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 63 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 92, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 0, 0, + + + // block 64 + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, 0, 0, + 91, 91, 91, 91, 91, 91, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 0, 92, 92, 92, 92, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, + + + // block 65 + 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 92, 92, 92, 92, 92, + 92, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 92, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 92, 92, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, + 0, 0, 28, 28, 28, 28, 28, 28, 0, 0, 28, 28, 28, 28, 28, 28, + 0, 0, 28, 28, 28, 28, 28, 28, 0, 0, 28, 28, 28, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 0, 92, 92, 92, 92, 92, 92, 92, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 92, 92, 92, 92, 0, 0, + + + // block 66 + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 0, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 0, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 0, 47, 47, 0, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 0, 0, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 0, 0, 0, 0, 0, + + + // block 67 + 92, 92, 92, 0, 0, 0, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 0, 0, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 91, 0, 0, + + + // block 68 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 0, 0, 0, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 69 + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, + 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 0, 86, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 0, 0, 0, 0, 88, 88, 88, 88, 88, 88, 88, 88, + 88, 88, 88, 88, 88, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 70 + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 0, 0, + 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 71 + 16, 16, 16, 16, 16, 16, 0, 0, 16, 0, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 0, 16, 16, 0, 0, 0, 16, 0, 0, 16, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 72 + 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 0, 0, 0, 63, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 0, 0, 0, 0, 0, 50, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 73 + 38, 38, 38, 38, 0, 38, 38, 0, 0, 0, 0, 0, 38, 38, 38, 38, + 38, 38, 38, 38, 0, 38, 38, 38, 0, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 0, 0, 0, 0, 38, 38, 38, 0, 0, 0, 0, 38, + 38, 38, 38, 38, 38, 38, 38, 38, 0, 0, 0, 0, 0, 0, 0, 0, + 38, 38, 38, 38, 38, 38, 38, 38, 38, 0, 0, 0, 0, 0, 0, 0, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 74 + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, + 64, 64, 64, 64, 64, 64, 0, 0, 64, 64, 64, 64, 64, 64, 64, 64, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, + 62, 62, 62, 0, 0, 0, 0, 0, 62, 62, 62, 62, 62, 62, 62, 62, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 75 + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, + 58, 58, 58, 58, 58, 58, 58, 58, 58, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 76 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 77 + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + + + // block 78 + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 79 + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 89, 89, 89, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 80 + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + + + // block 81 + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 82 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 83 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 0, 0, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 91, 91, 91, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 91, 91, 91, 91, 91, + 91, 91, 91, 92, 92, 91, 91, 91, 91, 91, 91, 91, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 91, 91, 91, 91, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 84 + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 25, 25, 25, 25, 25, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 85 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 86 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 92, 92, + 0, 0, 92, 0, 0, 92, 92, 0, 0, 92, 92, 92, 92, 0, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 92, 0, 92, 92, 92, + 92, 92, 92, 92, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + + + // block 87 + 92, 92, 92, 92, 92, 92, 0, 92, 92, 92, 92, 0, 0, 92, 92, 92, + 92, 92, 92, 92, 92, 0, 92, 92, 92, 92, 92, 92, 92, 0, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 92, 92, 92, 92, 0, + 92, 92, 92, 92, 92, 0, 92, 0, 0, 0, 92, 92, 92, 92, 92, 92, + 92, 0, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + + + // block 88 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 0, 0, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + + + // block 89 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + + + // block 90 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 91 + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, + 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 0, 92, + 0, 0, 92, 0, 0, 0, 92, 0, 0, 0, 92, 92, 92, 92, 92, 0, + 0, 0, 0, 0, 0, 0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 92, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 0, 92, 92, 0, 0, 92, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 92, 92, 92, 0, 0, + 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 92 + 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 93 + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 94 + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 95 + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, + 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 96 + 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 97 + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + + inline ::boost::uint8_t script_lookup(::boost::uint32_t ch) + { + ::boost::uint32_t block_offset = script_stage1[ch / 256] * 256; + return script_stage2[block_offset + ch % 256]; + } + +}}}} // namespace boost::spirit::unicode::detail diff --git a/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode/uppercase_table.hpp b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode/uppercase_table.hpp new file mode 100644 index 0000000..5ecae7c --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/char_encoding/unicode/uppercase_table.hpp @@ -0,0 +1,639 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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) + + AUTOGENERATED. DO NOT EDIT!!! +==============================================================================*/ +#include <boost/cstdint.hpp> + +namespace boost { namespace spirit { namespace ucd { namespace detail +{ + static const ::boost::uint8_t uppercase_stage1[] = { + + 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, + 6, 10, 6, 6, 11, 6, 6, 6, 6, 6, 6, 6, 12, 13, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 14, 15, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 16, + 6, 6, 6, 6, 17, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 + }; + + static const ::boost::uint32_t uppercase_stage2[] = { + + // block 0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 924, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 0, 216, 217, 218, 219, 220, 221, 222, 376, + + + // block 1 + 0, 256, 0, 258, 0, 260, 0, 262, 0, 264, 0, 266, 0, 268, 0, 270, + 0, 272, 0, 274, 0, 276, 0, 278, 0, 280, 0, 282, 0, 284, 0, 286, + 0, 288, 0, 290, 0, 292, 0, 294, 0, 296, 0, 298, 0, 300, 0, 302, + 0, 73, 0, 306, 0, 308, 0, 310, 0, 0, 313, 0, 315, 0, 317, 0, + 319, 0, 321, 0, 323, 0, 325, 0, 327, 0, 0, 330, 0, 332, 0, 334, + 0, 336, 0, 338, 0, 340, 0, 342, 0, 344, 0, 346, 0, 348, 0, 350, + 0, 352, 0, 354, 0, 356, 0, 358, 0, 360, 0, 362, 0, 364, 0, 366, + 0, 368, 0, 370, 0, 372, 0, 374, 0, 0, 377, 0, 379, 0, 381, 83, + 579, 0, 0, 386, 0, 388, 0, 0, 391, 0, 0, 0, 395, 0, 0, 0, + 0, 0, 401, 0, 0, 502, 0, 0, 0, 408, 573, 0, 0, 0, 544, 0, + 0, 416, 0, 418, 0, 420, 0, 0, 423, 0, 0, 0, 0, 428, 0, 0, + 431, 0, 0, 0, 435, 0, 437, 0, 0, 440, 0, 0, 0, 444, 0, 503, + 0, 0, 0, 0, 0, 452, 452, 0, 455, 455, 0, 458, 458, 0, 461, 0, + 463, 0, 465, 0, 467, 0, 469, 0, 471, 0, 473, 0, 475, 398, 0, 478, + 0, 480, 0, 482, 0, 484, 0, 486, 0, 488, 0, 490, 0, 492, 0, 494, + 0, 0, 497, 497, 0, 500, 0, 0, 0, 504, 0, 506, 0, 508, 0, 510, + + + // block 2 + 0, 512, 0, 514, 0, 516, 0, 518, 0, 520, 0, 522, 0, 524, 0, 526, + 0, 528, 0, 530, 0, 532, 0, 534, 0, 536, 0, 538, 0, 540, 0, 542, + 0, 0, 0, 546, 0, 548, 0, 550, 0, 552, 0, 554, 0, 556, 0, 558, + 0, 560, 0, 562, 0, 0, 0, 0, 0, 0, 0, 0, 571, 0, 0, 0, + 0, 0, 577, 0, 0, 0, 0, 582, 0, 584, 0, 586, 0, 588, 0, 590, + 11375, 11373, 0, 385, 390, 0, 393, 394, 0, 399, 0, 400, 0, 0, 0, 0, + 403, 0, 0, 404, 0, 0, 0, 0, 407, 406, 0, 11362, 0, 0, 0, 412, + 0, 11374, 413, 0, 0, 415, 0, 0, 0, 0, 0, 0, 0, 11364, 0, 0, + 422, 0, 0, 425, 0, 0, 0, 0, 430, 580, 433, 434, 581, 0, 0, 0, + 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 3 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 921, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 880, 0, 882, 0, 0, 0, 886, 0, 0, 0, 1021, 1022, 1023, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 902, 904, 905, 906, + 0, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, + 928, 929, 931, 931, 932, 933, 934, 935, 936, 937, 938, 939, 908, 910, 911, 0, + 914, 920, 0, 0, 0, 934, 928, 975, 0, 984, 0, 986, 0, 988, 0, 990, + 0, 992, 0, 994, 0, 996, 0, 998, 0, 1000, 0, 1002, 0, 1004, 0, 1006, + 922, 929, 1017, 0, 0, 917, 0, 0, 1015, 0, 0, 1018, 0, 0, 0, 0, + + + // block 4 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, + 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, + 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, + 0, 1120, 0, 1122, 0, 1124, 0, 1126, 0, 1128, 0, 1130, 0, 1132, 0, 1134, + 0, 1136, 0, 1138, 0, 1140, 0, 1142, 0, 1144, 0, 1146, 0, 1148, 0, 1150, + 0, 1152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1162, 0, 1164, 0, 1166, + 0, 1168, 0, 1170, 0, 1172, 0, 1174, 0, 1176, 0, 1178, 0, 1180, 0, 1182, + 0, 1184, 0, 1186, 0, 1188, 0, 1190, 0, 1192, 0, 1194, 0, 1196, 0, 1198, + 0, 1200, 0, 1202, 0, 1204, 0, 1206, 0, 1208, 0, 1210, 0, 1212, 0, 1214, + 0, 0, 1217, 0, 1219, 0, 1221, 0, 1223, 0, 1225, 0, 1227, 0, 1229, 1216, + 0, 1232, 0, 1234, 0, 1236, 0, 1238, 0, 1240, 0, 1242, 0, 1244, 0, 1246, + 0, 1248, 0, 1250, 0, 1252, 0, 1254, 0, 1256, 0, 1258, 0, 1260, 0, 1262, + 0, 1264, 0, 1266, 0, 1268, 0, 1270, 0, 1272, 0, 1274, 0, 1276, 0, 1278, + + + // block 5 + 0, 1280, 0, 1282, 0, 1284, 0, 1286, 0, 1288, 0, 1290, 0, 1292, 0, 1294, + 0, 1296, 0, 1298, 0, 1300, 0, 1302, 0, 1304, 0, 1306, 0, 1308, 0, 1310, + 0, 1312, 0, 1314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342, 1343, + 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, + 1360, 1361, 1362, 1363, 1364, 1365, 1366, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 6 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 7 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 42877, 0, 0, 0, 11363, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 8 + 0, 7680, 0, 7682, 0, 7684, 0, 7686, 0, 7688, 0, 7690, 0, 7692, 0, 7694, + 0, 7696, 0, 7698, 0, 7700, 0, 7702, 0, 7704, 0, 7706, 0, 7708, 0, 7710, + 0, 7712, 0, 7714, 0, 7716, 0, 7718, 0, 7720, 0, 7722, 0, 7724, 0, 7726, + 0, 7728, 0, 7730, 0, 7732, 0, 7734, 0, 7736, 0, 7738, 0, 7740, 0, 7742, + 0, 7744, 0, 7746, 0, 7748, 0, 7750, 0, 7752, 0, 7754, 0, 7756, 0, 7758, + 0, 7760, 0, 7762, 0, 7764, 0, 7766, 0, 7768, 0, 7770, 0, 7772, 0, 7774, + 0, 7776, 0, 7778, 0, 7780, 0, 7782, 0, 7784, 0, 7786, 0, 7788, 0, 7790, + 0, 7792, 0, 7794, 0, 7796, 0, 7798, 0, 7800, 0, 7802, 0, 7804, 0, 7806, + 0, 7808, 0, 7810, 0, 7812, 0, 7814, 0, 7816, 0, 7818, 0, 7820, 0, 7822, + 0, 7824, 0, 7826, 0, 7828, 0, 0, 0, 0, 0, 7776, 0, 0, 0, 0, + 0, 7840, 0, 7842, 0, 7844, 0, 7846, 0, 7848, 0, 7850, 0, 7852, 0, 7854, + 0, 7856, 0, 7858, 0, 7860, 0, 7862, 0, 7864, 0, 7866, 0, 7868, 0, 7870, + 0, 7872, 0, 7874, 0, 7876, 0, 7878, 0, 7880, 0, 7882, 0, 7884, 0, 7886, + 0, 7888, 0, 7890, 0, 7892, 0, 7894, 0, 7896, 0, 7898, 0, 7900, 0, 7902, + 0, 7904, 0, 7906, 0, 7908, 0, 7910, 0, 7912, 0, 7914, 0, 7916, 0, 7918, + 0, 7920, 0, 7922, 0, 7924, 0, 7926, 0, 7928, 0, 7930, 0, 7932, 0, 7934, + + + // block 9 + 7944, 7945, 7946, 7947, 7948, 7949, 7950, 7951, 0, 0, 0, 0, 0, 0, 0, 0, + 7960, 7961, 7962, 7963, 7964, 7965, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7976, 7977, 7978, 7979, 7980, 7981, 7982, 7983, 0, 0, 0, 0, 0, 0, 0, 0, + 7992, 7993, 7994, 7995, 7996, 7997, 7998, 7999, 0, 0, 0, 0, 0, 0, 0, 0, + 8008, 8009, 8010, 8011, 8012, 8013, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 8025, 0, 8027, 0, 8029, 0, 8031, 0, 0, 0, 0, 0, 0, 0, 0, + 8040, 8041, 8042, 8043, 8044, 8045, 8046, 8047, 0, 0, 0, 0, 0, 0, 0, 0, + 8122, 8123, 8136, 8137, 8138, 8139, 8154, 8155, 8184, 8185, 8170, 8171, 8186, 8187, 0, 0, + 8072, 8073, 8074, 8075, 8076, 8077, 8078, 8079, 0, 0, 0, 0, 0, 0, 0, 0, + 8088, 8089, 8090, 8091, 8092, 8093, 8094, 8095, 0, 0, 0, 0, 0, 0, 0, 0, + 8104, 8105, 8106, 8107, 8108, 8109, 8110, 8111, 0, 0, 0, 0, 0, 0, 0, 0, + 8120, 8121, 0, 8124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 921, 0, + 0, 0, 0, 8140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8152, 8153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8168, 8169, 0, 0, 0, 8172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 8188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 10 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8498, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8544, 8545, 8546, 8547, 8548, 8549, 8550, 8551, 8552, 8553, 8554, 8555, 8556, 8557, 8558, 8559, + 0, 0, 0, 0, 8579, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 11 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 9398, 9399, 9400, 9401, 9402, 9403, 9404, 9405, 9406, 9407, 9408, 9409, 9410, 9411, 9412, 9413, + 9414, 9415, 9416, 9417, 9418, 9419, 9420, 9421, 9422, 9423, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 12 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 11264, 11265, 11266, 11267, 11268, 11269, 11270, 11271, 11272, 11273, 11274, 11275, 11276, 11277, 11278, 11279, + 11280, 11281, 11282, 11283, 11284, 11285, 11286, 11287, 11288, 11289, 11290, 11291, 11292, 11293, 11294, 11295, + 11296, 11297, 11298, 11299, 11300, 11301, 11302, 11303, 11304, 11305, 11306, 11307, 11308, 11309, 11310, 0, + 0, 11360, 0, 0, 0, 570, 574, 0, 11367, 0, 11369, 0, 11371, 0, 0, 0, + 0, 0, 0, 11378, 0, 0, 11381, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 11392, 0, 11394, 0, 11396, 0, 11398, 0, 11400, 0, 11402, 0, 11404, 0, 11406, + 0, 11408, 0, 11410, 0, 11412, 0, 11414, 0, 11416, 0, 11418, 0, 11420, 0, 11422, + 0, 11424, 0, 11426, 0, 11428, 0, 11430, 0, 11432, 0, 11434, 0, 11436, 0, 11438, + 0, 11440, 0, 11442, 0, 11444, 0, 11446, 0, 11448, 0, 11450, 0, 11452, 0, 11454, + 0, 11456, 0, 11458, 0, 11460, 0, 11462, 0, 11464, 0, 11466, 0, 11468, 0, 11470, + 0, 11472, 0, 11474, 0, 11476, 0, 11478, 0, 11480, 0, 11482, 0, 11484, 0, 11486, + 0, 11488, 0, 11490, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 13 + 4256, 4257, 4258, 4259, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 4270, 4271, + 4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 4280, 4281, 4282, 4283, 4284, 4285, 4286, 4287, + 4288, 4289, 4290, 4291, 4292, 4293, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 14 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 42560, 0, 42562, 0, 42564, 0, 42566, 0, 42568, 0, 42570, 0, 42572, 0, 42574, + 0, 42576, 0, 42578, 0, 42580, 0, 42582, 0, 42584, 0, 42586, 0, 42588, 0, 42590, + 0, 0, 0, 42594, 0, 42596, 0, 42598, 0, 42600, 0, 42602, 0, 42604, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 42624, 0, 42626, 0, 42628, 0, 42630, 0, 42632, 0, 42634, 0, 42636, 0, 42638, + 0, 42640, 0, 42642, 0, 42644, 0, 42646, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 15 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 42786, 0, 42788, 0, 42790, 0, 42792, 0, 42794, 0, 42796, 0, 42798, + 0, 0, 0, 42802, 0, 42804, 0, 42806, 0, 42808, 0, 42810, 0, 42812, 0, 42814, + 0, 42816, 0, 42818, 0, 42820, 0, 42822, 0, 42824, 0, 42826, 0, 42828, 0, 42830, + 0, 42832, 0, 42834, 0, 42836, 0, 42838, 0, 42840, 0, 42842, 0, 42844, 0, 42846, + 0, 42848, 0, 42850, 0, 42852, 0, 42854, 0, 42856, 0, 42858, 0, 42860, 0, 42862, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42873, 0, 42875, 0, 0, 42878, + 0, 42880, 0, 42882, 0, 42884, 0, 42886, 0, 0, 0, 0, 42891, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 16 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 65313, 65314, 65315, 65316, 65317, 65318, 65319, 65320, 65321, 65322, 65323, 65324, 65325, 65326, 65327, + 65328, 65329, 65330, 65331, 65332, 65333, 65334, 65335, 65336, 65337, 65338, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + + // block 17 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66560, 66561, 66562, 66563, 66564, 66565, 66566, 66567, + 66568, 66569, 66570, 66571, 66572, 66573, 66574, 66575, 66576, 66577, 66578, 66579, 66580, 66581, 66582, 66583, + 66584, 66585, 66586, 66587, 66588, 66589, 66590, 66591, 66592, 66593, 66594, 66595, 66596, 66597, 66598, 66599, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + + inline ::boost::uint32_t uppercase_lookup(::boost::uint32_t ch) + { + ::boost::uint32_t block_offset = uppercase_stage1[ch / 256] * 256; + return uppercase_stage2[block_offset + ch % 256]; + } + +}}}} // namespace boost::spirit::unicode::detail diff --git a/3rdParty/Boost/src/boost/spirit/home/support/common_terminals.hpp b/3rdParty/Boost/src/boost/spirit/home/support/common_terminals.hpp new file mode 100644 index 0000000..2c7772d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/common_terminals.hpp @@ -0,0 +1,437 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + 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) +=============================================================================*/ +#ifndef BOOST_SPIRIT_COMMON_PLACEHOLDERS_OCTOBER_16_2008_0102PM +#define BOOST_SPIRIT_COMMON_PLACEHOLDERS_OCTOBER_16_2008_0102PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/terminal.hpp> +#include <boost/spirit/home/support/char_encoding/standard.hpp> +#include <boost/spirit/home/support/char_encoding/standard_wide.hpp> +#include <boost/spirit/home/support/char_encoding/ascii.hpp> +#include <boost/spirit/home/support/char_encoding/iso8859_1.hpp> +#include <boost/spirit/home/support/char_class.hpp> +#include <boost/mpl/vector.hpp> + +#if defined(BOOST_SPIRIT_UNICODE) +# include <boost/spirit/home/support/char_encoding/unicode.hpp> +#endif + +namespace boost { namespace spirit +{ + typedef mpl::vector< + spirit::char_encoding::ascii + , spirit::char_encoding::iso8859_1 + , spirit::char_encoding::standard + , spirit::char_encoding::standard_wide +#if defined(BOOST_SPIRIT_UNICODE) + , spirit::char_encoding::unicode +#endif + > + char_encodings; + + template <typename T> + struct is_char_encoding : mpl::false_ {}; + + template <> + struct is_char_encoding<spirit::char_encoding::ascii> : mpl::true_ {}; + + template <> + struct is_char_encoding<spirit::char_encoding::iso8859_1> : mpl::true_ {}; + + template <> + struct is_char_encoding<spirit::char_encoding::standard> : mpl::true_ {}; + + template <> + struct is_char_encoding<spirit::char_encoding::standard_wide> : mpl::true_ {}; + +#if defined(BOOST_SPIRIT_UNICODE) + template <> + struct is_char_encoding<spirit::char_encoding::unicode> : mpl::true_ {}; +#endif + + template <typename Encoding> + struct encoding + : proto::terminal<tag::char_code<tag::encoding, Encoding> >::type + {}; + + // Our basic terminals + BOOST_SPIRIT_DEFINE_TERMINALS_NAME( + ( verbatim, verbatim_type ) + ( no_delimit, no_delimit_type ) + ( lexeme, lexeme_type ) + ( no_skip, no_skip_type ) + ( omit, omit_type ) + ( raw, raw_type ) + ( as_string, as_string_type ) + ( as_wstring, as_wstring_type ) + ( inf, inf_type ) + ( eol, eol_type ) + ( eoi, eoi_type ) + ( buffer, buffer_type ) + ( true_, true_type ) + ( false_, false_type ) + ( matches, matches_type ) + ( hold, hold_type ) + ( strict, strict_type ) + ( relaxed, relaxed_type ) + ( duplicate, duplicate_type ) + ) + + // Our extended terminals + BOOST_SPIRIT_DEFINE_TERMINALS_NAME_EX( + ( lit, lit_type ) + ( bin, bin_type ) + ( oct, oct_type ) + ( hex, hex_type ) + ( bool_, bool_type ) + ( ushort_, ushort_type ) + ( ulong_, ulong_type ) + ( uint_, uint_type ) + ( short_, short_type ) + ( long_, long_type ) + ( int_, int_type ) + ( ulong_long, ulong_long_type ) + ( long_long, long_long_type ) + ( float_, float_type ) + ( double_, double_type ) + ( long_double, long_double_type ) + ( repeat, repeat_type ) + ( eps, eps_type ) + ( pad, pad_type ) + ( byte_, byte_type ) + ( word, word_type ) + ( big_word, big_word_type ) + ( little_word, little_word_type ) + ( dword, dword_type ) + ( big_dword, big_dword_type ) + ( little_dword, little_dword_type ) + ( qword, qword_type ) + ( big_qword, big_qword_type ) + ( little_qword, little_qword_type ) + ( bin_float, bin_float_type ) + ( big_bin_float, big_bin_float_type ) + ( little_bin_float, little_bin_float_type ) + ( bin_double, bin_double_type ) + ( big_bin_double, big_bin_double_type ) + ( little_bin_double, little_bin_double_type ) + ( skip, skip_type ) + ( delimit, delimit_type ) + ( stream, stream_type ) + ( wstream, wstream_type ) + ( left_align, left_align_type ) + ( right_align, right_align_type ) + ( center, center_type ) + ( maxwidth, maxwidth_type ) + ( set_state, set_state_type ) + ( in_state, in_state_type ) + ( token, token_type ) + ( tokenid, tokenid_type ) + ( raw_token, raw_token_type ) + ( tokenid_mask, tokenid_mask_type ) + ( attr, attr_type ) + ( columns, columns_type ) + ( auto_, auto_type ) + ) + + // special tags (used mainly for stateful tag types) + namespace tag + { + struct attr_cast { BOOST_SPIRIT_IS_TAG() }; + struct as { BOOST_SPIRIT_IS_TAG() }; + } +}} + +/////////////////////////////////////////////////////////////////////////////// +// Here we place the character-set sensitive placeholders. We have one set +// each for ascii, iso8859_1, standard and standard_wide and unicode. These +// placeholders are placed in its char-set namespace. For example, there exist +// a placeholder spirit::ascii::alnum for ascii versions of alnum. + +#define BOOST_SPIRIT_TAG_CHAR_SPEC(charset) \ + typedef tag::char_code<tag::char_, charset> char_; \ + typedef tag::char_code<tag::string, charset> string; \ + /***/ + +#ifdef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + +#define BOOST_SPIRIT_CHAR_SPEC(charset) \ + typedef spirit::terminal<tag::charset::char_> char_type; \ + typedef spirit::terminal<tag::charset::string> string_type; \ + /***/ + +#else + +#define BOOST_SPIRIT_CHAR_SPEC(charset) \ + typedef spirit::terminal<tag::charset::char_> char_type; \ + char_type const char_ = char_type(); \ + \ + inline void silence_unused_warnings_##char_() { (void) char_; } \ + \ + typedef spirit::terminal<tag::charset::string> string_type; \ + string_type const string = string_type(); \ + \ + inline void silence_unused_warnings_##string() { (void) string; } \ + /***/ + +#endif + +#ifdef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + +#define BOOST_SPIRIT_CHAR_CODE(name, charset) \ + typedef proto::terminal<tag::char_code<tag::name, charset> >::type \ + name##_type; \ + /***/ + +#else + +#define BOOST_SPIRIT_CHAR_CODE(name, charset) \ + typedef proto::terminal<tag::char_code<tag::name, charset> >::type \ + name##_type; \ + name##_type const name = name##_type(); \ + \ + inline void silence_unused_warnings_##name() { (void) name; } \ + /***/ + + +#endif + +#define BOOST_SPIRIT_DEFINE_CHAR_CODES(charset) \ + namespace boost { namespace spirit { namespace tag { namespace charset \ + { \ + BOOST_SPIRIT_TAG_CHAR_SPEC(spirit::char_encoding::charset) \ + }}}} \ + namespace boost { namespace spirit { namespace charset \ + { \ + BOOST_SPIRIT_CHAR_SPEC(charset) \ + \ + BOOST_SPIRIT_CHAR_CODE(alnum, spirit::char_encoding::charset) \ + BOOST_SPIRIT_CHAR_CODE(alpha, spirit::char_encoding::charset) \ + BOOST_SPIRIT_CHAR_CODE(blank, spirit::char_encoding::charset) \ + BOOST_SPIRIT_CHAR_CODE(cntrl, spirit::char_encoding::charset) \ + BOOST_SPIRIT_CHAR_CODE(digit, spirit::char_encoding::charset) \ + BOOST_SPIRIT_CHAR_CODE(graph, spirit::char_encoding::charset) \ + BOOST_SPIRIT_CHAR_CODE(print, spirit::char_encoding::charset) \ + BOOST_SPIRIT_CHAR_CODE(punct, spirit::char_encoding::charset) \ + BOOST_SPIRIT_CHAR_CODE(space, spirit::char_encoding::charset) \ + BOOST_SPIRIT_CHAR_CODE(xdigit, spirit::char_encoding::charset) \ + \ + BOOST_SPIRIT_CHAR_CODE(no_case, spirit::char_encoding::charset) \ + BOOST_SPIRIT_CHAR_CODE(lower, spirit::char_encoding::charset) \ + BOOST_SPIRIT_CHAR_CODE(upper, spirit::char_encoding::charset) \ + BOOST_SPIRIT_CHAR_CODE(lowernum, spirit::char_encoding::charset) \ + BOOST_SPIRIT_CHAR_CODE(uppernum, spirit::char_encoding::charset) \ + }}} \ + /***/ + +BOOST_SPIRIT_DEFINE_CHAR_CODES(ascii) +BOOST_SPIRIT_DEFINE_CHAR_CODES(iso8859_1) +BOOST_SPIRIT_DEFINE_CHAR_CODES(standard) +BOOST_SPIRIT_DEFINE_CHAR_CODES(standard_wide) + +namespace boost { namespace spirit { namespace traits +{ + template <typename Char> + struct char_encoding_from_char; + + template <> + struct char_encoding_from_char<char> + : mpl::identity<spirit::char_encoding::standard> + {}; + + template <> + struct char_encoding_from_char<wchar_t> + : mpl::identity<spirit::char_encoding::standard_wide> + {}; + + template <typename T> + struct char_encoding_from_char<T const> + : char_encoding_from_char<T> + {}; +}}} + +#if defined(BOOST_SPIRIT_UNICODE) +BOOST_SPIRIT_DEFINE_CHAR_CODES(unicode) + + namespace boost { namespace spirit { namespace tag { namespace unicode + { + BOOST_SPIRIT_TAG_CHAR_SPEC(spirit::char_encoding::unicode) + }}}} + + namespace boost { namespace spirit { namespace unicode + { +#define BOOST_SPIRIT_UNICODE_CHAR_CODE(name) \ + BOOST_SPIRIT_CHAR_CODE(name, spirit::char_encoding::unicode) \ + + /////////////////////////////////////////////////////////////////////////// + // Unicode Major Categories + /////////////////////////////////////////////////////////////////////////// + BOOST_SPIRIT_UNICODE_CHAR_CODE(letter) + BOOST_SPIRIT_UNICODE_CHAR_CODE(mark) + BOOST_SPIRIT_UNICODE_CHAR_CODE(number) + BOOST_SPIRIT_UNICODE_CHAR_CODE(separator) + BOOST_SPIRIT_UNICODE_CHAR_CODE(other) + BOOST_SPIRIT_UNICODE_CHAR_CODE(punctuation) + BOOST_SPIRIT_UNICODE_CHAR_CODE(symbol) + + /////////////////////////////////////////////////////////////////////////// + // Unicode General Categories + /////////////////////////////////////////////////////////////////////////// + BOOST_SPIRIT_UNICODE_CHAR_CODE(uppercase_letter) + BOOST_SPIRIT_UNICODE_CHAR_CODE(lowercase_letter) + BOOST_SPIRIT_UNICODE_CHAR_CODE(titlecase_letter) + BOOST_SPIRIT_UNICODE_CHAR_CODE(modifier_letter) + BOOST_SPIRIT_UNICODE_CHAR_CODE(other_letter) + + BOOST_SPIRIT_UNICODE_CHAR_CODE(nonspacing_mark) + BOOST_SPIRIT_UNICODE_CHAR_CODE(enclosing_mark) + BOOST_SPIRIT_UNICODE_CHAR_CODE(spacing_mark) + + BOOST_SPIRIT_UNICODE_CHAR_CODE(decimal_number) + BOOST_SPIRIT_UNICODE_CHAR_CODE(letter_number) + BOOST_SPIRIT_UNICODE_CHAR_CODE(other_number) + + BOOST_SPIRIT_UNICODE_CHAR_CODE(space_separator) + BOOST_SPIRIT_UNICODE_CHAR_CODE(line_separator) + BOOST_SPIRIT_UNICODE_CHAR_CODE(paragraph_separator) + + BOOST_SPIRIT_UNICODE_CHAR_CODE(control) + BOOST_SPIRIT_UNICODE_CHAR_CODE(format) + BOOST_SPIRIT_UNICODE_CHAR_CODE(private_use) + BOOST_SPIRIT_UNICODE_CHAR_CODE(surrogate) + BOOST_SPIRIT_UNICODE_CHAR_CODE(unassigned) + + BOOST_SPIRIT_UNICODE_CHAR_CODE(dash_punctuation) + BOOST_SPIRIT_UNICODE_CHAR_CODE(open_punctuation) + BOOST_SPIRIT_UNICODE_CHAR_CODE(close_punctuation) + BOOST_SPIRIT_UNICODE_CHAR_CODE(connector_punctuation) + BOOST_SPIRIT_UNICODE_CHAR_CODE(other_punctuation) + BOOST_SPIRIT_UNICODE_CHAR_CODE(initial_punctuation) + BOOST_SPIRIT_UNICODE_CHAR_CODE(final_punctuation) + + BOOST_SPIRIT_UNICODE_CHAR_CODE(math_symbol) + BOOST_SPIRIT_UNICODE_CHAR_CODE(currency_symbol) + BOOST_SPIRIT_UNICODE_CHAR_CODE(modifier_symbol) + BOOST_SPIRIT_UNICODE_CHAR_CODE(other_symbol) + + /////////////////////////////////////////////////////////////////////////// + // Unicode Derived Categories + /////////////////////////////////////////////////////////////////////////// + BOOST_SPIRIT_UNICODE_CHAR_CODE(alphabetic) + BOOST_SPIRIT_UNICODE_CHAR_CODE(uppercase) + BOOST_SPIRIT_UNICODE_CHAR_CODE(lowercase) + BOOST_SPIRIT_UNICODE_CHAR_CODE(white_space) + BOOST_SPIRIT_UNICODE_CHAR_CODE(hex_digit) + BOOST_SPIRIT_UNICODE_CHAR_CODE(noncharacter_code_point) + BOOST_SPIRIT_UNICODE_CHAR_CODE(default_ignorable_code_point) + + /////////////////////////////////////////////////////////////////////////// + // Unicode Scripts + /////////////////////////////////////////////////////////////////////////// + BOOST_SPIRIT_UNICODE_CHAR_CODE(arabic) + BOOST_SPIRIT_UNICODE_CHAR_CODE(imperial_aramaic) + BOOST_SPIRIT_UNICODE_CHAR_CODE(armenian) + BOOST_SPIRIT_UNICODE_CHAR_CODE(avestan) + BOOST_SPIRIT_UNICODE_CHAR_CODE(balinese) + BOOST_SPIRIT_UNICODE_CHAR_CODE(bamum) + BOOST_SPIRIT_UNICODE_CHAR_CODE(bengali) + BOOST_SPIRIT_UNICODE_CHAR_CODE(bopomofo) + BOOST_SPIRIT_UNICODE_CHAR_CODE(braille) + BOOST_SPIRIT_UNICODE_CHAR_CODE(buginese) + BOOST_SPIRIT_UNICODE_CHAR_CODE(buhid) + BOOST_SPIRIT_UNICODE_CHAR_CODE(canadian_aboriginal) + BOOST_SPIRIT_UNICODE_CHAR_CODE(carian) + BOOST_SPIRIT_UNICODE_CHAR_CODE(cham) + BOOST_SPIRIT_UNICODE_CHAR_CODE(cherokee) + BOOST_SPIRIT_UNICODE_CHAR_CODE(coptic) + BOOST_SPIRIT_UNICODE_CHAR_CODE(cypriot) + BOOST_SPIRIT_UNICODE_CHAR_CODE(cyrillic) + BOOST_SPIRIT_UNICODE_CHAR_CODE(devanagari) + BOOST_SPIRIT_UNICODE_CHAR_CODE(deseret) + BOOST_SPIRIT_UNICODE_CHAR_CODE(egyptian_hieroglyphs) + BOOST_SPIRIT_UNICODE_CHAR_CODE(ethiopic) + BOOST_SPIRIT_UNICODE_CHAR_CODE(georgian) + BOOST_SPIRIT_UNICODE_CHAR_CODE(glagolitic) + BOOST_SPIRIT_UNICODE_CHAR_CODE(gothic) + BOOST_SPIRIT_UNICODE_CHAR_CODE(greek) + BOOST_SPIRIT_UNICODE_CHAR_CODE(gujarati) + BOOST_SPIRIT_UNICODE_CHAR_CODE(gurmukhi) + BOOST_SPIRIT_UNICODE_CHAR_CODE(hangul) + BOOST_SPIRIT_UNICODE_CHAR_CODE(han) + BOOST_SPIRIT_UNICODE_CHAR_CODE(hanunoo) + BOOST_SPIRIT_UNICODE_CHAR_CODE(hebrew) + BOOST_SPIRIT_UNICODE_CHAR_CODE(hiragana) + BOOST_SPIRIT_UNICODE_CHAR_CODE(katakana_or_hiragana) + BOOST_SPIRIT_UNICODE_CHAR_CODE(old_italic) + BOOST_SPIRIT_UNICODE_CHAR_CODE(javanese) + BOOST_SPIRIT_UNICODE_CHAR_CODE(kayah_li) + BOOST_SPIRIT_UNICODE_CHAR_CODE(katakana) + BOOST_SPIRIT_UNICODE_CHAR_CODE(kharoshthi) + BOOST_SPIRIT_UNICODE_CHAR_CODE(khmer) + BOOST_SPIRIT_UNICODE_CHAR_CODE(kannada) + BOOST_SPIRIT_UNICODE_CHAR_CODE(kaithi) + BOOST_SPIRIT_UNICODE_CHAR_CODE(tai_tham) + BOOST_SPIRIT_UNICODE_CHAR_CODE(lao) + BOOST_SPIRIT_UNICODE_CHAR_CODE(latin) + BOOST_SPIRIT_UNICODE_CHAR_CODE(lepcha) + BOOST_SPIRIT_UNICODE_CHAR_CODE(limbu) + BOOST_SPIRIT_UNICODE_CHAR_CODE(linear_b) + BOOST_SPIRIT_UNICODE_CHAR_CODE(lisu) + BOOST_SPIRIT_UNICODE_CHAR_CODE(lycian) + BOOST_SPIRIT_UNICODE_CHAR_CODE(lydian) + BOOST_SPIRIT_UNICODE_CHAR_CODE(malayalam) + BOOST_SPIRIT_UNICODE_CHAR_CODE(mongolian) + BOOST_SPIRIT_UNICODE_CHAR_CODE(meetei_mayek) + BOOST_SPIRIT_UNICODE_CHAR_CODE(myanmar) + BOOST_SPIRIT_UNICODE_CHAR_CODE(nko) + BOOST_SPIRIT_UNICODE_CHAR_CODE(ogham) + BOOST_SPIRIT_UNICODE_CHAR_CODE(ol_chiki) + BOOST_SPIRIT_UNICODE_CHAR_CODE(old_turkic) + BOOST_SPIRIT_UNICODE_CHAR_CODE(oriya) + BOOST_SPIRIT_UNICODE_CHAR_CODE(osmanya) + BOOST_SPIRIT_UNICODE_CHAR_CODE(phags_pa) + BOOST_SPIRIT_UNICODE_CHAR_CODE(inscriptional_pahlavi) + BOOST_SPIRIT_UNICODE_CHAR_CODE(phoenician) + BOOST_SPIRIT_UNICODE_CHAR_CODE(inscriptional_parthian) + BOOST_SPIRIT_UNICODE_CHAR_CODE(rejang) + BOOST_SPIRIT_UNICODE_CHAR_CODE(runic) + BOOST_SPIRIT_UNICODE_CHAR_CODE(samaritan) + BOOST_SPIRIT_UNICODE_CHAR_CODE(old_south_arabian) + BOOST_SPIRIT_UNICODE_CHAR_CODE(saurashtra) + BOOST_SPIRIT_UNICODE_CHAR_CODE(shavian) + BOOST_SPIRIT_UNICODE_CHAR_CODE(sinhala) + BOOST_SPIRIT_UNICODE_CHAR_CODE(sundanese) + BOOST_SPIRIT_UNICODE_CHAR_CODE(syloti_nagri) + BOOST_SPIRIT_UNICODE_CHAR_CODE(syriac) + BOOST_SPIRIT_UNICODE_CHAR_CODE(tagbanwa) + BOOST_SPIRIT_UNICODE_CHAR_CODE(tai_le) + BOOST_SPIRIT_UNICODE_CHAR_CODE(new_tai_lue) + BOOST_SPIRIT_UNICODE_CHAR_CODE(tamil) + BOOST_SPIRIT_UNICODE_CHAR_CODE(tai_viet) + BOOST_SPIRIT_UNICODE_CHAR_CODE(telugu) + BOOST_SPIRIT_UNICODE_CHAR_CODE(tifinagh) + BOOST_SPIRIT_UNICODE_CHAR_CODE(tagalog) + BOOST_SPIRIT_UNICODE_CHAR_CODE(thaana) + BOOST_SPIRIT_UNICODE_CHAR_CODE(thai) + BOOST_SPIRIT_UNICODE_CHAR_CODE(tibetan) + BOOST_SPIRIT_UNICODE_CHAR_CODE(ugaritic) + BOOST_SPIRIT_UNICODE_CHAR_CODE(vai) + BOOST_SPIRIT_UNICODE_CHAR_CODE(old_persian) + BOOST_SPIRIT_UNICODE_CHAR_CODE(cuneiform) + BOOST_SPIRIT_UNICODE_CHAR_CODE(yi) + BOOST_SPIRIT_UNICODE_CHAR_CODE(inherited) + BOOST_SPIRIT_UNICODE_CHAR_CODE(common) + BOOST_SPIRIT_UNICODE_CHAR_CODE(unknown) + +#undef BOOST_SPIRIT_UNICODE_CHAR_CODE + }}} +#endif + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/container.hpp b/3rdParty/Boost/src/boost/spirit/home/support/container.hpp new file mode 100644 index 0000000..7f491aa --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/container.hpp @@ -0,0 +1,575 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 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_CONTAINER_FEBRUARY_06_2007_1001AM) +#define BOOST_SPIRIT_CONTAINER_FEBRUARY_06_2007_1001AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/unused.hpp> +#include <boost/spirit/home/support/attributes_fwd.hpp> +#include <boost/detail/iterator.hpp> // for boost::detail::iterator_traits +#include <boost/mpl/has_xxx.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/optional.hpp> +#include <boost/variant.hpp> +#include <boost/preprocessor/cat.hpp> +#include <boost/preprocessor/repeat.hpp> +#include <boost/range/iterator_range.hpp> + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + // This file contains some container utils for stl containers. The + // utilities provided also accept spirit's unused_type; all no-ops. + // Compiler optimization will easily strip these away. + /////////////////////////////////////////////////////////////////////////// + + namespace detail + { + BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type) + BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator) + BOOST_MPL_HAS_XXX_TRAIT_DEF(size_type) + BOOST_MPL_HAS_XXX_TRAIT_DEF(reference) + } + + template <typename T, typename Enable/* = void*/> + struct is_container + : mpl::bool_< + detail::has_value_type<T>::value && + detail::has_iterator<T>::value && + detail::has_size_type<T>::value && + detail::has_reference<T>::value> + {}; + + template <typename T> + struct is_container<T&> + : is_container<T> + {}; + + template <typename T> + struct is_container<boost::optional<T> > + : is_container<T> + {}; + +#define BOOST_SPIRIT_IS_CONTAINER(z, N, data) \ + is_container<BOOST_PP_CAT(T, N)>::value || \ + /***/ + + // make sure unused variant parameters do not affect the outcome + template <> + struct is_container<boost::detail::variant::void_> + : mpl::false_ + {}; + + template <BOOST_VARIANT_ENUM_PARAMS(typename T)> + struct is_container<variant<BOOST_VARIANT_ENUM_PARAMS(T)> > + : mpl::bool_<BOOST_PP_REPEAT(BOOST_VARIANT_LIMIT_TYPES + , BOOST_SPIRIT_IS_CONTAINER, _) false> + {}; + +#undef BOOST_SPIRIT_IS_CONTAINER + + template <typename T, typename Enable/* = void*/> + struct is_iterator_range + : mpl::false_ + {}; + + template <typename T> + struct is_iterator_range<iterator_range<T> > + : mpl::true_ + {}; + + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + template <typename T> + struct remove_value_const + { + typedef T type; + }; + + template <typename T> + struct remove_value_const<T const> + : remove_value_const<T> + {}; + + template <typename F, typename S> + struct remove_value_const<std::pair<F, S> > + { + typedef typename remove_value_const<F>::type first_type; + typedef typename remove_value_const<S>::type second_type; + typedef std::pair<first_type, second_type> type; + }; + } + + /////////////////////////////////////////////////////////////////////// + //[customization_container_value_default + template <typename Container, typename Enable/* = void*/> + struct container_value + : detail::remove_value_const<typename Container::value_type> + {}; + //] + + template <typename T> + struct container_value<T&> + : container_value<T> + {}; + + // this will be instantiated if the optional holds a container + template <typename T> + struct container_value<boost::optional<T> > + : container_value<T> + {}; + + // this will be instantiated if the variant holds a container + template <BOOST_VARIANT_ENUM_PARAMS(typename T)> + struct container_value<variant<BOOST_VARIANT_ENUM_PARAMS(T)> > + { + typedef typename + variant<BOOST_VARIANT_ENUM_PARAMS(T)>::types + types; + typedef typename + mpl::find_if<types, is_container<mpl::_1> >::type + iter; + + typedef typename container_value< + typename mpl::if_< + is_same<iter, typename mpl::end<types>::type> + , unused_type, typename mpl::deref<iter>::type + >::type + >::type type; + }; + + //[customization_container_value_unused + template <> + struct container_value<unused_type> + { + typedef unused_type type; + }; + //] + + template <> + struct container_value<unused_type const> + { + typedef unused_type type; + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename Container, typename Enable/* = void*/> + struct container_iterator + { + typedef typename Container::iterator type; + }; + + template <typename Container> + struct container_iterator<Container&> + : container_iterator<Container> + {}; + + template <typename Container> + struct container_iterator<Container const> + { + typedef typename Container::const_iterator type; + }; + + template <typename T> + struct container_iterator<optional<T> > + : container_iterator<T> + {}; + + template <typename T> + struct container_iterator<optional<T> const> + : container_iterator<T const> + {}; + + template <typename Iterator> + struct container_iterator<iterator_range<Iterator> > + { + typedef typename range_const_iterator< + iterator_range<Iterator> >::type type; + }; + + template <> + struct container_iterator<unused_type> + { + typedef unused_type const* type; + }; + + template <> + struct container_iterator<unused_type const> + { + typedef unused_type const* type; + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Enable/* = void*/> + struct optional_attribute + { + typedef T const& type; + + static type call(T const& val) + { + return val; + } + + static bool is_valid(T const&) + { + return true; + } + }; + + template <typename T> + struct optional_attribute<boost::optional<T> > + { + typedef T const& type; + + static type call(boost::optional<T> const& val) + { + return boost::get<T>(val); + } + + static bool is_valid(boost::optional<T> const& val) + { + return val; + } + }; + + template <typename T> + typename optional_attribute<T>::type + optional_value(T const& val) + { + return optional_attribute<T>::call(val); + } + + inline unused_type optional_value(unused_type) + { + return unused; + } + + template <typename T> + bool has_optional_value(T const& val) + { + return optional_attribute<T>::is_valid(val); + } + + inline bool has_optional_value(unused_type) + { + return true; + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Container, typename T> + bool push_back(Container& c, T const& val); + + //[customization_push_back_default + template <typename Container, typename T, typename Enable/* = void*/> + struct push_back_container + { + static bool call(Container& c, T const& val) + { + c.insert(c.end(), val); + return true; + } + }; + //] + + template <typename Container, typename T> + struct push_back_container<optional<Container>, T> + { + static bool call(boost::optional<Container>& c, T const& val) + { + if (!c) + c = Container(); + return push_back(boost::get<Container>(c), val); + } + }; + + namespace detail + { + template <typename T> + struct push_back_visitor : public static_visitor<> + { + typedef bool result_type; + + push_back_visitor(T const& t) : t_(t) {} + + template <typename Container> + bool push_back_impl(Container& c, mpl::true_) const + { + return push_back(c, t_); + } + + template <typename T_> + bool push_back_impl(T_&, mpl::false_) const + { + // this variant doesn't hold a container + BOOST_ASSERT(false && "This variant doesn't hold a container"); + return false; + } + + template <typename T_> + bool operator()(T_& c) const + { + return push_back_impl(c, typename is_container<T_>::type()); + } + + T const& t_; + }; + } + + template <BOOST_VARIANT_ENUM_PARAMS(typename T_), typename T> + struct push_back_container<variant<BOOST_VARIANT_ENUM_PARAMS(T_)>, T> + { + static bool call(variant<BOOST_VARIANT_ENUM_PARAMS(T_)>& c, T const& val) + { + return apply_visitor(detail::push_back_visitor<T>(val), c); + } + }; + + template <typename Container, typename T> + bool push_back(Container& c, T const& val) + { + return push_back_container<Container, T>::call(c, val); + } + + //[customization_push_back_unused + template <typename Container> + bool push_back(Container&, unused_type) + { + return true; + } + //] + + template <typename T> + bool push_back(unused_type, T const&) + { + return true; + } + + inline bool push_back(unused_type, unused_type) + { + return true; + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Container, typename Enable/* = void*/> + struct is_empty_container + { + static bool call(Container const& c) + { + return c.empty(); + } + }; + + template <typename Container> + bool is_empty(Container const& c) + { + return is_empty_container<Container>::call(c); + } + + inline bool is_empty(unused_type) + { + return true; + } + + /////////////////////////////////////////////////////////////////////////// + // Ensure the attribute is actually a container type + template <typename Container, typename Enable/* = void*/> + struct make_container_attribute + { + static void call(Container&) + { + // for static types this function does nothing + } + }; + + template <typename T> + void make_container(T& t) + { + make_container_attribute<T>::call(t); + } + + inline void make_container(unused_type) + { + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Container, typename Enable/* = void*/> + struct begin_container + { + static typename container_iterator<Container>::type call(Container& c) + { + return c.begin(); + } + }; + + template <typename Container> + typename spirit::result_of::begin<Container>::type + begin(Container& c) + { + return begin_container<Container>::call(c); + } + + inline unused_type const* + begin(unused_type) + { + return &unused; + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Container, typename Enable/* = void*/> + struct end_container + { + static typename container_iterator<Container>::type call(Container& c) + { + return c.end(); + } + }; + + template <typename Container> + inline typename spirit::result_of::end<Container>::type + end(Container& c) + { + return end_container<Container>::call(c); + } + + inline unused_type const* + end(unused_type) + { + return &unused; + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename Enable/* = void*/> + struct deref_iterator + { + typedef typename boost::detail::iterator_traits<Iterator>::reference type; + static type call(Iterator& it) + { + return *it; + } + }; + + template <typename Iterator> + typename deref_iterator<Iterator>::type + deref(Iterator& it) + { + return deref_iterator<Iterator>::call(it); + } + + inline unused_type + deref(unused_type const*) + { + return unused; + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename Enable/* = void*/> + struct next_iterator + { + static void call(Iterator& it) + { + ++it; + } + }; + + template <typename Iterator> + void next(Iterator& it) + { + next_iterator<Iterator>::call(it); + } + + inline void next(unused_type const*) + { + // do nothing + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Iterator, typename Enable/* = void*/> + struct compare_iterators + { + static bool call(Iterator const& it1, Iterator const& it2) + { + return it1 == it2; + } + }; + + template <typename Iterator> + bool compare(Iterator& it1, Iterator& it2) + { + return compare_iterators<Iterator>::call(it1, it2); + } + + inline bool compare(unused_type const*, unused_type const*) + { + return false; + } +}}} + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { namespace result_of +{ + /////////////////////////////////////////////////////////////////////////// + template <typename T> + struct optional_value + { + typedef T type; + }; + + template <typename T> + struct optional_value<boost::optional<T> > + { + typedef T type; + }; + + template <typename T> + struct optional_value<boost::optional<T> const> + { + typedef T const type; + }; + + template <> + struct optional_value<unused_type> + { + typedef unused_type type; + }; + + template <> + struct optional_value<unused_type const> + { + typedef unused_type type; + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename Container> + struct begin + : traits::container_iterator<Container> + {}; + + template <typename Container> + struct end + : traits::container_iterator<Container> + {}; + + template <typename Iterator> + struct deref + : traits::deref_iterator<Iterator> + {}; + + template <> + struct deref<unused_type const*> + { + typedef unused_type type; + }; + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/context.hpp b/3rdParty/Boost/src/boost/spirit/home/support/context.hpp new file mode 100644 index 0000000..b728b4f --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/context.hpp @@ -0,0 +1,299 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2011 Thomas Heller + + 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_CONTEXT_OCTOBER_31_2008_0654PM) +#define BOOST_SPIRIT_CONTEXT_OCTOBER_31_2008_0654PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/preprocessor/repetition/repeat_from_to.hpp> +#include <boost/spirit/include/phoenix_core.hpp> +#include <boost/spirit/home/support/nonterminal/expand_arg.hpp> +#include <boost/spirit/home/support/assert_msg.hpp> +#include <boost/spirit/home/support/argument.hpp> +#include <boost/spirit/home/support/limits.hpp> +#include <boost/fusion/include/at.hpp> +#include <boost/fusion/include/size.hpp> +#include <boost/fusion/include/as_list.hpp> +#include <boost/fusion/include/transform.hpp> +#include <boost/mpl/size.hpp> +#include <boost/mpl/at.hpp> + +/////////////////////////////////////////////////////////////////////////////// +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + +#define SPIRIT_DECLARE_ATTRIBUTE(z, n, data) \ + typedef phoenix::actor<attribute<n> > \ + BOOST_PP_CAT(BOOST_PP_CAT(_r, n), _type); \ + phoenix::actor<attribute<n> > const \ + BOOST_PP_CAT(_r, n) = BOOST_PP_CAT(BOOST_PP_CAT(_r, n), _type)(); + /***/ +#define SPIRIT_USING_ATTRIBUTE(z, n, data) \ + using spirit::BOOST_PP_CAT(BOOST_PP_CAT(_r, n), _type); \ + using spirit::BOOST_PP_CAT(_r, n); \ + /***/ + +#else + +#define SPIRIT_DECLARE_ATTRIBUTE(z, n, data) \ + typedef phoenix::actor<attribute<n> > \ + BOOST_PP_CAT(BOOST_PP_CAT(_r, n), _type); \ + /***/ +#define SPIRIT_USING_ATTRIBUTE(z, n, data) \ + using spirit::BOOST_PP_CAT(BOOST_PP_CAT(_r, n), _type); \ + /***/ + +#endif + +namespace boost { namespace spirit +{ + template <int> + struct attribute; + + template <int> + struct local_variable; +}} + +BOOST_PHOENIX_DEFINE_CUSTOM_TERMINAL( + template <int N> + , boost::spirit::attribute<N> + , mpl::false_ // is not nullary + , v2_eval( + proto::make< + boost::spirit::attribute<N>() + > + , proto::call< + functional::env(proto::_state) + > + ) +) + +BOOST_PHOENIX_DEFINE_CUSTOM_TERMINAL( + template <int N> + , boost::spirit::local_variable<N> + , mpl::false_ // is not nullary + , v2_eval( + proto::make< + boost::spirit::local_variable<N>() + > + , proto::call< + functional::env(proto::_state) + > + ) +) + +namespace boost { namespace spirit +{ + template <typename Attributes, typename Locals> + struct context + { + typedef Attributes attributes_type; + typedef Locals locals_type; + + context(typename Attributes::car_type attribute) + : attributes(attribute, fusion::nil()), locals() {} + + template <typename Args, typename Context> + context( + typename Attributes::car_type attribute + , Args const& args + , Context& caller_context + ) : attributes( + attribute + , fusion::as_list( + fusion::transform( + args + , detail::expand_arg<Context>(caller_context) + ) + ) + ) + , locals() {} + + context(Attributes const& attributes) + : attributes(attributes), locals() {} + + Attributes attributes; // The attributes + Locals locals; // Local variables + }; + + template <typename Context> + struct attributes_of + { + typedef typename Context::attributes_type type; + }; + + template <typename Context> + struct attributes_of<Context const> + { + typedef typename Context::attributes_type const type; + }; + + template <typename Context> + struct attributes_of<Context &> + : attributes_of<Context> + {}; + + template <typename Context> + struct locals_of + { + typedef typename Context::locals_type type; + }; + + template <typename Context> + struct locals_of<Context const> + { + typedef typename Context::locals_type const type; + }; + + template <typename Context> + struct locals_of<Context &> + { + typedef typename Context::locals_type type; + }; + + template <int N> + struct attribute + { + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result + { + typedef typename + attributes_of<typename + mpl::at_c<typename Env::args_type, 1>::type + >::type + attributes_type; + + typedef typename + fusion::result_of::size<attributes_type>::type + attributes_size; + + // report invalid argument not found (N is out of bounds) + BOOST_SPIRIT_ASSERT_MSG( + (N < attributes_size::value), + index_is_out_of_bounds, ()); + + typedef typename + fusion::result_of::at_c<attributes_type, N>::type + type; + }; + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + return fusion::at_c<N>((fusion::at_c<1>(env.args())).attributes); + } + }; + + template <int N> + struct local_variable + { + typedef mpl::true_ no_nullary; + + template <typename Env> + struct result + { + typedef typename + locals_of<typename + mpl::at_c<typename Env::args_type, 1>::type + >::type + locals_type; + + typedef typename + fusion::result_of::size<locals_type>::type + locals_size; + + // report invalid argument not found (N is out of bounds) + BOOST_SPIRIT_ASSERT_MSG( + (N < locals_size::value), + index_is_out_of_bounds, ()); + + typedef typename + fusion::result_of::at_c<locals_type, N>::type + type; + }; + + template <typename Env> + typename result<Env>::type + eval(Env const& env) const + { + return get_arg<N>((fusion::at_c<1>(env.args())).locals); + } + }; + + typedef phoenix::actor<attribute<0> > _val_type; + typedef phoenix::actor<attribute<0> > _r0_type; + typedef phoenix::actor<attribute<1> > _r1_type; + typedef phoenix::actor<attribute<2> > _r2_type; + +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + // _val refers to the 'return' value of a rule (same as _r0) + // _r1, _r2, ... refer to the rule arguments + _val_type const _val = _val_type(); + _r0_type const _r0 = _r0_type(); + _r1_type const _r1 = _r1_type(); + _r2_type const _r2 = _r2_type(); +#endif + + // Bring in the rest of the attributes (_r4 .. _rN+1), using PP + BOOST_PP_REPEAT_FROM_TO( + 3, SPIRIT_ATTRIBUTES_LIMIT, SPIRIT_DECLARE_ATTRIBUTE, _) + + typedef phoenix::actor<local_variable<0> > _a_type; + typedef phoenix::actor<local_variable<1> > _b_type; + typedef phoenix::actor<local_variable<2> > _c_type; + typedef phoenix::actor<local_variable<3> > _d_type; + typedef phoenix::actor<local_variable<4> > _e_type; + typedef phoenix::actor<local_variable<5> > _f_type; + typedef phoenix::actor<local_variable<6> > _g_type; + typedef phoenix::actor<local_variable<7> > _h_type; + typedef phoenix::actor<local_variable<8> > _i_type; + typedef phoenix::actor<local_variable<9> > _j_type; + +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + // _a, _b, ... refer to the local variables of a rule + _a_type const _a = _a_type(); + _b_type const _b = _b_type(); + _c_type const _c = _c_type(); + _d_type const _d = _d_type(); + _e_type const _e = _e_type(); + _f_type const _f = _f_type(); + _g_type const _g = _g_type(); + _h_type const _h = _h_type(); + _i_type const _i = _i_type(); + _j_type const _j = _j_type(); +#endif + + // You can bring these in with the using directive + // without worrying about bringing in too much. + namespace labels + { + BOOST_PP_REPEAT(SPIRIT_ARGUMENTS_LIMIT, SPIRIT_USING_ARGUMENT, _) + BOOST_PP_REPEAT(SPIRIT_ATTRIBUTES_LIMIT, SPIRIT_USING_ATTRIBUTE, _) + +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + using spirit::_val; + using spirit::_a; + using spirit::_b; + using spirit::_c; + using spirit::_d; + using spirit::_e; + using spirit::_f; + using spirit::_g; + using spirit::_h; + using spirit::_i; + using spirit::_j; +#endif + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/as_variant.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/as_variant.hpp new file mode 100644 index 0000000..e2fe18d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/as_variant.hpp @@ -0,0 +1,104 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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_PP_IS_ITERATING +#if !defined(BOOST_SPIRIT_AS_VARIANT_NOVEMBER_16_2007_0420PM) +#define BOOST_SPIRIT_AS_VARIANT_NOVEMBER_16_2007_0420PM + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +#include <boost/preprocessor/repetition/repeat_from_to.hpp> +#include <boost/variant/variant_fwd.hpp> +#include <boost/fusion/include/size.hpp> +#include <boost/fusion/include/begin.hpp> +#include <boost/fusion/include/next.hpp> +#include <boost/fusion/include/value_of.hpp> +#include <boost/mpl/fold.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/mpl/push_back.hpp> +#include <boost/mpl/equal_to.hpp> +#include <boost/mpl/contains.hpp> +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace spirit { namespace detail +{ + template <int size> + struct as_variant_impl; + + template <> + struct as_variant_impl<0> + { + template <typename Iterator> + struct apply + { + typedef variant<> type; + }; + }; + +#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \ + typedef typename fusion::result_of::next<BOOST_PP_CAT(I, n)>::type \ + BOOST_PP_CAT(I, BOOST_PP_INC(n)); + +#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \ + typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \ + BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n)); + +#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \ + typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \ + BOOST_PP_CAT(T, n); + +#define BOOST_PP_FILENAME_1 <boost/spirit/home/support/detail/as_variant.hpp> +#define BOOST_PP_ITERATION_LIMITS (1, BOOST_VARIANT_LIMIT_TYPES) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_NEXT_ITERATOR +#undef BOOST_FUSION_NEXT_CALL_ITERATOR +#undef BOOST_FUSION_VALUE_OF_ITERATOR + + template <typename Sequence> + struct as_variant + { + // build a variant generator being able to generate a variant holding + // all of the types as given in the typelist + typedef typename + detail::as_variant_impl<fusion::result_of::size<Sequence>::value> + gen; + + // use this generator to create the actual variant + typedef typename gen::template apply< + typename fusion::result_of::begin<Sequence>::type + >::type + type; + }; +}}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + template <> + struct as_variant_impl<N> + { + template <typename I0> + struct apply + { + BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _) + BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _) + typedef variant<BOOST_PP_ENUM_PARAMS(N, T)> type; + }; + }; + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/hold_any.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/hold_any.hpp new file mode 100644 index 0000000..4332fa2 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/hold_any.hpp @@ -0,0 +1,459 @@ +/*============================================================================= + Copyright (c) 2007-2011 Hartmut Kaiser + Copyright (c) Christopher Diggins 2005 + Copyright (c) Pablo Aguilar 2005 + Copyright (c) Kevlin Henney 2001 + + 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) + + The class boost::spirit::hold_any is built based on the any class + published here: http://www.codeproject.com/cpp/dynamic_typing.asp. It adds + support for std streaming operator<<() and operator>>(). +==============================================================================*/ +#if !defined(BOOST_SPIRIT_HOLD_ANY_MAY_02_2007_0857AM) +#define BOOST_SPIRIT_HOLD_ANY_MAY_02_2007_0857AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/config.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/type_traits/is_reference.hpp> +#include <boost/throw_exception.hpp> +#include <boost/static_assert.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/assert.hpp> +#include <boost/detail/sp_typeinfo.hpp> + +#include <stdexcept> +#include <typeinfo> +#include <algorithm> +#include <iosfwd> + +/////////////////////////////////////////////////////////////////////////////// +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +# pragma warning(push) +# pragma warning(disable: 4100) // 'x': unreferenced formal parameter +# pragma warning(disable: 4127) // conditional expression is constant +#endif + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit +{ + struct bad_any_cast + : std::bad_cast + { + bad_any_cast(boost::detail::sp_typeinfo const& src, boost::detail::sp_typeinfo const& dest) + : from(src.name()), to(dest.name()) + {} + + virtual const char* what() const throw() { return "bad any cast"; } + + const char* from; + const char* to; + }; + + namespace detail + { + // function pointer table + template <typename Char> + struct fxn_ptr_table + { + boost::detail::sp_typeinfo const& (*get_type)(); + void (*static_delete)(void**); + void (*destruct)(void**); + void (*clone)(void* const*, void**); + void (*move)(void* const*, void**); + std::basic_istream<Char>& (*stream_in)(std::basic_istream<Char>&, void**); + std::basic_ostream<Char>& (*stream_out)(std::basic_ostream<Char>&, void* const*); + }; + + // static functions for small value-types + template <typename Small> + struct fxns; + + template <> + struct fxns<mpl::true_> + { + template<typename T, typename Char> + struct type + { + static boost::detail::sp_typeinfo const& get_type() + { + return BOOST_SP_TYPEID(T); + } + static void static_delete(void** x) + { + reinterpret_cast<T*>(x)->~T(); + } + static void destruct(void** x) + { + reinterpret_cast<T*>(x)->~T(); + } + static void clone(void* const* src, void** dest) + { + new (dest) T(*reinterpret_cast<T const*>(src)); + } + static void move(void* const* src, void** dest) + { + reinterpret_cast<T*>(dest)->~T(); + *reinterpret_cast<T*>(dest) = + *reinterpret_cast<T const*>(src); + } + static std::basic_istream<Char>& + stream_in (std::basic_istream<Char>& i, void** obj) + { + i >> *reinterpret_cast<T*>(obj); + return i; + } + static std::basic_ostream<Char>& + stream_out(std::basic_ostream<Char>& o, void* const* obj) + { + o << *reinterpret_cast<T const*>(obj); + return o; + } + }; + }; + + // static functions for big value-types (bigger than a void*) + template <> + struct fxns<mpl::false_> + { + template<typename T, typename Char> + struct type + { + static boost::detail::sp_typeinfo const& get_type() + { + return BOOST_SP_TYPEID(T); + } + static void static_delete(void** x) + { + // destruct and free memory + delete (*reinterpret_cast<T**>(x)); + } + static void destruct(void** x) + { + // destruct only, we'll reuse memory + (*reinterpret_cast<T**>(x))->~T(); + } + static void clone(void* const* src, void** dest) + { + *dest = new T(**reinterpret_cast<T* const*>(src)); + } + static void move(void* const* src, void** dest) + { + (*reinterpret_cast<T**>(dest))->~T(); + **reinterpret_cast<T**>(dest) = + **reinterpret_cast<T* const*>(src); + } + static std::basic_istream<Char>& + stream_in(std::basic_istream<Char>& i, void** obj) + { + i >> **reinterpret_cast<T**>(obj); + return i; + } + static std::basic_ostream<Char>& + stream_out(std::basic_ostream<Char>& o, void* const* obj) + { + o << **reinterpret_cast<T* const*>(obj); + return o; + } + }; + }; + + template <typename T> + struct get_table + { + typedef mpl::bool_<(sizeof(T) <= sizeof(void*))> is_small; + + template <typename Char> + static fxn_ptr_table<Char>* get() + { + static fxn_ptr_table<Char> static_table = + { + fxns<is_small>::template type<T, Char>::get_type, + fxns<is_small>::template type<T, Char>::static_delete, + fxns<is_small>::template type<T, Char>::destruct, + fxns<is_small>::template type<T, Char>::clone, + fxns<is_small>::template type<T, Char>::move, + fxns<is_small>::template type<T, Char>::stream_in, + fxns<is_small>::template type<T, Char>::stream_out + }; + return &static_table; + } + }; + + /////////////////////////////////////////////////////////////////////// + struct empty {}; + + template <typename Char> + inline std::basic_istream<Char>& + operator>> (std::basic_istream<Char>& i, empty&) + { + // If this assertion fires you tried to insert from a std istream + // into an empty hold_any instance. This simply can't work, because + // there is no way to figure out what type to extract from the + // stream. + // The only way to make this work is to assign an arbitrary + // value of the required type to the hold_any instance you want to + // stream to. This assignment has to be executed before the actual + // call to the operator>>(). + BOOST_ASSERT(false && + "Tried to insert from a std istream into an empty " + "hold_any instance"); + return i; + } + + template <typename Char> + inline std::basic_ostream<Char>& + operator<< (std::basic_ostream<Char>& o, empty const&) + { + return o; + } + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Char> + class basic_hold_any + { + public: + // constructors + template <typename T> + explicit basic_hold_any(T const& x) + : table(spirit::detail::get_table<T>::template get<Char>()), object(0) + { + if (spirit::detail::get_table<T>::is_small::value) + new (&object) T(x); + else + object = new T(x); + } + + basic_hold_any() + : table(spirit::detail::get_table<spirit::detail::empty>::template get<Char>()), + object(0) + { + } + + basic_hold_any(basic_hold_any const& x) + : table(spirit::detail::get_table<spirit::detail::empty>::template get<Char>()), + object(0) + { + assign(x); + } + + ~basic_hold_any() + { + table->static_delete(&object); + } + + // assignment + basic_hold_any& assign(basic_hold_any const& x) + { + if (&x != this) { + // are we copying between the same type? + if (table == x.table) { + // if so, we can avoid reallocation + table->move(&x.object, &object); + } + else { + reset(); + x.table->clone(&x.object, &object); + table = x.table; + } + } + return *this; + } + + template <typename T> + basic_hold_any& assign(T const& x) + { + // are we copying between the same type? + spirit::detail::fxn_ptr_table<Char>* x_table = + spirit::detail::get_table<T>::template get<Char>(); + if (table == x_table) { + // if so, we can avoid deallocating and re-use memory + table->destruct(&object); // first destruct the old content + if (spirit::detail::get_table<T>::is_small::value) { + // create copy on-top of object pointer itself + new (&object) T(x); + } + else { + // create copy on-top of old version + new (object) T(x); + } + } + else { + if (spirit::detail::get_table<T>::is_small::value) { + // create copy on-top of object pointer itself + table->destruct(&object); // first destruct the old content + new (&object) T(x); + } + else { + reset(); // first delete the old content + object = new T(x); + } + table = x_table; // update table pointer + } + return *this; + } + + // assignment operator + template <typename T> + basic_hold_any& operator=(T const& x) + { + return assign(x); + } + + // utility functions + basic_hold_any& swap(basic_hold_any& x) + { + std::swap(table, x.table); + std::swap(object, x.object); + return *this; + } + + boost::detail::sp_typeinfo const& type() const + { + return table->get_type(); + } + + template <typename T> + T const& cast() const + { + if (type() != BOOST_SP_TYPEID(T)) + throw bad_any_cast(type(), BOOST_SP_TYPEID(T)); + + return spirit::detail::get_table<T>::is_small::value ? + *reinterpret_cast<T const*>(&object) : + *reinterpret_cast<T const*>(object); + } + +// implicit casting is disabled by default for compatibility with boost::any +#ifdef BOOST_SPIRIT_ANY_IMPLICIT_CASTING + // automatic casting operator + template <typename T> + operator T const& () const { return cast<T>(); } +#endif // implicit casting + + bool empty() const + { + return table == spirit::detail::get_table<spirit::detail::empty>::template get<Char>(); + } + + void reset() + { + if (!empty()) + { + table->static_delete(&object); + table = spirit::detail::get_table<spirit::detail::empty>::template get<Char>(); + object = 0; + } + } + + // these functions have been added in the assumption that the embedded + // type has a corresponding operator defined, which is completely safe + // because spirit::hold_any is used only in contexts where these operators + // do exist + template <typename Char_> + friend inline std::basic_istream<Char_>& + operator>> (std::basic_istream<Char_>& i, basic_hold_any<Char_>& obj) + { + return obj.table->stream_in(i, &obj.object); + } + + template <typename Char_> + friend inline std::basic_ostream<Char_>& + operator<< (std::basic_ostream<Char_>& o, basic_hold_any<Char_> const& obj) + { + return obj.table->stream_out(o, &obj.object); + } + +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS + private: // types + template <typename T, typename Char_> + friend T* any_cast(basic_hold_any<Char_> *); +#else + public: // types (public so any_cast can be non-friend) +#endif + // fields + spirit::detail::fxn_ptr_table<Char>* table; + void* object; + }; + + // boost::any-like casting + template <typename T, typename Char> + inline T* any_cast (basic_hold_any<Char>* operand) + { + if (operand && operand->type() == BOOST_SP_TYPEID(T)) { + return spirit::detail::get_table<T>::is_small::value ? + reinterpret_cast<T*>(&operand->object) : + reinterpret_cast<T*>(operand->object); + } + return 0; + } + + template <typename T, typename Char> + inline T const* any_cast(basic_hold_any<Char> const* operand) + { + return any_cast<T>(const_cast<basic_hold_any<Char>*>(operand)); + } + + template <typename T, typename Char> + T any_cast(basic_hold_any<Char>& operand) + { + typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type nonref; + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + // If 'nonref' is still reference type, it means the user has not + // specialized 'remove_reference'. + + // Please use BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION macro + // to generate specialization of remove_reference for your class + // See type traits library documentation for details + BOOST_STATIC_ASSERT(!is_reference<nonref>::value); +#endif + + nonref* result = any_cast<nonref>(&operand); + if(!result) + boost::throw_exception(bad_any_cast(operand.type(), BOOST_SP_TYPEID(T))); + return *result; + } + + template <typename T, typename Char> + T const& any_cast(basic_hold_any<Char> const& operand) + { + typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type nonref; + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + // The comment in the above version of 'any_cast' explains when this + // assert is fired and what to do. + BOOST_STATIC_ASSERT(!is_reference<nonref>::value); +#endif + + return any_cast<nonref const&>(const_cast<basic_hold_any<Char> &>(operand)); + } + + /////////////////////////////////////////////////////////////////////////////// + // backwards compatibility + typedef basic_hold_any<char> hold_any; + typedef basic_hold_any<wchar_t> whold_any; + + namespace traits + { + template <typename T> + struct is_hold_any : mpl::false_ {}; + + template <typename Char> + struct is_hold_any<basic_hold_any<Char> > : mpl::true_ {}; + } + +}} // namespace boost::spirit + +/////////////////////////////////////////////////////////////////////////////// +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +# pragma warning(pop) +#endif + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/is_spirit_tag.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/is_spirit_tag.hpp new file mode 100644 index 0000000..73269e2 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/is_spirit_tag.hpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 2001-2011 Hartmut Kaiser + + 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_SUPPORT_DETAIL_IS_SPIRIT_TAG_MAR_28_2011_0341PM) +#define BOOST_SPIRIT_SUPPORT_DETAIL_IS_SPIRIT_TAG_MAR_28_2011_0341PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 +#define BOOST_SPIRIT_IS_TAG() +#else +#define BOOST_SPIRIT_IS_TAG() typedef void is_spirit_tag; +#endif + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/char_traits.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/char_traits.hpp new file mode 100644 index 0000000..6b112ad --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/char_traits.hpp @@ -0,0 +1,54 @@ +// char_traits.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_CHAR_TRAITS_H +#define BOOST_LEXER_CHAR_TRAITS_H + +// Make sure wchar_t is defined +#include <string> + +namespace boost +{ +namespace lexer +{ +template<typename CharT> +struct char_traits +{ + typedef CharT char_type; + typedef CharT index_type; + + static index_type call (CharT ch) + { + return ch; + } +}; + +template<> +struct char_traits<char> +{ + typedef char char_type; + typedef unsigned char index_type; + + static index_type call (char ch) + { + return static_cast<index_type>(ch); + } +}; + +template<> +struct char_traits<wchar_t> +{ + typedef wchar_t char_type; + typedef wchar_t index_type; + + static index_type call (wchar_t ch) + { + return ch; + } +}; +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/consts.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/consts.hpp new file mode 100644 index 0000000..a8a8cce --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/consts.hpp @@ -0,0 +1,39 @@ +// consts.h +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_CONSTS_H +#define BOOST_LEXER_CONSTS_H + +#include <boost/config.hpp> +#include <boost/integer_traits.hpp> +#include "size_t.hpp" + +namespace boost +{ +namespace lexer +{ + enum regex_flags {none = 0, icase = 1, dot_not_newline = 2}; + // 0 = end state, 1 = id, 2 = unique_id, 3 = lex state, 4 = bol, 5 = eol, + // 6 = dead_state_index + enum {end_state_index, id_index, unique_id_index, state_index, bol_index, + eol_index, dead_state_index, dfa_offset}; + + const std::size_t max_macro_len = 30; + const std::size_t num_chars = 256; + // If sizeof(wchar_t) == sizeof(size_t) then don't overflow to 0 + // by adding one to comparison. + const std::size_t num_wchar_ts = + (boost::integer_traits<wchar_t>::const_max < 0x110000) ? + boost::integer_traits<wchar_t>::const_max + + static_cast<std::size_t> (1) : 0x110000; + const std::size_t null_token = static_cast<std::size_t> (~0); + const std::size_t bol_token = static_cast<std::size_t> (~1); + const std::size_t eol_token = static_cast<std::size_t> (~2); + const std::size_t end_state = 1; + const std::size_t npos = static_cast<std::size_t> (~0); +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/containers/ptr_list.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/containers/ptr_list.hpp new file mode 100644 index 0000000..5995849 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/containers/ptr_list.hpp @@ -0,0 +1,71 @@ +// ptr_list.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_PTR_LIST_HPP +#define BOOST_LEXER_PTR_LIST_HPP + +#include <list> + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +template<typename Type> +class ptr_list +{ +public: + typedef std::list<Type *> list; + + ptr_list () + { + } + + ~ptr_list () + { + clear (); + } + + list *operator -> () + { + return &_list; + } + + const list *operator -> () const + { + return &_list; + } + + list &operator * () + { + return _list; + } + + const list &operator * () const + { + return _list; + } + + void clear () + { + while (!_list.empty ()) + { + delete _list.front (); + _list.pop_front (); + } + } + +private: + list _list; + + ptr_list (const ptr_list &); // No copy construction. + ptr_list &operator = (const ptr_list &); // No assignment. +}; +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/containers/ptr_vector.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/containers/ptr_vector.hpp new file mode 100644 index 0000000..98411e6 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/containers/ptr_vector.hpp @@ -0,0 +1,108 @@ +// ptr_vector.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_PTR_VECTOR_HPP +#define BOOST_LEXER_PTR_VECTOR_HPP + +#include "../size_t.hpp" +#include <vector> + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +template<typename Type> +class ptr_vector +{ +public: + typedef std::vector<Type *> vector; + + ptr_vector () + { + } + + ~ptr_vector () + { + clear (); + } + + vector *operator -> () + { + return &_vector; + } + + const vector *operator -> () const + { + return &_vector; + } + + vector &operator * () + { + return _vector; + } + + const vector &operator * () const + { + return _vector; + } + + Type * &operator [] (const std::size_t index_) + { + return _vector[index_]; + } + + Type * const &operator [] (const std::size_t index_) const + { + return _vector[index_]; + } + + bool operator == (const ptr_vector &rhs_) const + { + bool equal_ = _vector.size () == rhs_._vector.size (); + + if (equal_) + { + typename vector::const_iterator lhs_iter_ = _vector.begin (); + typename vector::const_iterator end_ = _vector.end (); + typename vector::const_iterator rhs_iter_ = rhs_._vector.begin (); + + for (; equal_ && lhs_iter_ != end_; ++lhs_iter_, ++rhs_iter_) + { + equal_ = **lhs_iter_ == **rhs_iter_; + } + } + + return equal_; + } + + void clear () + { + if (!_vector.empty ()) + { + Type **iter_ = &_vector.front (); + Type **end_ = iter_ + _vector.size (); + + for (; iter_ != end_; ++iter_) + { + delete *iter_; + } + } + + _vector.clear (); + } + +private: + vector _vector; + + ptr_vector (const ptr_vector &); // No copy construction. + ptr_vector &operator = (const ptr_vector &); // No assignment. +}; +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/conversion/char_state_machine.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/conversion/char_state_machine.hpp new file mode 100644 index 0000000..38c70b5 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/conversion/char_state_machine.hpp @@ -0,0 +1,77 @@ +// char_state_machine.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_CHAR_STATE_MACHINE_HPP +#define BOOST_LEXER_CHAR_STATE_MACHINE_HPP + +#include "../consts.hpp" +#include <map> +#include "../size_t.hpp" +#include "../string_token.hpp" +#include <vector> + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +template<typename CharT> +struct basic_char_state_machine +{ + struct state + { + typedef basic_string_token<CharT> string_token; + typedef std::map<std::size_t, string_token> size_t_string_token_map; + typedef std::pair<std::size_t, string_token> size_t_string_token_pair; + + bool _end_state; + std::size_t _id; + std::size_t _unique_id; + std::size_t _state; + std::size_t _bol_index; + std::size_t _eol_index; + size_t_string_token_map _transitions; + + state () : + _end_state (false), + _id (0), + _unique_id (npos), + _state (0), + _bol_index (npos), + _eol_index (npos) + { + } + }; + + typedef std::vector<state> state_vector; + typedef std::vector<state_vector> state_vector_vector; + + state_vector_vector _sm_vector; + + bool empty () const + { + return _sm_vector.empty (); + } + + void clear () + { + _sm_vector.clear (); + } + + void swap (basic_char_state_machine &csm_) + { + _sm_vector.swap (csm_._sm_vector); + } +}; + +typedef basic_char_state_machine<char> char_state_machine; +typedef basic_char_state_machine<wchar_t> wchar_state_machine; + +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/debug.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/debug.hpp new file mode 100644 index 0000000..23cda87 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/debug.hpp @@ -0,0 +1,285 @@ +// debug.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_DEBUG_HPP +#define BOOST_LEXER_DEBUG_HPP + +#include <map> +#include <ostream> +#include "rules.hpp" +#include "size_t.hpp" +#include "state_machine.hpp" +#include "string_token.hpp" +#include <vector> + +namespace boost +{ +namespace lexer +{ +template<typename CharT> +class basic_debug +{ +public: + typedef std::basic_ostream<CharT> ostream; + typedef std::basic_string<CharT> string; + typedef std::vector<std::size_t> size_t_vector; + + static void escape_control_chars (const string &in_, string &out_) + { + const CharT *ptr_ = in_.c_str (); + std::size_t size_ = in_.size (); + +#if defined _MSC_VER && _MSC_VER <= 1200 + out_.erase (); +#else + out_.clear (); +#endif + + while (size_) + { + basic_string_token<CharT>::escape_char (*ptr_, out_); + ++ptr_; + --size_; + } + } + + static void dump (const basic_state_machine<CharT> &state_machine_, + basic_rules<CharT> &rules_, ostream &stream_) + { + typename basic_state_machine<CharT>::iterator iter_ = + state_machine_.begin (); + typename basic_state_machine<CharT>::iterator end_ = + state_machine_.end (); + + for (std::size_t dfa_ = 0, dfas_ = state_machine_.size (); + dfa_ < dfas_; ++dfa_) + { + lexer_state (stream_); + stream_ << rules_.state (dfa_) << std::endl << std::endl; + + dump_ex (iter_, stream_); + } + } + + static void dump (const basic_state_machine<CharT> &state_machine_, + ostream &stream_) + { + typename basic_state_machine<CharT>::iterator iter_ = + state_machine_.begin (); + typename basic_state_machine<CharT>::iterator end_ = + state_machine_.end (); + + for (std::size_t dfa_ = 0, dfas_ = state_machine_.size (); + dfa_ < dfas_; ++dfa_) + { + lexer_state (stream_); + stream_ << dfa_ << std::endl << std::endl; + + dump_ex (iter_, stream_); + } + } + +protected: + typedef std::basic_stringstream<CharT> stringstream; + + static void dump_ex (typename basic_state_machine<CharT>::iterator &iter_, + ostream &stream_) + { + const std::size_t states_ = iter_->states; + + for (std::size_t i_ = 0; i_ < states_; ++i_) + { + state (stream_); + stream_ << i_ << std::endl; + + if (iter_->end_state) + { + end_state (stream_); + stream_ << iter_->id; + unique_id (stream_); + stream_ << iter_->unique_id; + dfa (stream_); + stream_ << iter_->goto_dfa; + stream_ << std::endl; + } + + if (iter_->bol_index != npos) + { + bol (stream_); + stream_ << iter_->bol_index << std::endl; + } + + if (iter_->eol_index != npos) + { + eol (stream_); + stream_ << iter_->eol_index << std::endl; + } + + const std::size_t transitions_ = iter_->transitions; + + if (transitions_ == 0) + { + ++iter_; + } + + for (std::size_t t_ = 0; t_ < transitions_; ++t_) + { + std::size_t goto_state_ = iter_->goto_state; + + if (iter_->token.any ()) + { + any (stream_); + } + else + { + open_bracket (stream_); + + if (iter_->token._negated) + { + negated (stream_); + } + + string charset_; + CharT c_ = 0; + + escape_control_chars (iter_->token._charset, + charset_); + c_ = *charset_.c_str (); + + if (!iter_->token._negated && + (c_ == '^' || c_ == ']')) + { + stream_ << '\\'; + } + + stream_ << charset_; + close_bracket (stream_); + } + + stream_ << goto_state_ << std::endl; + ++iter_; + } + + stream_ << std::endl; + } + } + + static void lexer_state (std::ostream &stream_) + { + stream_ << "Lexer state: "; + } + + static void lexer_state (std::wostream &stream_) + { + stream_ << L"Lexer state: "; + } + + static void state (std::ostream &stream_) + { + stream_ << "State: "; + } + + static void state (std::wostream &stream_) + { + stream_ << L"State: "; + } + + static void bol (std::ostream &stream_) + { + stream_ << " BOL -> "; + } + + static void bol (std::wostream &stream_) + { + stream_ << L" BOL -> "; + } + + static void eol (std::ostream &stream_) + { + stream_ << " EOL -> "; + } + + static void eol (std::wostream &stream_) + { + stream_ << L" EOL -> "; + } + + static void end_state (std::ostream &stream_) + { + stream_ << " END STATE, Id = "; + } + + static void end_state (std::wostream &stream_) + { + stream_ << L" END STATE, Id = "; + } + + static void unique_id (std::ostream &stream_) + { + stream_ << ", Unique Id = "; + } + + static void unique_id (std::wostream &stream_) + { + stream_ << L", Unique Id = "; + } + + static void any (std::ostream &stream_) + { + stream_ << " . -> "; + } + + static void any (std::wostream &stream_) + { + stream_ << L" . -> "; + } + + static void open_bracket (std::ostream &stream_) + { + stream_ << " ["; + } + + static void open_bracket (std::wostream &stream_) + { + stream_ << L" ["; + } + + static void negated (std::ostream &stream_) + { + stream_ << "^"; + } + + static void negated (std::wostream &stream_) + { + stream_ << L"^"; + } + + static void close_bracket (std::ostream &stream_) + { + stream_ << "] -> "; + } + + static void close_bracket (std::wostream &stream_) + { + stream_ << L"] -> "; + } + + static void dfa (std::ostream &stream_) + { + stream_ << ", dfa = "; + } + + static void dfa (std::wostream &stream_) + { + stream_ << L", dfa = "; + } +}; + +typedef basic_debug<char> debug; +typedef basic_debug<wchar_t> wdebug; +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/generator.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/generator.hpp new file mode 100644 index 0000000..49bea2f --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/generator.hpp @@ -0,0 +1,858 @@ +// generator.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_GENERATOR_HPP +#define BOOST_LEXER_GENERATOR_HPP + +#include "char_traits.hpp" +// memcmp() +#include <cstring> +#include "partition/charset.hpp" +#include "partition/equivset.hpp" +#include <memory> +#include "parser/tree/node.hpp" +#include "parser/parser.hpp" +#include "containers/ptr_list.hpp" +#include "rules.hpp" +#include "state_machine.hpp" + +namespace boost +{ +namespace lexer +{ +template<typename CharT, typename Traits = char_traits<CharT> > +class basic_generator +{ +public: + typedef typename detail::internals::size_t_vector size_t_vector; + typedef basic_rules<CharT> rules; + + static void build (const rules &rules_, + basic_state_machine<CharT> &state_machine_) + { + std::size_t index_ = 0; + std::size_t size_ = rules_.statemap ().size (); + node_ptr_vector node_ptr_vector_; + detail::internals &internals_ = const_cast<detail::internals &> + (state_machine_.data ()); + bool seen_BOL_assertion_ = false; + bool seen_EOL_assertion_ = false; + + state_machine_.clear (); + + for (; index_ < size_; ++index_) + { + internals_._lookup->push_back (static_cast<size_t_vector *>(0)); + internals_._lookup->back () = new size_t_vector; + internals_._dfa_alphabet.push_back (0); + internals_._dfa->push_back (static_cast<size_t_vector *>(0)); + internals_._dfa->back () = new size_t_vector; + } + + for (index_ = 0, size_ = internals_._lookup->size (); + index_ < size_; ++index_) + { + internals_._lookup[index_]->resize (sizeof (CharT) == 1 ? + num_chars : num_wchar_ts, dead_state_index); + + if (!rules_.regexes ()[index_].empty ()) + { + // vector mapping token indexes to partitioned token index sets + index_set_vector set_mapping_; + // syntax tree + detail::node *root_ = build_tree (rules_, index_, + node_ptr_vector_, internals_, set_mapping_); + + build_dfa (root_, set_mapping_, + internals_._dfa_alphabet[index_], + *internals_._dfa[index_]); + + if (internals_._seen_BOL_assertion) + { + seen_BOL_assertion_ = true; + } + + if (internals_._seen_EOL_assertion) + { + seen_EOL_assertion_ = true; + } + + internals_._seen_BOL_assertion = false; + internals_._seen_EOL_assertion = false; + } + } + + internals_._seen_BOL_assertion = seen_BOL_assertion_; + internals_._seen_EOL_assertion = seen_EOL_assertion_; + } + + static void minimise (basic_state_machine<CharT> &state_machine_) + { + detail::internals &internals_ = const_cast<detail::internals &> + (state_machine_.data ()); + const std::size_t machines_ = internals_._dfa->size (); + + for (std::size_t i_ = 0; i_ < machines_; ++i_) + { + const std::size_t dfa_alphabet_ = internals_._dfa_alphabet[i_]; + size_t_vector *dfa_ = internals_._dfa[i_]; + + if (dfa_alphabet_ != 0) + { + std::size_t size_ = 0; + + do + { + size_ = dfa_->size (); + minimise_dfa (dfa_alphabet_, *dfa_, size_); + } while (dfa_->size () != size_); + } + } + } + +protected: + typedef detail::basic_charset<CharT> charset; + typedef detail::ptr_list<charset> charset_list; + typedef std::auto_ptr<charset> charset_ptr; + typedef detail::equivset equivset; + typedef detail::ptr_list<equivset> equivset_list; + typedef std::auto_ptr<equivset> equivset_ptr; + typedef typename charset::index_set index_set; + typedef std::vector<index_set> index_set_vector; + typedef detail::basic_parser<CharT> parser; + typedef typename parser::node_ptr_vector node_ptr_vector; + typedef std::set<const detail::node *> node_set; + typedef detail::ptr_vector<node_set> node_set_vector; + typedef std::vector<const detail::node *> node_vector; + typedef detail::ptr_vector<node_vector> node_vector_vector; + typedef typename parser::string string; + typedef std::pair<string, string> string_pair; + typedef typename parser::tokeniser::string_token string_token; + typedef std::deque<string_pair> macro_deque; + typedef std::pair<string, const detail::node *> macro_pair; + typedef typename parser::macro_map::iterator macro_iter; + typedef std::pair<macro_iter, bool> macro_iter_pair; + typedef typename parser::tokeniser::token_map token_map; + + static detail::node *build_tree (const rules &rules_, + const std::size_t state_, node_ptr_vector &node_ptr_vector_, + detail::internals &internals_, index_set_vector &set_mapping_) + { + size_t_vector *lookup_ = internals_._lookup[state_]; + const typename rules::string_deque_deque ®exes_ = + rules_.regexes (); + const typename rules::id_vector_deque &ids_ = rules_.ids (); + const typename rules::id_vector_deque &unique_ids_ = + rules_.unique_ids (); + const typename rules::id_vector_deque &states_ = rules_.states (); + typename rules::string_deque::const_iterator regex_iter_ = + regexes_[state_].begin (); + typename rules::string_deque::const_iterator regex_iter_end_ = + regexes_[state_].end (); + typename rules::id_vector::const_iterator ids_iter_ = + ids_[state_].begin (); + typename rules::id_vector::const_iterator unique_ids_iter_ = + unique_ids_[state_].begin (); + typename rules::id_vector::const_iterator states_iter_ = + states_[state_].begin (); + const typename rules::string ®ex_ = *regex_iter_; + // map of regex charset tokens (strings) to index + token_map token_map_; + const typename rules::string_pair_deque ¯odeque_ = + rules_.macrodeque (); + typename parser::macro_map macromap_; + typename detail::node::node_vector tree_vector_; + + build_macros (token_map_, macrodeque_, macromap_, + rules_.flags (), rules_.locale (), node_ptr_vector_, + internals_._seen_BOL_assertion, internals_._seen_EOL_assertion); + + detail::node *root_ = parser::parse (regex_.c_str (), + regex_.c_str () + regex_.size (), *ids_iter_, *unique_ids_iter_, + *states_iter_, rules_.flags (), rules_.locale (), node_ptr_vector_, + macromap_, token_map_, internals_._seen_BOL_assertion, + internals_._seen_EOL_assertion); + + ++regex_iter_; + ++ids_iter_; + ++unique_ids_iter_; + ++states_iter_; + tree_vector_.push_back (root_); + + // build syntax trees + while (regex_iter_ != regex_iter_end_) + { + // re-declare var, otherwise we perform an assignment..! + const typename rules::string ®ex_ = *regex_iter_; + + root_ = parser::parse (regex_.c_str (), + regex_.c_str () + regex_.size (), *ids_iter_, + *unique_ids_iter_, *states_iter_, rules_.flags (), + rules_.locale (), node_ptr_vector_, macromap_, token_map_, + internals_._seen_BOL_assertion, + internals_._seen_EOL_assertion); + tree_vector_.push_back (root_); + ++regex_iter_; + ++ids_iter_; + ++unique_ids_iter_; + ++states_iter_; + } + + if (internals_._seen_BOL_assertion) + { + // Fixup BOLs + typename detail::node::node_vector::iterator iter_ = + tree_vector_.begin (); + typename detail::node::node_vector::iterator end_ = + tree_vector_.end (); + + for (; iter_ != end_; ++iter_) + { + fixup_bol (*iter_, node_ptr_vector_); + } + } + + // join trees + { + typename detail::node::node_vector::iterator iter_ = + tree_vector_.begin (); + typename detail::node::node_vector::iterator end_ = + tree_vector_.end (); + + if (iter_ != end_) + { + root_ = *iter_; + ++iter_; + } + + for (; iter_ != end_; ++iter_) + { + node_ptr_vector_->push_back (static_cast<detail::selection_node *>(0)); + node_ptr_vector_->back () = new detail::selection_node + (root_, *iter_); + root_ = node_ptr_vector_->back (); + } + } + + // partitioned token list + charset_list token_list_; + + set_mapping_.resize (token_map_.size ()); + partition_tokens (token_map_, token_list_); + + typename charset_list::list::const_iterator iter_ = + token_list_->begin (); + typename charset_list::list::const_iterator end_ = + token_list_->end (); + std::size_t index_ = 0; + + for (; iter_ != end_; ++iter_, ++index_) + { + const charset *cs_ = *iter_; + typename charset::index_set::const_iterator set_iter_ = + cs_->_index_set.begin (); + typename charset::index_set::const_iterator set_end_ = + cs_->_index_set.end (); + + fill_lookup (cs_->_token, lookup_, index_); + + for (; set_iter_ != set_end_; ++set_iter_) + { + set_mapping_[*set_iter_].insert (index_); + } + } + + internals_._dfa_alphabet[state_] = token_list_->size () + dfa_offset; + return root_; + } + + static void build_macros (token_map &token_map_, + const macro_deque ¯odeque_, + typename parser::macro_map ¯omap_, const regex_flags flags_, + const std::locale &locale_, node_ptr_vector &node_ptr_vector_, + bool &seen_BOL_assertion_, bool &seen_EOL_assertion_) + { + for (typename macro_deque::const_iterator iter_ = + macrodeque_.begin (), end_ = macrodeque_.end (); + iter_ != end_; ++iter_) + { + const typename rules::string &name_ = iter_->first; + const typename rules::string ®ex_ = iter_->second; + detail::node *node_ = parser::parse (regex_.c_str (), + regex_.c_str () + regex_.size (), 0, 0, 0, flags_, + locale_, node_ptr_vector_, macromap_, token_map_, + seen_BOL_assertion_, seen_EOL_assertion_); + macro_iter_pair map_iter_ = macromap_. + insert (macro_pair (name_, static_cast<const detail::node *> + (0))); + + map_iter_.first->second = node_; + } + } + + static void build_dfa (detail::node *root_, + const index_set_vector &set_mapping_, const std::size_t dfa_alphabet_, + size_t_vector &dfa_) + { + typename detail::node::node_vector *followpos_ = + &root_->firstpos (); + node_set_vector seen_sets_; + node_vector_vector seen_vectors_; + size_t_vector hash_vector_; + + // 'jam' state + dfa_.resize (dfa_alphabet_, 0); + closure (followpos_, seen_sets_, seen_vectors_, + hash_vector_, dfa_alphabet_, dfa_); + + std::size_t *ptr_ = 0; + + for (std::size_t index_ = 0; index_ < seen_vectors_->size (); ++index_) + { + equivset_list equiv_list_; + + build_equiv_list (seen_vectors_[index_], set_mapping_, equiv_list_); + + for (typename equivset_list::list::const_iterator iter_ = + equiv_list_->begin (), end_ = equiv_list_->end (); + iter_ != end_; ++iter_) + { + equivset *equivset_ = *iter_; + const std::size_t transition_ = closure + (&equivset_->_followpos, seen_sets_, seen_vectors_, + hash_vector_, dfa_alphabet_, dfa_); + + if (transition_ != npos) + { + ptr_ = &dfa_.front () + ((index_ + 1) * dfa_alphabet_); + + // Prune abstemious transitions from end states. + if (*ptr_ && !equivset_->_greedy) continue; + + for (typename detail::equivset::index_vector::const_iterator + equiv_iter_ = equivset_->_index_vector.begin (), + equiv_end_ = equivset_->_index_vector.end (); + equiv_iter_ != equiv_end_; ++equiv_iter_) + { + const std::size_t index_ = *equiv_iter_; + + if (index_ == bol_token) + { + if (ptr_[eol_index] == 0) + { + ptr_[bol_index] = transition_; + } + } + else if (index_ == eol_token) + { + if (ptr_[bol_index] == 0) + { + ptr_[eol_index] = transition_; + } + } + else + { + ptr_[index_ + dfa_offset] = transition_; + } + } + } + } + } + } + + static std::size_t closure (typename detail::node::node_vector *followpos_, + node_set_vector &seen_sets_, node_vector_vector &seen_vectors_, + size_t_vector &hash_vector_, const std::size_t size_, + size_t_vector &dfa_) + { + bool end_state_ = false; + std::size_t id_ = 0; + std::size_t unique_id_ = npos; + std::size_t state_ = 0; + std::size_t hash_ = 0; + + if (followpos_->empty ()) return npos; + + std::size_t index_ = 0; + std::auto_ptr<node_set> set_ptr_ (new node_set); + std::auto_ptr<node_vector> vector_ptr_ (new node_vector); + + for (typename detail::node::node_vector::const_iterator iter_ = + followpos_->begin (), end_ = followpos_->end (); + iter_ != end_; ++iter_) + { + closure_ex (*iter_, end_state_, id_, unique_id_, state_, + set_ptr_.get (), vector_ptr_.get (), hash_); + } + + bool found_ = false; + typename size_t_vector::const_iterator hash_iter_ = + hash_vector_.begin (); + typename size_t_vector::const_iterator hash_end_ = + hash_vector_.end (); + typename node_set_vector::vector::const_iterator set_iter_ = + seen_sets_->begin (); + + for (; hash_iter_ != hash_end_; ++hash_iter_, ++set_iter_) + { + found_ = *hash_iter_ == hash_ && *(*set_iter_) == *set_ptr_; + ++index_; + + if (found_) break; + } + + if (!found_) + { + seen_sets_->push_back (static_cast<node_set *>(0)); + seen_sets_->back () = set_ptr_.release (); + seen_vectors_->push_back (static_cast<node_vector *>(0)); + seen_vectors_->back () = vector_ptr_.release (); + hash_vector_.push_back (hash_); + // State 0 is the jam state... + index_ = seen_sets_->size (); + + const std::size_t old_size_ = dfa_.size (); + + dfa_.resize (old_size_ + size_, 0); + + if (end_state_) + { + dfa_[old_size_] |= end_state; + dfa_[old_size_ + id_index] = id_; + dfa_[old_size_ + unique_id_index] = unique_id_; + dfa_[old_size_ + state_index] = state_; + } + } + + return index_; + } + + static void closure_ex (detail::node *node_, bool &end_state_, + std::size_t &id_, std::size_t &unique_id_, std::size_t &state_, + node_set *set_ptr_, node_vector *vector_ptr_, std::size_t &hash_) + { + const bool temp_end_state_ = node_->end_state (); + + if (temp_end_state_) + { + if (!end_state_) + { + end_state_ = true; + id_ = node_->id (); + unique_id_ = node_->unique_id (); + state_ = node_->lexer_state (); + } + } + + if (set_ptr_->insert (node_).second) + { + vector_ptr_->push_back (node_); + hash_ += reinterpret_cast<std::size_t> (node_); + } + } + + static void partition_tokens (const token_map &map_, + charset_list &lhs_) + { + charset_list rhs_; + + fill_rhs_list (map_, rhs_); + + if (!rhs_->empty ()) + { + typename charset_list::list::iterator iter_; + typename charset_list::list::iterator end_; + charset_ptr overlap_ (new charset); + + lhs_->push_back (static_cast<charset *>(0)); + lhs_->back () = rhs_->front (); + rhs_->pop_front (); + + while (!rhs_->empty ()) + { + charset_ptr r_ (rhs_->front ()); + + rhs_->pop_front (); + iter_ = lhs_->begin (); + end_ = lhs_->end (); + + while (!r_->empty () && iter_ != end_) + { + typename charset_list::list::iterator l_iter_ = iter_; + + (*l_iter_)->intersect (*r_.get (), *overlap_.get ()); + + if (overlap_->empty ()) + { + ++iter_; + } + else if ((*l_iter_)->empty ()) + { + delete *l_iter_; + *l_iter_ = overlap_.release (); + + // VC++ 6 Hack: + charset_ptr temp_overlap_ (new charset); + + overlap_ = temp_overlap_; + ++iter_; + } + else if (r_->empty ()) + { + delete r_.release (); + r_ = overlap_; + + // VC++ 6 Hack: + charset_ptr temp_overlap_ (new charset); + + overlap_ = temp_overlap_; + break; + } + else + { + iter_ = lhs_->insert (++iter_, + static_cast<charset *>(0)); + *iter_ = overlap_.release (); + + // VC++ 6 Hack: + charset_ptr temp_overlap_ (new charset); + + overlap_ = temp_overlap_; + ++iter_; + end_ = lhs_->end (); + } + } + + if (!r_->empty ()) + { + lhs_->push_back (static_cast<charset *>(0)); + lhs_->back () = r_.release (); + } + } + } + } + + static void fill_rhs_list (const token_map &map_, + charset_list &list_) + { + typename parser::tokeniser::token_map::const_iterator iter_ = + map_.begin (); + typename parser::tokeniser::token_map::const_iterator end_ = + map_.end (); + + for (; iter_ != end_; ++iter_) + { + list_->push_back (static_cast<charset *>(0)); + list_->back () = new charset (iter_->first, iter_->second); + } + } + + static void fill_lookup (const string_token &token_, + size_t_vector *lookup_, const std::size_t index_) + { + const CharT *curr_ = token_._charset.c_str (); + const CharT *chars_end_ = curr_ + token_._charset.size (); + std::size_t *ptr_ = &lookup_->front (); + const std::size_t max_ = sizeof (CharT) == 1 ? + num_chars : num_wchar_ts; + + if (token_._negated) + { + CharT curr_char_ = sizeof (CharT) == 1 ? -128 : 0; + std::size_t i_ = 0; + + while (curr_ < chars_end_) + { + while (*curr_ > curr_char_) + { + ptr_[static_cast<typename Traits::index_type> + (curr_char_)] = index_ + dfa_offset; + ++curr_char_; + ++i_; + } + + ++curr_char_; + ++curr_; + ++i_; + } + + for (; i_ < max_; ++i_) + { + ptr_[static_cast<typename Traits::index_type>(curr_char_)] = + index_ + dfa_offset; + ++curr_char_; + } + } + else + { + while (curr_ < chars_end_) + { + ptr_[static_cast<typename Traits::index_type>(*curr_)] = + index_ + dfa_offset; + ++curr_; + } + } + } + + static void build_equiv_list (const node_vector *vector_, + const index_set_vector &set_mapping_, equivset_list &lhs_) + { + equivset_list rhs_; + + fill_rhs_list (vector_, set_mapping_, rhs_); + + if (!rhs_->empty ()) + { + typename equivset_list::list::iterator iter_; + typename equivset_list::list::iterator end_; + equivset_ptr overlap_ (new equivset); + + lhs_->push_back (static_cast<equivset *>(0)); + lhs_->back () = rhs_->front (); + rhs_->pop_front (); + + while (!rhs_->empty ()) + { + equivset_ptr r_ (rhs_->front ()); + + rhs_->pop_front (); + iter_ = lhs_->begin (); + end_ = lhs_->end (); + + while (!r_->empty () && iter_ != end_) + { + typename equivset_list::list::iterator l_iter_ = iter_; + + (*l_iter_)->intersect (*r_.get (), *overlap_.get ()); + + if (overlap_->empty ()) + { + ++iter_; + } + else if ((*l_iter_)->empty ()) + { + delete *l_iter_; + *l_iter_ = overlap_.release (); + + // VC++ 6 Hack: + equivset_ptr temp_overlap_ (new equivset); + + overlap_ = temp_overlap_; + ++iter_; + } + else if (r_->empty ()) + { + delete r_.release (); + r_ = overlap_; + + // VC++ 6 Hack: + equivset_ptr temp_overlap_ (new equivset); + + overlap_ = temp_overlap_; + break; + } + else + { + iter_ = lhs_->insert (++iter_, + static_cast<equivset *>(0)); + *iter_ = overlap_.release (); + + // VC++ 6 Hack: + equivset_ptr temp_overlap_ (new equivset); + + overlap_ = temp_overlap_; + ++iter_; + end_ = lhs_->end (); + } + } + + if (!r_->empty ()) + { + lhs_->push_back (static_cast<equivset *>(0)); + lhs_->back () = r_.release (); + } + } + } + } + + static void fill_rhs_list (const node_vector *vector_, + const index_set_vector &set_mapping_, equivset_list &list_) + { + typename node_vector::const_iterator iter_ = + vector_->begin (); + typename node_vector::const_iterator end_ = + vector_->end (); + + for (; iter_ != end_; ++iter_) + { + const detail::node *node_ = *iter_; + + if (!node_->end_state ()) + { + const std::size_t token_ = node_->token (); + + if (token_ != null_token) + { + list_->push_back (static_cast<equivset *>(0)); + + if (token_ == bol_token || token_ == eol_token) + { + std::set<std::size_t> index_set_; + + index_set_.insert (token_); + list_->back () = new equivset (index_set_, + node_->greedy (), token_, node_->followpos ()); + } + else + { + list_->back () = new equivset (set_mapping_[token_], + node_->greedy (), token_, node_->followpos ()); + } + } + } + } + } + + static void fixup_bol (detail::node * &root_, + node_ptr_vector &node_ptr_vector_) + { + typename detail::node::node_vector *first_ = &root_->firstpos (); + bool found_ = false; + typename detail::node::node_vector::const_iterator iter_ = + first_->begin (); + typename detail::node::node_vector::const_iterator end_ = + first_->end (); + + for (; iter_ != end_; ++iter_) + { + const detail::node *node_ = *iter_; + + found_ = !node_->end_state () && node_->token () == bol_token; + + if (found_) break; + } + + if (!found_) + { + node_ptr_vector_->push_back (static_cast<detail::leaf_node *>(0)); + node_ptr_vector_->back () = new detail::leaf_node + (bol_token, true); + + detail::node *lhs_ = node_ptr_vector_->back (); + + node_ptr_vector_->push_back (static_cast<detail::leaf_node *>(0)); + node_ptr_vector_->back () = new detail::leaf_node + (null_token, true); + + detail::node *rhs_ = node_ptr_vector_->back (); + + node_ptr_vector_->push_back + (static_cast<detail::selection_node *>(0)); + node_ptr_vector_->back () = + new detail::selection_node (lhs_, rhs_); + lhs_ = node_ptr_vector_->back (); + + node_ptr_vector_->push_back + (static_cast<detail::sequence_node *>(0)); + node_ptr_vector_->back () = + new detail::sequence_node (lhs_, root_); + root_ = node_ptr_vector_->back (); + } + } + + static void minimise_dfa (const std::size_t dfa_alphabet_, + size_t_vector &dfa_, std::size_t size_) + { + const std::size_t *first_ = &dfa_.front (); + const std::size_t *second_ = 0; + const std::size_t *end_ = first_ + size_; + std::size_t index_ = 1; + std::size_t new_index_ = 1; + std::size_t curr_index_ = 0; + index_set index_set_; + size_t_vector lookup_; + std::size_t *lookup_ptr_ = 0; + + lookup_.resize (size_ / dfa_alphabet_, null_token); + lookup_ptr_ = &lookup_.front (); + *lookup_ptr_ = 0; + // Only one 'jam' state, so skip it. + first_ += dfa_alphabet_; + + for (; first_ < end_; first_ += dfa_alphabet_, ++index_) + { + for (second_ = first_ + dfa_alphabet_, curr_index_ = index_ + 1; + second_ < end_; second_ += dfa_alphabet_, ++curr_index_) + { + if (index_set_.find (curr_index_) != index_set_.end ()) + { + continue; + } + + // Some systems have memcmp in namespace std. + using namespace std; + + if (memcmp (first_, second_, sizeof (std::size_t) * + dfa_alphabet_) == 0) + { + index_set_.insert (curr_index_); + lookup_ptr_[curr_index_] = new_index_; + } + } + + if (lookup_ptr_[index_] == null_token) + { + lookup_ptr_[index_] = new_index_; + ++new_index_; + } + } + + if (!index_set_.empty ()) + { + const std::size_t *front_ = &dfa_.front (); + size_t_vector new_dfa_ (front_, front_ + dfa_alphabet_); + typename index_set::iterator set_end_ = + index_set_.end (); + const std::size_t *ptr_ = front_ + dfa_alphabet_; + std::size_t *new_ptr_ = 0; + + new_dfa_.resize (size_ - index_set_.size () * dfa_alphabet_, 0); + new_ptr_ = &new_dfa_.front () + dfa_alphabet_; + size_ /= dfa_alphabet_; + + for (index_ = 1; index_ < size_; ++index_) + { + if (index_set_.find (index_) != set_end_) + { + ptr_ += dfa_alphabet_; + continue; + } + + new_ptr_[end_state_index] = ptr_[end_state_index]; + new_ptr_[id_index] = ptr_[id_index]; + new_ptr_[unique_id_index] = ptr_[unique_id_index]; + new_ptr_[state_index] = ptr_[state_index]; + new_ptr_[bol_index] = lookup_ptr_[ptr_[bol_index]]; + new_ptr_[eol_index] = lookup_ptr_[ptr_[eol_index]]; + new_ptr_ += dfa_offset; + ptr_ += dfa_offset; + + for (std::size_t i_ = dfa_offset; i_ < dfa_alphabet_; ++i_) + { + *new_ptr_++ = lookup_ptr_[*ptr_++]; + } + } + + dfa_.swap (new_dfa_); + } + } +}; + +typedef basic_generator<char> generator; +typedef basic_generator<wchar_t> wgenerator; +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/internals.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/internals.hpp new file mode 100644 index 0000000..5f3a026 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/internals.hpp @@ -0,0 +1,60 @@ +// internals.hpp +// Copyright (c) 2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_INTERNALS_HPP +#define BOOST_LEXER_INTERNALS_HPP + +#include "containers/ptr_vector.hpp" + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +struct internals +{ + typedef std::vector<std::size_t> size_t_vector; + typedef ptr_vector<size_t_vector> size_t_vector_vector; + + size_t_vector_vector _lookup; + size_t_vector _dfa_alphabet; + size_t_vector_vector _dfa; + bool _seen_BOL_assertion; + bool _seen_EOL_assertion; + + internals () : + _seen_BOL_assertion (false), + _seen_EOL_assertion (false) + { + } + + void clear () + { + _lookup.clear (); + _dfa_alphabet.clear (); + _dfa.clear (); + _seen_BOL_assertion = false; + _seen_EOL_assertion = false; + } + + void swap (internals &internals_) + { + _lookup->swap (*internals_._lookup); + _dfa_alphabet.swap (internals_._dfa_alphabet); + _dfa->swap (*internals_._dfa); + std::swap (_seen_BOL_assertion, internals_._seen_BOL_assertion); + std::swap (_seen_EOL_assertion, internals_._seen_EOL_assertion); + } + +private: + internals (const internals &); // No copy construction. + internals &operator = (const internals &); // No assignment. +}; +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/parser.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/parser.hpp new file mode 100644 index 0000000..9000e5e --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/parser.hpp @@ -0,0 +1,511 @@ +// parser.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_PARSER_HPP +#define BOOST_LEXER_PARSER_HPP + +#include <boost/assert.hpp> +#include "tree/end_node.hpp" +#include "tree/iteration_node.hpp" +#include "tree/leaf_node.hpp" +#include "../runtime_error.hpp" +#include "tree/selection_node.hpp" +#include "tree/sequence_node.hpp" +#include "../size_t.hpp" +#include "tokeniser/re_tokeniser.hpp" + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +template<typename CharT> +class basic_parser +{ +public: + typedef basic_re_tokeniser<CharT> tokeniser; + typedef typename tokeniser::string string; + typedef std::map<string, const node *> macro_map; + typedef node::node_ptr_vector node_ptr_vector; + typedef typename tokeniser::num_token token; + +/* + General principles of regex parsing: + - Every regex is a sequence of sub-regexes. + - Regexes consist of operands and operators + - All operators decompose to sequence, selection ('|') and iteration ('*') + - Regex tokens are stored on the stack. + - When a complete sequence of regex tokens is on the stack it is processed. + +Grammar: + +<REGEX> -> <OREXP> +<OREXP> -> <SEQUENCE> | <OREXP>'|'<SEQUENCE> +<SEQUENCE> -> <SUB> +<SUB> -> <EXPRESSION> | <SUB><EXPRESSION> +<EXPRESSION> -> <REPEAT> +<REPEAT> -> charset | macro | '('<REGEX>')' | <REPEAT><DUPLICATE> +<DUPLICATE> -> '?' | '*' | '+' | '{n[,[m]]}' +*/ + static node *parse (const CharT *start_, const CharT * const end_, + const std::size_t id_, const std::size_t unique_id_, + const std::size_t dfa_state_, const regex_flags flags_, + const std::locale &locale_, node_ptr_vector &node_ptr_vector_, + const macro_map ¯omap_, typename tokeniser::token_map &map_, + bool &seen_BOL_assertion_, bool &seen_EOL_assertion_) + { + node *root_ = 0; + state state_ (start_, end_, flags_, locale_); + token lhs_token_; + token rhs_token_; + token_stack token_stack_; + tree_node_stack tree_node_stack_; + char action_ = 0; + + token_stack_.push (rhs_token_); + tokeniser::next (state_, map_, rhs_token_); + + do + { + lhs_token_ = token_stack_.top (); + action_ = lhs_token_.precedence (rhs_token_._type); + + switch (action_) + { + case '<': + case '=': + token_stack_.push (rhs_token_); + tokeniser::next (state_, map_, rhs_token_); + break; + case '>': + reduce (token_stack_, macromap_, node_ptr_vector_, + tree_node_stack_); + break; + default: + std::ostringstream ss_; + + ss_ << "A syntax error occured: '" << + lhs_token_.precedence_string () << + "' against '" << rhs_token_.precedence_string () << + "' at index " << state_.index () << "."; + throw runtime_error (ss_.str ().c_str ()); + break; + } + } while (!token_stack_.empty ()); + + if (tree_node_stack_.empty ()) + { + throw runtime_error ("Empty rules are not allowed."); + } + + BOOST_ASSERT(tree_node_stack_.size () == 1); + + node *lhs_node_ = tree_node_stack_.top (); + + tree_node_stack_.pop (); + + if (id_ == 0) + { + // Macros have no end state... + root_ = lhs_node_; + } + else + { + node_ptr_vector_->push_back (static_cast<end_node *>(0)); + + node *rhs_node_ = new end_node (id_, unique_id_, dfa_state_); + + node_ptr_vector_->back () = rhs_node_; + node_ptr_vector_->push_back (static_cast<sequence_node *>(0)); + node_ptr_vector_->back () = new sequence_node + (lhs_node_, rhs_node_); + root_ = node_ptr_vector_->back (); + } + + // Done this way as bug in VC++ 6 prevents |= operator working + // properly! + if (state_._seen_BOL_assertion) seen_BOL_assertion_ = true; + + if (state_._seen_EOL_assertion) seen_EOL_assertion_ = true; + + return root_; + } + +private: + typedef typename tokeniser::state state; + typedef std::stack<token> token_stack; + typedef node::node_stack tree_node_stack; + + static void reduce (token_stack &token_stack_, + const macro_map ¯omap_, node_ptr_vector &node_vector_ptr_, + tree_node_stack &tree_node_stack_) + { + typename tokeniser::num_token lhs_; + typename tokeniser::num_token rhs_; + token_stack handle_; + char action_ = 0; + + do + { + rhs_ = token_stack_.top (); + token_stack_.pop (); + handle_.push (rhs_); + + if (!token_stack_.empty ()) + { + lhs_ = token_stack_.top (); + action_ = lhs_.precedence (rhs_._type); + } + } while (!token_stack_.empty () && action_ == '='); + + BOOST_ASSERT(token_stack_.empty () || action_ == '<'); + + switch (rhs_._type) + { + case token::BEGIN: + // finished processing so exit + break; + case token::REGEX: + // finished parsing, nothing to do + break; + case token::OREXP: + orexp (handle_, token_stack_, node_vector_ptr_, tree_node_stack_); + break; + case token::SEQUENCE: + token_stack_.push (token::OREXP); + break; + case token::SUB: + sub (handle_, token_stack_, node_vector_ptr_, tree_node_stack_); + break; + case token::EXPRESSION: + token_stack_.push (token::SUB); + break; + case token::REPEAT: + repeat (handle_, token_stack_); + break; + case token::CHARSET: + charset (handle_, token_stack_, node_vector_ptr_, + tree_node_stack_); + break; + case token::MACRO: + macro (handle_, token_stack_, macromap_, node_vector_ptr_, + tree_node_stack_); + break; + case token::OPENPAREN: + openparen (handle_, token_stack_); + break; + case token::OPT: + case token::AOPT: + optional (rhs_._type == token::OPT, node_vector_ptr_, + tree_node_stack_); + token_stack_.push (token::DUP); + break; + case token::ZEROORMORE: + case token::AZEROORMORE: + zero_or_more (rhs_._type == token::ZEROORMORE, node_vector_ptr_, + tree_node_stack_); + token_stack_.push (token::DUP); + break; + case token::ONEORMORE: + case token::AONEORMORE: + one_or_more (rhs_._type == token::ONEORMORE, node_vector_ptr_, + tree_node_stack_); + token_stack_.push (token::DUP); + break; + case token::REPEATN: + case token::AREPEATN: + repeatn (rhs_._type == token::REPEATN, handle_.top (), + node_vector_ptr_, tree_node_stack_); + token_stack_.push (token::DUP); + break; + default: + throw runtime_error + ("Internal error regex_parser::reduce"); + break; + } + } + + static void orexp (token_stack &handle_, token_stack &token_stack_, + node_ptr_vector &node_ptr_vector_, tree_node_stack &tree_node_stack_) + { + BOOST_ASSERT(handle_.top ()._type == token::OREXP && + (handle_.size () == 1 || handle_.size () == 3)); + + if (handle_.size () == 1) + { + token_stack_.push (token::REGEX); + } + else + { + handle_.pop (); + BOOST_ASSERT(handle_.top ()._type == token::OR); + handle_.pop (); + BOOST_ASSERT(handle_.top ()._type == token::SEQUENCE); + perform_or (node_ptr_vector_, tree_node_stack_); + token_stack_.push (token::OREXP); + } + } + + static void sub (token_stack &handle_, token_stack &token_stack_, + node_ptr_vector &node_ptr_vector_, tree_node_stack &tree_node_stack_) + { + BOOST_ASSERT(handle_.top ()._type == token::SUB && + (handle_.size () == 1 || handle_.size () == 2)); + + if (handle_.size () == 1) + { + token_stack_.push (token::SEQUENCE); + } + else + { + handle_.pop (); + BOOST_ASSERT(handle_.top ()._type == token::EXPRESSION); + // perform join + sequence (node_ptr_vector_, tree_node_stack_); + token_stack_.push (token::SUB); + } + } + + static void repeat (token_stack &handle_, token_stack &token_stack_) + { + BOOST_ASSERT(handle_.top ()._type == token::REPEAT && + handle_.size () >= 1 && handle_.size () <= 3); + + if (handle_.size () == 1) + { + token_stack_.push (token::EXPRESSION); + } + else + { + handle_.pop (); + BOOST_ASSERT(handle_.top ()._type == token::DUP); + token_stack_.push (token::REPEAT); + } + } + + static void charset (token_stack &handle_, token_stack &token_stack_, + node_ptr_vector &node_ptr_vector_, tree_node_stack &tree_node_stack_) + { + BOOST_ASSERT(handle_.top ()._type == token::CHARSET && + handle_.size () == 1); + // store charset + node_ptr_vector_->push_back (static_cast<leaf_node *>(0)); + + const size_t id_ = handle_.top ()._id; + + node_ptr_vector_->back () = new leaf_node (id_, true); + tree_node_stack_.push (node_ptr_vector_->back ()); + token_stack_.push (token::REPEAT); + } + + static void macro (token_stack &handle_, token_stack &token_stack_, + const macro_map ¯omap_, node_ptr_vector &node_ptr_vector_, + tree_node_stack &tree_node_stack_) + { + token &top_ = handle_.top (); + + BOOST_ASSERT(top_._type == token::MACRO && handle_.size () == 1); + + typename macro_map::const_iterator iter_ = + macromap_.find (top_._macro); + + if (iter_ == macromap_.end ()) + { + const CharT *name_ = top_._macro; + std::basic_stringstream<CharT> ss_; + std::ostringstream os_; + + os_ << "Unknown MACRO name '"; + + while (*name_) + { + os_ << ss_.narrow (*name_++, ' '); + } + + os_ << "'."; + throw runtime_error (os_.str ()); + } + + tree_node_stack_.push (iter_->second->copy (node_ptr_vector_)); + token_stack_.push (token::REPEAT); + } + + static void openparen (token_stack &handle_, token_stack &token_stack_) + { + BOOST_ASSERT(handle_.top ()._type == token::OPENPAREN && + handle_.size () == 3); + handle_.pop (); + BOOST_ASSERT(handle_.top ()._type == token::REGEX); + handle_.pop (); + BOOST_ASSERT(handle_.top ()._type == token::CLOSEPAREN); + token_stack_.push (token::REPEAT); + } + + static void perform_or (node_ptr_vector &node_ptr_vector_, + tree_node_stack &tree_node_stack_) + { + // perform or + node *rhs_ = tree_node_stack_.top (); + + tree_node_stack_.pop (); + + node *lhs_ = tree_node_stack_.top (); + + node_ptr_vector_->push_back (static_cast<selection_node *>(0)); + node_ptr_vector_->back () = new selection_node (lhs_, rhs_); + tree_node_stack_.top () = node_ptr_vector_->back (); + } + + static void sequence (node_ptr_vector &node_ptr_vector_, + tree_node_stack &tree_node_stack_) + { + node *rhs_ = tree_node_stack_.top (); + + tree_node_stack_.pop (); + + node *lhs_ = tree_node_stack_.top (); + + node_ptr_vector_->push_back (static_cast<sequence_node *>(0)); + node_ptr_vector_->back () = new sequence_node (lhs_, rhs_); + tree_node_stack_.top () = node_ptr_vector_->back (); + } + + static void optional (const bool greedy_, + node_ptr_vector &node_ptr_vector_, tree_node_stack &tree_node_stack_) + { + // perform ? + node *lhs_ = tree_node_stack_.top (); + // You don't know if lhs_ is a leaf_node, so get firstpos. + node::node_vector &firstpos_ = lhs_->firstpos (); + + for (node::node_vector::iterator iter_ = firstpos_.begin (), + end_ = firstpos_.end (); iter_ != end_; ++iter_) + { + // These are leaf_nodes! + (*iter_)->greedy (greedy_); + } + + node_ptr_vector_->push_back (static_cast<leaf_node *>(0)); + + node *rhs_ = new leaf_node (null_token, greedy_); + + node_ptr_vector_->back () = rhs_; + node_ptr_vector_->push_back (static_cast<selection_node *>(0)); + node_ptr_vector_->back () = new selection_node (lhs_, rhs_); + tree_node_stack_.top () = node_ptr_vector_->back (); + } + + static void zero_or_more (const bool greedy_, + node_ptr_vector &node_ptr_vector_, tree_node_stack &tree_node_stack_) + { + // perform * + node *ptr_ = tree_node_stack_.top (); + + node_ptr_vector_->push_back (static_cast<iteration_node *>(0)); + node_ptr_vector_->back () = new iteration_node (ptr_, greedy_); + tree_node_stack_.top () = node_ptr_vector_->back (); + } + + static void one_or_more (const bool greedy_, + node_ptr_vector &node_ptr_vector_, tree_node_stack &tree_node_stack_) + { + // perform + + node *lhs_ = tree_node_stack_.top (); + node *copy_ = lhs_->copy (node_ptr_vector_); + + node_ptr_vector_->push_back (static_cast<iteration_node *>(0)); + + node *rhs_ = new iteration_node (copy_, greedy_); + + node_ptr_vector_->back () = rhs_; + node_ptr_vector_->push_back (static_cast<sequence_node *>(0)); + node_ptr_vector_->back () = new sequence_node (lhs_, rhs_); + tree_node_stack_.top () = node_ptr_vector_->back (); + } + + // This is one of the most mind bending routines in this code... + static void repeatn (const bool greedy_, const token &token_, + node_ptr_vector &node_ptr_vector_, tree_node_stack &tree_node_stack_) + { + // perform {n[,[m]]} + // Semantic checks have already been performed. + // {0,} = * + // {0,1} = ? + // {1,} = + + // therefore we do not check for these cases. + if (!(token_._min == 1 && !token_._comma)) + { + const std::size_t top_ = token_._min > 0 ? + token_._min : token_._max; + + if (token_._min == 0) + { + optional (greedy_, node_ptr_vector_, tree_node_stack_); + } + + node *prev_ = tree_node_stack_.top ()->copy (node_ptr_vector_); + node *curr_ = 0; + + for (std::size_t i_ = 2; i_ < top_; ++i_) + { + curr_ = prev_->copy (node_ptr_vector_); + tree_node_stack_.push (static_cast<node *>(0)); + tree_node_stack_.top () = prev_; + sequence (node_ptr_vector_, tree_node_stack_); + prev_ = curr_; + } + + if (token_._comma && token_._min > 0) + { + if (token_._min > 1) + { + curr_ = prev_->copy (node_ptr_vector_); + tree_node_stack_.push (static_cast<node *>(0)); + tree_node_stack_.top () = prev_; + sequence (node_ptr_vector_, tree_node_stack_); + prev_ = curr_; + } + + if (token_._comma && token_._max) + { + tree_node_stack_.push (static_cast<node *>(0)); + tree_node_stack_.top () = prev_; + optional (greedy_, node_ptr_vector_, tree_node_stack_); + prev_ = tree_node_stack_.top (); + tree_node_stack_.pop (); + + const std::size_t count_ = token_._max - token_._min; + + for (std::size_t i_ = 1; i_ < count_; ++i_) + { + curr_ = prev_->copy (node_ptr_vector_); + tree_node_stack_.push (static_cast<node *>(0)); + tree_node_stack_.top () = prev_; + sequence (node_ptr_vector_, tree_node_stack_); + prev_ = curr_; + } + } + else + { + tree_node_stack_.push (static_cast<node *>(0)); + tree_node_stack_.top () = prev_; + zero_or_more (greedy_, node_ptr_vector_, tree_node_stack_); + prev_ = tree_node_stack_.top (); + tree_node_stack_.pop (); + } + } + + tree_node_stack_.push (static_cast<node *>(0)); + tree_node_stack_.top () = prev_; + sequence (node_ptr_vector_, tree_node_stack_); + } + } +}; +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tokeniser/num_token.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tokeniser/num_token.hpp new file mode 100644 index 0000000..dc1c6bd --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tokeniser/num_token.hpp @@ -0,0 +1,146 @@ +// num_token.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_NUM_TOKEN_HPP +#define BOOST_LEXER_NUM_TOKEN_HPP + +#include <boost/config.hpp> +#include "../../consts.hpp" // null_token +#include "../../size_t.hpp" +#include <boost/detail/workaround.hpp> + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +template<typename CharT> +struct basic_num_token +{ + enum type {BEGIN, REGEX, OREXP, SEQUENCE, SUB, EXPRESSION, REPEAT, + DUP, OR, CHARSET, MACRO, OPENPAREN, CLOSEPAREN, OPT, AOPT, + ZEROORMORE, AZEROORMORE, ONEORMORE, AONEORMORE, REPEATN, AREPEATN, + END}; + + type _type; + std::size_t _id; + std::size_t _min; + bool _comma; + std::size_t _max; + CharT _macro[max_macro_len + 1]; + static const char _precedence_table[END + 1][END + 1]; + static const char *_precedence_strings[END + 1]; + + basic_num_token (const type type_ = BEGIN, + const std::size_t id_ = null_token) : + _type (type_), + _id (id_), + _min (0), + _comma (false), + _max (0) + { + *_macro = 0; + } + + basic_num_token &operator = (const basic_num_token &rhs_) + { + _type = rhs_._type; + _id = rhs_._id; + _min = rhs_._min; + _comma = rhs_._comma; + _max = rhs_._max; + + if (_type == MACRO) + { + const CharT *read_ = rhs_._macro; + CharT *write_ = _macro; + + while (*read_) + { + *write_++ = *read_++; + } + + *write_ = 0; + } + + return *this; + } + + void set (const type type_) + { + _type = type_; + _id = null_token; + } + + void set (const type type_, const std::size_t id_) + { + _type = type_; + _id = id_; + } + + void min_max (const std::size_t min_, const bool comma_, + const std::size_t max_) + { + _min = min_; + _comma = comma_; + _max = max_; + } + + char precedence (const type type_) const + { + return _precedence_table[_type][type_]; + } + + const char *precedence_string () const + { + return _precedence_strings[_type]; + } +}; + +template<typename CharT> +const char basic_num_token<CharT>::_precedence_table[END + 1][END + 1] = { +// BEG, REG, ORE, SEQ, SUB, EXP, RPT, DUP, | , CHR, MCR, ( , ) , ? , ?? , * , *? , + , +?, {n}?, {n}, END +/*BEGIN*/{' ', '<', '<', '<', '<', '<', '<', ' ', ' ', '<', '<', '<', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>'}, +/*REGEX*/{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '=', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>'}, +/*OREXP*/{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '=', '>', '>', ' ', '>', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>'}, +/* SEQ */{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>', '>', '>', ' ', '>', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>'}, +/* SUB */{' ', ' ', ' ', ' ', ' ', '=', '<', ' ', '>', '<', '<', '<', '>', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>'}, +/*EXPRE*/{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>', '>', '>', '>', '>', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>'}, +/* RPT */{' ', ' ', ' ', ' ', ' ', ' ', ' ', '=', '>', '>', '>', '>', '>', '<', '<', '<', '<', '<', '<', '<', '<', '>'}, +/*DUPLI*/{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>', '>', '>', '>', '>', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>'}, +/* | */{' ', ' ', ' ', '=', '<', '<', '<', ' ', ' ', '<', '<', '<', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, +/*CHARA*/{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>', '>', '>', '>', '>', '>', '>', '>', '>', '>', '>', '>', '>', '>'}, +/*MACRO*/{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>', '>', '>', '>', '>', '>', '>', '>', '>', '>', '>', '>', '>', '>'}, +/* ( */{' ', '=', '<', '<', '<', '<', '<', ' ', ' ', '<', '<', '<', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '}, +/* ) */{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>', '>', '>', '>', '>', '>', '>', '>', '>', '>', '>', '>', '>', '>'}, +/* ? */{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>', '>', '>', '>', '>', '<', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>'}, +/* ?? */{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>', '>', '>', '>', '>', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>'}, +/* * */{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>', '>', '>', '>', '>', '<', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>'}, +/* *? */{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>', '>', '>', '>', '>', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>'}, +/* + */{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>', '>', '>', '>', '>', '<', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>'}, +/* +? */{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>', '>', '>', '>', '>', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>'}, +/*{n,m}*/{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>', '>', '>', '>', '>', '<', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>'}, +/*{nm}?*/{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>', '>', '>', '>', '>', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '>'}, +/* END */{' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '} +}; + +template<typename CharT> +const char *basic_num_token<CharT>::_precedence_strings[END + 1] = +#if BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(910)) +{{"BEGIN"}, {"REGEX"}, {"OREXP"}, {"SEQUENCE"}, {"SUB"}, {"EXPRESSION"}, + {"REPEAT"}, {"DUPLICATE"}, {"|"}, {"CHARSET"}, {"MACRO"}, + {"("}, {")"}, {"?"}, {"??"}, {"*"}, {"*?"}, {"+"}, {"+?"}, {"{n[,[m]]}"}, + {"{n[,[m]]}?"}, {"END"}}; +#else +{"BEGIN", "REGEX", "OREXP", "SEQUENCE", "SUB", "EXPRESSION", "REPEAT", + "DUPLICATE", "|", "CHARSET", "MACRO", "(", ")", "?", "??", "*", "*?", + "+", "+?", "{n[,[m]]}", "{n[,[m]]}?", "END"}; +#endif +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser.hpp new file mode 100644 index 0000000..7bdeb80 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser.hpp @@ -0,0 +1,574 @@ +// tokeniser.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_RE_TOKENISER_HPP +#define BOOST_LEXER_RE_TOKENISER_HPP + +// memcpy() +#include <cstring> +#include <map> +#include "num_token.hpp" +#include "../../runtime_error.hpp" +#include "../../size_t.hpp" +#include <sstream> +#include "../../string_token.hpp" +#include "re_tokeniser_helper.hpp" + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +template<typename CharT> +class basic_re_tokeniser +{ +public: + typedef basic_num_token<CharT> num_token; + typedef basic_re_tokeniser_state<CharT> state; + typedef basic_string_token<CharT> string_token; + typedef typename string_token::string string; + typedef std::map<string_token, std::size_t> token_map; + typedef std::pair<string_token, std::size_t> token_pair; + + static void next (state &state_, token_map &map_, num_token &token_) + { + CharT ch_ = 0; + bool eos_ = state_.next (ch_); + + token_.min_max (0, false, 0); + + while (!eos_ && ch_ == '"') + { + state_._in_string ^= 1; + eos_ = state_.next (ch_); + } + + if (eos_) + { + if (state_._in_string) + { + throw runtime_error ("Unexpected end of regex " + "(missing '\"')."); + } + + if (state_._paren_count) + { + throw runtime_error ("Unexpected end of regex " + "(missing ')')."); + } + + token_.set (num_token::END, null_token); + } + else + { + if (ch_ == '\\') + { + // Even if we are in a string, respect escape sequences... + escape (state_, map_, token_); + } + else if (state_._in_string) + { + // All other meta characters lose their special meaning + // inside a string. + create_charset_token (string (1, ch_), false, map_, token_); + } + else + { + // Not an escape sequence and not inside a string, so + // check for meta characters. + switch (ch_) + { + case '(': + token_.set (num_token::OPENPAREN, null_token); + ++state_._paren_count; + read_options (state_); + break; + case ')': + --state_._paren_count; + + if (state_._paren_count < 0) + { + std::ostringstream ss_; + + ss_ << "Number of open parenthesis < 0 at index " << + state_.index () - 1 << '.'; + throw runtime_error (ss_.str ().c_str ()); + } + + token_.set (num_token::CLOSEPAREN, null_token); + + if (!state_._flags_stack.empty ()) + { + state_._flags = state_._flags_stack.top (); + state_._flags_stack.pop (); + } + break; + case '?': + if (!state_.eos () && *state_._curr == '?') + { + token_.set (num_token::AOPT, null_token); + state_.increment (); + } + else + { + token_.set (num_token::OPT, null_token); + } + + break; + case '*': + if (!state_.eos () && *state_._curr == '?') + { + token_.set (num_token::AZEROORMORE, null_token); + state_.increment (); + } + else + { + token_.set (num_token::ZEROORMORE, null_token); + } + + break; + case '+': + if (!state_.eos () && *state_._curr == '?') + { + token_.set (num_token::AONEORMORE, null_token); + state_.increment (); + } + else + { + token_.set (num_token::ONEORMORE, null_token); + } + + break; + case '{': + open_curly (state_, token_); + break; + case '|': + token_.set (num_token::OR, null_token); + break; + case '^': + if (state_._curr - 1 == state_._start) + { + token_.set (num_token::CHARSET, bol_token); + state_._seen_BOL_assertion = true; + } + else + { + create_charset_token (string (1, ch_), false, + map_, token_); + } + + break; + case '$': + if (state_._curr == state_._end) + { + token_.set (num_token::CHARSET, eol_token); + state_._seen_EOL_assertion = true; + } + else + { + create_charset_token (string (1, ch_), false, + map_, token_); + } + + break; + case '.': + { + string dot_; + + if (state_._flags & dot_not_newline) + { + dot_ = '\n'; + } + + create_charset_token (dot_, true, map_, token_); + break; + } + case '[': + { + charset (state_, map_, token_); + break; + } + case '/': + throw runtime_error("Lookahead ('/') is not supported yet."); + break; + default: + if ((state_._flags & icase) && + (std::isupper (ch_, state_._locale) || + std::islower (ch_, state_._locale))) + { + CharT upper_ = std::toupper (ch_, state_._locale); + CharT lower_ = std::tolower (ch_, state_._locale); + + string str_ (1, upper_); + + str_ += lower_; + create_charset_token (str_, false, map_, token_); + } + else + { + create_charset_token (string (1, ch_), false, + map_, token_); + } + + break; + } + } + } + } + +private: + typedef basic_re_tokeniser_helper<CharT> tokeniser_helper; + + static void read_options (state &state_) + { + if (!state_.eos () && *state_._curr == '?') + { + CharT ch_ = 0; + bool eos_ = false; + bool negate_ = false; + + state_.increment (); + eos_ = state_.next (ch_); + state_._flags_stack.push (state_._flags); + + while (!eos_ && ch_ != ':') + { + switch (ch_) + { + case '-': + negate_ ^= 1; + break; + case 'i': + if (negate_) + { + state_._flags = static_cast<regex_flags> + (state_._flags & ~icase); + } + else + { + state_._flags = static_cast<regex_flags> + (state_._flags | icase); + } + + negate_ = false; + break; + case 's': + if (negate_) + { + state_._flags = static_cast<regex_flags> + (state_._flags | dot_not_newline); + } + else + { + state_._flags = static_cast<regex_flags> + (state_._flags & ~dot_not_newline); + } + + negate_ = false; + break; + default: + { + std::ostringstream ss_; + + ss_ << "Unknown option at index " << + state_.index () - 1 << '.'; + throw runtime_error (ss_.str ().c_str ()); + } + } + + eos_ = state_.next (ch_); + } + + // End of string handler will handle early termination + } + else if (!state_._flags_stack.empty ()) + { + state_._flags_stack.push (state_._flags); + } + } + + static void escape (state &state_, token_map &map_, num_token &token_) + { + CharT ch_ = 0; + std::size_t str_len_ = 0; + const CharT *str_ = tokeniser_helper::escape_sequence (state_, + ch_, str_len_); + + if (str_) + { + state state2_ (str_ + 1, str_ + str_len_, state_._flags, + state_._locale); + + charset (state2_, map_, token_); + } + else + { + create_charset_token (string (1, ch_), false, map_, token_); + } + } + + static void charset (state &state_, token_map &map_, num_token &token_) + { + string chars_; + bool negated_ = false; + + tokeniser_helper::charset (state_, chars_, negated_); + create_charset_token (chars_, negated_, map_, token_); + } + + static void create_charset_token (const string &charset_, + const bool negated_, token_map &map_, num_token &token_) + { + std::size_t id_ = null_token; + string_token stok_ (negated_, charset_); + + stok_.remove_duplicates (); + stok_.normalise (); + + typename token_map::const_iterator iter_ = map_.find (stok_); + + if (iter_ == map_.end ()) + { + id_ = map_.size (); + map_.insert (token_pair (stok_, id_)); + } + else + { + id_ = iter_->second; + } + + token_.set (num_token::CHARSET, id_); + } + + static void open_curly (state &state_, num_token &token_) + { + if (state_.eos ()) + { + throw runtime_error ("Unexpected end of regex " + "(missing '}')."); + } + else if (*state_._curr >= '0' && *state_._curr <= '9') + { + repeat_n (state_, token_); + + if (!state_.eos () && *state_._curr == '?') + { + token_._type = num_token::AREPEATN; + state_.increment (); + } + } + else + { + macro (state_, token_); + } + } + + // SYNTAX: + // {n[,[n]]} + // SEMANTIC RULES: + // {0} - INVALID (throw exception) + // {0,} = * + // {0,0} - INVALID (throw exception) + // {0,1} = ? + // {1,} = + + // {min,max} where min == max - {min} + // {min,max} where max < min - INVALID (throw exception) + static void repeat_n (state &state_, num_token &token_) + { + CharT ch_ = 0; + bool eos_ = state_.next (ch_); + + while (!eos_ && ch_ >= '0' && ch_ <= '9') + { + token_._min *= 10; + token_._min += ch_ - '0'; + eos_ = state_.next (ch_); + } + + if (eos_) + { + throw runtime_error ("Unexpected end of regex " + "(missing '}')."); + } + + bool min_max_ = false; + bool repeatn_ = true; + + token_._comma = ch_ == ','; + + if (token_._comma) + { + eos_ = state_.next (ch_); + + if (eos_) + { + throw runtime_error ("Unexpected end of regex " + "(missing '}')."); + } + + if (ch_ == '}') + { + // Small optimisation: Check for '*' equivalency. + if (token_._min == 0) + { + token_.set (num_token::ZEROORMORE, null_token); + repeatn_ = false; + } + // Small optimisation: Check for '+' equivalency. + else if (token_._min == 1) + { + token_.set (num_token::ONEORMORE, null_token); + repeatn_ = false; + } + } + else + { + if (ch_ < '0' || ch_ > '9') + { + std::ostringstream ss_; + + ss_ << "Missing '}' at index " << + state_.index () - 1 << '.'; + throw runtime_error (ss_.str ().c_str ()); + } + + min_max_ = true; + + do + { + token_._max *= 10; + token_._max += ch_ - '0'; + eos_ = state_.next (ch_); + } while (!eos_ && ch_ >= '0' && ch_ <= '9'); + + if (eos_) + { + throw runtime_error ("Unexpected end of regex " + "(missing '}')."); + } + + // Small optimisation: Check for '?' equivalency. + if (token_._min == 0 && token_._max == 1) + { + token_.set (num_token::OPT, null_token); + repeatn_ = false; + } + // Small optimisation: if min == max, then min. + else if (token_._min == token_._max) + { + token_._comma = false; + min_max_ = false; + token_._max = 0; + } + } + } + + if (ch_ != '}') + { + std::ostringstream ss_; + + ss_ << "Missing '}' at index " << state_.index () - 1 << '.'; + throw runtime_error (ss_.str ().c_str ()); + } + + if (repeatn_) + { + // SEMANTIC VALIDATION follows: + // NOTE: {0,} has already become * + // therefore we don't check for a comma. + if (token_._min == 0 && token_._max == 0) + { + std::ostringstream ss_; + + ss_ << "Cannot have exactly zero repeats preceding index " << + state_.index () << '.'; + throw runtime_error (ss_.str ().c_str ()); + } + + if (min_max_ && token_._max < token_._min) + { + std::ostringstream ss_; + + ss_ << "Max less than min preceding index " << + state_.index () << '.'; + throw runtime_error (ss_.str ().c_str ()); + } + + token_.set (num_token::REPEATN, null_token); + } + } + + static void macro (state &state_, num_token &token_) + { + CharT ch_ = 0; + bool eos_ = false; + const CharT *start_ = state_._curr; + + state_.next (ch_); + + if (ch_ != '_' && !(ch_ >= 'A' && ch_ <= 'Z') && + !(ch_ >= 'a' && ch_ <= 'z')) + { + std::ostringstream ss_; + + ss_ << "Invalid MACRO name at index " << + state_.index () - 1 << '.'; + throw runtime_error (ss_.str ().c_str ()); + } + + do + { + eos_ = state_.next (ch_); + + if (eos_) + { + throw runtime_error ("Unexpected end of regex " + "(missing '}')."); + } + } while (ch_ == '_' || ch_ == '-' || (ch_ >= 'A' && ch_ <= 'Z') || + (ch_ >= 'a' && ch_ <= 'z') || (ch_ >= '0' && ch_ <= '9')); + + if (ch_ != '}') + { + std::ostringstream ss_; + + ss_ << "Missing '}' at index " << state_.index () - 1 << '.'; + throw runtime_error (ss_.str ().c_str ()); + } + + std::size_t len_ = state_._curr - 1 - start_; + + if (len_ > max_macro_len) + { + std::basic_stringstream<CharT> ss_; + std::ostringstream os_; + + os_ << "MACRO name '"; + + while (len_) + { + os_ << ss_.narrow (*start_++, ' '); + --len_; + } + + os_ << "' too long."; + throw runtime_error (os_.str ()); + } + + token_.set (num_token::MACRO, null_token); + + // Some systems have memcpy in namespace std. + using namespace std; + + memcpy (token_._macro, start_, len_ * sizeof (CharT)); + token_._macro[len_] = 0; + } +}; +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_helper.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_helper.hpp new file mode 100644 index 0000000..6e0791e --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_helper.hpp @@ -0,0 +1,549 @@ +// tokeniser_helper.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_RE_TOKENISER_HELPER_H +#define BOOST_LEXER_RE_TOKENISER_HELPER_H + +#include "../../char_traits.hpp" +// strlen() +#include <cstring> +#include "../../size_t.hpp" +#include "re_tokeniser_state.hpp" + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +template<typename CharT, typename Traits = char_traits<CharT> > +class basic_re_tokeniser_helper +{ +public: + typedef basic_re_tokeniser_state<CharT> state; + typedef std::basic_string<CharT> string; + + static const CharT *escape_sequence (state &state_, CharT &ch_, + std::size_t &str_len_) + { + bool eos_ = state_.eos (); + + if (eos_) + { + throw runtime_error ("Unexpected end of regex " + "following '\\'."); + } + + const CharT *str_ = charset_shortcut (*state_._curr, str_len_); + + if (str_) + { + state_.increment (); + } + else + { + ch_ = chr (state_); + } + + return str_; + } + + // This function can call itself. + static void charset (state &state_, string &chars_, bool &negated_) + { + CharT ch_ = 0; + bool eos_ = state_.next (ch_); + + if (eos_) + { + // Pointless returning index if at end of string + throw runtime_error ("Unexpected end of regex " + "following '['."); + } + + negated_ = ch_ == '^'; + + if (negated_) + { + eos_ = state_.next (ch_); + + if (eos_) + { + // Pointless returning index if at end of string + throw runtime_error ("Unexpected end of regex " + "following '^'."); + } + } + + bool chset_ = false; + CharT prev_ = 0; + + while (ch_ != ']') + { + if (ch_ == '\\') + { + std::size_t str_len_ = 0; + const CharT *str_ = escape_sequence (state_, prev_, str_len_); + + chset_ = str_ != 0; + + if (chset_) + { + state temp_state_ (str_ + 1, str_ + str_len_, + state_._flags, state_._locale); + string temp_chars_; + bool temp_negated_ = false; + + charset (temp_state_, temp_chars_, temp_negated_); + + if (negated_ != temp_negated_) + { + std::ostringstream ss_; + + ss_ << "Mismatch in charset negation preceding " + "index " << state_.index () << '.'; + throw runtime_error (ss_.str ().c_str ()); + } + + chars_ += temp_chars_; + } + } +/* + else if (ch_ == '[' && !state_.eos () && *state_._curr == ':') + { + // TODO: POSIX charsets + } +*/ + else + { + chset_ = false; + prev_ = ch_; + } + + eos_ = state_.next (ch_); + + // Covers preceding if, else if and else + if (eos_) + { + // Pointless returning index if at end of string + throw runtime_error ("Unexpected end of regex " + "(missing ']')."); + } + + if (ch_ == '-') + { + charset_range (chset_, state_, eos_, ch_, prev_, chars_); + } + else if (!chset_) + { + if ((state_._flags & icase) && + (std::isupper (prev_, state_._locale) || + std::islower (prev_, state_._locale))) + { + CharT upper_ = std::toupper (prev_, state_._locale); + CharT lower_ = std::tolower (prev_, state_._locale); + + chars_ += upper_; + chars_ += lower_; + } + else + { + chars_ += prev_; + } + } + } + + if (!negated_ && chars_.empty ()) + { + throw runtime_error ("Empty charsets not allowed."); + } + } + + static CharT chr (state &state_) + { + CharT ch_ = 0; + + // eos_ has already been checked for. + switch (*state_._curr) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + ch_ = decode_octal (state_); + break; + case 'a': + ch_ = '\a'; + state_.increment (); + break; + case 'b': + ch_ = '\b'; + state_.increment (); + break; + case 'c': + ch_ = decode_control_char (state_); + break; + case 'e': + ch_ = 27; // '\e' not recognised by compiler + state_.increment (); + break; + case 'f': + ch_ = '\f'; + state_.increment (); + break; + case 'n': + ch_ = '\n'; + state_.increment (); + break; + case 'r': + ch_ = '\r'; + state_.increment (); + break; + case 't': + ch_ = '\t'; + state_.increment (); + break; + case 'v': + ch_ = '\v'; + state_.increment (); + break; + case 'x': + ch_ = decode_hex (state_); + break; + default: + ch_ = *state_._curr; + state_.increment (); + break; + } + + return ch_; + } + +private: + static const char *charset_shortcut (const char ch_, + std::size_t &str_len_) + { + const char *str_ = 0; + + switch (ch_) + { + case 'd': + str_ = "[0-9]"; + break; + case 'D': + str_ = "[^0-9]"; + break; + case 's': + str_ = "[ \t\n\r\f\v]"; + break; + case 'S': + str_ = "[^ \t\n\r\f\v]"; + break; + case 'w': + str_ = "[_0-9A-Za-z]"; + break; + case 'W': + str_ = "[^_0-9A-Za-z]"; + break; + } + + if (str_) + { + // Some systems have strlen in namespace std. + using namespace std; + + str_len_ = strlen (str_); + } + else + { + str_len_ = 0; + } + + return str_; + } + + static const wchar_t *charset_shortcut (const wchar_t ch_, + std::size_t &str_len_) + { + const wchar_t *str_ = 0; + + switch (ch_) + { + case 'd': + str_ = L"[0-9]"; + break; + case 'D': + str_ = L"[^0-9]"; + break; + case 's': + str_ = L"[ \t\n\r\f\v]"; + break; + case 'S': + str_ = L"[^ \t\n\r\f\v]"; + break; + case 'w': + str_ = L"[_0-9A-Za-z]"; + break; + case 'W': + str_ = L"[^_0-9A-Za-z]"; + break; + } + + if (str_) + { + // Some systems have wcslen in namespace std. + using namespace std; + + str_len_ = wcslen (str_); + } + else + { + str_len_ = 0; + } + + return str_; + } + + static CharT decode_octal (state &state_) + { + std::size_t accumulator_ = 0; + CharT ch_ = *state_._curr; + unsigned short count_ = 3; + bool eos_ = false; + + for (;;) + { + accumulator_ *= 8; + accumulator_ += ch_ - '0'; + --count_; + state_.increment (); + eos_ = state_.eos (); + + if (!count_ || eos_) break; + + ch_ = *state_._curr; + + // Don't consume invalid chars! + if (ch_ < '0' || ch_ > '7') + { + break; + } + } + + return static_cast<CharT> (accumulator_); + } + + static CharT decode_control_char (state &state_) + { + // Skip over 'c' + state_.increment (); + + CharT ch_ = 0; + bool eos_ = state_.next (ch_); + + if (eos_) + { + // Pointless returning index if at end of string + throw runtime_error ("Unexpected end of regex following \\c."); + } + else + { + if (ch_ >= 'a' && ch_ <= 'z') + { + ch_ -= 'a' - 1; + } + else if (ch_ >= 'A' && ch_ <= 'Z') + { + ch_ -= 'A' - 1; + } + else if (ch_ == '@') + { + // Apparently... + ch_ = 0; + } + else + { + std::ostringstream ss_; + + ss_ << "Invalid control char at index " << + state_.index () - 1 << '.'; + throw runtime_error (ss_.str ().c_str ()); + } + } + + return ch_; + } + + static CharT decode_hex (state &state_) + { + // Skip over 'x' + state_.increment (); + + CharT ch_ = 0; + bool eos_ = state_.next (ch_); + + if (eos_) + { + // Pointless returning index if at end of string + throw runtime_error ("Unexpected end of regex following \\x."); + } + + if (!((ch_ >= '0' && ch_ <= '9') || (ch_ >= 'a' && ch_ <= 'f') || + (ch_ >= 'A' && ch_ <= 'F'))) + { + std::ostringstream ss_; + + ss_ << "Illegal char following \\x at index " << + state_.index () - 1 << '.'; + throw runtime_error (ss_.str ().c_str ()); + } + + std::size_t hex_ = 0; + + do + { + hex_ *= 16; + + if (ch_ >= '0' && ch_ <= '9') + { + hex_ += ch_ - '0'; + } + else if (ch_ >= 'a' && ch_ <= 'f') + { + hex_ += 10 + (ch_ - 'a'); + } + else + { + hex_ += 10 + (ch_ - 'A'); + } + + eos_ = state_.eos (); + + if (!eos_) + { + ch_ = *state_._curr; + + // Don't consume invalid chars! + if (((ch_ >= '0' && ch_ <= '9') || + (ch_ >= 'a' && ch_ <= 'f') || (ch_ >= 'A' && ch_ <= 'F'))) + { + state_.increment (); + } + else + { + eos_ = true; + } + } + } while (!eos_); + + return static_cast<CharT> (hex_); + } + + static void charset_range (const bool chset_, state &state_, bool &eos_, + CharT &ch_, const CharT prev_, string &chars_) + { + if (chset_) + { + std::ostringstream ss_; + + ss_ << "Charset cannot form start of range preceding " + "index " << state_.index () - 1 << '.'; + throw runtime_error (ss_.str ().c_str ()); + } + + eos_ = state_.next (ch_); + + if (eos_) + { + // Pointless returning index if at end of string + throw runtime_error ("Unexpected end of regex " + "following '-'."); + } + + CharT curr_ = 0; + + if (ch_ == '\\') + { + std::size_t str_len_ = 0; + + if (escape_sequence (state_, curr_, str_len_)) + { + std::ostringstream ss_; + + ss_ << "Charset cannot form end of range preceding index " + << state_.index () << '.'; + throw runtime_error (ss_.str ().c_str ()); + } + } +/* + else if (ch_ == '[' && !state_.eos () && *state_._curr == ':') + { + std::ostringstream ss_; + + ss_ << "POSIX char class cannot form end of range at " + "index " << state_.index () - 1 << '.'; + throw runtime_error (ss_.str ().c_str ()); + } +*/ + else + { + curr_ = ch_; + } + + eos_ = state_.next (ch_); + + // Covers preceding if and else + if (eos_) + { + // Pointless returning index if at end of string + throw runtime_error ("Unexpected end of regex " + "(missing ']')."); + } + + std::size_t start_ = static_cast<typename Traits::index_type> (prev_); + std::size_t end_ = static_cast<typename Traits::index_type> (curr_); + + // Semanic check + if (end_ < start_) + { + std::ostringstream ss_; + + ss_ << "Invalid range in charset preceding index " << + state_.index () - 1 << '.'; + throw runtime_error (ss_.str ().c_str ()); + } + + chars_.reserve (chars_.size () + (end_ + 1 - start_)); + + for (; start_ <= end_; ++start_) + { + CharT ch_ = static_cast<CharT> (start_); + + if ((state_._flags & icase) && + (std::isupper (ch_, state_._locale) || + std::islower (ch_, state_._locale))) + { + CharT upper_ = std::toupper (ch_, state_._locale); + CharT lower_ = std::tolower (ch_, state_._locale); + + chars_ += (upper_); + chars_ += (lower_); + } + else + { + chars_ += (ch_); + } + } + } +}; +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_state.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_state.hpp new file mode 100644 index 0000000..35995ad --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tokeniser/re_tokeniser_state.hpp @@ -0,0 +1,98 @@ +// tokeniser_state.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_RE_TOKENISER_STATE_HPP +#define BOOST_LEXER_RE_TOKENISER_STATE_HPP + +#include "../../consts.hpp" +#include <locale> +#include "../../size_t.hpp" +#include <stack> + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +template<typename CharT> +struct basic_re_tokeniser_state +{ + const CharT * const _start; + const CharT * const _end; + const CharT *_curr; + regex_flags _flags; + std::stack<regex_flags> _flags_stack; + std::locale _locale; + long _paren_count; + bool _in_string; + bool _seen_BOL_assertion; + bool _seen_EOL_assertion; + + basic_re_tokeniser_state (const CharT *start_, const CharT * const end_, + const regex_flags flags_, const std::locale locale_) : + _start (start_), + _end (end_), + _curr (start_), + _flags (flags_), + _locale (locale_), + _paren_count (0), + _in_string (false), + _seen_BOL_assertion (false), + _seen_EOL_assertion (false) + { + } + + // prevent VC++ 7.1 warning: + const basic_re_tokeniser_state &operator = + (const basic_re_tokeniser_state &rhs_) + { + _start = rhs_._start; + _end = rhs_._end; + _curr = rhs_._curr; + _flags = rhs_._flags; + _locale = rhs_._locale; + _paren_count = rhs_._paren_count; + _in_string = rhs_._in_string; + _seen_BOL_assertion = rhs_._seen_BOL_assertion; + _seen_EOL_assertion = rhs_._seen_EOL_assertion; + return this; + } + + inline bool next (CharT &ch_) + { + if (_curr >= _end) + { + ch_ = 0; + return true; + } + else + { + ch_ = *_curr; + increment (); + return false; + } + } + + inline void increment () + { + ++_curr; + } + + inline std::size_t index () + { + return _curr - _start; + } + + inline bool eos () + { + return _curr >= _end; + } +}; +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/end_node.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/end_node.hpp new file mode 100644 index 0000000..c613e6a --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/end_node.hpp @@ -0,0 +1,90 @@ +// end_node.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_END_NODE_HPP +#define BOOST_LEXER_END_NODE_HPP + +#include "node.hpp" +#include "../../size_t.hpp" + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +class end_node : public node +{ +public: + end_node (const std::size_t id_, const std::size_t unique_id_, + const std::size_t lexer_state_) : + node (false), + _id (id_), + _unique_id (unique_id_), + _lexer_state (lexer_state_) + { + node::_firstpos.push_back (this); + node::_lastpos.push_back (this); + } + + virtual ~end_node () + { + } + + virtual type what_type () const + { + return END; + } + + virtual bool traverse (const_node_stack &/*node_stack_*/, + bool_stack &/*perform_op_stack_*/) const + { + return false; + } + + virtual const node_vector &followpos () const + { + // _followpos is always empty..! + return _followpos; + } + + virtual bool end_state () const + { + return true; + } + + virtual std::size_t id () const + { + return _id; + } + + virtual std::size_t unique_id () const + { + return _unique_id; + } + + virtual std::size_t lexer_state () const + { + return _lexer_state; + } + +private: + std::size_t _id; + std::size_t _unique_id; + std::size_t _lexer_state; + node_vector _followpos; + + virtual void copy_node (node_ptr_vector &/*node_ptr_vector_*/, + node_stack &/*new_node_stack_*/, bool_stack &/*perform_op_stack_*/, + bool &/*down_*/) const + { + // Nothing to do, as end_nodes are not copied. + } +}; +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/iteration_node.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/iteration_node.hpp new file mode 100644 index 0000000..6b39462 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/iteration_node.hpp @@ -0,0 +1,90 @@ +// iteration_node.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_ITERATION_NODE_HPP +#define BOOST_LEXER_ITERATION_NODE_HPP + +#include "node.hpp" + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +class iteration_node : public node +{ +public: + iteration_node (node *next_, const bool greedy_) : + node (true), + _next (next_), + _greedy (greedy_) + { + node_vector::iterator iter_; + node_vector::iterator end_; + + _next->append_firstpos (_firstpos); + _next->append_lastpos (_lastpos); + + for (iter_ = _lastpos.begin (), end_ = _lastpos.end (); + iter_ != end_; ++iter_) + { + (*iter_)->append_followpos (_firstpos); + } + + for (iter_ = _firstpos.begin (), end_ = _firstpos.end (); + iter_ != end_; ++iter_) + { + (*iter_)->greedy (greedy_); + } + } + + virtual ~iteration_node () + { + } + + virtual type what_type () const + { + return ITERATION; + } + + virtual bool traverse (const_node_stack &node_stack_, + bool_stack &perform_op_stack_) const + { + perform_op_stack_.push (true); + node_stack_.push (_next); + return true; + } + +private: + // Not owner of this pointer... + node *_next; + bool _greedy; + + virtual void copy_node (node_ptr_vector &node_ptr_vector_, + node_stack &new_node_stack_, bool_stack &perform_op_stack_, + bool &down_) const + { + if (perform_op_stack_.top ()) + { + node *ptr_ = new_node_stack_.top (); + + node_ptr_vector_->push_back (static_cast<iteration_node *>(0)); + node_ptr_vector_->back () = new iteration_node (ptr_, _greedy); + new_node_stack_.top () = node_ptr_vector_->back (); + } + else + { + down_ = true; + } + + perform_op_stack_.pop (); + } +}; +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/leaf_node.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/leaf_node.hpp new file mode 100644 index 0000000..39ed98d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/leaf_node.hpp @@ -0,0 +1,107 @@ +// leaf_node.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_LEAF_NODE_HPP +#define BOOST_LEXER_LEAF_NODE_HPP + +#include "../../consts.hpp" // null_token +#include "node.hpp" +#include "../../size_t.hpp" + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +class leaf_node : public node +{ +public: + leaf_node (const std::size_t token_, const bool greedy_) : + node (token_ == null_token), + _token (token_), + _set_greedy (!greedy_), + _greedy (greedy_) + { + if (!_nullable) + { + _firstpos.push_back (this); + _lastpos.push_back (this); + } + } + + virtual ~leaf_node () + { + } + + virtual void append_followpos (const node_vector &followpos_) + { + for (node_vector::const_iterator iter_ = followpos_.begin (), + end_ = followpos_.end (); iter_ != end_; ++iter_) + { + _followpos.push_back (*iter_); + } + } + + virtual type what_type () const + { + return LEAF; + } + + virtual bool traverse (const_node_stack &/*node_stack_*/, + bool_stack &/*perform_op_stack_*/) const + { + return false; + } + + virtual std::size_t token () const + { + return _token; + } + + virtual void greedy (const bool greedy_) + { + if (!_set_greedy) + { + _greedy = greedy_; + _set_greedy = true; + } + } + + virtual bool greedy () const + { + return _greedy; + } + + virtual const node_vector &followpos () const + { + return _followpos; + } + + virtual node_vector &followpos () + { + return _followpos; + } + +private: + std::size_t _token; + bool _set_greedy; + bool _greedy; + node_vector _followpos; + + virtual void copy_node (node_ptr_vector &node_ptr_vector_, + node_stack &new_node_stack_, bool_stack &/*perform_op_stack_*/, + bool &/*down_*/) const + { + node_ptr_vector_->push_back (static_cast<leaf_node *>(0)); + node_ptr_vector_->back () = new leaf_node (_token, _greedy); + new_node_stack_.push (node_ptr_vector_->back ()); + } +}; +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/node.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/node.hpp new file mode 100644 index 0000000..1e36ccb --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/node.hpp @@ -0,0 +1,188 @@ +// node.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_NODE_HPP +#define BOOST_LEXER_NODE_HPP + +#include <boost/assert.hpp> +#include "../../containers/ptr_vector.hpp" +#include "../../runtime_error.hpp" +#include "../../size_t.hpp" +#include <stack> +#include <vector> + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +class node +{ +public: + enum type {LEAF, SEQUENCE, SELECTION, ITERATION, END}; + + typedef std::stack<bool> bool_stack; + typedef std::stack<node *> node_stack; + // stack and vector not owner of node pointers + typedef std::stack<const node *> const_node_stack; + typedef std::vector<node *> node_vector; + typedef ptr_vector<node> node_ptr_vector; + + node () : + _nullable (false) + { + } + + node (const bool nullable_) : + _nullable (nullable_) + { + } + + virtual ~node () + { + } + + bool nullable () const + { + return _nullable; + } + + void append_firstpos (node_vector &firstpos_) const + { + firstpos_.insert (firstpos_.end (), + _firstpos.begin (), _firstpos.end ()); + } + + void append_lastpos (node_vector &lastpos_) const + { + lastpos_.insert (lastpos_.end (), + _lastpos.begin (), _lastpos.end ()); + } + + virtual void append_followpos (const node_vector &/*followpos_*/) + { + throw runtime_error ("Internal error node::append_followpos()"); + } + + node *copy (node_ptr_vector &node_ptr_vector_) const + { + node *new_root_ = 0; + const_node_stack node_stack_; + bool_stack perform_op_stack_; + bool down_ = true; + node_stack new_node_stack_; + + node_stack_.push (this); + + while (!node_stack_.empty ()) + { + while (down_) + { + down_ = node_stack_.top ()->traverse (node_stack_, + perform_op_stack_); + } + + while (!down_ && !node_stack_.empty ()) + { + const node *top_ = node_stack_.top (); + + top_->copy_node (node_ptr_vector_, new_node_stack_, + perform_op_stack_, down_); + + if (!down_) node_stack_.pop (); + } + } + + BOOST_ASSERT(new_node_stack_.size () == 1); + new_root_ = new_node_stack_.top (); + new_node_stack_.pop (); + return new_root_; + } + + virtual type what_type () const = 0; + + virtual bool traverse (const_node_stack &node_stack_, + bool_stack &perform_op_stack_) const = 0; + + node_vector &firstpos () + { + return _firstpos; + } + + const node_vector &firstpos () const + { + return _firstpos; + } + + // _lastpos modified externally, so not const & + node_vector &lastpos () + { + return _lastpos; + } + + virtual bool end_state () const + { + return false; + } + + virtual std::size_t id () const + { + throw runtime_error ("Internal error node::id()"); + } + + virtual std::size_t unique_id () const + { + throw runtime_error ("Internal error node::unique_id()"); + } + + virtual std::size_t lexer_state () const + { + throw runtime_error ("Internal error node::state()"); + } + + virtual std::size_t token () const + { + throw runtime_error ("Internal error node::token()"); + } + + virtual void greedy (const bool /*greedy_*/) + { + throw runtime_error ("Internal error node::token(bool)"); + } + + virtual bool greedy () const + { + throw runtime_error ("Internal error node::token()"); + } + + virtual const node_vector &followpos () const + { + throw runtime_error ("Internal error node::followpos()"); + } + + virtual node_vector &followpos () + { + throw runtime_error ("Internal error node::followpos()"); + } + +protected: + const bool _nullable; + node_vector _firstpos; + node_vector _lastpos; + + virtual void copy_node (node_ptr_vector &node_ptr_vector_, + node_stack &new_node_stack_, bool_stack &perform_op_stack_, + bool &down_) const = 0; + +private: + node (node const &); // No copy construction. + node &operator = (node const &); // No assignment. +}; +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/selection_node.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/selection_node.hpp new file mode 100644 index 0000000..67e5ea0 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/selection_node.hpp @@ -0,0 +1,94 @@ +// selection_node.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_SELECTION_NODE_HPP +#define BOOST_LEXER_SELECTION_NODE_HPP + +#include "node.hpp" + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +class selection_node : public node +{ +public: + selection_node (node *left_, node *right_) : + node (left_->nullable () || right_->nullable ()), + _left (left_), + _right (right_) + { + _left->append_firstpos (_firstpos); + _right->append_firstpos (_firstpos); + _left->append_lastpos (_lastpos); + _right->append_lastpos (_lastpos); + } + + virtual ~selection_node () + { + } + + virtual type what_type () const + { + return SELECTION; + } + + virtual bool traverse (const_node_stack &node_stack_, + bool_stack &perform_op_stack_) const + { + perform_op_stack_.push (true); + + switch (_right->what_type ()) + { + case SEQUENCE: + case SELECTION: + case ITERATION: + perform_op_stack_.push (false); + break; + default: + break; + } + + node_stack_.push (_right); + node_stack_.push (_left); + return true; + } + +private: + // Not owner of these pointers... + node *_left; + node *_right; + + virtual void copy_node (node_ptr_vector &node_ptr_vector_, + node_stack &new_node_stack_, bool_stack &perform_op_stack_, + bool &down_) const + { + if (perform_op_stack_.top ()) + { + node *rhs_ = new_node_stack_.top (); + + new_node_stack_.pop (); + + node *lhs_ = new_node_stack_.top (); + + node_ptr_vector_->push_back (static_cast<selection_node *>(0)); + node_ptr_vector_->back () = new selection_node (lhs_, rhs_); + new_node_stack_.top () = node_ptr_vector_->back (); + } + else + { + down_ = true; + } + + perform_op_stack_.pop (); + } +}; +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/sequence_node.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/sequence_node.hpp new file mode 100644 index 0000000..471fa68 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/parser/tree/sequence_node.hpp @@ -0,0 +1,112 @@ +// sequence_node.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_SEQUENCE_NODE_HPP +#define BOOST_LEXER_SEQUENCE_NODE_HPP + +#include "node.hpp" + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +class sequence_node : public node +{ +public: + sequence_node (node *left_, node *right_) : + node (left_->nullable () && right_->nullable ()), + _left (left_), + _right (right_) + { + _left->append_firstpos (_firstpos); + + if (_left->nullable ()) + { + _right->append_firstpos (_firstpos); + } + + if (_right->nullable ()) + { + _left->append_lastpos (_lastpos); + } + + _right->append_lastpos (_lastpos); + + node_vector &lastpos_ = _left->lastpos (); + const node_vector &firstpos_ = _right->firstpos (); + + for (node_vector::iterator iter_ = lastpos_.begin (), + end_ = lastpos_.end (); iter_ != end_; ++iter_) + { + (*iter_)->append_followpos (firstpos_); + } + } + + virtual ~sequence_node () + { + } + + virtual type what_type () const + { + return SEQUENCE; + } + + virtual bool traverse (const_node_stack &node_stack_, + bool_stack &perform_op_stack_) const + { + perform_op_stack_.push (true); + + switch (_right->what_type ()) + { + case SEQUENCE: + case SELECTION: + case ITERATION: + perform_op_stack_.push (false); + break; + default: + break; + } + + node_stack_.push (_right); + node_stack_.push (_left); + return true; + } + +private: + // Not owner of these pointers... + node *_left; + node *_right; + + virtual void copy_node (node_ptr_vector &node_ptr_vector_, + node_stack &new_node_stack_, bool_stack &perform_op_stack_, + bool &down_) const + { + if (perform_op_stack_.top ()) + { + node *rhs_ = new_node_stack_.top (); + + new_node_stack_.pop (); + + node *lhs_ = new_node_stack_.top (); + + node_ptr_vector_->push_back (static_cast<sequence_node *>(0)); + node_ptr_vector_->back () = new sequence_node (lhs_, rhs_); + new_node_stack_.top () = node_ptr_vector_->back (); + } + else + { + down_ = true; + } + + perform_op_stack_.pop (); + } +}; +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/partition/charset.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/partition/charset.hpp new file mode 100644 index 0000000..c74dd36 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/partition/charset.hpp @@ -0,0 +1,81 @@ +// charset.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_CHARSET_HPP +#define BOOST_LEXER_CHARSET_HPP + +#include <set> +#include "../size_t.hpp" +#include "../string_token.hpp" + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +template<typename CharT> +struct basic_charset +{ + typedef basic_string_token<CharT> token; + typedef std::set<std::size_t> index_set; + + token _token; + index_set _index_set; + + basic_charset () + { + } + + basic_charset (const token &token_, const std::size_t index_) : + _token (token_) + { + _index_set.insert (index_); + } + + bool empty () const + { + return _token.empty () && _index_set.empty (); + } + + void intersect (basic_charset &rhs_, basic_charset &overlap_) + { + _token.intersect (rhs_._token, overlap_._token); + + if (!overlap_._token.empty ()) + { + typename index_set::const_iterator iter_ = _index_set.begin (); + typename index_set::const_iterator end_ = _index_set.end (); + + for (; iter_ != end_; ++iter_) + { + overlap_._index_set.insert (*iter_); + } + + iter_ = rhs_._index_set.begin (); + end_ = rhs_._index_set.end (); + + for (; iter_ != end_; ++iter_) + { + overlap_._index_set.insert (*iter_); + } + + if (_token.empty ()) + { + _index_set.clear (); + } + + if (rhs_._token.empty ()) + { + rhs_._index_set.clear (); + } + } + } +}; +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/partition/equivset.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/partition/equivset.hpp new file mode 100644 index 0000000..b39fb15 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/partition/equivset.hpp @@ -0,0 +1,140 @@ +// equivset.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_EQUIVSET_HPP +#define BOOST_LEXER_EQUIVSET_HPP + +#include <algorithm> +#include "../parser/tree/node.hpp" +#include <set> +#include "../size_t.hpp" + +namespace boost +{ +namespace lexer +{ +namespace detail +{ +struct equivset +{ + typedef std::set<std::size_t> index_set; + typedef std::vector<std::size_t> index_vector; + // Not owner of nodes: + typedef std::vector<node *> node_vector; + + index_vector _index_vector; + bool _greedy; + std::size_t _id; + node_vector _followpos; + + equivset () : + _greedy (true), + _id (0) + { + } + + equivset (const index_set &index_set_, const bool greedy_, + const std::size_t id_, const node_vector &followpos_) : + _greedy (greedy_), + _id (id_), + _followpos (followpos_) + { + index_set::const_iterator iter_ = index_set_.begin (); + index_set::const_iterator end_ = index_set_.end (); + + for (; iter_ != end_; ++iter_) + { + _index_vector.push_back (*iter_); + } + } + + bool empty () const + { + return _index_vector.empty () && _followpos.empty (); + } + + void intersect (equivset &rhs_, equivset &overlap_) + { + intersect_indexes (rhs_._index_vector, overlap_._index_vector); + + if (!overlap_._index_vector.empty ()) + { + // Note that the LHS takes priority in order to + // respect rule ordering priority in the lex spec. + overlap_._id = _id; + overlap_._greedy = _greedy; + overlap_._followpos = _followpos; + + node_vector::const_iterator overlap_begin_ = + overlap_._followpos.begin (); + node_vector::const_iterator overlap_end_ = + overlap_._followpos.end (); + node_vector::const_iterator rhs_iter_ = + rhs_._followpos.begin (); + node_vector::const_iterator rhs_end_ = + rhs_._followpos.end (); + + for (; rhs_iter_ != rhs_end_; ++rhs_iter_) + { + node *node_ = *rhs_iter_; + + if (std::find (overlap_begin_, overlap_end_, node_) == + overlap_end_) + { + overlap_._followpos.push_back (node_); + overlap_begin_ = overlap_._followpos.begin (); + overlap_end_ = overlap_._followpos.end (); + } + } + + if (_index_vector.empty ()) + { + _followpos.clear (); + } + + if (rhs_._index_vector.empty ()) + { + rhs_._followpos.clear (); + } + } + } + +private: + void intersect_indexes (index_vector &rhs_, index_vector &overlap_) + { + index_vector::iterator iter_ = _index_vector.begin (); + index_vector::iterator end_ = _index_vector.end (); + index_vector::iterator rhs_iter_ = rhs_.begin (); + index_vector::iterator rhs_end_ = rhs_.end (); + + while (iter_ != end_ && rhs_iter_ != rhs_end_) + { + const std::size_t index_ = *iter_; + const std::size_t rhs_index_ = *rhs_iter_; + + if (index_ < rhs_index_) + { + ++iter_; + } + else if (index_ > rhs_index_) + { + ++rhs_iter_; + } + else + { + overlap_.push_back (index_); + iter_ = _index_vector.erase (iter_); + end_ = _index_vector.end (); + rhs_iter_ = rhs_.erase (rhs_iter_); + rhs_end_ = rhs_.end (); + } + } + } +}; +} +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/rules.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/rules.hpp new file mode 100644 index 0000000..83cc9a4 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/rules.hpp @@ -0,0 +1,806 @@ +// rules.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_RULES_HPP +#define BOOST_LEXER_RULES_HPP + +#include "consts.hpp" +#include <deque> +#include <locale> +#include <map> +#include "runtime_error.hpp" +#include <set> +#include "size_t.hpp" +#include <sstream> +#include <string> +#include <vector> + +namespace boost +{ +namespace lexer +{ +namespace detail +{ + // return name of initial state + template <typename CharT> + struct strings; + + template <> + struct strings<char> + { + static const char *initial () + { + return "INITIAL"; + } + + static const char *dot () + { + return "."; + } + + static const char *all_states () + { + return "*"; + } + + static const char *char_name () + { + return "char"; + } + + static const char *char_prefix () + { + return ""; + } + }; + + template <> + struct strings<wchar_t> + { + static const wchar_t *initial () + { + return L"INITIAL"; + } + + static const wchar_t *dot () + { + return L"."; + } + + static const wchar_t *all_states () + { + return L"*"; + } + + static const char *char_name () + { + return "wchar_t"; + } + + static const char *char_prefix () + { + return "L"; + } + }; +} + +template<typename CharT> +class basic_rules +{ +public: + typedef std::vector<std::size_t> id_vector; + typedef std::deque<id_vector> id_vector_deque; + typedef std::basic_string<CharT> string; + typedef std::deque<string> string_deque; + typedef std::deque<string_deque> string_deque_deque; + typedef std::set<string> string_set; + typedef std::pair<string, string> string_pair; + typedef std::deque<string_pair> string_pair_deque; + typedef std::map<string, std::size_t> string_size_t_map; + typedef std::pair<string, std::size_t> string_size_t_pair; + + basic_rules (const regex_flags flags_ = dot_not_newline, + std::size_t (*counter_ptr_) () = 0) : + _flags (flags_), + _counter (0), + _counter_ptr (counter_ptr_) + { + add_state (initial ()); + } + + void clear () + { + _statemap.clear (); + _macrodeque.clear (); + _macroset.clear (); + _regexes.clear (); + _ids.clear (); + _unique_ids.clear (); + _states.clear (); + _flags = dot_not_newline; + _locale = std::locale (); + add_state (initial ()); + } + + void clear (const CharT *state_name_) + { + std::size_t state_ = state (state_name_); + + if (state_ != npos) + { + _regexes[state_].clear (); + _ids[state_].clear (); + _unique_ids[state_].clear (); + _states[state_].clear (); + } + } + + void flags (const regex_flags flags_) + { + _flags = flags_; + } + + regex_flags flags () const + { + return _flags; + } + + std::size_t next_unique_id () + { + return _counter_ptr ? _counter_ptr () : _counter++; + } + + std::locale imbue (std::locale &locale_) + { + std::locale loc_ = _locale; + + _locale = locale_; + return loc_; + } + + const std::locale &locale () const + { + return _locale; + } + + std::size_t state (const CharT *name_) const + { + std::size_t state_ = npos; + typename string_size_t_map::const_iterator iter_ = + _statemap.find (name_); + + if (iter_ != _statemap.end ()) + { + state_ = iter_->second; + } + + return state_; + } + + const CharT *state (const std::size_t index_) const + { + if (index_ == 0) + { + return initial (); + } + else + { + const std::size_t vec_index_ = index_ - 1; + + if (vec_index_ > _lexer_state_names.size () - 1) + { + return 0; + } + else + { + return _lexer_state_names[vec_index_].c_str (); + } + } + } + + std::size_t add_state (const CharT *name_) + { + validate (name_); + + if (_statemap.insert (string_size_t_pair (name_, + _statemap.size ())).second) + { + _regexes.push_back (string_deque ()); + _ids.push_back (id_vector ()); + _unique_ids.push_back (id_vector ()); + _states.push_back (id_vector ()); + + if (string (name_) != initial ()) + { + _lexer_state_names.push_back (name_); + } + } + + // Initial is not stored, so no need to - 1. + return _lexer_state_names.size (); + } + + void add_macro (const CharT *name_, const CharT *regex_) + { + add_macro (name_, string (regex_)); + } + + void add_macro (const CharT *name_, const CharT *regex_start_, + const CharT *regex_end_) + { + add_macro (name_, string (regex_start_, regex_end_)); + } + + void add_macro (const CharT *name_, const string ®ex_) + { + validate (name_); + + typename string_set::const_iterator iter_ = _macroset.find (name_); + + if (iter_ == _macroset.end ()) + { + _macrodeque.push_back (string_pair (name_, regex_)); + _macroset.insert (name_); + } + else + { + std::basic_stringstream<CharT> ss_; + std::ostringstream os_; + + os_ << "Attempt to redefine MACRO '"; + + while (*name_) + { + os_ << ss_.narrow (*name_++, static_cast<CharT> (' ')); + } + + os_ << "'."; + throw runtime_error (os_.str ()); + } + } + + void add_macros (const basic_rules<CharT> &rules_) + { + const string_pair_deque ¯os_ = rules_.macrodeque (); + typename string_pair_deque::const_iterator macro_iter_ = + macros_.begin (); + typename string_pair_deque::const_iterator macro_end_ = + macros_.end (); + + for (; macro_iter_ != macro_end_; ++macro_iter_) + { + add_macro (macro_iter_->first.c_str (), + macro_iter_->second.c_str ()); + } + } + + void merge_macros (const basic_rules<CharT> &rules_) + { + const string_pair_deque ¯os_ = rules_.macrodeque (); + typename string_pair_deque::const_iterator macro_iter_ = + macros_.begin (); + typename string_pair_deque::const_iterator macro_end_ = + macros_.end (); + typename string_set::const_iterator macro_dest_iter_; + typename string_set::const_iterator macro_dest_end_ = _macroset.end (); + + for (; macro_iter_ != macro_end_; ++macro_iter_) + { + macro_dest_iter_ = _macroset.find (macro_iter_->first); + + if (macro_dest_iter_ == macro_dest_end_) + { + add_macro (macro_iter_->first.c_str (), + macro_iter_->second.c_str ()); + } + } + } + + std::size_t add (const CharT *regex_, const std::size_t id_) + { + return add (string (regex_), id_); + } + + std::size_t add (const CharT *regex_start_, const CharT *regex_end_, + const std::size_t id_) + { + return add (string (regex_start_, regex_end_), id_); + } + + std::size_t add (const string ®ex_, const std::size_t id_) + { + const std::size_t counter_ = next_unique_id (); + + check_for_invalid_id (id_); + _regexes.front ().push_back (regex_); + _ids.front ().push_back (id_); + _unique_ids.front ().push_back (counter_); + _states.front ().push_back (0); + return counter_; + } + + std::size_t add (const CharT *curr_state_, const CharT *regex_, + const CharT *new_state_) + { + return add (curr_state_, string (regex_), new_state_); + } + + std::size_t add (const CharT *curr_state_, const CharT *regex_start_, + const CharT *regex_end_, const CharT *new_state_) + { + return add (curr_state_, string (regex_start_, regex_end_), + new_state_); + } + + std::size_t add (const CharT *curr_state_, const string ®ex_, + const CharT *new_state_) + { + return add (curr_state_, regex_, 0, new_state_, false); + } + + std::size_t add (const CharT *curr_state_, const CharT *regex_, + const std::size_t id_, const CharT *new_state_) + { + return add (curr_state_, string (regex_), id_, new_state_); + } + + std::size_t add (const CharT *curr_state_, const CharT *regex_start_, + const CharT *regex_end_, const std::size_t id_, + const CharT *new_state_) + { + return add (curr_state_, string (regex_start_, regex_end_), id_, + new_state_); + } + + std::size_t add (const CharT *curr_state_, const string ®ex_, + const std::size_t id_, const CharT *new_state_) + { + return add (curr_state_, regex_, id_, new_state_, true); + } + + void add (const CharT *source_, const basic_rules<CharT> &rules_, + const CharT *dest_, const CharT *to_ = detail::strings<CharT>::dot ()) + { + const bool star_ = *source_ == '*' && *(source_ + 1) == 0; + const bool dest_dot_ = *dest_ == '.' && *(dest_ + 1) == 0; + const bool to_dot_ = *to_ == '.' && *(to_ + 1) == 0; + std::size_t state_ = 0; + const string_deque_deque &all_regexes_ = rules_.regexes (); + const id_vector_deque &all_ids_ = rules_.ids (); + const id_vector_deque &all_unique_ids_ = rules_.unique_ids (); + const id_vector_deque &all_states_ = rules_.states (); + typename string_deque::const_iterator regex_iter_; + typename string_deque::const_iterator regex_end_; + typename id_vector::const_iterator id_iter_; + typename id_vector::const_iterator uid_iter_; + typename id_vector::const_iterator state_iter_; + + if (star_) + { + typename string_deque_deque::const_iterator all_regexes_iter_ = + all_regexes_.begin (); + typename string_deque_deque::const_iterator all_regexes_end_ = + all_regexes_.end (); + typename id_vector_deque::const_iterator all_ids_iter_ = + all_ids_.begin (); + typename id_vector_deque::const_iterator all_uids_iter_ = + all_unique_ids_.begin (); + typename id_vector_deque::const_iterator all_states_iter_ = + all_states_.begin (); + + for (; all_regexes_iter_ != all_regexes_end_; + ++state_, ++all_regexes_iter_, ++all_ids_iter_, + ++all_uids_iter_, ++all_states_iter_) + { + regex_iter_ = all_regexes_iter_->begin (); + regex_end_ = all_regexes_iter_->end (); + id_iter_ = all_ids_iter_->begin (); + uid_iter_ = all_uids_iter_->begin (); + state_iter_ = all_states_iter_->begin (); + + for (; regex_iter_ != regex_end_; ++regex_iter_, ++id_iter_, + ++uid_iter_, ++state_iter_) + { + // If ..._dot_ then lookup state name from rules_; otherwise + // pass name through. + add (dest_dot_ ? rules_.state (state_) : dest_, *regex_iter_, + *id_iter_, to_dot_ ? rules_.state (*state_iter_) : to_, true, + *uid_iter_); + } + } + } + else + { + const CharT *start_ = source_; + string state_name_; + + while (*source_) + { + while (*source_ && *source_ != ',') + { + ++source_; + } + + state_name_.assign (start_, source_); + + if (*source_) + { + ++source_; + start_ = source_; + } + + state_ = rules_.state (state_name_.c_str ()); + + if (state_ == npos) + { + std::basic_stringstream<CharT> ss_; + std::ostringstream os_; + + os_ << "Unknown state name '"; + source_ = state_name_.c_str (); + + while (*source_) + { + os_ << ss_.narrow (*source_++, ' '); + } + + os_ << "'."; + throw runtime_error (os_.str ()); + } + + regex_iter_ = all_regexes_[state_].begin (); + regex_end_ = all_regexes_[state_].end (); + id_iter_ = all_ids_[state_].begin (); + uid_iter_ = all_unique_ids_[state_].begin (); + state_iter_ = all_states_[state_].begin (); + + for (; regex_iter_ != regex_end_; ++regex_iter_, ++id_iter_, + ++uid_iter_, ++state_iter_) + { + // If ..._dot_ then lookup state name from rules_; otherwise + // pass name through. + add (dest_dot_ ? state_name_.c_str () : dest_, *regex_iter_, + *id_iter_, to_dot_ ? rules_.state (*state_iter_) : to_, true, + *uid_iter_); + } + } + } + } +/* + void add (const CharT *curr_state_, const basic_rules<CharT> &rules_) + { + const string_deque_deque ®exes_ = rules_.regexes (); + const id_vector_deque &ids_ = rules_.ids (); + const id_vector_deque &unique_ids_ = rules_.unique_ids (); + typename string_deque_deque::const_iterator state_regex_iter_ = + regexes_.begin (); + typename string_deque_deque::const_iterator state_regex_end_ = + regexes_.end (); + typename id_vector_deque::const_iterator state_id_iter_ = + ids_.begin (); + typename id_vector_deque::const_iterator state_uid_iter_ = + unique_ids_.begin (); + typename string_deque::const_iterator regex_iter_; + typename string_deque::const_iterator regex_end_; + typename id_vector::const_iterator id_iter_; + typename id_vector::const_iterator uid_iter_; + + for (; state_regex_iter_ != state_regex_end_; ++state_regex_iter_) + { + regex_iter_ = state_regex_iter_->begin (); + regex_end_ = state_regex_iter_->end (); + id_iter_ = state_id_iter_->begin (); + uid_iter_ = state_uid_iter_->begin (); + + for (; regex_iter_ != regex_end_; ++regex_iter_, ++id_iter_, + ++uid_iter_) + { + add (curr_state_, *regex_iter_, *id_iter_, curr_state_, true, + *uid_iter_); + } + } + } +*/ + const string_size_t_map &statemap () const + { + return _statemap; + } + + const string_pair_deque ¯odeque () const + { + return _macrodeque; + } + + const string_deque_deque ®exes () const + { + return _regexes; + } + + const id_vector_deque &ids () const + { + return _ids; + } + + const id_vector_deque &unique_ids () const + { + return _unique_ids; + } + + const id_vector_deque &states () const + { + return _states; + } + + bool empty () const + { + typename string_deque_deque::const_iterator iter_ = _regexes.begin (); + typename string_deque_deque::const_iterator end_ = _regexes.end (); + bool empty_ = true; + + for (; iter_ != end_; ++iter_) + { + if (!iter_->empty ()) + { + empty_ = false; + break; + } + } + + return empty_; + } + + static const CharT *initial () + { + return detail::strings<CharT>::initial (); + } + + static const CharT *all_states () + { + return detail::strings<CharT>::all_states (); + } + + static const CharT *dot () + { + return detail::strings<CharT>::dot (); + } + +private: + string_size_t_map _statemap; + string_pair_deque _macrodeque; + string_set _macroset; + string_deque_deque _regexes; + id_vector_deque _ids; + id_vector_deque _unique_ids; + id_vector_deque _states; + regex_flags _flags; + std::size_t _counter; + std::size_t (*_counter_ptr) (); + std::locale _locale; + string_deque _lexer_state_names; + + std::size_t add (const CharT *curr_state_, const string ®ex_, + const std::size_t id_, const CharT *new_state_, const bool check_, + const std::size_t uid_ = npos) + { + const bool star_ = *curr_state_ == '*' && *(curr_state_ + 1) == 0; + const bool dot_ = *new_state_ == '.' && *(new_state_ + 1) == 0; + + if (check_) + { + check_for_invalid_id (id_); + } + + if (!dot_) + { + validate (new_state_); + } + + std::size_t new_ = string::npos; + typename string_size_t_map::const_iterator iter_; + typename string_size_t_map::const_iterator end_ = _statemap.end (); + id_vector states_; + + if (!dot_) + { + iter_ = _statemap.find (new_state_); + + if (iter_ == end_) + { + std::basic_stringstream<CharT> ss_; + std::ostringstream os_; + + os_ << "Unknown state name '"; + + while (*new_state_) + { + os_ << ss_.narrow (*new_state_++, ' '); + } + + os_ << "'."; + throw runtime_error (os_.str ()); + } + + new_ = iter_->second; + } + + if (star_) + { + const std::size_t size_ = _statemap.size (); + + for (std::size_t i_ = 0; i_ < size_; ++i_) + { + states_.push_back (i_); + } + } + else + { + const CharT *start_ = curr_state_; + string state_; + + while (*curr_state_) + { + while (*curr_state_ && *curr_state_ != ',') + { + ++curr_state_; + } + + state_.assign (start_, curr_state_); + + if (*curr_state_) + { + ++curr_state_; + start_ = curr_state_; + } + + validate (state_.c_str ()); + iter_ = _statemap.find (state_.c_str ()); + + if (iter_ == end_) + { + std::basic_stringstream<CharT> ss_; + std::ostringstream os_; + + os_ << "Unknown state name '"; + curr_state_ = state_.c_str (); + + while (*curr_state_) + { + os_ << ss_.narrow (*curr_state_++, ' '); + } + + os_ << "'."; + throw runtime_error (os_.str ()); + } + + states_.push_back (iter_->second); + } + } + + std::size_t first_counter_ = npos; + + for (std::size_t i_ = 0, size_ = states_.size (); i_ < size_; ++i_) + { + const std::size_t curr_ = states_[i_]; + + _regexes[curr_].push_back (regex_); + _ids[curr_].push_back (id_); + + if (uid_ == npos) + { + const std::size_t counter_ = next_unique_id (); + + if (first_counter_ == npos) + { + first_counter_ = counter_; + } + + _unique_ids[curr_].push_back (counter_); + } + else + { + if (first_counter_ == npos) + { + first_counter_ = uid_; + } + + _unique_ids[curr_].push_back (uid_); + } + + _states[curr_].push_back (dot_ ? curr_ : new_); + } + + return first_counter_; + } + + void validate (const CharT *name_) const + { + const CharT *start_ = name_; + + if (*name_ != '_' && !(*name_ >= 'A' && *name_ <= 'Z') && + !(*name_ >= 'a' && *name_ <= 'z')) + { + std::basic_stringstream<CharT> ss_; + std::ostringstream os_; + + os_ << "Invalid name '"; + + while (*name_) + { + os_ << ss_.narrow (*name_++, ' '); + } + + os_ << "'."; + throw runtime_error (os_.str ()); + } + else if (*name_) + { + ++name_; + } + + while (*name_) + { + if (*name_ != '_' && *name_ != '-' && + !(*name_ >= 'A' && *name_ <= 'Z') && + !(*name_ >= 'a' && *name_ <= 'z') && + !(*name_ >= '0' && *name_ <= '9')) + { + std::basic_stringstream<CharT> ss_; + std::ostringstream os_; + + os_ << "Invalid name '"; + name_ = start_; + + while (*name_) + { + os_ << ss_.narrow (*name_++, ' '); + } + + os_ << "'."; + throw runtime_error (os_.str ()); + } + + ++name_; + } + + if (name_ - start_ > static_cast<std::ptrdiff_t>(max_macro_len)) + { + std::basic_stringstream<CharT> ss_; + std::ostringstream os_; + + os_ << "Name '"; + name_ = start_; + + while (*name_) + { + os_ << ss_.narrow (*name_++, ' '); + } + + os_ << "' too long."; + throw runtime_error (os_.str ()); + } + } + + void check_for_invalid_id (const std::size_t id_) const + { + switch (id_) + { + case 0: + throw runtime_error ("id 0 is reserved for EOF."); + case npos: + throw runtime_error ("id npos is reserved for the " + "UNKNOWN token."); + default: + // OK + break; + } + } +}; + +typedef basic_rules<char> rules; +typedef basic_rules<wchar_t> wrules; +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/runtime_error.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/runtime_error.hpp new file mode 100644 index 0000000..2ab716a --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/runtime_error.hpp @@ -0,0 +1,26 @@ +// runtime_error.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_RUNTIME_ERROR_HPP +#define BOOST_LEXER_RUNTIME_ERROR_HPP + +#include <stdexcept> + +namespace boost +{ +namespace lexer +{ +class runtime_error : public std::runtime_error +{ +public: + runtime_error (const std::string &what_arg_) : + std::runtime_error (what_arg_) + { + } +}; +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/size_t.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/size_t.hpp new file mode 100644 index 0000000..349aa6d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/size_t.hpp @@ -0,0 +1,21 @@ +// size_t.h +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_SIZE_T_H +#define BOOST_LEXER_SIZE_T_H + +#include <stddef.h> // ptrdiff_t + +#if defined _MSC_VER && _MSC_VER <= 1200 +namespace std +{ + using ::ptrdiff_t; + using ::size_t; +} +#else +#include <string> +#endif + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/state_machine.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/state_machine.hpp new file mode 100644 index 0000000..e09e991 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/state_machine.hpp @@ -0,0 +1,439 @@ +// state_machine.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_STATE_MACHINE_HPP +#define BOOST_LEXER_STATE_MACHINE_HPP + +#include <algorithm> +#include "conversion/char_state_machine.hpp" +#include "consts.hpp" +#include <deque> +#include "internals.hpp" +#include <map> +#include "containers/ptr_vector.hpp" +#include "size_t.hpp" +#include <string> + +namespace boost +{ +namespace lexer +{ +template<typename CharT> +class basic_state_machine +{ +public: + typedef CharT char_type; + + class iterator + { + public: +#if defined _MSC_VER && _MSC_VER <= 1200 + friend basic_state_machine; +#else + friend class basic_state_machine; +#endif + + struct data + { + // Current iterator info + std::size_t dfa; + std::size_t states; + std::size_t state; + std::size_t transitions; + std::size_t transition; + + // Current state info + bool end_state; + std::size_t id; + std::size_t unique_id; + std::size_t goto_dfa; + std::size_t bol_index; + std::size_t eol_index; + + // Current transition info + basic_string_token<CharT> token; + std::size_t goto_state; + + data () : + dfa (npos), + states (0), + state (npos), + transitions (0), + transition (npos), + end_state (false), + id (npos), + unique_id (npos), + goto_dfa (npos), + bol_index (npos), + eol_index (npos), + goto_state (npos) + { + } + + bool operator == (const data &rhs_) const + { + return dfa == rhs_.dfa && + states == rhs_.states && + state == rhs_.state && + transitions == rhs_.transitions && + transition == rhs_.transition && + end_state == rhs_.end_state && + id == rhs_.id && + unique_id == rhs_.unique_id && + goto_dfa == rhs_.goto_dfa && + bol_index == rhs_.bol_index && + eol_index == rhs_.eol_index && + token == rhs_.token && + transition == rhs_.transition; + } + }; + + iterator () : + _sm (0), + _dfas (0), + _dfa (npos), + _states (0), + _state (npos), + _transitions (0), + _transition (npos) + { + } + + bool operator == (const iterator &rhs_) const + { + return _dfas == rhs_._dfas && _dfa == rhs_._dfa && + _states == rhs_._states && _state == rhs_._state && + _transitions == rhs_._transitions && + _transition == rhs_._transition; + } + + bool operator != (const iterator &rhs_) const + { + return !(*this == rhs_); + } + + data &operator * () + { + return _data; + } + + data *operator -> () + { + return &_data; + } + + // Let compiler generate operator = (). + + // prefix version + iterator &operator ++ () + { + next (); + return *this; + } + + // postfix version + iterator operator ++ (int) + { + iterator iter_ = *this; + + next (); + return iter_; + } + + void clear () + { + _dfas = _states = _transitions = 0; + _dfa = _state = _transition = npos; + } + + private: + basic_state_machine *_sm; + data _data; + std::size_t _dfas; + std::size_t _dfa; + std::size_t _states; + std::size_t _state; + std::size_t _transitions; + std::size_t _transition; + typename detail::basic_char_state_machine<CharT>::state:: + size_t_string_token_map::const_iterator _token_iter; + typename detail::basic_char_state_machine<CharT>::state:: + size_t_string_token_map::const_iterator _token_end; + + void next () + { + bool reset_state_ = false; + + if (_transition >= _transitions) + { + _transition = _data.transition = 0; + _data.state = ++_state; + reset_state_ = true; + + if (_state >= _states) + { + ++_dfa; + + if (_dfa >= _dfas) + { + clear (); + reset_state_ = false; + } + else + { + _states = _data.states = + _sm->_csm._sm_vector[_dfa].size (); + _state = _data.state = 0; + } + } + } + else + { + _data.transition = _transition; + } + + if (reset_state_) + { + const typename detail::basic_char_state_machine<CharT>:: + state *ptr_ = &_sm->_csm._sm_vector[_dfa][_state]; + + _transitions = _data.transitions = ptr_->_transitions.size (); + _data.end_state = ptr_->_end_state; + _data.id = ptr_->_id; + _data.unique_id = ptr_->_unique_id; + _data.goto_dfa = ptr_->_state; + _data.bol_index = ptr_->_bol_index; + _data.eol_index = ptr_->_eol_index; + _token_iter = ptr_->_transitions.begin (); + _token_end = ptr_->_transitions.end (); + } + + if (_token_iter != _token_end) + { + _data.token = _token_iter->second; + _data.goto_state = _token_iter->first; + ++_token_iter; + ++_transition; + } + else + { + _data.token.clear (); + _data.goto_state = npos; + } + } + }; + +#if defined _MSC_VER && _MSC_VER <= 1200 + friend iterator; +#else + friend class iterator; +#endif + + basic_state_machine () + { + } + + void clear () + { + _internals.clear (); + _csm.clear (); + } + + bool empty () const + { + // Don't include _csm in this test, as irrelevant to state. + return _internals._lookup->empty () && + _internals._dfa_alphabet.empty () && + _internals._dfa->empty (); + } + + std::size_t size () const + { + return _internals._dfa->size (); + } + + bool operator == (const basic_state_machine &rhs_) const + { + // Don't include _csm in this test, as irrelevant to state. + return _internals._lookup == rhs_._internals._lookup && + _internals._dfa_alphabet == rhs_._internals._dfa_alphabet && + _internals._dfa == rhs_._internals._dfa && + _internals._seen_BOL_assertion == + rhs_._internals._seen_BOL_assertion && + _internals._seen_EOL_assertion == + rhs_._internals._seen_EOL_assertion; + } + + iterator begin () const + { + iterator iter_; + + iter_._sm = const_cast<basic_state_machine *>(this); + check_for_csm (); + + if (!_csm.empty ()) + { + const typename detail::basic_char_state_machine<CharT>:: + state_vector *ptr_ = &_csm._sm_vector.front (); + + iter_._dfas = _csm._sm_vector.size (); + iter_._states = iter_._data.states = ptr_->size (); + iter_._transitions = iter_._data.transitions = + ptr_->front ()._transitions.size (); + iter_._dfa = iter_._data.dfa = 0; + iter_._state = iter_._data.state = 0; + iter_._transition = 0; + iter_._data.end_state = ptr_->front ()._end_state; + iter_._data.id = ptr_->front ()._id; + iter_._data.unique_id = ptr_->front ()._unique_id; + iter_._data.goto_dfa = ptr_->front ()._state; + iter_._data.bol_index = ptr_->front ()._bol_index; + iter_._data.eol_index = ptr_->front ()._eol_index; + iter_._token_iter = ptr_->front ()._transitions.begin (); + iter_._token_end = ptr_->front ()._transitions.end (); + + // Deal with case where there is only a bol or eol + // but no other transitions. + if (iter_._transitions) + { + ++iter_; + } + } + + return iter_; + } + + iterator end () const + { + iterator iter_; + + iter_._sm = const_cast<basic_state_machine *>(this); + return iter_; + } + + void swap (basic_state_machine &sm_) + { + _internals.swap (sm_._internals); + _csm.swap (sm_._csm); + } + + const detail::internals &data () const + { + return _internals; + } + +private: + detail::internals _internals; + mutable detail::basic_char_state_machine<CharT> _csm; + + void check_for_csm () const + { + if (_csm.empty ()) + { + human_readable (_csm); + } + } + + void human_readable (detail::basic_char_state_machine<CharT> &sm_) const + { + const std::size_t max_ = sizeof (CharT) == 1 ? + num_chars : num_wchar_ts; + const std::size_t start_states_ = _internals._dfa->size (); + + sm_.clear (); + sm_._sm_vector.resize (start_states_); + + for (std::size_t start_state_index_ = 0; + start_state_index_ < start_states_; ++start_state_index_) + { + const detail::internals::size_t_vector *lu_ = + _internals._lookup[start_state_index_]; + const std::size_t alphabet_ = + _internals._dfa_alphabet[start_state_index_] - dfa_offset; + std::vector<std::basic_string<CharT> > chars_ (alphabet_); + const std::size_t states_ = _internals._dfa[start_state_index_]-> + size () / (alphabet_ + dfa_offset); + const std::size_t *read_ptr_ = &_internals. + _dfa[start_state_index_]->front () + alphabet_ + dfa_offset; + + sm_._sm_vector[start_state_index_].resize (states_ - 1); + + for (std::size_t alpha_index_ = 0; alpha_index_ < max_; + ++alpha_index_) + { + const std::size_t col_ = lu_->at (alpha_index_); + + if (col_ != dead_state_index) + { + chars_[col_ - dfa_offset] += static_cast<CharT> + (alpha_index_); + } + } + + for (std::size_t state_index_ = 1; state_index_ < states_; + ++state_index_) + { + typename detail::basic_char_state_machine<CharT>::state + *state_ = &sm_._sm_vector[start_state_index_] + [state_index_ - 1]; + + state_->_end_state = *read_ptr_ != 0; + state_->_id = *(read_ptr_ + id_index); + state_->_unique_id = *(read_ptr_ + unique_id_index); + state_->_state = *(read_ptr_ + state_index); + state_->_bol_index = *(read_ptr_ + bol_index) - 1; + state_->_eol_index = *(read_ptr_ + eol_index) - 1; + read_ptr_ += dfa_offset; + + for (std::size_t col_index_ = 0; col_index_ < alphabet_; + ++col_index_, ++read_ptr_) + { + const std::size_t transition_ = *read_ptr_; + + if (transition_ != 0) + { + const std::size_t i_ = transition_ - 1; + typename detail::basic_char_state_machine<CharT>:: + state::size_t_string_token_map::iterator iter_ = + state_->_transitions.find (i_); + + if (iter_ == state_->_transitions.end ()) + { + basic_string_token<CharT> token_ + (false, chars_[col_index_]); + typename detail::basic_char_state_machine<CharT>:: + state::size_t_string_token_pair pair_ + (i_, token_); + + state_->_transitions.insert (pair_); + } + else + { + iter_->second._charset += chars_[col_index_]; + } + } + } + + for (typename detail::basic_char_state_machine<CharT>::state:: + size_t_string_token_map::iterator iter_ = + state_->_transitions.begin (), + end_ = state_->_transitions.end (); + iter_ != end_; ++iter_) + { + std::sort (iter_->second._charset.begin (), + iter_->second._charset.end ()); + iter_->second.normalise (); + } + } + } + } +}; + +typedef basic_state_machine<char> state_machine; +typedef basic_state_machine<wchar_t> wstate_machine; +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/string_token.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/string_token.hpp new file mode 100644 index 0000000..6bfa6ff --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/string_token.hpp @@ -0,0 +1,413 @@ +// string_token.hpp +// Copyright (c) 2007-2009 Ben Hanson (http://www.benhanson.net/) +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file licence_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_LEXER_STRING_TOKEN_HPP +#define BOOST_LEXER_STRING_TOKEN_HPP + +#include <algorithm> +#include "size_t.hpp" +#include "consts.hpp" // num_chars, num_wchar_ts +#include <string> + +namespace boost +{ +namespace lexer +{ +template<typename CharT> +struct basic_string_token +{ + typedef std::basic_string<CharT> string; + + bool _negated; + string _charset; + + basic_string_token () : + _negated (false) + { + } + + basic_string_token (const bool negated_, const string &charset_) : + _negated (negated_), + _charset (charset_) + { + } + + void remove_duplicates () + { + const CharT *start_ = _charset.c_str (); + const CharT *end_ = start_ + _charset.size (); + + // Optimisation for very large charsets: + // sorting via pointers is much quicker than + // via iterators... + std::sort (const_cast<CharT *> (start_), const_cast<CharT *> (end_)); + _charset.erase (std::unique (_charset.begin (), _charset.end ()), + _charset.end ()); + } + + void normalise () + { + const std::size_t max_chars_ = sizeof (CharT) == 1 ? + num_chars : num_wchar_ts; + + if (_charset.length () == max_chars_) + { + _negated = !_negated; +#if defined _MSC_VER && _MSC_VER <= 1200 + _charset.erase (); +#else + _charset.clear (); +#endif + } + else if (_charset.length () > max_chars_ / 2) + { + negate (); + } + } + + void negate () + { + const std::size_t max_chars_ = sizeof (CharT) == 1 ? + num_chars : num_wchar_ts; + CharT curr_char_ = sizeof (CharT) == 1 ? -128 : 0; + string temp_; + const CharT *curr_ = _charset.c_str (); + const CharT *chars_end_ = curr_ + _charset.size (); + + _negated = !_negated; + temp_.resize (max_chars_ - _charset.size ()); + + CharT *ptr_ = const_cast<CharT *> (temp_.c_str ()); + std::size_t i_ = 0; + + while (curr_ < chars_end_) + { + while (*curr_ > curr_char_) + { + *ptr_ = curr_char_; + ++ptr_; + ++curr_char_; + ++i_; + } + + ++curr_char_; + ++curr_; + ++i_; + } + + for (; i_ < max_chars_; ++i_) + { + *ptr_ = curr_char_; + ++ptr_; + ++curr_char_; + } + + _charset = temp_; + } + + bool operator < (const basic_string_token &rhs_) const + { + return _negated < rhs_._negated || + (_negated == rhs_._negated && _charset < rhs_._charset); + } + + bool empty () const + { + return _charset.empty () && !_negated; + } + + bool any () const + { + return _charset.empty () && _negated; + } + + void clear () + { + _negated = false; +#if defined _MSC_VER && _MSC_VER <= 1200 + _charset.erase (); +#else + _charset.clear (); +#endif + } + + void intersect (basic_string_token &rhs_, basic_string_token &overlap_) + { + if ((any () && rhs_.any ()) || (_negated == rhs_._negated && + !any () && !rhs_.any ())) + { + intersect_same_types (rhs_, overlap_); + } + else + { + intersect_diff_types (rhs_, overlap_); + } + } + + static void escape_char (const CharT ch_, string &out_) + { + switch (ch_) + { + case '\0': + out_ += '\\'; + out_ += '0'; + break; + case '\a': + out_ += '\\'; + out_ += 'a'; + break; + case '\b': + out_ += '\\'; + out_ += 'b'; + break; + case 27: + out_ += '\\'; + out_ += 'x'; + out_ += '1'; + out_ += 'b'; + break; + case '\f': + out_ += '\\'; + out_ += 'f'; + break; + case '\n': + out_ += '\\'; + out_ += 'n'; + break; + case '\r': + out_ += '\\'; + out_ += 'r'; + break; + case '\t': + out_ += '\\'; + out_ += 't'; + break; + case '\v': + out_ += '\\'; + out_ += 'v'; + break; + case '\\': + out_ += '\\'; + out_ += '\\'; + break; + case '"': + out_ += '\\'; + out_ += '"'; + break; + case '\'': + out_ += '\\'; + out_ += '\''; + break; + default: + { + if (ch_ < 32 && ch_ >= 0) + { + std::basic_stringstream<CharT> ss_; + + out_ += '\\'; + out_ += 'x'; + ss_ << std::hex << + static_cast<std::size_t> (ch_); + out_ += ss_.str (); + } + else + { + out_ += ch_; + } + + break; + } + } + } + +private: + void intersect_same_types (basic_string_token &rhs_, + basic_string_token &overlap_) + { + if (any ()) + { + clear (); + overlap_._negated = true; + rhs_.clear (); + } + else + { + typename string::iterator iter_ = _charset.begin (); + typename string::iterator end_ = _charset.end (); + typename string::iterator rhs_iter_ = rhs_._charset.begin (); + typename string::iterator rhs_end_ = rhs_._charset.end (); + + overlap_._negated = _negated; + + while (iter_ != end_ && rhs_iter_ != rhs_end_) + { + if (*iter_ < *rhs_iter_) + { + ++iter_; + } + else if (*iter_ > *rhs_iter_) + { + ++rhs_iter_; + } + else + { + overlap_._charset += *iter_; + iter_ = _charset.erase (iter_); + end_ = _charset.end (); + rhs_iter_ = rhs_._charset.erase (rhs_iter_); + rhs_end_ = rhs_._charset.end (); + } + } + + if (_negated) + { + // duplicates already merged, so safe to merge + // using std lib. + + // src, dest + merge (_charset, overlap_._charset); + // duplicates already merged, so safe to merge + // using std lib. + + // src, dest + merge (rhs_._charset, overlap_._charset); + _negated = false; + rhs_._negated = false; + std::swap (_charset, rhs_._charset); + normalise (); + overlap_.normalise (); + rhs_.normalise (); + } + else if (!overlap_._charset.empty ()) + { + normalise (); + overlap_.normalise (); + rhs_.normalise (); + } + } + } + + void intersect_diff_types (basic_string_token &rhs_, + basic_string_token &overlap_) + { + if (any ()) + { + intersect_any (rhs_, overlap_); + } + else if (_negated) + { + intersect_negated (rhs_, overlap_); + } + else // _negated == false + { + intersect_charset (rhs_, overlap_); + } + } + + void intersect_any (basic_string_token &rhs_, basic_string_token &overlap_) + { + if (rhs_._negated) + { + rhs_.intersect_negated (*this, overlap_); + } + else // rhs._negated == false + { + rhs_.intersect_charset (*this, overlap_); + } + } + + void intersect_negated (basic_string_token &rhs_, + basic_string_token &overlap_) + { + if (rhs_.any ()) + { + overlap_._negated = true; + overlap_._charset = _charset; + rhs_._negated = false; + rhs_._charset = _charset; + clear (); + } + else // rhs._negated == false + { + rhs_.intersect_charset (*this, overlap_); + } + } + + void intersect_charset (basic_string_token &rhs_, + basic_string_token &overlap_) + { + if (rhs_.any ()) + { + overlap_._charset = _charset; + rhs_._negated = true; + rhs_._charset = _charset; + clear (); + } + else // rhs_._negated == true + { + typename string::iterator iter_ = _charset.begin (); + typename string::iterator end_ = _charset.end (); + typename string::iterator rhs_iter_ = rhs_._charset.begin (); + typename string::iterator rhs_end_ = rhs_._charset.end (); + + while (iter_ != end_ && rhs_iter_ != rhs_end_) + { + if (*iter_ < *rhs_iter_) + { + overlap_._charset += *iter_; + rhs_iter_ = rhs_._charset.insert (rhs_iter_, *iter_); + ++rhs_iter_; + rhs_end_ = rhs_._charset.end (); + iter_ = _charset.erase (iter_); + end_ = _charset.end (); + } + else if (*iter_ > *rhs_iter_) + { + ++rhs_iter_; + } + else + { + ++iter_; + ++rhs_iter_; + } + } + + if (iter_ != end_) + { + // nothing bigger in rhs_ than iter_, + // so safe to merge using std lib. + string temp_ (iter_, end_); + + // src, dest + merge (temp_, overlap_._charset); + _charset.erase (iter_, end_); + } + + if (!overlap_._charset.empty ()) + { + merge (overlap_._charset, rhs_._charset); + // possible duplicates, so check for any and erase. + rhs_._charset.erase (std::unique (rhs_._charset.begin (), + rhs_._charset.end ()), rhs_._charset.end ()); + normalise (); + overlap_.normalise (); + rhs_.normalise (); + } + } + } + + void merge (string &src_, string &dest_) + { + string tmp_ (src_.size () + dest_.size (), 0); + + std::merge (src_.begin (), src_.end (), dest_.begin (), dest_.end (), + tmp_.begin ()); + dest_ = tmp_; + } +}; +} +} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/make_cons.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/make_cons.hpp new file mode 100644 index 0000000..cbbb73b --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/make_cons.hpp @@ -0,0 +1,86 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + 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) +=============================================================================*/ +#ifndef BOOST_SPIRIT_MAKE_CONS_OCTOBER_16_2008_1252PM +#define BOOST_SPIRIT_MAKE_CONS_OCTOBER_16_2008_1252PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/include/phoenix_limits.hpp> // needs to be included before proto +#include <boost/proto/proto.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/fusion/include/cons.hpp> +#include <boost/type_traits/remove_const.hpp> +#include <boost/type_traits/is_abstract.hpp> +#include <boost/type_traits/is_function.hpp> +#include <boost/type_traits/add_reference.hpp> +#include <boost/utility/enable_if.hpp> + +namespace boost { namespace spirit { namespace detail +{ + template <typename T> + struct as_meta_element + : mpl::eval_if_c<is_abstract<T>::value || is_function<T>::value + , add_reference<T>, remove_const<T> > + {}; + + template <typename T> + struct as_meta_element<T&> : as_meta_element<T> // always store by value + {}; + + template <typename T, int N> + struct as_meta_element<T[N]> + { + typedef const T(&type)[N]; + }; + + namespace result_of + { + template <typename Car, typename Cdr = fusion::nil> + struct make_cons + { + typedef typename as_meta_element<Car>::type car_type; + typedef typename fusion::cons<car_type, Cdr> type; + }; + } + + template <typename Car, typename Cdr> + fusion::cons<typename as_meta_element<Car>::type, Cdr> + make_cons(Car const& car, Cdr const& cdr) + { + typedef typename as_meta_element<Car>::type car_type; + typedef typename fusion::cons<car_type, Cdr> result; + return result(car, cdr); + } + + template <typename Car> + fusion::cons<typename as_meta_element<Car>::type> + make_cons(Car const& car) + { + typedef typename as_meta_element<Car>::type car_type; + typedef typename fusion::cons<car_type> result; + return result(car); + } + +#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 0) + // workaround for gcc-4.0 bug where illegal function types + // can be formed (const is added to function type) + // description: http://lists.boost.org/Archives/boost/2009/04/150743.php + template <typename Car> + fusion::cons<typename as_meta_element<Car>::type> + make_cons(Car& car, typename enable_if<is_function<Car> >::type* = 0) + { + typedef typename as_meta_element<Car>::type car_type; + typedef typename fusion::cons<car_type> result; + return result(car); + } +#endif +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/make_vector.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/make_vector.hpp new file mode 100644 index 0000000..92fb2c9 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/make_vector.hpp @@ -0,0 +1,114 @@ +/*============================================================================= + Copyright (c) 2001-2010 Joel de Guzman + + 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) +==============================================================================*/ +#include <boost/version.hpp> + +// This is the same as the one in fusion in Boost 1.41. This is provided +// for compatibility with Boost 1.40 and below. + +#if (BOOST_VERSION > 104000) + +#include <boost/fusion/include/make_vector.hpp> + +namespace boost { namespace spirit { namespace detail +{ + namespace result_of + { + using fusion::result_of::make_vector; + } + using fusion::make_vector; +}}} + +#else + +#ifndef BOOST_PP_IS_ITERATING +#if !defined(SPIRIT_MAKE_VECTOR_07162005_0243) +#define SPIRIT_MAKE_VECTOR_07162005_0243 + +#include <boost/preprocessor/iterate.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_binary_params.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +#include <boost/preprocessor/repetition/repeat_from_to.hpp> +#include <boost/fusion/container/vector/vector.hpp> +#include <boost/fusion/support/detail/as_fusion_element.hpp> + +namespace boost { namespace fusion +{ + struct void_; +}} + +namespace boost { namespace spirit { namespace detail +{ + namespace result_of + { + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_VECTOR_SIZE, typename T, fusion::void_) + , typename Extra = fusion::void_ + > + struct make_vector; + + template <> + struct make_vector<> + { + typedef fusion::vector0 type; + }; + } + + inline fusion::vector0 + make_vector() + { + return fusion::vector0(); + } + +#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ + typename fusion::detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type + +#define BOOST_PP_FILENAME_1 <boost/spirit/home/support/detail/make_vector.hpp> +#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) +#include BOOST_PP_ITERATE() + +#undef BOOST_FUSION_AS_FUSION_ELEMENT + +}}} + +#endif +#else // defined(BOOST_PP_IS_ITERATING) +/////////////////////////////////////////////////////////////////////////////// +// +// Preprocessor vertical repetition code +// +/////////////////////////////////////////////////////////////////////////////// + +#define N BOOST_PP_ITERATION() + + namespace result_of + { + template <BOOST_PP_ENUM_PARAMS(N, typename T)> +#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) + #define TEXT(z, n, text) , text + struct make_vector< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, fusion::void_) > + #undef TEXT +#else + struct make_vector<BOOST_PP_ENUM_PARAMS(N, T)> +#endif + { + typedef BOOST_PP_CAT(fusion::vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type; + }; + } + + template <BOOST_PP_ENUM_PARAMS(N, typename T)> + inline BOOST_PP_CAT(fusion::vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> + make_vector(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) + { + return BOOST_PP_CAT(fusion::vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>( + BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) +#endif // (BOOST_VERSION > 103800) diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/scoped_enum_emulation.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/scoped_enum_emulation.hpp new file mode 100644 index 0000000..70979a6 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/scoped_enum_emulation.hpp @@ -0,0 +1,28 @@ +// Copyright (c) 2001-2011 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) + +#ifndef BOOST_SPIRIT_SCOPED_ENUM_EMULATION_HPP +#define BOOST_SPIRIT_SCOPED_ENUM_EMULATION_HPP + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/version.hpp> +#include <boost/config.hpp> + +#if BOOST_VERSION >= 104000 +# include <boost/detail/scoped_enum_emulation.hpp> +#else +# if !defined(BOOST_NO_SCOPED_ENUMS) +# define BOOST_NO_SCOPED_ENUMS +# endif +# define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_type +# define BOOST_SCOPED_ENUM_END }; +# define BOOST_SCOPED_ENUM(name) name::enum_type +#endif + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/handles_container.hpp b/3rdParty/Boost/src/boost/spirit/home/support/handles_container.hpp new file mode 100644 index 0000000..876c9a9 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/handles_container.hpp @@ -0,0 +1,55 @@ +/*============================================================================= + Copyright (c) 2001-2011 Hartmut Kaiser + + 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_HANDLES_CONTAINER_DEC_18_2010_0920AM) +#define BOOST_SPIRIT_HANDLES_CONTAINER_DEC_18_2010_0920AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/attributes_fwd.hpp> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/or.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/find_if.hpp> +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace spirit { namespace traits +{ + // Finds out whether a component handles container attributes intrinsically + // (or whether container attributes need to be split up separately). + template <typename T, typename Attribute, typename Context + , typename Iterator, typename Enable> + struct handles_container : mpl::false_ {}; + + template <typename Subject, typename Attribute, typename Context + , typename Iterator> + struct unary_handles_container + : handles_container<Subject, Attribute, Context, Iterator> {}; + + template <typename Left, typename Right, typename Attribute + , typename Context, typename Iterator> + struct binary_handles_container + : mpl::or_< + handles_container<Left, Attribute, Context, Iterator> + , handles_container<Right, Attribute, Context, Iterator> > + {}; + + template <typename Elements, typename Attribute, typename Context + , typename Iterator> + struct nary_handles_container + : mpl::not_< + is_same< + typename mpl::find_if< + Elements, handles_container<mpl::_, Attribute + , Context, Iterator> + >::type + , typename mpl::end<Elements>::type> > + {}; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/has_semantic_action.hpp b/3rdParty/Boost/src/boost/spirit/home/support/has_semantic_action.hpp new file mode 100644 index 0000000..b4cb4e7 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/has_semantic_action.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2001-2011 Hartmut Kaiser + + 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_HAS_SEMANTIC_ACTION_SEP_20_2009_0626PM) +#define BOOST_SPIRIT_HAS_SEMANTIC_ACTION_SEP_20_2009_0626PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/mpl/bool.hpp> +#include <boost/mpl/or.hpp> +#include <boost/mpl/not.hpp> +#include <boost/mpl/find_if.hpp> +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace spirit { namespace traits +{ + // finding out, whether a component contains a semantic action + template <typename T, typename Enable = void> + struct has_semantic_action + : mpl::false_ {}; + + template <typename Subject> + struct unary_has_semantic_action + : has_semantic_action<Subject> {}; + + template <typename Left, typename Right> + struct binary_has_semantic_action + : mpl::or_<has_semantic_action<Left>, has_semantic_action<Right> > {}; + + template <typename Elements> + struct nary_has_semantic_action + : mpl::not_< + is_same< + typename mpl::find_if< + Elements, has_semantic_action<mpl::_> + >::type + , typename mpl::end<Elements>::type + > + > {}; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/info.hpp b/3rdParty/Boost/src/boost/spirit/home/support/info.hpp new file mode 100644 index 0000000..ff523ab --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/info.hpp @@ -0,0 +1,159 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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_INFO_NOVEMBER_22_2008_1132AM) +#define BOOST_SPIRIT_INFO_NOVEMBER_22_2008_1132AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/variant/variant.hpp> +#include <boost/variant/recursive_variant.hpp> +#include <boost/variant/apply_visitor.hpp> +#include <boost/foreach.hpp> +#include <boost/spirit/home/support/utf8.hpp> +#include <list> +#include <iterator> +#include <utility> + +namespace boost { namespace spirit +{ + // info provides information about a component. Each component + // has a what member function that returns an info object. + // strings in the info object are assumed to be encoded as UTF8 + // for uniformity. + struct info + { + struct nil {}; + + typedef + boost::variant< + nil + , utf8_string + , recursive_wrapper<info> + , recursive_wrapper<std::pair<info, info> > + , recursive_wrapper<std::list<info> > + > + value_type; + + explicit info(utf8_string const& tag) + : tag(tag), value(nil()) {} + + template <typename T> + info(utf8_string const& tag, T const& value) + : tag(tag), value(value) {} + + info(utf8_string const& tag, char value) + : tag(tag), value(utf8_string(1, value)) {} + + info(utf8_string const& tag, wchar_t value) + : tag(tag), value(to_utf8(value)) {} + + info(utf8_string const& tag, ucs4_char value) + : tag(tag), value(to_utf8(value)) {} + + template <typename Char> + info(utf8_string const& tag, Char const* str) + : tag(tag), value(to_utf8(str)) {} + + template <typename Char, typename Traits, typename Allocator> + info(utf8_string const& tag + , std::basic_string<Char, Traits, Allocator> const& str) + : tag(tag), value(to_utf8(str)) {} + + utf8_string tag; + value_type value; + }; + + template <typename Callback> + struct basic_info_walker + { + typedef void result_type; + typedef basic_info_walker<Callback> this_type; + + basic_info_walker(Callback& callback, utf8_string const& tag, int depth) + : callback(callback), tag(tag), depth(depth) {} + + void operator()(info::nil) const + { + callback.element(tag, "", depth); + } + + void operator()(utf8_string const& str) const + { + callback.element(tag, str, depth); + } + + void operator()(info const& what) const + { + boost::apply_visitor( + this_type(callback, what.tag, depth+1), what.value); + } + + void operator()(std::pair<info, info> const& pair) const + { + callback.element(tag, "", depth); + boost::apply_visitor( + this_type(callback, pair.first.tag, depth+1), pair.first.value); + boost::apply_visitor( + this_type(callback, pair.second.tag, depth+1), pair.second.value); + } + + void operator()(std::list<info> const& l) const + { + callback.element(tag, "", depth); + BOOST_FOREACH(info const& what, l) + { + boost::apply_visitor( + this_type(callback, what.tag, depth+1), what.value); + } + } + + Callback& callback; + utf8_string const& tag; + int depth; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + basic_info_walker& operator= (basic_info_walker const&); + }; + + // bare-bones print support + template <typename Out> + struct simple_printer + { + typedef utf8_string string; + + simple_printer(Out& out) + : out(out) {} + + void element(string const& tag, string const& value, int /*depth*/) const + { + if (value == "") + out << '<' << tag << '>'; + else + out << '"' << value << '"'; + } + + Out& out; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + simple_printer& operator= (simple_printer const&); + }; + + template <typename Out> + Out& operator<<(Out& out, info const& what) + { + simple_printer<Out> pr(out); + basic_info_walker<simple_printer<Out> > walker(pr, what.tag, 0); + boost::apply_visitor(walker, what.value); + return out; + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/buf_id_check_policy.hpp b/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/buf_id_check_policy.hpp new file mode 100644 index 0000000..9df2d9c --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/buf_id_check_policy.hpp @@ -0,0 +1,90 @@ +// Copyright (c) 2001, Daniel C. Nuffer +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_ITERATOR_BUF_ID_CHECK_POLICY_MAR_16_2007_1108AM) +#define BOOST_SPIRIT_ITERATOR_BUF_ID_CHECK_POLICY_MAR_16_2007_1108AM + +#include <boost/spirit/home/support/iterators/multi_pass_fwd.hpp> +#include <boost/spirit/home/support/iterators/detail/multi_pass.hpp> +#include <boost/config.hpp> +#include <boost/throw_exception.hpp> +#include <exception> // for std::exception + +namespace boost { namespace spirit { namespace iterator_policies +{ + /////////////////////////////////////////////////////////////////////////// + // class illegal_backtracking + // thrown by buf_id_check CheckingPolicy if an instance of an iterator is + // used after another one has invalidated the queue + /////////////////////////////////////////////////////////////////////////// + class illegal_backtracking : public std::exception + { + public: + illegal_backtracking() throw() {} + ~illegal_backtracking() throw() {} + + char const* what() const throw() + { + return "boost::spirit::multi_pass::illegal_backtracking"; + } + }; + + /////////////////////////////////////////////////////////////////////////////// + // class buf_id_check + // Implementation of the CheckingPolicy used by multi_pass + // This policy is most effective when used together with the std_deque + // StoragePolicy. + // + // If used with the fixed_size_queue StoragePolicy, it will not detect + // iterator dereferences that are out of the range of the queue. + /////////////////////////////////////////////////////////////////////////////// + struct buf_id_check + { + /////////////////////////////////////////////////////////////////////// + struct unique //: detail::default_checking_policy + { + unique() : buf_id(0) {} + unique(unique const& x) : buf_id(x.buf_id) {} + + void swap(unique& x) + { + boost::swap(buf_id, x.buf_id); + } + + // called to verify that everything is ok. + template <typename MultiPass> + static void docheck(MultiPass const& mp) + { + if (mp.buf_id != mp.shared()->shared_buf_id) + boost::throw_exception(illegal_backtracking()); + } + + // called from multi_pass::clear_queue, so we can increment the count + template <typename MultiPass> + static void clear_queue(MultiPass& mp) + { + ++mp.shared()->shared_buf_id; + ++mp.buf_id; + } + + template <typename MultiPass> + static void destroy(MultiPass&) {} + + protected: + unsigned long buf_id; + }; + + /////////////////////////////////////////////////////////////////////// + struct shared + { + shared() : shared_buf_id(0) {} + unsigned long shared_buf_id; + }; + }; + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/combine_policies.hpp b/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/combine_policies.hpp new file mode 100644 index 0000000..cfac882 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/combine_policies.hpp @@ -0,0 +1,558 @@ +// Copyright (c) 2001-2012 Hartmut Kaiser +// +// 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_ITERATOR_COMBINE_POLICIES_APR_06_2008_0136PM) +#define BOOST_SPIRIT_ITERATOR_COMBINE_POLICIES_APR_06_2008_0136PM + +#include <boost/config.hpp> +#include <boost/type_traits/is_empty.hpp> + +namespace boost { namespace spirit { namespace iterator_policies +{ + /////////////////////////////////////////////////////////////////////////// + // The purpose of the multi_pass_unique template is to eliminate + // empty policy classes (policies not containing any data items) from the + // multiple inheritance chain. This is necessary since some compilers + // fail to apply the empty base optimization if multiple inheritance is + // involved. + // Additionally this can be used to combine separate policies into one + // single multi_pass_policy as required by the multi_pass template + /////////////////////////////////////////////////////////////////////////// + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + // without partial template specialization there is nothing much to do in + // terms of empty base optimization anyways... + template <typename T, typename Ownership, typename Checking, + typename Input, typename Storage> + struct multi_pass_unique + : Ownership, Checking, Input, Storage + { + multi_pass_unique() {} + multi_pass_unique(T& x) : Input(x) {} + multi_pass_unique(T const& x) : Input(x) {} + + template <typename MultiPass> + static void destroy(MultiPass& mp) + { + Ownership::destroy(mp); + Checking::destroy(mp); + Input::destroy(mp); + Storage::destroy(mp); + } + + void swap(multi_pass_unique& x) + { + this->Ownership::swap(x); + this->Checking::swap(x); + this->Input::swap(x); + this->Storage::swap(x); + } + + template <typename MultiPass> + inline static void clear_queue(MultiPass& mp) + { + Checking::clear_queue(mp); + Storage::clear_queue(mp); + } + }; +#else + /////////////////////////////////////////////////////////////////////////// + // select the correct derived classes based on if a policy is empty + template <typename T + , typename Ownership, typename Checking, typename Input, typename Storage + , bool OwnershipIsEmpty = boost::is_empty<Ownership>::value + , bool CheckingIsEmpty = boost::is_empty<Checking>::value + , bool InputIsEmpty = boost::is_empty<Input>::value> + struct multi_pass_unique; + + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Ownership, typename Checking + , typename Input, typename Storage> + struct multi_pass_unique<T, Ownership, Checking, Input, Storage + , false, false, false> + : Ownership, Checking, Input, Storage + { + multi_pass_unique() {} + multi_pass_unique(T& x) : Input(x) {} + multi_pass_unique(T const& x) : Input(x) {} + + template <typename MultiPass> + static void destroy(MultiPass& mp) + { + Ownership::destroy(mp); + Checking::destroy(mp); + Input::destroy(mp); + Storage::destroy(mp); + } + + void swap(multi_pass_unique& x) + { + this->Ownership::swap(x); + this->Checking::swap(x); + this->Input::swap(x); + this->Storage::swap(x); + } + + template <typename MultiPass> + inline static void clear_queue(MultiPass& mp) + { + Checking::clear_queue(mp); + Storage::clear_queue(mp); + } + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Ownership, typename Checking + , typename Input, typename Storage> + struct multi_pass_unique<T, Ownership, Checking, Input, Storage + , false, false, true> + : Ownership, Checking, Storage + { + multi_pass_unique() {} + multi_pass_unique(T const&) {} + + template <typename MultiPass> + static void destroy(MultiPass& mp) + { + Ownership::destroy(mp); + Checking::destroy(mp); + Input::destroy(mp); + Storage::destroy(mp); + } + + void swap(multi_pass_unique& x) + { + this->Ownership::swap(x); + this->Checking::swap(x); + this->Storage::swap(x); + } + + template <typename MultiPass> + inline static void clear_queue(MultiPass& mp) + { + Checking::clear_queue(mp); + Storage::clear_queue(mp); + } + + // implement input policy functions by forwarding to the Input type + template <typename MultiPass> + inline static void advance_input(MultiPass& mp) + { Input::advance_input(mp); } + + template <typename MultiPass> + inline static typename MultiPass::reference get_input(MultiPass& mp) + { return Input::get_input(mp); } + + template <typename MultiPass> + inline static bool input_at_eof(MultiPass const& mp) + { return Input::input_at_eof(mp); } + + template <typename MultiPass, typename TokenType> + inline static bool input_is_valid(MultiPass& mp, TokenType& curtok) + { return Input::input_is_valid(mp, curtok); } + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Ownership, typename Checking + , typename Input, typename Storage> + struct multi_pass_unique<T, Ownership, Checking, Input, Storage + , false, true, false> + : Ownership, Input, Storage + { + multi_pass_unique() {} + multi_pass_unique(T& x) : Input(x) {} + multi_pass_unique(T const& x) : Input(x) {} + + template <typename MultiPass> + static void destroy(MultiPass& mp) + { + Ownership::destroy(mp); + Input::destroy(mp); + Storage::destroy(mp); + } + + void swap(multi_pass_unique& x) + { + this->Ownership::swap(x); + this->Input::swap(x); + this->Storage::swap(x); + } + + template <typename MultiPass> + inline static void clear_queue(MultiPass& mp) + { + Checking::clear_queue(mp); + Storage::clear_queue(mp); + } + + // checking policy functions are forwarded to the Checking type + template <typename MultiPass> + inline static void docheck(MultiPass const& mp) + { Checking::docheck(mp); } + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Ownership, typename Checking + , typename Input, typename Storage> + struct multi_pass_unique<T, Ownership, Checking, Input, Storage + , false, true, true> + : Ownership, Storage + { + multi_pass_unique() {} + multi_pass_unique(T const&) {} + + template <typename MultiPass> + static void destroy(MultiPass& mp) + { + Ownership::destroy(mp); + Input::destroy(mp); + Storage::destroy(mp); + } + + void swap(multi_pass_unique& x) + { + this->Ownership::swap(x); + this->Storage::swap(x); + } + + template <typename MultiPass> + inline static void clear_queue(MultiPass& mp) + { + Checking::clear_queue(mp); + Storage::clear_queue(mp); + } + + // implement input policy functions by forwarding to the Input type + template <typename MultiPass> + inline static void advance_input(MultiPass& mp) + { Input::advance_input(mp); } + + template <typename MultiPass> + inline static typename MultiPass::reference get_input(MultiPass& mp) + { return Input::get_input(mp); } + + template <typename MultiPass> + inline static bool input_at_eof(MultiPass const& mp) + { return Input::input_at_eof(mp); } + + template <typename MultiPass, typename TokenType> + inline static bool input_is_valid(MultiPass& mp, TokenType& curtok) + { return Input::input_is_valid(mp, curtok); } + + // checking policy functions are forwarded to the Checking type + template <typename MultiPass> + inline static void docheck(MultiPass const& mp) + { Checking::docheck(mp); } + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Ownership, typename Checking + , typename Input, typename Storage> + struct multi_pass_unique<T, Ownership, Checking, Input, Storage + , true, false, false> + : Checking, Input, Storage + { + multi_pass_unique() {} + multi_pass_unique(T& x) : Input(x) {} + multi_pass_unique(T const& x) : Input(x) {} + + template <typename MultiPass> + static void destroy(MultiPass& mp) + { + Checking::destroy(mp); + Input::destroy(mp); + Storage::destroy(mp); + } + + void swap(multi_pass_unique& x) + { + this->Checking::swap(x); + this->Input::swap(x); + this->Storage::swap(x); + } + + template <typename MultiPass> + inline static void clear_queue(MultiPass& mp) + { + Checking::clear_queue(mp); + Storage::clear_queue(mp); + } + + // ownership policy functions are forwarded to the Ownership type + template <typename MultiPass> + inline static void clone(MultiPass& mp) + { Ownership::clone(mp); } + + template <typename MultiPass> + inline static bool release(MultiPass& mp) + { return Ownership::release(mp); } + + template <typename MultiPass> + inline static bool is_unique(MultiPass const& mp) + { return Ownership::is_unique(mp); } + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Ownership, typename Checking + , typename Input, typename Storage> + struct multi_pass_unique<T, Ownership, Checking, Input, Storage + , true, false, true> + : Checking, Storage + { + multi_pass_unique() {} + multi_pass_unique(T const&) {} + + template <typename MultiPass> + static void destroy(MultiPass& mp) + { + Checking::destroy(mp); + Input::destroy(mp); + Storage::destroy(mp); + } + + void swap(multi_pass_unique& x) + { + this->Checking::swap(x); + this->Storage::swap(x); + } + + template <typename MultiPass> + inline static void clear_queue(MultiPass& mp) + { + Checking::clear_queue(mp); + Storage::clear_queue(mp); + } + + // implement input policy functions by forwarding to the Input type + template <typename MultiPass> + inline static void advance_input(MultiPass& mp) + { Input::advance_input(mp); } + + template <typename MultiPass> + inline static typename MultiPass::reference get_input(MultiPass& mp) + { return Input::get_input(mp); } + + template <typename MultiPass> + inline static bool input_at_eof(MultiPass const& mp) + { return Input::input_at_eof(mp); } + + template <typename MultiPass, typename TokenType> + inline static bool input_is_valid(MultiPass& mp, TokenType& curtok) + { return Input::input_is_valid(mp, curtok); } + + // ownership policy functions are forwarded to the Ownership type + template <typename MultiPass> + inline static void clone(MultiPass& mp) + { Ownership::clone(mp); } + + template <typename MultiPass> + inline static bool release(MultiPass& mp) + { return Ownership::release(mp); } + + template <typename MultiPass> + inline static bool is_unique(MultiPass const& mp) + { return Ownership::is_unique(mp); } + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Ownership, typename Checking + , typename Input, typename Storage> + struct multi_pass_unique<T, Ownership, Checking, Input, Storage + , true, true, false> + : Input, Storage + { + multi_pass_unique() {} + multi_pass_unique(T& x) : Input(x) {} + multi_pass_unique(T const& x) : Input(x) {} + + template <typename MultiPass> + static void destroy(MultiPass& mp) + { + Input::destroy(mp); + Storage::destroy(mp); + } + + void swap(multi_pass_unique& x) + { + this->Input::swap(x); + this->Storage::swap(x); + } + + template <typename MultiPass> + inline static void clear_queue(MultiPass& mp) + { + Checking::clear_queue(mp); + Storage::clear_queue(mp); + } + + // checking policy functions are forwarded to the Checking type + template <typename MultiPass> + inline static void docheck(MultiPass const& mp) + { Checking::docheck(mp); } + + // ownership policy functions are forwarded to the Ownership type + template <typename MultiPass> + inline static void clone(MultiPass& mp) + { Ownership::clone(mp); } + + template <typename MultiPass> + inline static bool release(MultiPass& mp) + { return Ownership::release(mp); } + + template <typename MultiPass> + inline static bool is_unique(MultiPass const& mp) + { return Ownership::is_unique(mp); } + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Ownership, typename Checking + , typename Input, typename Storage> + struct multi_pass_unique<T, Ownership, Checking, Input, Storage + , true, true, true> + : Storage + { + multi_pass_unique() {} + multi_pass_unique(T const&) {} + + template <typename MultiPass> + static void destroy(MultiPass& mp) + { + Input::destroy(mp); + Storage::destroy(mp); + } + + void swap(multi_pass_unique& x) + { + this->Storage::swap(x); + } + + template <typename MultiPass> + inline static void clear_queue(MultiPass& mp) + { + Checking::clear_queue(mp); + Storage::clear_queue(mp); + } + + // implement input policy functions by forwarding to the Input type + template <typename MultiPass> + inline static void advance_input(MultiPass& mp) + { Input::advance_input(mp); } + + template <typename MultiPass> + inline static typename MultiPass::reference get_input(MultiPass& mp) + { return Input::get_input(mp); } + + template <typename MultiPass> + inline static bool input_at_eof(MultiPass const& mp) + { return Input::input_at_eof(mp); } + + template <typename MultiPass, typename TokenType> + inline static bool input_is_valid(MultiPass& mp, TokenType& curtok) + { return Input::input_is_valid(mp, curtok); } + + // checking policy functions are forwarded to the Checking type + template <typename MultiPass> + inline static void docheck(MultiPass const& mp) + { Checking::docheck(mp); } + + // ownership policy functions are forwarded to the Ownership type + template <typename MultiPass> + inline static void clone(MultiPass& mp) + { Ownership::clone(mp); } + + template <typename MultiPass> + inline static bool release(MultiPass& mp) + { return Ownership::release(mp); } + + template <typename MultiPass> + inline static bool is_unique(MultiPass const& mp) + { return Ownership::is_unique(mp); } + }; +#endif + + /////////////////////////////////////////////////////////////////////////// + // the multi_pass_shared structure is used to combine the shared data items + // of all policies into one single structure + /////////////////////////////////////////////////////////////////////////// + template<typename T, typename Ownership, typename Checking, typename Input + , typename Storage> + struct multi_pass_shared : Ownership, Checking, Input, Storage + { + explicit multi_pass_shared(T& input) : Input(input) {} + explicit multi_pass_shared(T const& input) : Input(input) {} + }; + + /////////////////////////////////////////////////////////////////////////// + // This is a default implementation of a policy class as required by the + // multi_pass template, combining 4 separate policies into one. Any other + // multi_pass policy class needs to follow the scheme as shown below. + template<typename Ownership, typename Checking, typename Input + , typename Storage> + struct default_policy + { + typedef Ownership ownership_policy; + typedef Checking checking_policy; + typedef Input input_policy; + typedef Storage storage_policy; + + /////////////////////////////////////////////////////////////////////// + template <typename T> + struct unique : multi_pass_unique<T + , typename Ownership::unique, typename Checking::unique + , typename Input::BOOST_NESTED_TEMPLATE unique<T> + , typename Storage::BOOST_NESTED_TEMPLATE unique< + typename Input::BOOST_NESTED_TEMPLATE unique<T>::value_type> > + { + typedef typename Ownership::unique ownership_policy; + typedef typename Checking::unique checking_policy; + typedef typename Input::BOOST_NESTED_TEMPLATE unique<T> + input_policy; + typedef typename Storage::BOOST_NESTED_TEMPLATE unique< + typename input_policy::value_type> storage_policy; + + typedef multi_pass_unique<T, ownership_policy, checking_policy + , input_policy, storage_policy> unique_base_type; + + unique() {} + explicit unique(T& input) : unique_base_type(input) {} + explicit unique(T const& input) : unique_base_type(input) {} + }; + + /////////////////////////////////////////////////////////////////////// + template <typename T> + struct shared : multi_pass_shared<T + , typename Ownership::shared, typename Checking::shared + , typename Input::BOOST_NESTED_TEMPLATE shared<T> + , typename Storage::BOOST_NESTED_TEMPLATE shared< + typename Input::BOOST_NESTED_TEMPLATE unique<T>::value_type> > + { + typedef typename Ownership::shared ownership_policy; + typedef typename Checking::shared checking_policy; + typedef typename Input::BOOST_NESTED_TEMPLATE shared<T> + input_policy; + typedef typename Storage::BOOST_NESTED_TEMPLATE shared< + typename Input::BOOST_NESTED_TEMPLATE unique<T>::value_type> + storage_policy; + + typedef multi_pass_shared<T, ownership_policy, checking_policy + , input_policy, storage_policy> shared_base_type; + + explicit shared(T& input) + : shared_base_type(input), inhibit_clear_queue_(false) {} + explicit shared(T const& input) + : shared_base_type(input), inhibit_clear_queue_(false) {} + + // This is needed for the correct implementation of expectation + // points. Normally expectation points flush any multi_pass + // iterator they may act on, but if the corresponding error handler + // is of type 'retry' no flushing of the internal buffers should be + // executed (even if explicitly requested). + bool inhibit_clear_queue_; + }; + }; + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/multi_pass.hpp b/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/multi_pass.hpp new file mode 100644 index 0000000..088b39a --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/multi_pass.hpp @@ -0,0 +1,132 @@ +// Copyright (c) 2001 Daniel C. Nuffer +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_ITERATOR_MULTI_PASS_MAR_16_2007_1122AM) +#define BOOST_SPIRIT_ITERATOR_MULTI_PASS_MAR_16_2007_1122AM + +#include <boost/config.hpp> +#include <boost/spirit/home/support/iterators/multi_pass_fwd.hpp> +#include <boost/iterator.hpp> +#include <boost/mpl/bool.hpp> +#include <iterator> +#include <algorithm> + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit { namespace detail +{ +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + /////////////////////////////////////////////////////////////////////////// + // Meta-function to generate a std::iterator<> base class for multi_pass. + // This is used mainly to improve conformance of compilers not supporting + // PTS and thus relying on inheritance to recognize an iterator. + // + // We are using boost::iterator<> because it offers an automatic + // workaround for broken std::iterator<> implementations. + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename InputPolicy> + struct iterator_base_creator + { + typedef typename InputPolicy::BOOST_NESTED_TEMPLATE unique<T> input_type; + + typedef boost::iterator < + std::forward_iterator_tag + , typename input_type::value_type + , typename input_type::difference_type + , typename input_type::pointer + , typename input_type::reference + > type; + }; +#endif + + /////////////////////////////////////////////////////////////////////////// + // Default implementations of the different policies to be used with a + // multi_pass iterator + /////////////////////////////////////////////////////////////////////////// + struct default_input_policy + { + default_input_policy() {} + + template <typename Functor> + default_input_policy(Functor const&) {} + + template <typename MultiPass> + static void destroy(MultiPass&) {} + + void swap(default_input_policy&) {} + + template <typename MultiPass, typename TokenType> + static void advance_input(MultiPass& mp); + + template <typename MultiPass> + static typename MultiPass::reference get_input(MultiPass& mp); + + template <typename MultiPass> + static bool input_at_eof(MultiPass const& mp); + + template <typename MultiPass, typename TokenType> + static bool input_is_valid(MultiPass& mp, TokenType& curtok); + }; + + struct default_ownership_policy + { + template <typename MultiPass> + static void destroy(MultiPass&) {} + + void swap(default_ownership_policy&) {} + + template <typename MultiPass> + static void clone(MultiPass&) {} + + template <typename MultiPass> + static bool release(MultiPass& mp); + + template <typename MultiPass> + static bool is_unique(MultiPass const& mp); + }; + + struct default_storage_policy + { + template <typename MultiPass> + static void destroy(MultiPass&) {} + + void swap(default_storage_policy&) {} + + template <typename MultiPass> + static typename MultiPass::reference dereference(MultiPass const& mp); + + template <typename MultiPass> + static void increment(MultiPass&) {} + + template <typename MultiPass> + static void clear_queue(MultiPass&) {} + + template <typename MultiPass> + static bool is_eof(MultiPass const& mp); + + template <typename MultiPass> + static bool equal_to(MultiPass const& mp, MultiPass const& x); + + template <typename MultiPass> + static bool less_than(MultiPass const& mp, MultiPass const& x); + }; + + struct default_checking_policy + { + template <typename MultiPass> + static void destroy(MultiPass&) {} + + void swap(default_checking_policy&) {} + + template <typename MultiPass> + static void docheck(MultiPass const&) {} + + template <typename MultiPass> + static void clear_queue(MultiPass&) {} + }; + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/no_check_policy.hpp b/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/no_check_policy.hpp new file mode 100644 index 0000000..8f4a26d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/no_check_policy.hpp @@ -0,0 +1,31 @@ +// Copyright (c) 2001 Daniel C. Nuffer +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_ITERATOR_NO_CHECK_POLICY_MAR_16_2007_1121AM) +#define BOOST_SPIRIT_ITERATOR_NO_CHECK_POLICY_MAR_16_2007_1121AM + +#include <boost/spirit/home/support/iterators/multi_pass_fwd.hpp> +#include <boost/spirit/home/support/iterators/detail/multi_pass.hpp> + +namespace boost { namespace spirit { namespace iterator_policies +{ + /////////////////////////////////////////////////////////////////////////// + // class no_check + // Implementation of the CheckingPolicy used by multi_pass + // It does not do anything :-) + /////////////////////////////////////////////////////////////////////////// + struct no_check + { + /////////////////////////////////////////////////////////////////////// + struct unique : public detail::default_checking_policy {}; + + /////////////////////////////////////////////////////////////////////// + struct shared {}; + }; + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/ref_counted_policy.hpp b/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/ref_counted_policy.hpp new file mode 100644 index 0000000..723bbee --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/ref_counted_policy.hpp @@ -0,0 +1,79 @@ +// Copyright (c) 2001 Daniel C. Nuffer +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_ITERATOR_REF_COUNTED_POLICY_MAR_16_2007_1108AM) +#define BOOST_SPIRIT_ITERATOR_REF_COUNTED_POLICY_MAR_16_2007_1108AM + +#include <boost/spirit/home/support/iterators/multi_pass_fwd.hpp> +#include <boost/spirit/home/support/iterators/detail/multi_pass.hpp> +#if defined(BOOST_HAS_THREADS) +#include <boost/detail/atomic_count.hpp> +#endif +#include <cstdlib> + +namespace boost { namespace spirit { namespace iterator_policies +{ + /////////////////////////////////////////////////////////////////////////// + // class ref_counted + // Implementation of an OwnershipPolicy used by multi_pass. + // + // Implementation modified from RefCounted class from the Loki library by + // Andrei Alexandrescu. + /////////////////////////////////////////////////////////////////////////// + struct ref_counted + { + /////////////////////////////////////////////////////////////////////// + struct unique // : detail::default_ownership_policy + { + void swap(unique&) {} + + // clone is called when a copy of the iterator is made, so + // increment the ref-count. + template <typename MultiPass> + static void clone(MultiPass& mp) + { + if (0 != mp.shared()) + ++mp.shared()->count; + } + + // called when a copy is deleted. Decrement the ref-count. Return + // value of true indicates that the last copy has been released. + template <typename MultiPass> + static bool release(MultiPass& mp) + { + return 0 != mp.shared() && 0 == --mp.shared()->count; + } + + // returns true if there is only one iterator in existence. + // std_deque StoragePolicy will free it's buffered data if this + // returns true. + template <typename MultiPass> + static bool is_unique(MultiPass const& mp) + { + return 0 == mp.shared() || 1 == mp.shared()->count; + } + + template <typename MultiPass> + static void destroy(MultiPass&) {} + }; + + //////////////////////////////////////////////////////////////////////// + struct shared + { + shared() : count(1) {} + +#if defined(BOOST_HAS_THREADS) + boost::detail::atomic_count count; +#else + std::size_t count; +#endif + }; + + }; + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp b/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp new file mode 100644 index 0000000..711ae90 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/split_functor_input_policy.hpp @@ -0,0 +1,201 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_ITERATOR_SPLIT_FUNCTOR_INPUT_POLICY_JAN_17_2008_0103PM) +#define BOOST_SPIRIT_ITERATOR_SPLIT_FUNCTOR_INPUT_POLICY_JAN_17_2008_0103PM + +#include <boost/spirit/home/support/iterators/multi_pass_fwd.hpp> +#include <boost/spirit/home/support/iterators/detail/multi_pass.hpp> +#include <boost/assert.hpp> +#include <boost/type_traits/is_empty.hpp> + +namespace boost { namespace spirit { namespace iterator_policies +{ + namespace split_functor_input_is_valid_test_ + { + template <typename Token> + inline bool token_is_valid(Token const&) + { + return true; + } + } + + /////////////////////////////////////////////////////////////////////////// + // class split_functor_input + // Implementation of the InputPolicy used by multi_pass + // split_functor_input gets tokens from a functor + // + // This policy should be used when the functor holds two parts of data: a + // unique part (unique for each instance of the iterator) and a shared + // part (to be shared between the different copies of the same iterator). + // Using this policy allows to merge the shared part of the functor with + // the shared part of the iterator data, saving one pointer and one + // allocation per iterator instance. + // + // The Functor template parameter of this policy is expected to be a + // std::pair<unique, shared>, where 'unique' and 'shared' represent the + // respective parts of the functor itself. + // + // Note: the unique part of the functor must have a typedef for result_type + // It also must have a static variable of type result_type defined + // to represent EOF that is called eof. + // + /////////////////////////////////////////////////////////////////////////// + struct split_functor_input + { + /////////////////////////////////////////////////////////////////////// + template <typename Functor + , bool FunctorIsEmpty = is_empty<typename Functor::first_type>::value> + class unique; + + // the unique part of the functor is empty, do not include the functor + // as a member at all to avoid unnecessary padding bytes to be included + // into the generated structure + template <typename Functor> + class unique<Functor, true> // : public detail::default_input_policy + { + protected: + typedef typename Functor::first_type functor_type; + typedef typename functor_type::result_type result_type; + + public: + typedef result_type value_type; + typedef std::ptrdiff_t difference_type; + typedef std::ptrdiff_t distance_type; + typedef result_type const* pointer; + typedef result_type const& reference; + + protected: + unique() {} + explicit unique(Functor const&) {} + + public: + void swap(unique&) {} + + // get the next token + template <typename MultiPass> + static typename MultiPass::reference get_input(MultiPass& mp) + { + value_type& curtok = mp.shared()->curtok; + using namespace split_functor_input_is_valid_test_; + if (!token_is_valid(curtok)) + functor_type::get_next(mp, curtok); + return curtok; + } + + template <typename MultiPass> + static void advance_input(MultiPass& mp) + { + functor_type::get_next(mp, mp.shared()->curtok); + } + + // test, whether we reached the end of the underlying stream + template <typename MultiPass> + static bool input_at_eof(MultiPass const& mp) + { + return mp.shared()->curtok == functor_type::eof; + } + + template <typename MultiPass> + static bool input_is_valid(MultiPass const&, value_type const& t) + { + using namespace split_functor_input_is_valid_test_; + return token_is_valid(t); + } + + template <typename MultiPass> + static void destroy(MultiPass& mp) + { + functor_type::destroy(mp); + } + }; + + // the unique part of the functor is non-empty + template <typename Functor> + class unique<Functor, false> : public unique<Functor, true> + { + protected: + typedef typename Functor::first_type functor_type; + typedef typename functor_type::result_type result_type; + + protected: + unique() {} + explicit unique(Functor const& x) : ftor(x.first) {} + + void swap(unique& x) + { + boost::swap(ftor, x.ftor); + } + + public: + typedef result_type value_type; + typedef std::ptrdiff_t difference_type; + typedef std::ptrdiff_t distance_type; + typedef result_type const* pointer; + typedef result_type const& reference; + + public: + // get the next token + template <typename MultiPass> + static typename MultiPass::reference get_input(MultiPass& mp) + { + value_type& curtok = mp.shared()->curtok; + using namespace split_functor_input_is_valid_test_; + if (!token_is_valid(curtok)) + functor_type::get_next(mp, curtok); + return curtok; + } + + template <typename MultiPass> + static void advance_input(MultiPass& mp) + { + mp.ftor.get_next(mp, mp.shared()->curtok); + } + + template <typename MultiPass> + static bool input_is_valid(MultiPass const&, value_type const& t) + { + using namespace split_functor_input_is_valid_test_; + return token_is_valid(t); + } + + // test, whether we reached the end of the underlying stream + template <typename MultiPass> + static bool input_at_eof(MultiPass const& mp) + { + return mp.shared()->curtok == mp.ftor.eof; + } + + typename Functor::first_type& get_functor() const + { + return ftor; + } + + mutable functor_type ftor; + }; + + /////////////////////////////////////////////////////////////////////// + template <typename Functor> + struct shared + { + protected: + typedef typename Functor::first_type functor_type; + typedef typename functor_type::result_type result_type; + + public: + explicit shared(Functor const& x) : ftor(x.second), curtok(0) {} + + mutable typename Functor::second_type ftor; + result_type curtok; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + shared& operator= (shared const&); + }; + }; + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/split_std_deque_policy.hpp b/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/split_std_deque_policy.hpp new file mode 100644 index 0000000..402956b --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/iterators/detail/split_std_deque_policy.hpp @@ -0,0 +1,170 @@ +// Copyright (c) 2001 Daniel C. Nuffer +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_ITERATOR_SPLIT_DEQUE_POLICY_APR_06_2008_0138PM) +#define BOOST_SPIRIT_ITERATOR_SPLIT_DEQUE_POLICY_APR_06_2008_0138PM + +#include <boost/spirit/home/support/iterators/multi_pass_fwd.hpp> +#include <boost/spirit/home/support/iterators/detail/multi_pass.hpp> +#include <boost/assert.hpp> +#include <vector> + +namespace boost { namespace spirit { namespace iterator_policies +{ + /////////////////////////////////////////////////////////////////////////// + // class split_std_deque + // + // Implementation of the StoragePolicy used by multi_pass + // This stores all data in a std::vector (despite its name), and keeps an + // offset to the current position. It stores all the data unless there is + // only one iterator using the queue. + // + /////////////////////////////////////////////////////////////////////////// + struct split_std_deque + { + enum { threshold = 16 }; + + /////////////////////////////////////////////////////////////////////// + template <typename Value> + class unique //: public detail::default_storage_policy + { + private: + typedef std::vector<Value> queue_type; + + protected: + unique() : queued_position(0) {} + + unique(unique const& x) + : queued_position(x.queued_position) {} + + void swap(unique& x) + { + boost::swap(queued_position, x.queued_position); + } + + // This is called when the iterator is dereferenced. It's a + // template method so we can recover the type of the multi_pass + // iterator and call advance_input and input_is_valid. + template <typename MultiPass> + static typename MultiPass::reference + dereference(MultiPass const& mp) + { + queue_type& queue = mp.shared()->queued_elements; + typename queue_type::size_type size = queue.size(); + + BOOST_ASSERT(mp.queued_position <= size); + + if (mp.queued_position == size) + { + // check if this is the only iterator + if (size >= threshold && MultiPass::is_unique(mp)) + { + // free up the memory used by the queue. + queue.clear(); + mp.queued_position = 0; + } + return MultiPass::get_input(mp); + } + + return queue[mp.queued_position]; + } + + // This is called when the iterator is incremented. It's a template + // method so we can recover the type of the multi_pass iterator + // and call is_unique and advance_input. + template <typename MultiPass> + static void increment(MultiPass& mp) + { + queue_type& queue = mp.shared()->queued_elements; + typename queue_type::size_type size = queue.size(); + + BOOST_ASSERT(mp.queued_position <= size); + +// // do not increment iterator as long as the current token is +// // invalid +// if (size > 0 && !MultiPass::input_is_valid(mp, queue[mp.queued_position-1])) +// return; + + if (mp.queued_position == size) + { + // check if this is the only iterator + if (size >= threshold && MultiPass::is_unique(mp)) + { + // free up the memory used by the queue. we avoid + // clearing the queue on every increment, though, + // because this would be too time consuming + queue.clear(); + mp.queued_position = 0; + } + else + { + queue.push_back(MultiPass::get_input(mp)); + ++mp.queued_position; + } + MultiPass::advance_input(mp); + } + else + { + ++mp.queued_position; + } + } + + // called to forcibly clear the queue + template <typename MultiPass> + static void clear_queue(MultiPass& mp) + { + mp.shared()->queued_elements.clear(); + mp.queued_position = 0; + } + + // called to determine whether the iterator is an eof iterator + template <typename MultiPass> + static bool is_eof(MultiPass const& mp) + { + return mp.queued_position == mp.shared()->queued_elements.size() + && MultiPass::input_at_eof(mp); + } + + // called by operator== + template <typename MultiPass> + static bool equal_to(MultiPass const& mp, MultiPass const& x) + { + return mp.queued_position == x.queued_position; + } + + // called by operator< + template <typename MultiPass> + static bool less_than(MultiPass const& mp, MultiPass const& x) + { + return mp.queued_position < x.queued_position; + } + + template <typename MultiPass> + static void destroy(MultiPass&) {} + + protected: + mutable typename queue_type::size_type queued_position; + }; + + /////////////////////////////////////////////////////////////////////// + template <typename Value> + struct shared + { + shared() + { + queued_elements.reserve(threshold); + } + + typedef std::vector<Value> queue_type; + queue_type queued_elements; + }; + + }; // split_std_deque + +}}} + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/support/iterators/multi_pass.hpp b/3rdParty/Boost/src/boost/spirit/home/support/iterators/multi_pass.hpp new file mode 100644 index 0000000..2b355bf --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/iterators/multi_pass.hpp @@ -0,0 +1,252 @@ +// Copyright (c) 2001, Daniel C. Nuffer +// Copyright (c) 2001-2011 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_ITERATOR_MULTI_PASS_MAR_16_2007_1124AM) +#define BOOST_SPIRIT_ITERATOR_MULTI_PASS_MAR_16_2007_1124AM + +#include <boost/config.hpp> +#include <boost/spirit/home/support/iterators/multi_pass_fwd.hpp> +#include <boost/spirit/home/support/iterators/detail/multi_pass.hpp> +#include <boost/spirit/home/support/iterators/detail/combine_policies.hpp> +#include <boost/limits.hpp> +#include <boost/detail/workaround.hpp> +#include <boost/utility/base_from_member.hpp> + +namespace boost { namespace spirit +{ + /////////////////////////////////////////////////////////////////////////// + // The default multi_pass instantiation uses a ref-counted std_deque scheme. + /////////////////////////////////////////////////////////////////////////// + template<typename T, typename Policies> + class multi_pass + : private boost::base_from_member< + typename Policies::BOOST_NESTED_TEMPLATE shared<T>*> + , public Policies::BOOST_NESTED_TEMPLATE unique<T> +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + , typename iterator_base_creator<T, typename Policies::input_policy>::type +#endif + { + private: + // unique and shared data types + typedef typename Policies::BOOST_NESTED_TEMPLATE unique<T> + policies_base_type; + typedef typename Policies::BOOST_NESTED_TEMPLATE shared<T> + shared_data_type; + + typedef boost::base_from_member<shared_data_type*> member_base; + + // define the types the standard embedded iterator typedefs are taken + // from +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + typedef typename iterator_base_creator<Input, T>::type iterator_type; +#else + typedef typename policies_base_type::input_policy iterator_type; +#endif + + public: + // standard iterator typedefs + typedef std::forward_iterator_tag iterator_category; + typedef typename iterator_type::value_type value_type; + typedef typename iterator_type::difference_type difference_type; + typedef typename iterator_type::distance_type distance_type; + typedef typename iterator_type::reference reference; + typedef typename iterator_type::pointer pointer; + + multi_pass() : member_base(static_cast<shared_data_type*>(0)) {} + + explicit multi_pass(T& input) + : member_base(new shared_data_type(input)), policies_base_type(input) {} + + explicit multi_pass(T const& input) + : member_base(new shared_data_type(input)), policies_base_type(input) {} + + multi_pass(multi_pass const& x) + : member_base(x.member), policies_base_type(x) + { + policies_base_type::clone(*this); + } + +#if BOOST_WORKAROUND(__GLIBCPP__, == 20020514) + // The standard library shipped with gcc-3.1 has a bug in + // bits/basic_string.tcc. It tries to use iter::iter(0) to + // construct an iterator. Ironically, this happens in sanity + // checking code that isn't required by the standard. + // The workaround is to provide an additional constructor that + // ignores its int argument and behaves like the default constructor. + multi_pass(int) : member_base(static_cast<shared_data_type*>(0)) {} +#endif // BOOST_WORKAROUND(__GLIBCPP__, == 20020514) + + ~multi_pass() + { + if (policies_base_type::release(*this)) { + policies_base_type::destroy(*this); + delete this->member; + } + } + + multi_pass& operator=(multi_pass const& x) + { + if (this != &x) { + multi_pass temp(x); + temp.swap(*this); + } + return *this; + } + + void swap(multi_pass& x) + { + boost::swap(this->member, x.member); + this->policies_base_type::swap(x); + } + + reference operator*() const + { + policies_base_type::docheck(*this); + return policies_base_type::dereference(*this); + } + pointer operator->() const + { + return &(operator*()); + } + + multi_pass& operator++() + { + policies_base_type::docheck(*this); + policies_base_type::increment(*this); + return *this; + } + multi_pass operator++(int) + { + multi_pass tmp(*this); + ++*this; + return tmp; + } + + void clear_queue(BOOST_SCOPED_ENUM(traits::clear_mode) mode = + traits::clear_mode::clear_if_enabled) + { + if (mode == traits::clear_mode::clear_always || !inhibit_clear_queue()) + policies_base_type::clear_queue(*this); + } + bool inhibit_clear_queue() const + { + return this->member->inhibit_clear_queue_; + } + void inhibit_clear_queue(bool flag) + { + this->member->inhibit_clear_queue_ = flag; + } + + bool operator==(multi_pass const& y) const + { + if (is_eof()) + return y.is_eof(); + if (y.is_eof()) + return false; + + return policies_base_type::equal_to(*this, y); + } + bool operator<(multi_pass const& y) const + { + return policies_base_type::less_than(*this, y); + } + + bool operator!=(multi_pass const& y) + { + return !(*this == y); + } + bool operator>(multi_pass const& y) + { + return y < *this; + } + bool operator>=(multi_pass const& y) + { + return !(*this < y); + } + bool operator<=(multi_pass const& y) + { + return !(y < *this); + } + + // allow access to base member + shared_data_type* shared() const { return this->member; } + + private: // helper functions + bool is_eof() const + { + return (0 == this->member) || policies_base_type::is_eof(*this); + } + }; + + /////////////////////////////////////////////////////////////////////////// + // Generator function + /////////////////////////////////////////////////////////////////////////// + template <typename Policies, typename T> + inline multi_pass<T, Policies> + make_multi_pass(T& i) + { + return multi_pass<T, Policies>(i); + } + template <typename Policies, typename T> + inline multi_pass<T, Policies> + make_multi_pass(T const& i) + { + return multi_pass<T, Policies>(i); + } + + /////////////////////////////////////////////////////////////////////////// + template <typename T> + inline multi_pass<T> + make_default_multi_pass(T& i) + { + return multi_pass<T>(i); + } + template <typename T> + inline multi_pass<T> + make_default_multi_pass(T const& i) + { + return multi_pass<T>(i); + } + + /////////////////////////////////////////////////////////////////////////// + template <typename T, typename Policies> + inline void + swap(multi_pass<T, Policies> &x, multi_pass<T, Policies> &y) + { + x.swap(y); + } + + /////////////////////////////////////////////////////////////////////////// + // define special functions allowing to integrate any multi_pass iterator + // with expectation points + namespace traits + { + template <typename T, typename Policies> + void clear_queue(multi_pass<T, Policies>& mp + , BOOST_SCOPED_ENUM(traits::clear_mode) mode) + { + mp.clear_queue(mode); + } + + template <typename T, typename Policies> + void inhibit_clear_queue(multi_pass<T, Policies>& mp, bool flag) + { + mp.inhibit_clear_queue(flag); + } + + template <typename T, typename Policies> + bool inhibit_clear_queue(multi_pass<T, Policies>& mp) + { + return mp.inhibit_clear_queue(); + } + } + +}} // namespace boost::spirit + +#endif + + diff --git a/3rdParty/Boost/src/boost/spirit/home/support/iterators/multi_pass_fwd.hpp b/3rdParty/Boost/src/boost/spirit/home/support/iterators/multi_pass_fwd.hpp new file mode 100644 index 0000000..4724d11 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/iterators/multi_pass_fwd.hpp @@ -0,0 +1,91 @@ +/*============================================================================= + Copyright (c) 2007 Tobias Schwinger + Copyright (c) 2001-2011 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_ITERATOR_MULTI_PASS_FWD_APR_18_2008_1102AM) +#define BOOST_SPIRIT_ITERATOR_MULTI_PASS_FWD_APR_18_2008_1102AM + +#include <cstddef> +#include <boost/spirit/home/support/multi_pass_wrapper.hpp> +#include <boost/swap.hpp> + +namespace boost { namespace spirit { + + namespace iterator_policies + { + // input policies + struct input_iterator; + struct buffering_input_iterator; + struct istream; + struct lex_input; + struct functor_input; + struct split_functor_input; + + // ownership policies + struct ref_counted; + struct first_owner; + + // checking policies + class illegal_backtracking; + struct buf_id_check; + struct no_check; + + // storage policies + struct split_std_deque; + template<std::size_t N> struct fixed_size_queue; + + // policy combiner +#if defined(BOOST_SPIRIT_DEBUG) + template<typename Ownership = ref_counted + , typename Checking = buf_id_check + , typename Input = buffering_input_iterator + , typename Storage = split_std_deque> + struct default_policy; +#else + template<typename Ownership = ref_counted + , typename Checking = no_check + , typename Input = buffering_input_iterator + , typename Storage = split_std_deque> + struct default_policy; +#endif + } + + template <typename T + , typename Policies = iterator_policies::default_policy<> > + class multi_pass; + + template <typename T, typename Policies> + void swap(multi_pass<T, Policies> &x, multi_pass<T, Policies> &y); + +}} // namespace boost::spirit + +namespace boost { namespace spirit { namespace traits +{ + // declare special functions allowing to integrate any multi_pass iterator + // with expectation points + + // multi_pass iterators require special handling (for the non-specialized + // versions of these functions see support/multi_pass_wrapper.hpp) + template <typename T, typename Policies> + void clear_queue(multi_pass<T, Policies>& + , BOOST_SCOPED_ENUM(clear_mode) mode = clear_mode::clear_if_enabled); + + template <typename T, typename Policies> + void inhibit_clear_queue(multi_pass<T, Policies>&, bool); + + template <typename T, typename Policies> + bool inhibit_clear_queue(multi_pass<T, Policies>&); + + // Helper template to recognize a multi_pass iterator. This specialization + // will be instantiated for any multi_pass iterator. + template <typename T, typename Policies> + struct is_multi_pass<multi_pass<T, Policies> > : mpl::true_ {}; + +}}} + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/support/limits.hpp b/3rdParty/Boost/src/boost/spirit/home/support/limits.hpp new file mode 100644 index 0000000..ff53967 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/limits.hpp @@ -0,0 +1,35 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_SUPPORT_LIMITS_MAR_26_2011_0833PM) +#define BOOST_SPIRIT_SUPPORT_LIMITS_MAR_26_2011_0833PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/include/phoenix_core.hpp> + +#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 + +#if !defined(SPIRIT_ARGUMENTS_LIMIT) +# define SPIRIT_ARGUMENTS_LIMIT PHOENIX_LIMIT +#endif +#if !defined(SPIRIT_ATTRIBUTES_LIMIT) +# define SPIRIT_ATTRIBUTES_LIMIT PHOENIX_LIMIT +#endif + +#else + +#if !defined(SPIRIT_ARGUMENTS_LIMIT) +# define SPIRIT_ARGUMENTS_LIMIT BOOST_PHOENIX_LIMIT +#endif +#if !defined(SPIRIT_ATTRIBUTES_LIMIT) +# define SPIRIT_ATTRIBUTES_LIMIT BOOST_PHOENIX_LIMIT +#endif + +#endif + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/make_component.hpp b/3rdParty/Boost/src/boost/spirit/home/support/make_component.hpp new file mode 100644 index 0000000..04a7437 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/make_component.hpp @@ -0,0 +1,474 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + 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) +=============================================================================*/ +#ifndef BOOST_SPIRIT_MAKE_COMPONENT_OCTOBER_16_2008_1250PM +#define BOOST_SPIRIT_MAKE_COMPONENT_OCTOBER_16_2008_1250PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/include/phoenix_core.hpp> +#include <boost/proto/proto.hpp> +#include <boost/spirit/home/support/detail/make_cons.hpp> +#include <boost/spirit/home/support/modify.hpp> + +namespace boost { namespace spirit +{ + // There is no real "component" class. Each domain is responsible + // for creating its own components. You need to specialize this for + // each component in your domain. Use this as a guide. + + template <typename Domain, typename Tag, typename Enable = void> + struct make_component + { + template <typename Sig> + struct result; + + template <typename This, typename Elements, typename Modifiers> + struct result<This(Elements, Modifiers)>; + + template <typename Elements, typename Modifiers> + typename result<make_component(Elements, Modifiers)>::type + operator()(Elements const& elements, Modifiers const& modifiers) const; + }; + + namespace tag + { + // Normally, we use proto tags as-is to distinguish operators. + // The special case is proto::tag::subscript. Spirit uses this + // as either sementic actions or directives. To distinguish between + // the two, we use these special tags below. + + struct directive; + struct action; + } + + template <typename Domain, typename T, typename Enable = void> + struct flatten_tree; +}} + +namespace boost { namespace spirit { namespace detail +{ + template <typename Expr, typename State, typename Data, typename Domain> + struct make_terminal_impl + : proto::transform_impl<Expr, State, Data> + { + typedef typename + proto::result_of::value<Expr>::type + value; + + typedef typename result_of::make_cons<value>::type elements; + + typedef + make_component<Domain, proto::tag::terminal> + make_component_; + + typedef typename + make_component_::template + result<make_component_(elements, Data)>::type + result_type; + + result_type operator()( + typename make_terminal_impl::expr_param expr + , typename make_terminal_impl::state_param /*state*/ + , typename make_terminal_impl::data_param data + ) const + { + return typename make_terminal_impl::make_component_()( + detail::make_cons(proto::value(expr)) + , data + ); + } + }; + + template <typename Expr, typename State, typename Data, typename Domain> + struct make_terminal_impl<phoenix::actor<Expr>, State, Data, Domain> + : proto::transform_impl<phoenix::actor<Expr>, State, Data> + { + typedef phoenix::actor<Expr> value; + typedef typename result_of::make_cons<value>::type elements; + typedef make_component<Domain, proto::tag::terminal> make_component_; + + typedef typename + make_component_::template + result<make_component_(elements, Data)>::type + result_type; + + result_type operator()( + typename make_terminal_impl::expr_param expr + , typename make_terminal_impl::state_param /*state*/ + , typename make_terminal_impl::data_param data + ) const + { + return typename make_terminal_impl::make_component_()( + detail::make_cons(expr) + , data + ); + } + }; + + template <typename Expr, typename State, typename Data, typename Domain> + struct make_terminal_impl<phoenix::actor<Expr> &, State, Data, Domain> + : make_terminal_impl<phoenix::actor<Expr>, State, Data, Domain> + {}; + + template <typename Expr, typename State, typename Data, typename Domain> + struct make_terminal_impl<phoenix::actor<Expr> const &, State, Data, Domain> + : make_terminal_impl<phoenix::actor<Expr>, State, Data, Domain> + {}; + + template <typename Domain> + struct make_terminal : proto::transform<make_terminal<Domain> > + { + template<typename Expr, typename State, typename Data> + struct impl : make_terminal_impl<Expr, State, Data, Domain> {}; + }; + + template <typename Domain, typename Tag, typename Grammar> + struct make_unary : proto::transform<make_unary<Domain, Tag, Grammar> > + { + template<typename Expr, typename State, typename Data> + struct impl : proto::transform_impl<Expr, State, Data> + { + typedef typename + proto::result_of::child_c<Expr, 0>::type + child; + + typedef typename Grammar:: + template result<Grammar(child, State, Data)>::type + child_component; + + typedef typename + result_of::make_cons<child_component>::type + elements; + + typedef make_component<Domain, Tag> make_component_; + + typedef typename + make_component_::template + result<make_component_(elements, Data)>::type + result_type; + + result_type operator()( + typename impl::expr_param expr + , typename impl::state_param state + , typename impl::data_param data + ) const + { + return typename impl::make_component_()( + detail::make_cons( + Grammar()(proto::child(expr), state, data)) + , data + ); + } + }; + }; + + // un-flattened version + template <typename Domain, typename Tag, typename Grammar, + bool flatten = flatten_tree<Domain, Tag>::value> + struct make_binary + { + template<typename Expr, typename State, typename Data> + struct impl : proto::transform_impl<Expr, State, Data> + { + typedef typename Grammar:: + template result<Grammar( + typename proto::result_of::child_c<Expr, 0>::type + , State, Data)>::type + lhs_component; + + typedef typename Grammar:: + template result<Grammar( + typename proto::result_of::child_c<Expr, 1>::type + , State, Data)>::type + rhs_component; + + typedef typename + result_of::make_cons< + lhs_component + , typename result_of::make_cons<rhs_component>::type + >::type + elements_type; + + typedef make_component<Domain, Tag> make_component_; + + typedef typename + make_component_::template + result<make_component_(elements_type, Data)>::type + result_type; + + result_type operator()( + typename impl::expr_param expr + , typename impl::state_param state + , typename impl::data_param data + ) const + { + elements_type elements = + detail::make_cons( + Grammar()( + proto::child_c<0>(expr), state, data) // LHS + , detail::make_cons( + Grammar()( + proto::child_c<1>(expr), state, data) // RHS + ) + ); + + return make_component_()(elements, data); + } + }; + }; + + template <typename Grammar> + struct make_binary_helper : proto::transform<make_binary_helper<Grammar> > + { + template<typename Expr, typename State, typename Data> + struct impl : proto::transform_impl<Expr, State, Data> + { + typedef typename Grammar:: + template result<Grammar(Expr, State, Data)>::type + lhs; + + typedef typename result_of::make_cons<lhs, State>::type result_type; + + result_type operator()( + typename impl::expr_param expr + , typename impl::state_param state + , typename impl::data_param data + ) const + { + return detail::make_cons(Grammar()(expr, state, data), state); + } + }; + }; + + // Flattened version + template <typename Domain, typename Tag, typename Grammar> + struct make_binary<Domain, Tag, Grammar, true> + : proto::transform<make_binary<Domain, Tag, Grammar> > + { + template<typename Expr, typename State, typename Data> + struct impl : proto::transform_impl<Expr, State, Data> + { + typedef typename + proto::reverse_fold_tree< + proto::_ + , proto::make<fusion::nil> + , make_binary_helper<Grammar> + >::template impl<Expr, State, Data> + reverse_fold_tree; + + typedef typename reverse_fold_tree::result_type elements; + typedef make_component<Domain, Tag> make_component_; + + typedef typename + make_component_::template + result<make_component_(elements, Data)>::type + result_type; + + result_type operator()( + typename impl::expr_param expr + , typename impl::state_param state + , typename impl::data_param data + ) const + { + return make_component_()( + reverse_fold_tree()(expr, state, data), data); + } + }; + }; + + template <typename Domain, typename Grammar> + struct make_directive : proto::transform<make_directive<Domain, Grammar> > + { + template<typename Expr, typename State, typename Data> + struct impl : proto::transform_impl<Expr, State, Data> + { + typedef typename + proto::result_of::child_c<Expr, 0>::type + lhs; + + typedef typename + proto::result_of::value<lhs>::type + tag_type; + + typedef typename modify<Domain>:: + template result<modify<Domain>(tag_type, Data)>::type + modifier_type; + + typedef typename Grammar:: + template result<Grammar( + typename proto::result_of::child_c<Expr, 1>::type + , State + , modifier_type + )>::type + rhs_component; + + typedef typename + result_of::make_cons< + tag_type + , typename result_of::make_cons<rhs_component>::type + >::type + elements_type; + + typedef make_component<Domain, tag::directive> make_component_; + + typedef typename + make_component_::template + result<make_component_(elements_type, Data)>::type + result_type; + + result_type operator()( + typename impl::expr_param expr + , typename impl::state_param state + , typename impl::data_param data + ) const + { + tag_type tag = proto::value(proto::child_c<0>(expr)); + typename remove_reference<modifier_type>::type + modifier = modify<Domain>()(tag, data); + + elements_type elements = + detail::make_cons( + tag // LHS + , detail::make_cons( + Grammar()( + proto::child_c<1>(expr) // RHS + , state, modifier) + ) + ); + + return make_component_()(elements, data); + } + }; + }; + + template <typename Domain, typename Grammar> + struct make_action : proto::transform<make_action<Domain, Grammar> > + { + template<typename Expr, typename State, typename Data> + struct impl : proto::transform_impl<Expr, State, Data> + { + typedef typename Grammar:: + template result<Grammar( + typename proto::result_of::child_c<Expr, 0>::type + , State + , Data + )>::type + lhs_component; + +#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 + typedef typename + proto::result_of::value< + typename proto::result_of::child_c<Expr, 1>::type + >::type + rhs_component; +#else + typedef + typename mpl::eval_if_c< + phoenix::is_actor< + typename proto::result_of::child_c<Expr, 1>::type + >::type::value + , proto::result_of::child_c<Expr, 1> + , proto::result_of::value< + typename proto::result_of::child_c<Expr, 1>::type + > + >::type + rhs_component; +#endif + + typedef typename + result_of::make_cons< + lhs_component + , typename result_of::make_cons<rhs_component>::type + >::type + elements_type; + + typedef make_component<Domain, tag::action> make_component_; + + typedef typename + make_component_::template + result<make_component_(elements_type, Data)>::type + result_type; + +#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 + result_type operator()( + typename impl::expr_param expr + , typename impl::state_param state + , typename impl::data_param data + ) const + { + elements_type elements = + detail::make_cons( + Grammar()( + proto::child_c<0>(expr), state, data) // LHS + , detail::make_cons( + proto::value(proto::child_c<1>(expr))) // RHS + ); + + return make_component_()(elements, data); + } +#else + result_type operator()( + typename impl::expr_param expr + , typename impl::state_param state + , typename impl::data_param data + ) const + { + return + (*this)( + expr + , state + , data + , typename phoenix::is_actor< + typename proto::result_of::child_c<Expr, 1>::type + >::type() + ); + } + + result_type operator()( + typename impl::expr_param expr + , typename impl::state_param state + , typename impl::data_param data + , mpl::false_ + ) const + { + elements_type elements = + detail::make_cons( + Grammar()( + proto::child_c<0>(expr), state, data) // LHS + , detail::make_cons( + proto::value(proto::child_c<1>(expr))) // RHS + ); + + return make_component_()(elements, data); + } + + result_type operator()( + typename impl::expr_param expr + , typename impl::state_param state + , typename impl::data_param data + , mpl::true_ + ) const + { + elements_type elements = + detail::make_cons( + Grammar()( + proto::child_c<0>(expr), state, data) // LHS + , detail::make_cons( + proto::child_c<1>(expr)) // RHS + ); + + return make_component_()(elements, data); + } +#endif + }; + }; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/meta_compiler.hpp b/3rdParty/Boost/src/boost/spirit/home/support/meta_compiler.hpp new file mode 100644 index 0000000..a525ef3 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/meta_compiler.hpp @@ -0,0 +1,320 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + 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) +=============================================================================*/ +#ifndef BOOST_SPIRIT_META_COMPILER_OCTOBER_16_2008_1258PM +#define BOOST_SPIRIT_META_COMPILER_OCTOBER_16_2008_1258PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/config.hpp> +#include <boost/spirit/include/phoenix_limits.hpp> +#include <boost/detail/workaround.hpp> +#include <boost/spirit/include/phoenix_limits.hpp> // needs to be included before proto +#include <boost/proto/proto.hpp> +#include <boost/spirit/home/support/make_component.hpp> +#include <boost/spirit/home/support/modify.hpp> +#include <boost/spirit/home/support/detail/make_cons.hpp> +#include <boost/spirit/home/support/unused.hpp> +#include <boost/spirit/home/support/assert_msg.hpp> +#include <boost/utility/enable_if.hpp> +#include <boost/type_traits/remove_reference.hpp> + +namespace boost { namespace spirit +{ + // Some defaults... + + template <typename Domain, typename Tag, typename Enable = void> + struct use_operator : mpl::false_ {}; + + template <typename Domain, typename T, typename Enable = void> + struct use_function : mpl::false_ {}; + + template <typename Domain, typename T, typename Enable = void> + struct use_directive : mpl::false_ {}; + + template <typename Domain, typename T, typename Enable /* = void */> + struct is_modifier_directive : mpl::false_ {}; + + template <typename Domain, typename T, typename Enable = void> + struct use_terminal : mpl::false_ {}; + + template <typename Domain, typename T, typename Enable /*= void*/> + struct flatten_tree : mpl::false_ {}; + + // Our meta-compiler. This is the main engine that hooks Spirit + // to the proto expression template engine. + + template <typename Domain> + struct meta_compiler + { + struct meta_grammar; + + BOOST_SPIRIT_ASSERT_MSG(( + !use_operator<Domain, proto::tag::subscript>::value + ), error_proto_tag_subscript_cannot_be_used, ()); + +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1400) + // this is the non-broken part for compilers properly supporting + // partial template specialization (VC7.1 does not) + struct cases + { + template <typename Tag, typename Enable = void> + struct case_ + : proto::not_<proto::_> + {}; + + /////////////////////////////////////////////////////////////////// + // terminals + /////////////////////////////////////////////////////////////////// + template <typename Enable> + struct case_<proto::tag::terminal, Enable> + : proto::when< + proto::if_<use_terminal<Domain, proto::_value>()>, + detail::make_terminal<Domain> + > + {}; + + template <typename Tag> + struct case_<Tag, typename enable_if<use_operator<Domain, Tag> >::type> + : proto::or_< + /////////////////////////////////////////////////////////////////// + // binary operators + /////////////////////////////////////////////////////////////////// + proto::when<proto::binary_expr<Tag, meta_grammar, meta_grammar>, + detail::make_binary<Domain, Tag, meta_grammar> + >, + /////////////////////////////////////////////////////////////////// + // unary operators + /////////////////////////////////////////////////////////////////// + proto::when<proto::unary_expr<Tag, meta_grammar>, + detail::make_unary<Domain, Tag, meta_grammar> + > + > + {}; + + template <typename Enable> + struct case_<proto::tag::subscript, Enable> + : proto::or_< + /////////////////////////////////////////////////////////////////// + // directives + /////////////////////////////////////////////////////////////////// + proto::when<proto::binary_expr<proto::tag::subscript + , proto::and_< + proto::terminal<proto::_> + , proto::if_<use_directive<Domain, proto::_value >()> > + , meta_grammar>, + detail::make_directive<Domain, meta_grammar> + >, + /////////////////////////////////////////////////////////////////// + // semantic actions + /////////////////////////////////////////////////////////////////// + proto::when<proto::binary_expr<proto::tag::subscript + , meta_grammar, proto::_>, + detail::make_action<Domain, meta_grammar> + > + > + {}; + }; +#else + // this part actually constitutes invalid C++ code, but it allows us to + // convince VC7.1 to do what we want + struct cases + { + template <typename Tag, typename Enable = void> + struct case_ + : proto::not_<proto::_> + {}; + + /////////////////////////////////////////////////////////////////// + // terminals + /////////////////////////////////////////////////////////////////// + template <> + struct case_<proto::tag::terminal> + : proto::when< + proto::if_<use_terminal<Domain, proto::_value>()>, + detail::make_terminal<Domain> + > + {}; + + template <typename Tag> + struct case_<Tag> + : proto::or_< + /////////////////////////////////////////////////////////////////// + // binary operators + /////////////////////////////////////////////////////////////////// + proto::when<proto::binary_expr< + typename enable_if<use_operator<Domain, Tag>, Tag>::type + , meta_grammar, meta_grammar> + , detail::make_binary<Domain, Tag, meta_grammar> + >, + /////////////////////////////////////////////////////////////////// + // unary operators + /////////////////////////////////////////////////////////////////// + proto::when<proto::unary_expr< + typename enable_if<use_operator<Domain, Tag>, Tag>::type + , meta_grammar> + , detail::make_unary<Domain, Tag, meta_grammar> + > + > + {}; + + template <> + struct case_<proto::tag::subscript> + : proto::or_< + /////////////////////////////////////////////////////////////////// + // directives + /////////////////////////////////////////////////////////////////// + proto::when<proto::binary_expr<proto::tag::subscript + , proto::and_< + proto::terminal<proto::_> + , proto::if_<use_directive<Domain, proto::_value >()> > + , meta_grammar>, + detail::make_directive<Domain, meta_grammar> + >, + /////////////////////////////////////////////////////////////////// + // semantic actions + /////////////////////////////////////////////////////////////////// + proto::when<proto::binary_expr<proto::tag::subscript + , meta_grammar, proto::_>, + detail::make_action<Domain, meta_grammar> + > + > + {}; + }; +#endif + + struct meta_grammar + : proto::switch_<cases> + {}; + }; + + namespace result_of + { + // Default case + template <typename Domain, typename Expr + , typename Modifiers = unused_type, typename Enable = void> + struct compile + { + typedef typename meta_compiler<Domain>::meta_grammar meta_grammar; + typedef typename meta_grammar:: + template result<meta_grammar(Expr, mpl::void_, Modifiers)>::type + type; + }; + + // If Expr is not a proto expression, make it a terminal + template <typename Domain, typename Expr, typename Modifiers> + struct compile<Domain, Expr, Modifiers, + typename disable_if<proto::is_expr<Expr> >::type> + : compile<Domain, typename proto::terminal<Expr>::type, Modifiers> {}; + } + + namespace traits + { + // Check if Expr matches the domain's grammar + template <typename Domain, typename Expr> + struct matches : + proto::matches< + typename proto::result_of::as_expr< + typename remove_reference<Expr>::type>::type, + typename meta_compiler<Domain>::meta_grammar + > + { + }; + } + + namespace detail + { + template <typename Domain> + struct compiler + { + // Default case + template <typename Expr, typename Modifiers> + static typename spirit::result_of::compile<Domain, Expr, Modifiers>::type + compile(Expr const& expr, Modifiers modifiers, mpl::true_) + { + typename meta_compiler<Domain>::meta_grammar compiler; + return compiler(expr, mpl::void_(), modifiers); + } + + // If Expr is not a proto expression, make it a terminal + template <typename Expr, typename Modifiers> + static typename spirit::result_of::compile<Domain, Expr, Modifiers>::type + compile(Expr const& expr, Modifiers modifiers, mpl::false_) + { + typename meta_compiler<Domain>::meta_grammar compiler; + typedef typename detail::as_meta_element<Expr>::type expr_; + typename proto::terminal<expr_>::type term = {expr}; + return compiler(term, mpl::void_(), modifiers); + } + }; + } + + template <typename Domain, typename Expr> + inline typename result_of::compile<Domain, Expr, unused_type>::type + compile(Expr const& expr) + { + typedef typename proto::is_expr<Expr>::type is_expr; + return detail::compiler<Domain>::compile(expr, unused, is_expr()); + } + + template <typename Domain, typename Expr, typename Modifiers> + inline typename result_of::compile<Domain, Expr, Modifiers>::type + compile(Expr const& expr, Modifiers modifiers) + { + typedef typename proto::is_expr<Expr>::type is_expr; + return detail::compiler<Domain>::compile(expr, modifiers, is_expr()); + } + + /////////////////////////////////////////////////////////////////////////// + template <typename Elements, template <typename Subject> class generator> + struct make_unary_composite + { + typedef typename + fusion::result_of::value_at_c<Elements, 0>::type + element_type; + typedef generator<element_type> result_type; + result_type operator()(Elements const& elements, unused_type) const + { + return result_type(fusion::at_c<0>(elements)); + } + }; + + template <typename Elements, template <typename Left, typename Right> class generator> + struct make_binary_composite + { + typedef typename + fusion::result_of::value_at_c<Elements, 0>::type + left_type; + typedef typename + fusion::result_of::value_at_c<Elements, 1>::type + right_type; + typedef generator<left_type, right_type> result_type; + + result_type operator()(Elements const& elements, unused_type) const + { + return result_type( + fusion::at_c<0>(elements) + , fusion::at_c<1>(elements) + ); + } + }; + + template <typename Elements, template <typename Elements_> class generator> + struct make_nary_composite + { + typedef generator<Elements> result_type; + result_type operator()(Elements const& elements, unused_type) const + { + return result_type(elements); + } + }; + +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/modify.hpp b/3rdParty/Boost/src/boost/spirit/home/support/modify.hpp new file mode 100644 index 0000000..80d2f71 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/modify.hpp @@ -0,0 +1,124 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + 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) +=============================================================================*/ +#ifndef BOOST_SPIRIT_MODIFY_OCTOBER_25_2008_0142PM +#define BOOST_SPIRIT_MODIFY_OCTOBER_25_2008_0142PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/include/phoenix_limits.hpp> // needs to be included before proto +#include <boost/proto/proto.hpp> +#include <boost/mpl/if.hpp> +#include <boost/type_traits/is_base_of.hpp> +#include <boost/spirit/home/support/unused.hpp> + +namespace boost { namespace spirit +{ + template <typename Domain, typename T, typename Enable = void> + struct is_modifier_directive; + + // Testing if a modifier set includes a modifier T involves + // checking for inheritance (i.e. Modifiers is derived from T) + template <typename Modifiers, typename T> + struct has_modifier + : is_base_of<T, Modifiers> {}; + + // Adding modifiers is done using multi-inheritance + template <typename Current, typename New, typename Enable = void> + struct compound_modifier : Current, New + { + compound_modifier() + : Current(), New() {} + + compound_modifier(Current const& current, New const& new_) + : Current(current), New(new_) {} + }; + + // Don't add if New is already in Current + template <typename Current, typename New> + struct compound_modifier< + Current, New, typename enable_if<has_modifier<Current, New> >::type> + : Current + { + compound_modifier() + : Current() {} + + compound_modifier(Current const& current, New const&) + : Current(current) {} + }; + + // Special case if Current is unused_type + template <typename New, typename Enable> + struct compound_modifier<unused_type, New, Enable> : New + { + compound_modifier() + : New() {} + + compound_modifier(unused_type, New const& new_) + : New(new_) {} + }; + + // Domains may specialize this modify metafunction to allow + // directives to add information to the Modifier template + // parameter that is passed to the make_component metafunction. + // By default, we return the modifiers untouched + template <typename Domain, typename Enable = void> + struct modify + { + template <typename Sig> + struct result; + + template <typename This, typename Tag, typename Modifiers> + struct result<This(Tag, Modifiers)> + { + typedef typename remove_const< + typename remove_reference<Tag>::type>::type + tag_type; + typedef typename remove_const< + typename remove_reference<Modifiers>::type>::type + modifiers_type; + + typedef typename mpl::if_< + is_modifier_directive<Domain, tag_type> + , compound_modifier<modifiers_type, tag_type> + , Modifiers>::type + type; + }; + + template <typename Tag, typename Modifiers> + typename result<modify(Tag, Modifiers)>::type + operator()(Tag tag, Modifiers modifiers) const + { + return op(tag, modifiers, is_modifier_directive<Domain, Tag>()); + } + + template <typename Tag, typename Modifiers> + Modifiers + op(Tag /*tag*/, Modifiers modifiers, mpl::false_) const + { + return modifiers; + } + + template <typename Tag, typename Modifiers> + compound_modifier<Modifiers, Tag> + op(Tag tag, Modifiers modifiers, mpl::true_) const + { + return compound_modifier<Modifiers, Tag>(modifiers, tag); + } + }; +}} + +namespace boost { namespace proto +{ + template <typename Domain, typename Enable> + struct is_callable<spirit::modify<Domain, Enable> > + : mpl::true_ {}; +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/multi_pass_wrapper.hpp b/3rdParty/Boost/src/boost/spirit/home/support/multi_pass_wrapper.hpp new file mode 100644 index 0000000..ec5fa36 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/multi_pass_wrapper.hpp @@ -0,0 +1,52 @@ +// Copyright (c) 2001-2011 Hartmut Kaiser +// +// 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_ITERATOR_MULTI_PASS_WRAPPER_JUL_12_2009_0914PM) +#define BOOST_SPIRIT_ITERATOR_MULTI_PASS_WRAPPER_JUL_12_2009_0914PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/mpl/bool.hpp> +#include <boost/spirit/home/support/detail/scoped_enum_emulation.hpp> + +namespace boost { namespace spirit { namespace traits +{ + // declare special functions allowing to integrate any multi_pass iterator + // with expectation points + + // normal iterators require no special handling + BOOST_SCOPED_ENUM_START(clear_mode) + { + clear_if_enabled, + clear_always + }; + BOOST_SCOPED_ENUM_END + + template <typename Iterator> + void clear_queue(Iterator& + , BOOST_SCOPED_ENUM(clear_mode) /*mode*/ = clear_mode::clear_if_enabled) + {} + + template <typename Iterator> + void inhibit_clear_queue(Iterator&, bool) + {} + + template <typename Iterator> + bool inhibit_clear_queue(Iterator&) + { + return false; + } + + // Helper template to recognize a multi_pass iterator. This specialization + // will be instantiated for any non-multi_pass iterator. + template <typename Iterator> + struct is_multi_pass : mpl::false_ {}; + +}}} + +#endif + diff --git a/3rdParty/Boost/src/boost/spirit/home/support/nonterminal/expand_arg.hpp b/3rdParty/Boost/src/boost/spirit/home/support/nonterminal/expand_arg.hpp new file mode 100644 index 0000000..f037acc --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/nonterminal/expand_arg.hpp @@ -0,0 +1,88 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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_EXPAND_ARG_FEB_19_2007_1107AM) +#define BOOST_SPIRIT_EXPAND_ARG_FEB_19_2007_1107AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/mpl/bool.hpp> +#include <boost/mpl/or.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/utility/result_of.hpp> +#include <boost/type_traits/is_scalar.hpp> +#include <boost/spirit/home/support/string_traits.hpp> + +namespace boost { namespace spirit { namespace detail +{ + /////////////////////////////////////////////////////////////////////////// + template <typename Context> + struct expand_arg + { + template <typename T> + struct result_type + { + // This is a temporary hack. The better way is to detect if T + // can be called given unused context. + typedef typename + mpl::eval_if< + mpl::or_<is_scalar<T>, traits::is_string<T> > + , mpl::identity<T const &> + , boost::result_of<T(unused_type, Context)> + >::type + type; + }; + + template <typename T> + struct result; + + template <typename F, typename A0> + struct result<F(A0)> + : result_type<A0> {}; + + template <typename F, typename A0> + struct result<F(A0&)> + : result_type<A0> {}; + + expand_arg(Context& context) + : context(context) + { + } + + template <typename T> + typename result_type<T>::type + call(T const& f, mpl::false_) const + { + return f(unused, context); + } + + template <typename T> + typename result_type<T>::type + call(T const& val, mpl::true_) const + { + return val; + } + + template <typename T> + typename result_type<T>::type + operator()(T const& x) const + { + return call(x, mpl::or_<is_scalar<T>, traits::is_string<T> >()); + } + + Context& context; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + expand_arg& operator= (expand_arg const&); + }; + +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/nonterminal/extract_param.hpp b/3rdParty/Boost/src/boost/spirit/home/support/nonterminal/extract_param.hpp new file mode 100644 index 0000000..6149932 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/nonterminal/extract_param.hpp @@ -0,0 +1,123 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2009 Francois Barel + + 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_EXTRACT_PARAM_AUGUST_08_2009_0848AM) +#define BOOST_SPIRIT_EXTRACT_PARAM_AUGUST_08_2009_0848AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/meta_compiler.hpp> +#include <boost/spirit/home/support/nonterminal/locals.hpp> +#include <boost/spirit/home/support/unused.hpp> +#include <boost/spirit/home/support/common_terminals.hpp> + +#include <boost/function_types/is_function.hpp> +#include <boost/function_types/parameter_types.hpp> +#include <boost/function_types/result_type.hpp> +#include <boost/fusion/include/as_list.hpp> +#include <boost/fusion/include/as_vector.hpp> +#include <boost/mpl/deref.hpp> +#include <boost/mpl/end.hpp> +#include <boost/mpl/eval_if.hpp> +#include <boost/mpl/find_if.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/if.hpp> +#include <boost/mpl/placeholders.hpp> +#include <boost/type_traits/is_same.hpp> + +namespace boost { namespace spirit { namespace detail +{ + /////////////////////////////////////////////////////////////////////////// + // Helpers to extract params (locals, attributes, ...) from nonterminal + // template arguments + /////////////////////////////////////////////////////////////////////////// + template <typename Types, typename Pred, typename Default> + struct extract_param + { + typedef typename mpl::find_if<Types, Pred>::type pos; + + typedef typename + mpl::eval_if< + is_same<pos, typename mpl::end<Types>::type> + , mpl::identity<Default> + , mpl::deref<pos> + >::type + type; + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename Types> + struct extract_locals + : fusion::result_of::as_vector< + typename extract_param< + Types + , is_locals<mpl::_> + , locals<> + >::type + > + {}; + + /////////////////////////////////////////////////////////////////////////// + template <typename Domain, typename Types> + struct extract_component + : spirit::result_of::compile< + Domain + , typename extract_param< + Types + , traits::matches<Domain, mpl::_> + , unused_type + >::type + > + {}; + + /////////////////////////////////////////////////////////////////////////// + template <typename Types> + struct extract_sig + : extract_param< + Types + , function_types::is_function<mpl::_> + , void() + > + {}; + + template <typename Sig> + struct attr_from_sig + { + typedef typename function_types::result_type<Sig>::type attr; + + typedef typename + mpl::if_< + is_same<attr, void> + , unused_type + , attr + >::type + type; + }; + + template <typename Sig> + struct params_from_sig + { + typedef typename function_types::parameter_types<Sig>::type params; + + typedef typename fusion::result_of::as_list<params>::type type; + }; + + /////////////////////////////////////////////////////////////////////////// + template <typename Types> + struct extract_encoding + : extract_param< + Types + , is_char_encoding<mpl::_> + , unused_type + > + {}; +}}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/nonterminal/locals.hpp b/3rdParty/Boost/src/boost/spirit/home/support/nonterminal/locals.hpp new file mode 100644 index 0000000..4db0349 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/nonterminal/locals.hpp @@ -0,0 +1,54 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + + 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_LOCALS_APRIL_03_2007_0506PM) +#define BOOST_SPIRIT_LOCALS_APRIL_03_2007_0506PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> +#include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/mpl/vector.hpp> +#include <boost/mpl/bool.hpp> + +#if !defined(BOOST_SPIRIT_MAX_LOCALS_SIZE) +# define BOOST_SPIRIT_MAX_LOCALS_SIZE 10 +#else +# if BOOST_SPIRIT_MAX_LOCALS_SIZE < 3 +# undef BOOST_SPIRIT_MAX_LOCALS_SIZE +# define BOOST_SPIRIT_MAX_LOCALS_SIZE 10 +# endif +#endif + +namespace boost { namespace spirit +{ + /////////////////////////////////////////////////////////////////////////// + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + BOOST_SPIRIT_MAX_LOCALS_SIZE, typename T, mpl::na) + > + struct locals + : mpl::vector<BOOST_PP_ENUM_PARAMS(BOOST_SPIRIT_MAX_LOCALS_SIZE, T)> {}; + + /////////////////////////////////////////////////////////////////////////// + namespace detail + { + template <typename T> + struct is_locals + : mpl::false_ + {}; + + template <BOOST_PP_ENUM_PARAMS(BOOST_SPIRIT_MAX_LOCALS_SIZE, typename T)> + struct is_locals<locals<BOOST_PP_ENUM_PARAMS(BOOST_SPIRIT_MAX_LOCALS_SIZE, T)> > + : mpl::true_ + {}; + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/string_traits.hpp b/3rdParty/Boost/src/boost/spirit/home/support/string_traits.hpp new file mode 100644 index 0000000..f970012 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/string_traits.hpp @@ -0,0 +1,358 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2010 Bryce Lelbach + + 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_STRING_TRAITS_OCTOBER_2008_1252PM) +#define BOOST_SPIRIT_STRING_TRAITS_OCTOBER_2008_1252PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/home/support/container.hpp> +#include <string> +#include <boost/mpl/bool.hpp> +#include <boost/mpl/identity.hpp> +#include <boost/mpl/if.hpp> +#include <boost/proto/proto_fwd.hpp> +#include <boost/type_traits/is_const.hpp> +#if defined(__GNUC__) && (__GNUC__ < 4) +#include <boost/type_traits/add_const.hpp> +#endif + +namespace boost { namespace spirit { namespace traits +{ + /////////////////////////////////////////////////////////////////////////// + // Determine if T is a character type + /////////////////////////////////////////////////////////////////////////// + template <typename T> + struct is_char : mpl::false_ {}; + + template <typename T> + struct is_char<T const> : is_char<T> {}; + + template <> + struct is_char<char> : mpl::true_ {}; + + template <> + struct is_char<wchar_t> : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + // Determine if T is a string + /////////////////////////////////////////////////////////////////////////// + template <typename T> + struct is_string : mpl::false_ {}; + + template <typename T> + struct is_string<T const> : is_string<T> {}; + + template <> + struct is_string<char const*> : mpl::true_ {}; + + template <> + struct is_string<wchar_t const*> : mpl::true_ {}; + + template <> + struct is_string<char*> : mpl::true_ {}; + + template <> + struct is_string<wchar_t*> : mpl::true_ {}; + + template <std::size_t N> + struct is_string<char[N]> : mpl::true_ {}; + + template <std::size_t N> + struct is_string<wchar_t[N]> : mpl::true_ {}; + + template <std::size_t N> + struct is_string<char const[N]> : mpl::true_ {}; + + template <std::size_t N> + struct is_string<wchar_t const[N]> : mpl::true_ {}; + + template <std::size_t N> + struct is_string<char(&)[N]> : mpl::true_ {}; + + template <std::size_t N> + struct is_string<wchar_t(&)[N]> : mpl::true_ {}; + + template <std::size_t N> + struct is_string<char const(&)[N]> : mpl::true_ {}; + + template <std::size_t N> + struct is_string<wchar_t const(&)[N]> : mpl::true_ {}; + + template <typename T, typename Traits, typename Allocator> + struct is_string<std::basic_string<T, Traits, Allocator> > : mpl::true_ {}; + + /////////////////////////////////////////////////////////////////////////// + // Get the underlying char type of a string + /////////////////////////////////////////////////////////////////////////// + template <typename T> + struct char_type_of; + + template <typename T> + struct char_type_of<T const> : char_type_of<T> {}; + + template <> + struct char_type_of<char> : mpl::identity<char> {}; + + template <> + struct char_type_of<wchar_t> : mpl::identity<wchar_t> {}; + + template <> + struct char_type_of<char const*> : mpl::identity<char const> {}; + + template <> + struct char_type_of<wchar_t const*> : mpl::identity<wchar_t const> {}; + + template <> + struct char_type_of<char*> : mpl::identity<char> {}; + + template <> + struct char_type_of<wchar_t*> : mpl::identity<wchar_t> {}; + + template <std::size_t N> + struct char_type_of<char[N]> : mpl::identity<char> {}; + + template <std::size_t N> + struct char_type_of<wchar_t[N]> : mpl::identity<wchar_t> {}; + + template <std::size_t N> + struct char_type_of<char const[N]> : mpl::identity<char const> {}; + + template <std::size_t N> + struct char_type_of<wchar_t const[N]> : mpl::identity<wchar_t const> {}; + + template <std::size_t N> + struct char_type_of<char(&)[N]> : mpl::identity<char> {}; + + template <std::size_t N> + struct char_type_of<wchar_t(&)[N]> : mpl::identity<wchar_t> {}; + + template <std::size_t N> + struct char_type_of<char const(&)[N]> : mpl::identity<char const> {}; + + template <std::size_t N> + struct char_type_of<wchar_t const(&)[N]> : mpl::identity<wchar_t const> {}; + + template <typename T, typename Traits, typename Allocator> + struct char_type_of<std::basic_string<T, Traits, Allocator> > + : mpl::identity<T> {}; + + /////////////////////////////////////////////////////////////////////////// + // Get the C string from a string + /////////////////////////////////////////////////////////////////////////// + template <typename String> + struct extract_c_string; + + template <typename String> + struct extract_c_string + { + typedef typename char_type_of<String>::type char_type; + + template <typename T> + static T const* call (T* str) + { + return (T const*)str; + } + + template <typename T> + static T const* call (T const* str) + { + return str; + } + }; + + // Forwarder that strips const + template <typename T> + struct extract_c_string<T const> + { + typedef typename extract_c_string<T>::char_type char_type; + + static typename extract_c_string<T>::char_type const* call (T const str) + { + return extract_c_string<T>::call(str); + } + }; + + // Forwarder that strips references + template <typename T> + struct extract_c_string<T&> + { + typedef typename extract_c_string<T>::char_type char_type; + + static typename extract_c_string<T>::char_type const* call (T& str) + { + return extract_c_string<T>::call(str); + } + }; + + // Forwarder that strips const references + template <typename T> + struct extract_c_string<T const&> + { + typedef typename extract_c_string<T>::char_type char_type; + + static typename extract_c_string<T>::char_type const* call (T const& str) + { + return extract_c_string<T>::call(str); + } + }; + + template <typename T, typename Traits, typename Allocator> + struct extract_c_string<std::basic_string<T, Traits, Allocator> > + { + typedef T char_type; + + typedef std::basic_string<T, Traits, Allocator> string; + + static T const* call (string const& str) + { + return str.c_str(); + } + }; + + template <typename T> + typename extract_c_string<T*>::char_type const* + get_c_string (T* str) + { + return extract_c_string<T*>::call(str); + } + + template <typename T> + typename extract_c_string<T const*>::char_type const* + get_c_string (T const* str) + { + return extract_c_string<T const*>::call(str); + } + + template <typename String> + typename extract_c_string<String>::char_type const* + get_c_string (String& str) + { + return extract_c_string<String>::call(str); + } + + template <typename String> + typename extract_c_string<String>::char_type const* + get_c_string (String const& str) + { + return extract_c_string<String>::call(str); + } + + /////////////////////////////////////////////////////////////////////////// + // Get the begin/end iterators from a string + /////////////////////////////////////////////////////////////////////////// + + // Implementation for C-style strings. + +// gcc 3.x.x has problems resolving ambiguities here +#if defined(__GNUC__) && (__GNUC__ < 4) + template <typename T> + inline typename add_const<T>::type * get_begin(T* str) { return str; } + + template <typename T> + inline typename add_const<T>::type* get_end(T* str) + { + T* last = str; + while (*last) + last++; + return last; + } +#else + template <typename T> + inline T const* get_begin(T const* str) { return str; } + + template <typename T> + inline T* get_begin(T* str) { return str; } + + template <typename T> + inline T const* get_end(T const* str) + { + T const* last = str; + while (*last) + last++; + return last; + } + + template <typename T> + inline T* get_end(T* str) + { + T* last = str; + while (*last) + last++; + return last; + } +#endif + + // Implementation for containers (includes basic_string). + template <typename T, typename Str> + inline typename Str::const_iterator get_begin(Str const& str) + { return str.begin(); } + + template <typename T, typename Str> + inline typename Str::iterator + get_begin(Str& str BOOST_PROTO_DISABLE_IF_IS_CONST(Str)) + { return str.begin(); } + + template <typename T, typename Str> + inline typename Str::const_iterator get_end(Str const& str) + { return str.end(); } + + template <typename T, typename Str> + inline typename Str::iterator + get_end(Str& str BOOST_PROTO_DISABLE_IF_IS_CONST(Str)) + { return str.end(); } + + // Default implementation for other types: try a C-style string + // conversion. + // These overloads are explicitly disabled for containers, + // as they would be ambiguous with the previous ones. + template <typename T, typename Str> + inline typename disable_if<is_container<Str> + , T const*>::type get_begin(Str const& str) + { return str; } + + template <typename T, typename Str> + inline typename disable_if<is_container<Str> + , T const*>::type get_end(Str const& str) + { return get_end(get_begin<T>(str)); } +} + +namespace result_of +{ + template <typename Char, typename T, typename Enable = void> + struct get_begin + { + typedef typename traits::char_type_of<T>::type char_type; + + typedef typename mpl::if_< + is_const<char_type> + , char_type const + , char_type + >::type* type; + }; + + template <typename Char, typename Str> + struct get_begin<Char, Str + , typename enable_if<traits::is_container<Str> >::type> + { + typedef typename mpl::if_< + is_const<Str> + , typename Str::const_iterator + , typename Str::iterator + >::type type; + }; + + template <typename Char, typename T> + struct get_end : get_begin<Char, T> {}; +} + +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/terminal.hpp b/3rdParty/Boost/src/boost/spirit/home/support/terminal.hpp new file mode 100644 index 0000000..d52fad2 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/terminal.hpp @@ -0,0 +1,655 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2011 Thomas Heller + + 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_TERMINAL_NOVEMBER_04_2008_0906AM) +#define BOOST_SPIRIT_TERMINAL_NOVEMBER_04_2008_0906AM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/spirit/include/phoenix_core.hpp> +#include <boost/spirit/include/phoenix_function.hpp> +#include <boost/proto/proto.hpp> +#include <boost/fusion/include/void.hpp> +#include <boost/spirit/home/support/meta_compiler.hpp> +#include <boost/spirit/home/support/detail/make_vector.hpp> +#include <boost/spirit/home/support/unused.hpp> +#include <boost/spirit/home/support/detail/is_spirit_tag.hpp> +#include <boost/preprocessor/tuple/elem.hpp> + +#include <boost/spirit/home/support/terminal_expression.hpp> + +namespace boost { namespace spirit +{ + template <typename Terminal, typename Args> + struct terminal_ex + { + typedef Terminal terminal_type; + typedef Args args_type; + + terminal_ex(Args const& args) + : args(args) {} + terminal_ex(Args const& args, Terminal const& term) + : args(args), term(term) {} + + Args args; // Args is guaranteed to be a fusion::vectorN so you + // can use that template for detection and specialization + Terminal term; + }; + + template <typename Terminal, typename Actor, int Arity> + struct lazy_terminal + { + typedef Terminal terminal_type; + typedef Actor actor_type; + static int const arity = Arity; + + lazy_terminal(Actor const& actor) + : actor(actor) {} + lazy_terminal(Actor const& actor, Terminal const& term) + : actor(actor), term(term) {} + + Actor actor; + Terminal term; + }; + + template <typename Domain, typename Terminal, int Arity, typename Enable = void> + struct use_lazy_terminal : mpl::false_ {}; + + template <typename Domain, typename Terminal, int Arity, typename Enable = void> + struct use_lazy_directive : mpl::false_ {}; + + template <typename Terminal> + struct terminal; + + template <typename Domain, typename Terminal> + struct use_terminal<Domain, terminal<Terminal> > + : use_terminal<Domain, Terminal> {}; + + template <typename Domain, typename Terminal, int Arity, typename Actor> + struct use_terminal<Domain, lazy_terminal<Terminal, Actor, Arity> > + : use_lazy_terminal<Domain, Terminal, Arity> {}; + + template <typename Domain, typename Terminal, int Arity, typename Actor> + struct use_directive<Domain, lazy_terminal<Terminal, Actor, Arity> > + : use_lazy_directive<Domain, Terminal, Arity> {}; + + template < + typename F + , typename A0 = unused_type + , typename A1 = unused_type + , typename A2 = unused_type + , typename Unused = unused_type + > + struct make_lazy; + + template <typename F, typename A0> + struct make_lazy<F, A0> + { + typedef typename + proto::terminal< + lazy_terminal< + typename F::terminal_type + , typename phoenix::detail::expression::function_eval<F, A0>::type + , 1 // arity + > + >::type + result_type; + typedef result_type type; + + result_type + operator()(F f, A0 const& _0) const + { + typedef typename result_type::proto_child0 child_type; + return result_type::make(child_type( + phoenix::detail::expression::function_eval<F, A0>::make(f, _0) + , f.proto_base().child0 + )); + } + }; + + template <typename F, typename A0, typename A1> + struct make_lazy<F, A0, A1> + { + typedef typename + proto::terminal< + lazy_terminal< + typename F::terminal_type + , typename phoenix::detail::expression::function_eval<F, A0, A1>::type + , 2 // arity + > + >::type + result_type; + typedef result_type type; + + result_type + operator()(F f, A0 const& _0, A1 const& _1) const + { + typedef typename result_type::proto_child0 child_type; + return result_type::make(child_type( + phoenix::detail::expression::function_eval<F, A0, A1>::make(f, _0, _1) + , f.proto_base().child0 + )); + } + }; + + template <typename F, typename A0, typename A1, typename A2> + struct make_lazy<F, A0, A1, A2> + { + typedef typename + proto::terminal< + lazy_terminal< + typename F::terminal_type + , typename phoenix::detail::expression::function_eval<F, A0, A1, A2>::type + , 3 // arity + > + >::type + result_type; + typedef result_type type; + + result_type + operator()(F f, A0 const& _0, A1 const& _1, A2 const& _2) const + { + typedef typename result_type::proto_child0 child_type; + return result_type::make(child_type( + phoenix::detail::expression::function_eval<F, A0, A1, A2>::make(f, _0, _1, _2) + , f.proto_base().child0 + )); + } + }; + + namespace detail + { + // Helper struct for SFINAE purposes + template <bool C> struct bool_; + + template <> + struct bool_<true> : mpl::bool_<true> + { + typedef bool_<true>* is_true; + }; + + template <> + struct bool_<false> : mpl::bool_<false> + { + typedef bool_<false>* is_false; + }; + + // Metafunction to detect if at least one arg is a Phoenix actor + template < + typename A0 + , typename A1 = unused_type + , typename A2 = unused_type + > + struct contains_actor + : bool_< + phoenix::is_actor<A0>::value + || phoenix::is_actor<A1>::value + || phoenix::is_actor<A2>::value + > + {}; + + // to_lazy_arg: convert a terminal arg type to the type make_lazy needs + template <typename A> + struct to_lazy_arg + : phoenix::as_actor<A> // wrap A in a Phoenix actor if not already one + {}; + + template <typename A> + struct to_lazy_arg<const A> + : to_lazy_arg<A> + {}; + + template <typename A> + struct to_lazy_arg<A &> + : to_lazy_arg<A> + {}; + + template <> + struct to_lazy_arg<unused_type> + { + // unused arg: make_lazy wants unused_type + typedef unused_type type; + }; + + // to_nonlazy_arg: convert a terminal arg type to the type make_vector needs + template <typename A> + struct to_nonlazy_arg + { + // identity + typedef A type; + }; + + template <typename A> + struct to_nonlazy_arg<const A> + : to_nonlazy_arg<A> + {}; + + template <typename A> + struct to_nonlazy_arg<A &> + : to_nonlazy_arg<A> + {}; + + template <> + struct to_nonlazy_arg<unused_type> + { + // unused arg: make_vector wants fusion::void_ + typedef fusion::void_ type; + }; + } + + template <typename Terminal> + struct terminal + : proto::extends< + typename proto::terminal<Terminal>::type + , terminal<Terminal> + > + { + typedef terminal<Terminal> this_type; + typedef Terminal terminal_type; + + typedef proto::extends< + typename proto::terminal<Terminal>::type + , terminal<Terminal> + > base_type; + + terminal() {} + + terminal(Terminal const& t) + : base_type(proto::terminal<Terminal>::type::make(t)) + {} + + template < + bool Lazy + , typename A0 + , typename A1 + , typename A2 + > + struct result_helper; + + template < + typename A0 + , typename A1 + , typename A2 + > + struct result_helper<false, A0, A1, A2> + { + typedef typename + proto::terminal< + terminal_ex< + Terminal + , typename detail::result_of::make_vector< + typename detail::to_nonlazy_arg<A0>::type + , typename detail::to_nonlazy_arg<A1>::type + , typename detail::to_nonlazy_arg<A2>::type>::type> + >::type + type; + }; + + template < + typename A0 + , typename A1 + , typename A2 + > + struct result_helper<true, A0, A1, A2> + { + typedef typename + make_lazy<this_type + , typename detail::to_lazy_arg<A0>::type + , typename detail::to_lazy_arg<A1>::type + , typename detail::to_lazy_arg<A2>::type>::type + type; + }; + + // FIXME: we need to change this to conform to the result_of protocol + template < + typename A0 + , typename A1 = unused_type + , typename A2 = unused_type // Support up to 3 args + > + struct result + { + typedef typename + result_helper< + detail::contains_actor<A0, A1, A2>::value + , A0, A1, A2 + >::type + type; + }; + + template <typename This, typename A0> + struct result<This(A0)> + { + typedef typename + result_helper< + detail::contains_actor<A0, unused_type, unused_type>::value + , A0, unused_type, unused_type + >::type + type; + }; + + template <typename This, typename A0, typename A1> + struct result<This(A0, A1)> + { + typedef typename + result_helper< + detail::contains_actor<A0, A1, unused_type>::value + , A0, A1, unused_type + >::type + type; + }; + + + template <typename This, typename A0, typename A1, typename A2> + struct result<This(A0, A1, A2)> + { + typedef typename + result_helper< + detail::contains_actor<A0, A1, A2>::value + , A0, A1, A2 + >::type + type; + }; + + // Note: in the following overloads, SFINAE cannot + // be done on return type because of gcc bug #24915: + // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24915 + // Hence an additional, fake argument is used for SFINAE, + // using a type which can never be a real argument type. + + // Non-lazy overloads. Only enabled when all + // args are immediates (no Phoenix actor). + + template <typename A0> + typename result<A0>::type + operator()(A0 const& _0 + , typename detail::contains_actor<A0>::is_false = 0) const + { + typedef typename result<A0>::type result_type; + typedef typename result_type::proto_child0 child_type; + return result_type::make( + child_type( + detail::make_vector(_0) + , this->proto_base().child0) + ); + } + + template <typename A0, typename A1> + typename result<A0, A1>::type + operator()(A0 const& _0, A1 const& _1 + , typename detail::contains_actor<A0, A1>::is_false = 0) const + { + typedef typename result<A0, A1>::type result_type; + typedef typename result_type::proto_child0 child_type; + return result_type::make( + child_type( + detail::make_vector(_0, _1) + , this->proto_base().child0) + ); + } + + template <typename A0, typename A1, typename A2> + typename result<A0, A1, A2>::type + operator()(A0 const& _0, A1 const& _1, A2 const& _2 + , typename detail::contains_actor<A0, A1, A2>::is_false = 0) const + { + typedef typename result<A0, A1, A2>::type result_type; + typedef typename result_type::proto_child0 child_type; + return result_type::make( + child_type( + detail::make_vector(_0, _1, _2) + , this->proto_base().child0) + ); + } + + // Lazy overloads. Enabled when at + // least one arg is a Phoenix actor. + template <typename A0> + typename result<A0>::type + operator()(A0 const& _0 + , typename detail::contains_actor<A0>::is_true = 0) const + { + return make_lazy<this_type + , typename phoenix::as_actor<A0>::type>()(*this + , phoenix::as_actor<A0>::convert(_0)); + } + + template <typename A0, typename A1> + typename result<A0, A1>::type + operator()(A0 const& _0, A1 const& _1 + , typename detail::contains_actor<A0, A1>::is_true = 0) const + { + return make_lazy<this_type + , typename phoenix::as_actor<A0>::type + , typename phoenix::as_actor<A1>::type>()(*this + , phoenix::as_actor<A0>::convert(_0) + , phoenix::as_actor<A1>::convert(_1)); + } + + template <typename A0, typename A1, typename A2> + typename result<A0, A1, A2>::type + operator()(A0 const& _0, A1 const& _1, A2 const& _2 + , typename detail::contains_actor<A0, A1, A2>::is_true = 0) const + { + return make_lazy<this_type + , typename phoenix::as_actor<A0>::type + , typename phoenix::as_actor<A1>::type + , typename phoenix::as_actor<A2>::type>()(*this + , phoenix::as_actor<A0>::convert(_0) + , phoenix::as_actor<A1>::convert(_1) + , phoenix::as_actor<A2>::convert(_2)); + } + + private: + // silence MSVC warning C4512: assignment operator could not be generated + terminal& operator= (terminal const&); + }; + + /////////////////////////////////////////////////////////////////////////// + namespace result_of + { + // Calculate the type of the compound terminal if generated by one of + // the spirit::terminal::operator() overloads above + + // The terminal type itself is passed through without modification + template <typename Tag> + struct terminal + { + typedef spirit::terminal<Tag> type; + }; + + template <typename Tag, typename A0> + struct terminal<Tag(A0)> + { + typedef typename spirit::terminal<Tag>:: + template result<A0>::type type; + }; + + template <typename Tag, typename A0, typename A1> + struct terminal<Tag(A0, A1)> + { + typedef typename spirit::terminal<Tag>:: + template result<A0, A1>::type type; + }; + + template <typename Tag, typename A0, typename A1, typename A2> + struct terminal<Tag(A0, A1, A2)> + { + typedef typename spirit::terminal<Tag>:: + template result<A0, A1, A2>::type type; + }; + } + + /////////////////////////////////////////////////////////////////////////// + // support for stateful tag types + namespace tag + { + template < + typename Data, typename Tag + , typename DataTag1 = unused_type, typename DataTag2 = unused_type> + struct stateful_tag + { + BOOST_SPIRIT_IS_TAG() + + typedef Data data_type; + + stateful_tag() {} + stateful_tag(data_type const& data) : data_(data) {} + + data_type data_; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + stateful_tag& operator= (stateful_tag const&); + }; + } + + template < + typename Data, typename Tag + , typename DataTag1 = unused_type, typename DataTag2 = unused_type> + struct stateful_tag_type + : spirit::terminal<tag::stateful_tag<Data, Tag, DataTag1, DataTag2> > + { + typedef tag::stateful_tag<Data, Tag, DataTag1, DataTag2> tag_type; + + stateful_tag_type() {} + stateful_tag_type(Data const& data) + : spirit::terminal<tag_type>(data) + {} + + private: + // silence MSVC warning C4512: assignment operator could not be generated + stateful_tag_type& operator= (stateful_tag_type const&); + }; + + namespace detail + { + // extract expression if this is a Tag + template <typename StatefulTag> + struct get_stateful_data + { + typedef typename StatefulTag::data_type data_type; + + // is invoked if given tag is != Tag + template <typename Tag_> + static data_type call(Tag_) { return data_type(); } + + // this is invoked if given tag is same as'Tag' + static data_type const& call(StatefulTag const& t) { return t.data_; } + }; + } + +}} + +#ifdef BOOST_SPIRIT_USE_PHOENIX_V3 +namespace boost { namespace phoenix +{ + template <typename Tag> + struct is_custom_terminal<Tag, typename Tag::is_spirit_tag> + : mpl::true_ + {}; + + template <typename Tag> + struct custom_terminal<Tag, typename Tag::is_spirit_tag> + { + typedef spirit::terminal<Tag> result_type; + + template <typename Context> + result_type operator()(Tag const & t, Context const &) + { + return spirit::terminal<Tag>(t); + } + }; +}} +#endif + +// Define a spirit terminal. This macro may be placed in any namespace. +// Common placeholders are placed in the main boost::spirit namespace +// (see common_terminals.hpp) + +#define BOOST_SPIRIT_TERMINAL_X(x, y) ((x, y)) BOOST_SPIRIT_TERMINAL_Y +#define BOOST_SPIRIT_TERMINAL_Y(x, y) ((x, y)) BOOST_SPIRIT_TERMINAL_X +#define BOOST_SPIRIT_TERMINAL_X0 +#define BOOST_SPIRIT_TERMINAL_Y0 + +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + +#define BOOST_SPIRIT_TERMINAL_NAME(name, type_name) \ + namespace tag { struct name { BOOST_SPIRIT_IS_TAG() }; } \ + typedef boost::proto::terminal<tag::name>::type type_name; \ + type_name const name = {{}}; \ + inline void BOOST_PP_CAT(silence_unused_warnings_, name)() { (void) name; } \ + /***/ + +#else + +#define BOOST_SPIRIT_TERMINAL_NAME(name, type_name) \ + namespace tag { struct name { BOOST_SPIRIT_IS_TAG() }; } \ + typedef boost::proto::terminal<tag::name>::type type_name; \ + /***/ + +#endif + +#define BOOST_SPIRIT_TERMINAL(name) \ + BOOST_SPIRIT_TERMINAL_NAME(name, name ## _type) \ + /***/ + +#define BOOST_SPIRIT_DEFINE_TERMINALS_NAME_A(r, _, names) \ + BOOST_SPIRIT_TERMINAL_NAME( \ + BOOST_PP_TUPLE_ELEM(2, 0, names), \ + BOOST_PP_TUPLE_ELEM(2, 1, names) \ + ) \ + /***/ + +#define BOOST_SPIRIT_DEFINE_TERMINALS_NAME(seq) \ + BOOST_PP_SEQ_FOR_EACH(BOOST_SPIRIT_DEFINE_TERMINALS_NAME_A, _, \ + BOOST_PP_CAT(BOOST_SPIRIT_TERMINAL_X seq, 0)) \ + /***/ + +// Define a spirit extended terminal. This macro may be placed in any namespace. +// Common placeholders are placed in the main boost::spirit namespace +// (see common_terminals.hpp) + +#ifndef BOOST_SPIRIT_NO_PREDEFINED_TERMINALS + +#define BOOST_SPIRIT_TERMINAL_NAME_EX(name, type_name) \ + namespace tag { struct name { BOOST_SPIRIT_IS_TAG() }; } \ + typedef boost::spirit::terminal<tag::name> type_name; \ + type_name const name = type_name(); \ + inline void BOOST_PP_CAT(silence_unused_warnings_, name)() { (void) name; } \ + /***/ + +#else + +#define BOOST_SPIRIT_TERMINAL_NAME_EX(name, type_name) \ + namespace tag { struct name { BOOST_SPIRIT_IS_TAG() }; } \ + typedef boost::spirit::terminal<tag::name> type_name; \ + /***/ + +#endif + +#define BOOST_SPIRIT_TERMINAL_EX(name) \ + BOOST_SPIRIT_TERMINAL_NAME_EX(name, name ## _type) \ + /***/ + +#define BOOST_SPIRIT_DEFINE_TERMINALS_NAME_EX_A(r, _, names) \ + BOOST_SPIRIT_TERMINAL_NAME_EX( \ + BOOST_PP_TUPLE_ELEM(2, 0, names), \ + BOOST_PP_TUPLE_ELEM(2, 1, names) \ + ) \ + /***/ + +#define BOOST_SPIRIT_DEFINE_TERMINALS_NAME_EX(seq) \ + BOOST_PP_SEQ_FOR_EACH(BOOST_SPIRIT_DEFINE_TERMINALS_NAME_EX_A, _, \ + BOOST_PP_CAT(BOOST_SPIRIT_TERMINAL_X seq, 0)) \ + /***/ + +#endif + + diff --git a/3rdParty/Boost/src/boost/spirit/home/support/terminal_expression.hpp b/3rdParty/Boost/src/boost/spirit/home/support/terminal_expression.hpp new file mode 100644 index 0000000..cf6bc5d --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/terminal_expression.hpp @@ -0,0 +1,75 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + Copyright (c) 2011 Thomas Heller + + 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_TERMINAL_EXPRESSION_MARCH_24_2011_1210AM) +#define BOOST_SPIRIT_TERMINAL_EXPRESSION_MARCH_24_2011_1210AM + +#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 + +namespace boost { namespace phoenix { namespace detail +{ + namespace expression + { + template < + typename F, typename A0 = void, typename A1 = void + , typename A2 = void, typename Dummy = void> + struct function_eval; + + template <typename F, typename A0> + struct function_eval<F, A0> + { + typedef phoenix::actor< + typename phoenix::as_composite< + phoenix::detail::function_eval<1>, F, A0 + >::type + > type; + + static type make(F f, A0 const & _0) + { + return phoenix::compose< + phoenix::detail::function_eval<1> >(f, _0); + } + }; + + template <typename F, typename A0, typename A1> + struct function_eval<F, A0, A1> + { + typedef phoenix::actor< + typename phoenix::as_composite< + phoenix::detail::function_eval<2>, F, A0, A1 + >::type + > type; + + static type make(F f, A0 const & _0, A1 const & _1) + { + return phoenix::compose< + phoenix::detail::function_eval<2> >(f, _0, _1); + } + }; + + template <typename F, typename A0, typename A1, typename A2> + struct function_eval<F, A0, A1, A2> + { + typedef phoenix::actor< + typename phoenix::as_composite< + phoenix::detail::function_eval<3>, F, A0, A1, A2 + >::type + > type; + + static type make(F f, A0 const & _0, A1 const & _1, A2 const & _2) + { + return phoenix::compose< + phoenix::detail::function_eval<3> >(f, _0, _1, _2); + } + }; + } +}}} + +#endif // !BOOST_SPIRIT_USE_PHOENIX_V3 + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/unused.hpp b/3rdParty/Boost/src/boost/spirit/home/support/unused.hpp new file mode 100644 index 0000000..4197d6a --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/unused.hpp @@ -0,0 +1,105 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2001-2011 Hartmut Kaiser + + 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_UNUSED_APRIL_16_2006_0616PM) +#define BOOST_SPIRIT_UNUSED_APRIL_16_2006_0616PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/config.hpp> +#include <boost/mpl/bool.hpp> + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable: 4522) // multiple assignment operators specified warning +#endif + +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit +{ + /////////////////////////////////////////////////////////////////////////// + // We do not import fusion ::unused_type anymore to avoid boost::fusion + // being turned into an associate namespace for boost::spirit, as this + // interferes with ADL in unexpected ways. We rather copy the full + // unused_type implementation from boost::fusion. + /////////////////////////////////////////////////////////////////////////// + struct unused_type + { + unused_type() + { + } + + template <typename T> + unused_type(T const&) + { + } + + template <typename T> + unused_type const& + operator=(T const&) const + { + return *this; + } + + template <typename T> + unused_type& + operator=(T const&) + { + return *this; + } + + unused_type const& + operator=(unused_type const&) const + { + return *this; + } + + unused_type& + operator=(unused_type const&) + { + return *this; + } + }; + + unused_type const unused = unused_type(); + + namespace detail + { + struct unused_only + { + unused_only(unused_type const&) {} + }; + } + + template <typename Out> + inline Out& operator<<(Out& out, detail::unused_only const&) + { + return out; + } + + template <typename In> + inline In& operator>>(In& in, unused_type&) + { + return in; + } + + /////////////////////////////////////////////////////////////////////////// + namespace traits + { + // We use this test to detect if the argument is not an unused_type + template <typename T> struct not_is_unused : mpl::true_ {}; + template <> struct not_is_unused<unused_type> : mpl::false_ {}; + } +}} + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/utf8.hpp b/3rdParty/Boost/src/boost/spirit/home/support/utf8.hpp new file mode 100644 index 0000000..c488342 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/utf8.hpp @@ -0,0 +1,72 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + 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_UC_TYPES_NOVEMBER_23_2008_0840PM) +#define BOOST_SPIRIT_UC_TYPES_NOVEMBER_23_2008_0840PM + +#if defined(_MSC_VER) +#pragma once +#endif + +#include <boost/cstdint.hpp> +#include <boost/foreach.hpp> +#include <boost/regex/pending/unicode_iterator.hpp> +#include <boost/type_traits/make_unsigned.hpp> +#include <string> + +namespace boost { namespace spirit +{ + typedef ::boost::uint32_t ucs4_char; + typedef char utf8_char; + typedef std::basic_string<ucs4_char> ucs4_string; + typedef std::basic_string<utf8_char> utf8_string; + + template <typename Char> + inline utf8_string to_utf8(Char value) + { + // always store as UTF8 + utf8_string result; + typedef std::back_insert_iterator<utf8_string> insert_iter; + insert_iter out_iter(result); + utf8_output_iterator<insert_iter> utf8_iter(out_iter); + typedef typename make_unsigned<Char>::type UChar; + *utf8_iter = (UChar)value; + return result; + } + + template <typename Char> + inline utf8_string to_utf8(Char const* str) + { + // always store as UTF8 + utf8_string result; + typedef std::back_insert_iterator<utf8_string> insert_iter; + insert_iter out_iter(result); + utf8_output_iterator<insert_iter> utf8_iter(out_iter); + typedef typename make_unsigned<Char>::type UChar; + while (*str) + *utf8_iter++ = (UChar)*str++; + return result; + } + + template <typename Char, typename Traits, typename Allocator> + inline utf8_string + to_utf8(std::basic_string<Char, Traits, Allocator> const& str) + { + // always store as UTF8 + utf8_string result; + typedef std::back_insert_iterator<utf8_string> insert_iter; + insert_iter out_iter(result); + utf8_output_iterator<insert_iter> utf8_iter(out_iter); + typedef typename make_unsigned<Char>::type UChar; + BOOST_FOREACH(Char ch, str) + { + *utf8_iter++ = (UChar)ch; + } + return result; + } +}} + +#endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/utree/utree_traits_fwd.hpp b/3rdParty/Boost/src/boost/spirit/home/support/utree/utree_traits_fwd.hpp new file mode 100644 index 0000000..7830c79 --- /dev/null +++ b/3rdParty/Boost/src/boost/spirit/home/support/utree/utree_traits_fwd.hpp @@ -0,0 +1,24 @@ +/*============================================================================= + Copyright (c) 2001-2011 Hartmut Kaiser + + 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_OUTPUT_UTREE_TRAITS_FWD_FEB_14_2011_0632AM) +#define BOOST_SPIRIT_OUTPUT_UTREE_TRAITS_FWD_FEB_14_2011_0632AM + +/////////////////////////////////////////////////////////////////////////////// +// forward declarations only +/////////////////////////////////////////////////////////////////////////////// +namespace boost { namespace spirit +{ + class utree; +}} + +namespace boost +{ + template <typename T> + inline T get(boost::spirit::utree const& x); +} + +#endif |