diff options
author | Adrian Thurston <thurston@colm.net> | 2021-12-28 17:34:34 +0000 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2021-12-28 17:34:34 +0000 |
commit | 8dc93d3b2cc730e5344ce9c047d4d595dac3dc29 (patch) | |
tree | 495e2583ffb99e4934f4d2609096bcdf2dd57dd0 | |
parent | d5d66f8a74ab83c5a6f1eb78172185fd30f6c783 (diff) | |
download | ragel-8dc93d3b2cc730e5344ce9c047d4d595dac3dc29.tar.gz |
test case covering from-state actions on EOF
refs #80 from-state actions on EOF are executed only if there are EOF
transition actions
-rw-r--r-- | test/ragel.d/eoffrom.rl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/ragel.d/eoffrom.rl b/test/ragel.d/eoffrom.rl new file mode 100644 index 00000000..534de7b4 --- /dev/null +++ b/test/ragel.d/eoffrom.rl @@ -0,0 +1,24 @@ +/* + * @LANG: indep + * @NEEDS_EOF: yes + */ + +%%{ + machine eofact; + + action a1 { print_str "a1\n"; } + action a2 { print_str "a2\n"; } + + main := "hello" ( "" %from a1 %from a2 ); +}%% + +##### INPUT ##### +"hello" +"hello there" +##### OUTPUT ##### +a1 +a2 +ACCEPT +a1 +a2 +FAIL |