diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2014-10-13 19:14:30 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2014-10-13 19:14:30 +0000 |
commit | eafd7a3974e8605fd02794269db6114a3446e016 (patch) | |
tree | 064737b35dbe10f2995753ead92f95bac30ba048 /test/scan2.rl | |
download | ragel-tarball-eafd7a3974e8605fd02794269db6114a3446e016.tar.gz |
ragel-6.9ragel-6.9
Diffstat (limited to 'test/scan2.rl')
-rw-r--r-- | test/scan2.rl | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/scan2.rl b/test/scan2.rl new file mode 100644 index 0000000..a1ae959 --- /dev/null +++ b/test/scan2.rl @@ -0,0 +1,34 @@ +/* + * @LANG: indep + */ +ptr ts; +ptr te; +int act; +int token; +%% +%%{ + machine scanner; + + # Warning: changing the patterns or the input string will affect the + # coverage of the scanner action types. + main := |* + 'a' => { + prints "pat1\n"; + }; + + [ab]+ . 'c' => { + prints "pat2\n"; + }; + + any => { + prints "any\n"; + }; + *|; +}%% +/* _____INPUT_____ +"a" +_____INPUT_____ */ +/* _____OUTPUT_____ +pat1 +ACCEPT +_____OUTPUT_____ */ |