added item.
[ragel.git] / test / scan4.rl
blob12d4d4c75410962a181364c125a5fcbc4a094f08
1 /*
2  * @LANG: indep
3  */
4 ptr ts;
5 ptr te;
6 int act;
7 int token;
8 %%
9 %%{
10         machine scanner;
12         # Warning: changing the patterns or the input string will affect the
13         # coverage of the scanner action types.
14         main := |*
15           'a' => {
16                   prints "pat1\n";
17           };
19           [ab]+ . 'c' => {
20                   prints "pat2\n";
21           };
23           any;
24         *|;
25 }%%
26 /* _____INPUT_____
27 "ba a"
28 _____INPUT_____ */
29 /* _____OUTPUT_____
30 pat1
31 pat1
32 ACCEPT
33 _____OUTPUT_____ */