4 # Test the host language scanning for ruby.
10 action on_char { print("char: ", data[p..p], "\n"); }
11 action on_err { print("err: ", data[p..p], "\n"); }
12 action to_state { print("to state: " , data[p..p], "\n"); }
14 main := 'heXXX' $on_char $err(on_err) $to(to_state);
19 def run_machine( data )
27 print("rest: " , data[p..p+2], "\n")
34 inp.each { |str| run_machine(str) }
36 =begin _____OUTPUT_____