1/*=============================================================================
2 Copyright (c) 2019 Nikita Kniazev
3
4 Use, modification and distribution is subject to the Boost Software
5 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 http://www.boost.org/LICENSE_1_0.txt)
7=============================================================================*/
8
9#include "rule_separate_tu_grammar.hpp"
10
11#include <boost/spirit/home/x3.hpp>
12
13namespace unused_attr {
14
15const auto skipper_def = x3::lit(ch: '*');
16BOOST_SPIRIT_DEFINE(skipper)
17BOOST_SPIRIT_INSTANTIATE(skipper_type, char const*, x3::unused_type)
18
19const auto skipper2_def = x3::lit(ch: '#');
20BOOST_SPIRIT_DEFINE(skipper2)
21BOOST_SPIRIT_INSTANTIATE(skipper2_type, char const*, x3::unused_type)
22
23const auto grammar_def = *x3::lit(ch: '=');
24BOOST_SPIRIT_DEFINE(grammar)
25BOOST_SPIRIT_INSTANTIATE(grammar_type, char const*, x3::unused_type)
26BOOST_SPIRIT_INSTANTIATE(grammar_type, char const*, x3::phrase_parse_context<skipper_type>::type)
27BOOST_SPIRIT_INSTANTIATE(grammar_type, char const*, x3::phrase_parse_context<skipper2_type>::type)
28
29}
30
31namespace used_attr {
32
33const auto skipper_def = x3::space;
34BOOST_SPIRIT_DEFINE(skipper)
35BOOST_SPIRIT_INSTANTIATE(skipper_type, char const*, x3::unused_type)
36
37const auto grammar_def = x3::int_;
38BOOST_SPIRIT_DEFINE(grammar)
39BOOST_SPIRIT_INSTANTIATE(grammar_type, char const*, x3::unused_type)
40BOOST_SPIRIT_INSTANTIATE(grammar_type, char const*, x3::phrase_parse_context<skipper_type>::type)
41
42}
43

source code of boost/libs/spirit/test/x3/rule_separate_tu_grammar.cpp