Skip to content

Commit

Permalink
test case covering from-state actions on EOF
Browse files Browse the repository at this point in the history
refs #80 from-state actions on EOF are executed only if there are EOF
transition actions
  • Loading branch information
adrian-thurston committed Dec 28, 2021
1 parent d5d66f8 commit 8dc93d3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/ragel.d/eoffrom.rl
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8dc93d3

Please sign in to comment.