summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/gotocallret2_go.go-Z-G2--goto-backend.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/rlhc.d/case/gotocallret2_go.go-Z-G2--goto-backend.exp')
-rw-r--r--test/rlhc.d/case/gotocallret2_go.go-Z-G2--goto-backend.exp712
1 files changed, 712 insertions, 0 deletions
diff --git a/test/rlhc.d/case/gotocallret2_go.go-Z-G2--goto-backend.exp b/test/rlhc.d/case/gotocallret2_go.go-Z-G2--goto-backend.exp
new file mode 100644
index 00000000..f3101438
--- /dev/null
+++ b/test/rlhc.d/case/gotocallret2_go.go-Z-G2--goto-backend.exp
@@ -0,0 +1,712 @@
+package main
+import "fmt"
+
+var comm byte ;
+var top int ;
+var stack [32] int ;
+var ts int ;
+var te int ;
+var act int ;
+var val int ;
+
+
+
+
+var cs int;
+var blen int;
+var buffer [1024] byte;
+
+var GotoCallRet_start int = 6
+var GotoCallRet_first_final int = 6
+var GotoCallRet_error int = 0
+var GotoCallRet_en_handle int = 5
+var GotoCallRet_en_one int = 10
+var GotoCallRet_en_two int = 13
+var GotoCallRet_en_main int = 6
+var _GotoCallRet_nfa_targs [] int8 = [] int8 { 0, 0 }
+var _GotoCallRet_nfa_offsets [] int8 = [] int8 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+var _GotoCallRet_nfa_push_actions [] int8 = [] int8 { 0, 0 }
+var _GotoCallRet_nfa_pop_trans [] int8 = [] int8 { 0, 0 }
+func prepare() {
+
+ {
+ cs = int(GotoCallRet_start);
+ top = 0;
+ ts = 0;
+ te = 0;
+ }
+}
+
+func exec(data string) {
+ var p int = 0
+ var pe int = len(data)
+ var eof int = pe
+
+ {
+ if p == pe {
+ goto _test_eof;
+
+ }
+ goto _resume;
+
+ _again:
+ switch cs {
+ case 6:
+ goto st6;
+ case 0:
+ goto st0;
+ case 7:
+ goto st7;
+ case 1:
+ goto st1;
+ case 2:
+ goto st2;
+ case 3:
+ goto st3;
+ case 4:
+ goto st4;
+ case 8:
+ goto st8;
+ case 5:
+ goto st5;
+ case 9:
+ goto st9;
+ case 10:
+ goto st10;
+ case 11:
+ goto st11;
+ case 12:
+ goto st12;
+ case 13:
+ goto st13;
+ case 14:
+ goto st14;
+ case 15:
+ goto st15;
+
+ }
+ _resume:
+ switch cs {
+ case 6:
+ goto st_case_6;
+ case 0:
+ goto st_case_0;
+ case 7:
+ goto st_case_7;
+ case 1:
+ goto st_case_1;
+ case 2:
+ goto st_case_2;
+ case 3:
+ goto st_case_3;
+ case 4:
+ goto st_case_4;
+ case 8:
+ goto st_case_8;
+ case 5:
+ goto st_case_5;
+ case 9:
+ goto st_case_9;
+ case 10:
+ goto st_case_10;
+ case 11:
+ goto st_case_11;
+ case 12:
+ goto st_case_12;
+ case 13:
+ goto st_case_13;
+ case 14:
+ goto st_case_14;
+ case 15:
+ goto st_case_15;
+
+ }
+ goto st_out;
+ ctr7:
+ {{p = ((te))-1;
+ {fmt.Print( "word " );val = 3;
+ {goto st5;}}
+ }}
+
+
+ goto st6;
+ ctr8:
+ {{te = p+1;
+ {fmt.Print( "this is the foil" );}
+ }}
+
+
+ goto st6;
+ ctr10:
+ {{te = p+1;
+ }}
+
+
+ goto st6;
+ ctr12:
+ {{te = p+1;
+ {fmt.Print( "space " );}
+ }}
+
+
+ goto st6;
+ ctr13:
+ {{te = p+1;
+ {fmt.Print( "[ " );{stack[top] = 6;
+ top+= 1;
+ goto st13;}}
+ }}
+
+
+ goto st6;
+ ctr15:
+ {{te = p+1;
+ {fmt.Print( "{ " );{stack[top] = 6;
+ top+= 1;
+ goto st10;}}
+ }}
+
+
+ goto st6;
+ ctr20:
+ {{te = p;
+ p = p - 1;
+ {fmt.Print( "word " );val = 3;
+ {goto st5;}}
+ }}
+
+
+ goto st6;
+ st6:
+ {{ts = 0;
+ }}
+
+ p+= 1;
+ if p == pe {
+ goto _test_eof6;
+
+ }
+ st_case_6:
+ {{ts = p;
+ }}
+ switch ( data[p ]) {
+ case 10:
+ {
+ goto ctr10;
+ }
+ case 32:
+ {
+ goto ctr12;
+ }
+ case 91:
+ {
+ goto ctr13;
+ }
+ case 123:
+ {
+ goto ctr15;
+ }
+
+ }
+ if 97 <= ( data[p ]) && ( data[p ]) <= 122 {
+ {
+ goto ctr14;
+ }
+
+ }
+ {
+ goto st0;
+ }
+ st_case_0:
+ st0:
+ cs = 0;
+ goto _out;
+ ctr14:
+ {{te = p+1;
+ }}
+
+
+ goto st7;
+ st7:
+ p+= 1;
+ if p == pe {
+ goto _test_eof7;
+
+ }
+ st_case_7:
+ if ( data[p ]) == 32 {
+ {
+ goto st1;
+ }
+
+ }
+ if 97 <= ( data[p ]) && ( data[p ]) <= 122 {
+ {
+ goto st8;
+ }
+
+ }
+ {
+ goto ctr20;
+ }
+ st1:
+ p+= 1;
+ if p == pe {
+ goto _test_eof1;
+
+ }
+ st_case_1:
+ if ( data[p ]) == 102 {
+ {
+ goto st2;
+ }
+
+ }
+ {
+ goto ctr7;
+ }
+ st2:
+ p+= 1;
+ if p == pe {
+ goto _test_eof2;
+
+ }
+ st_case_2:
+ if ( data[p ]) == 111 {
+ {
+ goto st3;
+ }
+
+ }
+ {
+ goto ctr7;
+ }
+ st3:
+ p+= 1;
+ if p == pe {
+ goto _test_eof3;
+
+ }
+ st_case_3:
+ if ( data[p ]) == 105 {
+ {
+ goto st4;
+ }
+
+ }
+ {
+ goto ctr7;
+ }
+ st4:
+ p+= 1;
+ if p == pe {
+ goto _test_eof4;
+
+ }
+ st_case_4:
+ if ( data[p ]) == 108 {
+ {
+ goto ctr8;
+ }
+
+ }
+ {
+ goto ctr7;
+ }
+ st8:
+ p+= 1;
+ if p == pe {
+ goto _test_eof8;
+
+ }
+ st_case_8:
+ if 97 <= ( data[p ]) && ( data[p ]) <= 122 {
+ {
+ goto st8;
+ }
+
+ }
+ {
+ goto ctr20;
+ }
+ st5:
+ {{ts = 0;
+ }}
+
+ p+= 1;
+ if p == pe {
+ goto _test_eof5;
+
+ }
+ st_case_5:
+ {
+ goto ctr9;
+ }
+ ctr9:
+ cs = 9;
+ {fmt.Print( "handle " );{p = p - 1;
+ }
+
+ if ( val == 1 ) {
+ cs = (10);
+
+ }
+ if ( val == 2 ) {
+ cs = (13);
+
+ }
+ if ( val == 3 ) {
+ cs = 6;}
+ }
+
+
+ goto _again;
+ st9:
+ p+= 1;
+ if p == pe {
+ goto _test_eof9;
+
+ }
+ st_case_9:
+ {
+ goto st0;
+ }
+ ctr21:
+ {{te = p+1;
+ {fmt.Print( "space " );}
+ }}
+
+
+ goto st10;
+ ctr22:
+ {{te = p+1;
+ {fmt.Print( "[ " );{stack[top] = 10;
+ top+= 1;
+ cs = (13);
+ goto _again;}
+ }
+ }}
+
+
+ goto st10;
+ ctr24:
+ {{te = p+1;
+ {fmt.Print( "{ " );{stack[top] = 10;
+ top+= 1;
+ cs = (10);
+ goto _again;}
+ }
+ }}
+
+
+ goto st10;
+ ctr27:
+ {{te = p;
+ p = p - 1;
+ {fmt.Print( "word " );val = 1;
+ {cs = (5);
+ goto _again;}
+ }
+ }}
+
+
+ goto st10;
+ ctr29:
+ {{te = p;
+ p = p - 1;
+ {fmt.Print( "} " );{top -= 1;
+ cs = stack[top];
+ goto _again;}
+ }
+ }}
+
+
+ goto st10;
+ st10:
+ {{ts = 0;
+ }}
+
+ p+= 1;
+ if p == pe {
+ goto _test_eof10;
+
+ }
+ st_case_10:
+ {{ts = p;
+ }}
+ switch ( data[p ]) {
+ case 32:
+ {
+ goto ctr21;
+ }
+ case 91:
+ {
+ goto ctr22;
+ }
+ case 123:
+ {
+ goto ctr24;
+ }
+ case 125:
+ {
+ goto st12;
+ }
+
+ }
+ if 97 <= ( data[p ]) && ( data[p ]) <= 122 {
+ {
+ goto st11;
+ }
+
+ }
+ {
+ goto st0;
+ }
+ st11:
+ p+= 1;
+ if p == pe {
+ goto _test_eof11;
+
+ }
+ st_case_11:
+ if 97 <= ( data[p ]) && ( data[p ]) <= 122 {
+ {
+ goto st11;
+ }
+
+ }
+ {
+ goto ctr27;
+ }
+ st12:
+ p+= 1;
+ if p == pe {
+ goto _test_eof12;
+
+ }
+ st_case_12:
+ if ( data[p ]) == 32 {
+ {
+ goto st12;
+ }
+
+ }
+ {
+ goto ctr29;
+ }
+ ctr30:
+ {{te = p+1;
+ {fmt.Print( "space " );}
+ }}
+
+
+ goto st13;
+ ctr31:
+ {{te = p+1;
+ {fmt.Print( "[ " );{stack[top] = 13;
+ top+= 1;
+ cs = (13);
+ goto _again;}
+ }
+ }}
+
+
+ goto st13;
+ ctr34:
+ {{te = p+1;
+ {fmt.Print( "{ " );{stack[top] = 13;
+ top+= 1;
+ cs = (10);
+ goto _again;}
+ }
+ }}
+
+
+ goto st13;
+ ctr36:
+ {{te = p;
+ p = p - 1;
+ {fmt.Print( "] " );{top -= 1;
+ cs = stack[top];
+ goto _again;}
+ }
+ }}
+
+
+ goto st13;
+ ctr38:
+ {{te = p;
+ p = p - 1;
+ {fmt.Print( "word " );val = 2;
+ {cs = (5);
+ goto _again;}
+ }
+ }}
+
+
+ goto st13;
+ st13:
+ {{ts = 0;
+ }}
+
+ p+= 1;
+ if p == pe {
+ goto _test_eof13;
+
+ }
+ st_case_13:
+ {{ts = p;
+ }}
+ switch ( data[p ]) {
+ case 32:
+ {
+ goto ctr30;
+ }
+ case 91:
+ {
+ goto ctr31;
+ }
+ case 93:
+ {
+ goto st14;
+ }
+ case 123:
+ {
+ goto ctr34;
+ }
+
+ }
+ if 97 <= ( data[p ]) && ( data[p ]) <= 122 {
+ {
+ goto st15;
+ }
+
+ }
+ {
+ goto st0;
+ }
+ st14:
+ p+= 1;
+ if p == pe {
+ goto _test_eof14;
+
+ }
+ st_case_14:
+ if ( data[p ]) == 32 {
+ {
+ goto st14;
+ }
+
+ }
+ {
+ goto ctr36;
+ }
+ st15:
+ p+= 1;
+ if p == pe {
+ goto _test_eof15;
+
+ }
+ st_case_15:
+ if 97 <= ( data[p ]) && ( data[p ]) <= 122 {
+ {
+ goto st15;
+ }
+
+ }
+ {
+ goto ctr38;
+ }
+ st_out:
+ _test_eof6: cs = 6;
+ goto _test_eof;
+ _test_eof7: cs = 7;
+ goto _test_eof;
+ _test_eof1: cs = 1;
+ goto _test_eof;
+ _test_eof2: cs = 2;
+ goto _test_eof;
+ _test_eof3: cs = 3;
+ goto _test_eof;
+ _test_eof4: cs = 4;
+ goto _test_eof;
+ _test_eof8: cs = 8;
+ goto _test_eof;
+ _test_eof5: cs = 5;
+ goto _test_eof;
+ _test_eof9: cs = 9;
+ goto _test_eof;
+ _test_eof10: cs = 10;
+ goto _test_eof;
+ _test_eof11: cs = 11;
+ goto _test_eof;
+ _test_eof12: cs = 12;
+ goto _test_eof;
+ _test_eof13: cs = 13;
+ goto _test_eof;
+ _test_eof14: cs = 14;
+ goto _test_eof;
+ _test_eof15: cs = 15;
+ goto _test_eof;
+
+ _test_eof: {}
+ if p == eof {
+ {
+ switch cs {
+ case 7:
+ goto ctr20;
+ case 1:
+ goto ctr7;
+ case 2:
+ goto ctr7;
+ case 3:
+ goto ctr7;
+ case 4:
+ goto ctr7;
+ case 8:
+ goto ctr20;
+ case 11:
+ goto ctr27;
+ case 12:
+ goto ctr29;
+ case 14:
+ goto ctr36;
+ case 15:
+ goto ctr38;
+
+ }
+ }
+
+
+ }
+ _out: {}
+ }
+}
+func finish() {
+ if cs >= GotoCallRet_first_final {
+ fmt.Println("ACCEPT")
+ } else {
+ fmt.Println("FAIL")
+ }
+}
+var inp []string = []string {
+ "{a{b[c d]d}c}\n",
+ "[a{b[c d]d}c}\n",
+ "[a[b]c]d{ef{g{h}i}j}l\n",
+ "{{[]}}\n",
+ "a b c\n",
+ "{a b c}\n",
+ "[a b c]\n",
+ "{]\n",
+ "{{}\n",
+ "[[[[[[]]]]]]\n",
+ "[[[[[[]]}]]]\n",
+};
+
+func main() {
+ for _, data := range inp {
+ prepare()
+ exec(data)
+ finish()
+ }
+}