From 8dc93d3b2cc730e5344ce9c047d4d595dac3dc29 Mon Sep 17 00:00:00 2001 From: Adrian Thurston Date: Tue, 28 Dec 2021 17:34:34 +0000 Subject: [PATCH] test case covering from-state actions on EOF refs #80 from-state actions on EOF are executed only if there are EOF transition actions --- test/ragel.d/eoffrom.rl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/ragel.d/eoffrom.rl 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