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/eofact.rl | |
download | ragel-tarball-eafd7a3974e8605fd02794269db6114a3446e016.tar.gz |
ragel-6.9ragel-6.9
Diffstat (limited to 'test/eofact.rl')
-rw-r--r-- | test/eofact.rl | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/test/eofact.rl b/test/eofact.rl new file mode 100644 index 0000000..eeb91b8 --- /dev/null +++ b/test/eofact.rl @@ -0,0 +1,51 @@ +/* + * @LANG: indep + * + * Test works with split code gen. + */ +%% +%%{ + machine eofact; + + action a1 { prints "a1\n"; } + action a2 { prints "a2\n"; } + action a3 { prints "a3\n"; } + action a4 { prints "a4\n"; } + + + main := ( + 'hello' @eof a1 %eof a2 '\n'? | + 'there' @eof a3 %eof a4 + ); + +}%% +/* _____INPUT_____ +"" +"h" +"hell" +"hello" +"hello\n" +"t" +"ther" +"there" +"friend" +_____INPUT_____ */ +/* _____OUTPUT_____ +a1 +a3 +FAIL +a1 +FAIL +a1 +FAIL +a2 +ACCEPT +ACCEPT +a3 +FAIL +a3 +FAIL +a4 +ACCEPT +FAIL +_____OUTPUT_____ */ |