update(add) packaging directory and spec file from OBSTF:Private, OBS
[external/ragel.git] / test / scan4.rl
1 /*
2  * @LANG: indep
3  */
4 ptr ts;
5 ptr te;
6 int act;
7 int token;
8 %%
9 %%{
10         machine scanner;
11
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           };
18
19           [ab]+ . 'c' => {
20                   prints "pat2\n";
21           };
22
23           any;
24         *|;
25 }%%
26 /* _____INPUT_____
27 "ba a"
28 _____INPUT_____ */
29 /* _____OUTPUT_____
30 pat1
31 pat1
32 ACCEPT
33 _____OUTPUT_____ */