// The Construct // // Copyright (C) The Construct Developers, Authors & Contributors // Copyright (C) 2016-2022 Jason Volk // // Permission to use, copy, modify, and/or distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice is present in all copies. The // full license for this software is available in the LICENSE file. #pragma once #define HAVE_IRCD_SPIRIT_CUSTOM_PARSER_H // This file is not part of the IRCd standard include list (stdinc.h) because // it involves extremely expensive boost headers for creating formal spirit // grammars. This file is automatically included in the spirit.h group. namespace ircd { namespace spirit __attribute__((visibility("internal"))) { template struct custom_parser; BOOST_SPIRIT_TERMINAL(custom0); BOOST_SPIRIT_TERMINAL(custom1); BOOST_SPIRIT_TERMINAL(custom2); }} namespace boost { namespace spirit __attribute__((visibility("internal"))) { namespace qi { template struct make_primitive; template struct make_primitive; template struct make_primitive; } template<> struct [[clang::internal_linkage]] use_terminal :mpl::true_ {}; template<> struct [[clang::internal_linkage]] use_terminal :mpl::true_ {}; template<> struct [[clang::internal_linkage]] use_terminal :mpl::true_ {}; }} template struct [[gnu::visibility("internal"), clang::internal_linkage]] ircd::spirit::custom_parser :qi::primitive_parser> { template struct attribute { using type = iterator; }; template boost::spirit::info what(context &) const { return boost::spirit::info("custom"); } template [[clang::internal_linkage]] bool parse(iterator &, const iterator &, context &, const skipper &, attr &) const; }; template struct [[gnu::visibility("internal"), clang::internal_linkage]] boost::spirit::qi::make_primitive { using result_type = ircd::spirit::custom_parser<0>; result_type operator()(unused_type, unused_type) const { return result_type{}; } }; template struct [[gnu::visibility("internal"), clang::internal_linkage]] boost::spirit::qi::make_primitive { using result_type = ircd::spirit::custom_parser<1>; result_type operator()(unused_type, unused_type) const { return result_type{}; } }; template struct [[gnu::visibility("internal"), clang::internal_linkage]] boost::spirit::qi::make_primitive { using result_type = ircd::spirit::custom_parser<2>; result_type operator()(unused_type, unused_type) const { return result_type{}; } };