rem: typedef sequence<chlit<char>, chlit<char> > test_sequence1_t; BOOST_STATIC_ASSERT(( ::boost::is_same< test_sequence1_t, post_order::result<identity_transform, test_sequence1_t>::type >::value ));   assert( parse( "ab", post_order::traverse(identity_transform(), ch_p('a') >> 'b') ).full ); assert( !parse( "ba", post_order::traverse(identity_transform(), ch_p('a') >> 'b') ).hit );   assert( !parse( "cba", post_order::traverse( identity_transform(), ch_p('a') >> 'b' >> 'c' ) ).hit );
context: traverse_identity_tests(){    //  test type equality    typedef sequence<chlit<char>, chlit<char> > test_sequence1_t;    BOOST_STATIC_ASSERT((        ::boost::is_same<            test_sequence1_t,            post_order::result<identity_transform, test_sequence1_t>::type        >::value    ));    //  test (rough) runtime equality    assert(        parse(            "ab",            post_order::traverse(identity_transform(), ch_p('a') >> 'b')        ).full    );    assert(        !parse(            "ba",            post_order::traverse(identity_transform(), ch_p('a') >> 'b')        ).hit    );    ///////////////////////////////////////////////////////////////////////////    assert(        !parse(            "cba",            post_order::traverse(                identity_transform(),                ch_p('a') >> 'b' >> 'c'            )        ).hit    );/////////////////////////////////////////////////////////////////////////////////  Test more complex sequenceschar c;/////////////////////////////////////////////////////////////////////////////////  test: ((a >> b) >> c) >> d    typedef        sequence<            sequence<                sequence<                    kleene_star<chlit<> >,                    action<chlit<>, assign_actor<char> >                >,                chlit<>            >,            optional<chlit<> >        > test_sequence2_t;    BOOST_STATIC_ASSERT((        ::boost::is_same<            test_sequence2_t,            post_order::result<identity_transform, test_sequence2_t>::type        >::value    ));    c = 0;    assert(        parse(            "aabcd",            post_order::traverse(                identity_transform(),                ((*ch_p('a') >> ch_p('b')[assign(c)]) >> 'c') >> !ch_p('d')            )        ).full    );    assert(c == 'b');/////////////////////////////////////////////////////////////////////////////////  test: (a >> (b >> c)) >> d    typedef        sequence<            sequence<                kleene_star<chlit<> >,                sequence<                    action<chlit<>, assign_actor<char> >,                    chlit<>                >            >,            optional<chlit<char> >        > test_sequence3_t;    BOOST_STATIC_ASSERT((        ::boost::is_same<            test_sequence3_t,            post_order::result<identity_transform, test_sequence3_t>::type        >::value    ));    c = 0;    assert(        parse(            "aabcd",            post_order::traverse(                identity_transform(),                (*ch_p('a') >> (ch_p('b')[assign(c)] >> 'c')) >> !ch_p('d')            )        ).full    );    assert(c == 'b');/////////////////////////////////////////////////////////////////////////////////  test: a >> (b >> (c >> d))    typedef        sequence<            kleene_star<chlit<> >,            sequence<                action<chlit<>, assign_actor<char> >,                sequence<                    chlit<>,                    optional<chlit<> >                >            >        > test_sequence4_t;    BOOST_STATIC_ASSERT((        ::boost::is_same<            test_sequence4_t,            post_order::result<identity_transform, test_sequence4_t>::type        >::value    ));    c = 0;    assert(        parse(            "aabcd",            post_order::traverse(                identity_transform(),                *ch_p('a') >> (ch_p('b')[assign(c)] >> ('c' >> !ch_p('d')))            )        ).full    );    assert(c == 'b');/////////////////////////////////////////////////////////////////////////////////  test: a >> ((b >> c) >> d)    typedef        sequence<            kleene_star<chlit<> >,            sequence<                sequence<                    action<chlit<>, assign_actor<char> >,                    chlit<>                >,                optional<chlit<> >            >        > test_sequence5_t;    BOOST_STATIC_ASSERT((        ::boost::is_same<            test_sequence5_t,            post_order::result<identity_transform, test_sequence5_t>::type        >::value    ));    c = 0;    assert(        parse(            "aabcd",            post_order::traverse(                identity_transform(),                *ch_p('a') >> ((ch_p('b')[assign(c)] >> 'c') >> !ch_p('d'))            )        ).full    );    assert(c == 'b');/////////////////////////////////////////////////////////////////////////////////  test: (a >> b) >> (c >> d)    typedef        sequence<            sequence<                kleene_star<chlit<> >,                action<chlit<>, assign_actor<char> >            >,            sequence<                chlit<>,                optional<chlit<> >            >        > test_sequence6_t;    BOOST_STATIC_ASSERT((        ::boost::is_same<            test_sequence6_t,            post_order::result<identity_transform, test_sequence6_t>::type        >::value    ));    c = 0;    assert(        parse(            "aabcd",            post_order::traverse(                identity_transform(),                (*ch_p('a') >> ch_p('b')[assign(c)]) >> ('c' >> !ch_p('d'))            )        ).full    );    assert(c == 'b');}