summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/next2_go.go-Z-F1--goto-backend.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/rlhc.d/case/next2_go.go-Z-F1--goto-backend.exp')
-rw-r--r--test/rlhc.d/case/next2_go.go-Z-F1--goto-backend.exp184
1 files changed, 184 insertions, 0 deletions
diff --git a/test/rlhc.d/case/next2_go.go-Z-F1--goto-backend.exp b/test/rlhc.d/case/next2_go.go-Z-F1--goto-backend.exp
new file mode 100644
index 00000000..4f0f9945
--- /dev/null
+++ b/test/rlhc.d/case/next2_go.go-Z-F1--goto-backend.exp
@@ -0,0 +1,184 @@
+package main
+import "fmt"
+
+var target int ;
+var last int ;
+
+
+
+
+var cs int;
+var blen int;
+var buffer [1024] byte;
+
+var _next2_trans_keys [] byte = [] byte { 1, 0, 15, 15, 13, 13, 8, 8, 13, 13, 11, 11, 6, 6, 5, 5, 9, 9, 8, 8, 6, 6, 12, 12, 14, 14, 9, 9, 12, 12, 7, 7, 10, 10, 6, 6, 6, 6, 0, 4, 1, 0, 1, 0, 1, 0, 1, 0, 0 }
+var _next2_char_class [] int8 = [] int8 { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 6, 1, 1, 7, 1, 1, 1, 1, 1, 8, 9, 1, 1, 10, 11, 12, 13, 1, 14, 15, 0 }
+var _next2_index_offsets [] int8 = [] int8 { 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 23, 23, 23, 23, 0 }
+var _next2_indicies [] int8 = [] int8 { 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 0, 1, 19, 20, 21, 0 }
+var _next2_index_defaults [] int8 = [] int8 { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }
+var _next2_trans_cond_spaces [] int8 = [] int8 { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0 }
+var _next2_cond_targs [] int8 = [] int8 { 19, 0, 3, 4, 5, 6, 7, 20, 9, 10, 21, 12, 13, 22, 15, 16, 17, 18, 23, 19, 19, 1, 0 }
+var _next2_cond_actions [] int8 = [] int8 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 3, 4, 5, 6, 0 }
+var _next2_nfa_targs [] int8 = [] int8 { 0, 0 }
+var _next2_nfa_offsets [] int8 = [] int8 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+var _next2_nfa_push_actions [] int8 = [] int8 { 0, 0 }
+var _next2_nfa_pop_trans [] int8 = [] int8 { 0, 0 }
+var next2_start int = 19
+var next2_first_final int = 19
+var next2_error int = 0
+var next2_en_unused int = 2
+var next2_en_one int = 8
+var next2_en_two int = 11
+var next2_en_three int = 14
+var next2_en_main int = 19
+func prepare() {
+
+ {
+ cs = int(next2_start);
+ }
+}
+
+func exec(data string) {
+ var p int = 0
+ var pe int = len(data)
+
+ {
+ var _trans int = 0
+ var _keys int
+ var _inds int
+ if p == pe {
+ goto _test_eof;
+
+ }
+ if cs == 0 {
+ goto _out;
+
+ }
+ _resume :
+ _keys = int((cs<<1) );
+ _inds = int(_next2_index_offsets[cs] );
+ switch {
+ case ( data[p ]) <= 120 && ( data[p ]) >= 10 :
+ {
+ var _ic int = int(_next2_char_class[int(( data[p ]) )- 10])
+ switch {
+ case _ic <= int(_next2_trans_keys[_keys+1 ])&& _ic >= int(_next2_trans_keys[_keys ]):
+ _trans = int(_next2_indicies[_inds + int(( _ic - int(_next2_trans_keys[_keys ])) )]);
+
+ default:
+ _trans = int(_next2_index_defaults[cs]);
+
+ }
+ }
+
+ default:
+ {
+ _trans = int(_next2_index_defaults[cs]);
+ }
+
+
+ }
+ goto _match_cond;
+
+ _match_cond :
+ cs = int(_next2_cond_targs[_trans]);
+ if _next2_cond_actions[_trans] == 0 {
+ goto _again;
+
+
+ }
+ switch _next2_cond_actions[_trans] {
+ case 1 :
+ {fmt.Print( "one\n" );target = 19;
+ {cs = (target);
+ }
+
+ }
+
+ break;
+ case 2 :
+ {fmt.Print( "two\n" );target = 19;
+ {cs = (target);
+ }
+
+ }
+
+ break;
+ case 3 :
+ {fmt.Print( "three\n" );target = 19;
+ {cs = (target);
+ }
+
+ }
+
+ break;
+ case 4 :
+ {target = 8;
+ {cs = (target);
+ }
+
+ last = 1;
+ }
+
+ break;
+ case 5 :
+ {target = 11;
+ {cs = (target);
+ }
+
+ last = 2;
+ }
+
+ break;
+ case 6 :
+ {if ( last == 2 ) {
+ target = 14;
+ {cs = (target);
+ }
+
+
+ }
+ last = 3;
+ }
+
+ break;
+
+ }
+
+ _again :
+ if cs == 0 {
+ goto _out;
+
+ }
+ p+= 1;
+ if p != pe {
+ goto _resume;
+
+ }
+
+ _test_eof :
+ {}
+
+ _out :
+ {}
+
+ }
+}
+func finish() {
+ if cs >= next2_first_final {
+ fmt.Println("ACCEPT")
+ } else {
+ fmt.Println("FAIL")
+ }
+}
+var inp []string = []string {
+ "1one3x2two3three\n",
+};
+
+func main() {
+ for _, data := range inp {
+ prepare()
+ exec(data)
+ finish()
+ }
+}