Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/spirit/test/group_match_bug.cpp @ 29

Last change on this file since 29 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 1.2 KB
Line 
1/*=============================================================================
2    Copyright (c) 2004 Joao Abecasis
3    http://spirit.sourceforge.net/
4
5    Use, modification and distribution is subject to the Boost Software
6    License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7    http://www.boost.org/LICENSE_1_0.txt)
8=============================================================================*/
9
10#include <boost/spirit/core.hpp>
11
12#include <boost/spirit/attribute/closure.hpp>
13
14#include <boost/spirit/tree/ast.hpp>
15#include <boost/spirit/tree/parse_tree.hpp>
16
17using namespace boost::spirit;
18
19struct test_closure : public closure<test_closure, int>
20{
21    member1 value;
22};
23
24struct test_grammar : public grammar<test_grammar>
25{
26    template <typename ScannerT>
27    struct definition
28    {
29        definition(const test_grammar&)
30        {
31        }
32
33        rule<ScannerT, test_closure::context_t> const & start() const
34        {
35            return first;
36        }
37
38        rule<ScannerT, test_closure::context_t> first;
39    };
40};
41
42int main()
43{
44    parse("abcd", test_grammar());
45    pt_parse("abcd", test_grammar());
46    ast_parse("abcd", test_grammar());
47}
48
49
Note: See TracBrowser for help on using the repository browser.