diff options
Diffstat (limited to 'test/ragel.d/erract9.rl')
-rw-r--r-- | test/ragel.d/erract9.rl | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/test/ragel.d/erract9.rl b/test/ragel.d/erract9.rl deleted file mode 100644 index e95a2282..00000000 --- a/test/ragel.d/erract9.rl +++ /dev/null @@ -1,43 +0,0 @@ -# -# @LANG: ruby -# -# Test the host language scanning for ruby. -# - -%%{ - machine erract9; - - action on_char { print("char: ", data[p..p], "\n"); } - action on_err { print("err: ", data[p..p], "\n"); } - action to_state { print("to state: " , data[p..p], "\n"); } - - main := 'heXXX' $on_char $err(on_err) $to(to_state); -}%% - -%% write data; - -def run_machine( data ) - p = 0; - pe = data.length - eof = pe - cs = 0 - - %% write init; - %% write exec; - - print("rest: " , data[p..p+2], "\n") -end - -inp = [ - "hello\n", -] - -inp.each { |str| run_machine(str) } - -##### OUTPUT ##### -char: h -to state: h -char: e -to state: e -err: l -rest: llo |