Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| SHA1 Hash: | 997da00871c0d6bfc4a0d96df197dc49291225f3 |
|---|---|
| Date: | 2008-06-21 10:57:50 |
| User: | stephan |
| Comment: | more tinkering |
Tags And Properties
- branch=trunk inherited from [d45e7467f2]
- sym-trunk inherited from [d45e7467f2]
Changes
Changes to test.cpp
| Old (538a4810cab964ba) | New (f12927700b2af25c) | |||
|---|---|---|---|---|
| 1 | //////////////////////////////////////////////////////////////////////// | 1 | //////////////////////////////////////////////////////////////////////// | |
| 2 | // Test/demo code for flatestream | 2 | // Test/demo code for flatestream | |
| 3 | //////////////////////////////////////////////////////////////////////// | 3 | //////////////////////////////////////////////////////////////////////// | |
| 4 | #include <iostream> | 4 | #include <iostream> | |
| 5 | #include <iterator> | 5 | #include <iterator> | |
| 26 hidden lines | ||||
| 32 | 32 | |||
| 33 | typedef r_plus< r_alpha > RAlphaPlus; | 33 | typedef r_plus< r_alpha > RAlphaPlus; | |
| 34 | typedef rule_list< r_chi<'a'>, r_ch<'b'>, r_chi<'c'> > myr_chars; | 34 | typedef rule_list< r_chi<'a'>, r_ch<'b'>, r_chi<'c'> > myr_chars; | |
| 35 | typedef r_plus< r_and< myr_chars > > Rule2; | 35 | typedef r_plus< r_and< myr_chars > > Rule2; | |
| 36 | 36 | |||
| 37 | typedef r_action< OneOf, MyAction > head; | | | 37 | typedef r_action< OneOf, a_actions< rule_list<MyAction,a_append> > > head; |
| 38 | 38 | |||
| 39 | std::string instr( "AbCabcdef ghijkl"); | 39 | std::string instr( "AbCabcdef ghijkl"); | |
| 40 | COUT << "input == ["<<instr<<"]\n"; | 40 | COUT << "input == ["<<instr<<"]\n"; | |
| 41 | int ignored; | | | 41 | std::string cstate; |
| 42 | bool worked = parse<head>( instr, ignored ); | | | 42 | bool worked = parse<head>( instr, cstate ); |
| 43 | COUT << "worked == " << worked << '\n'; | 43 | COUT << "worked == " << worked << '\n'; | |
| > | 44 | COUT << "cstate == ["<<cstate<<"]\n"; | ||
| 44 | } | 45 | } | |
| 45 | 46 | |||
| 46 | void do_calc() | 47 | void do_calc() | |
| 47 | { | 48 | { | |
| 48 | using namespace Ps; | 49 | using namespace Ps; | |
| 83 hidden lines | ||||
| 132 | return 1; | 133 | return 1; | |
| 133 | } | 134 | } | |
| 134 | return 0; | 135 | return 0; | |
| 135 | } | 136 | } | |
| 136 | #undef DO_PARSE | 137 | #undef DO_PARSE | |