summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/scan3_go.go-Z-F0--var-backend.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/rlhc.d/case/scan3_go.go-Z-F0--var-backend.exp')
-rw-r--r--test/rlhc.d/case/scan3_go.go-Z-F0--var-backend.exp262
1 files changed, 262 insertions, 0 deletions
diff --git a/test/rlhc.d/case/scan3_go.go-Z-F0--var-backend.exp b/test/rlhc.d/case/scan3_go.go-Z-F0--var-backend.exp
new file mode 100644
index 00000000..42ed98d8
--- /dev/null
+++ b/test/rlhc.d/case/scan3_go.go-Z-F0--var-backend.exp
@@ -0,0 +1,262 @@
+package main
+import "fmt"
+
+var ts int ;
+var te int ;
+var act int ;
+var token int ;
+
+
+
+
+var cs int;
+var blen int;
+var buffer [1024] byte;
+
+var _scanner_actions [] int8 = [] int8 { 0, 1, 0, 1, 1, 1, 6, 2, 2, 3, 2, 2, 4, 2, 2, 5, 0 }
+var _scanner_trans_keys [] byte = [] byte { 1, 0, 0, 1, 1, 0, 0 }
+var _scanner_char_class [] int8 = [] int8 { 0, 1, 0 }
+var _scanner_index_offsets [] int8 = [] int8 { 0, 0, 2, 0 }
+var _scanner_indicies [] int8 = [] int8 { 0, 2, 0 }
+var _scanner_index_defaults [] int8 = [] int8 { 0, 1, 4, 0 }
+var _scanner_trans_cond_spaces [] int8 = [] int8 { -1, -1, -1, -1, -1, 0 }
+var _scanner_cond_targs [] int8 = [] int8 { 2, 0, 2, 1, 2, 0 }
+var _scanner_cond_actions [] int8 = [] int8 { 7, 0, 10, 5, 13, 0 }
+var _scanner_to_state_actions [] int8 = [] int8 { 0, 1, 0, 0 }
+var _scanner_from_state_actions [] int8 = [] int8 { 0, 3, 0, 0 }
+var _scanner_eof_trans [] int8 = [] int8 { 0, 0, 4, 0 }
+var _scanner_nfa_targs [] int8 = [] int8 { 0, 0 }
+var _scanner_nfa_offsets [] int8 = [] int8 { 0, 0, 0, 0 }
+var _scanner_nfa_push_actions [] int8 = [] int8 { 0, 0 }
+var _scanner_nfa_pop_trans [] int8 = [] int8 { 0, 0 }
+var scanner_start int = 1
+var scanner_first_final int = 1
+var scanner_error int = 0
+var scanner_en_main int = 1
+func prepare() {
+
+ {
+ cs = int(scanner_start);
+ ts = 0;
+ te = 0;
+ act = 0;
+ }
+}
+
+func exec(data string) {
+ var p int = 0
+ var pe int = len(data)
+ var eof int = pe
+
+ {
+ var _trans uint = 0
+ var _have uint = 0
+ var _cont uint = 1
+ var _acts int
+ var _nacts uint
+ var _keys int
+ var _inds int
+ for _cont == 1 {
+ {
+
+ if cs == 0 {
+ _cont = 0;
+
+ }
+ _have = 0;
+ if p == pe {
+ {
+ if p == eof {
+ {
+ if _scanner_eof_trans[cs] > 0 {
+ {
+ _trans = uint(_scanner_eof_trans[cs] )- 1;
+ _have = 1;
+ }
+
+ }
+ if _have == 0 {
+ {
+ }
+
+ }
+ }
+
+
+ }
+ if _have == 0 {
+ _cont = 0;
+
+ }
+ }
+
+ }
+ if _cont == 1 {
+ {
+ if _have == 0 {
+ {
+ _acts = int(_scanner_from_state_actions[cs] );
+ _nacts = uint(_scanner_actions[_acts ]);
+ _acts += 1;
+ for _nacts > 0 {
+ {
+ switch _scanner_actions[_acts ] {
+ case 1 :
+ {{ts = p;
+ }}
+
+ break;
+
+ }
+ _nacts -= 1;
+ _acts += 1;
+ }
+
+
+ }
+ _keys = int((cs<<1) );
+ _inds = int(_scanner_index_offsets[cs] );
+ switch {
+ case ( data[p ]) <= 98 && ( data[p ]) >= 97 :
+ {
+ var _ic int = int(_scanner_char_class[int(( data[p ]) )- 97])
+ switch {
+ case _ic <= int(_scanner_trans_keys[_keys+1 ])&& _ic >= int(_scanner_trans_keys[_keys ]):
+ _trans = uint(_scanner_indicies[_inds + int(( _ic - int(_scanner_trans_keys[_keys ])) )]);
+
+ default:
+ _trans = uint(_scanner_index_defaults[cs]);
+
+ }
+ }
+
+ default:
+ {
+ _trans = uint(_scanner_index_defaults[cs]);
+ }
+
+
+ }
+ }
+
+ }
+ if _cont == 1 {
+ {
+ cs = int(_scanner_cond_targs[_trans]);
+ if _scanner_cond_actions[_trans] != 0 {
+ {
+ _acts = int(_scanner_cond_actions[_trans] );
+ _nacts = uint(_scanner_actions[_acts ]);
+ _acts += 1;
+ for _nacts > 0 {
+ {
+ switch _scanner_actions[_acts ] {
+ case 2 :
+ {{te = p+1;
+ }}
+
+ break;
+ case 3 :
+ {{act = 1;
+ }}
+
+ break;
+ case 4 :
+ {{act = 2;
+ }}
+
+ break;
+ case 5 :
+ {{act = 3;
+ }}
+
+ break;
+ case 6 :
+ {{switch act {
+ case 1 :
+ p = ((te))-1;
+ {fmt.Print( "pat1\n" );}
+
+ break;
+ case 2 :
+ p = ((te))-1;
+ {fmt.Print( "pat2\n" );}
+
+ break;
+ case 3 :
+ p = ((te))-1;
+ {fmt.Print( "pat3\n" );}
+
+ break;
+
+ }
+ }
+ }
+
+ break;
+
+ }
+ _nacts -= 1;
+ _acts += 1;
+ }
+
+ }
+ }
+
+
+ }
+ _acts = int(_scanner_to_state_actions[cs] );
+ _nacts = uint(_scanner_actions[_acts ]);
+ _acts += 1;
+ for _nacts > 0 {
+ {
+ switch _scanner_actions[_acts ] {
+ case 0 :
+ {{ts = 0;
+ }}
+
+ break;
+
+ }
+ _nacts -= 1;
+ _acts += 1;
+ }
+
+
+ }
+ if cs == 0 {
+ _cont = 0;
+
+ }
+ if _cont == 1 {
+ p += 1;
+
+ }
+ }
+ }
+ }
+
+ }
+ }
+
+ }
+ }
+}
+func finish() {
+ if cs >= scanner_first_final {
+ fmt.Println("ACCEPT")
+ } else {
+ fmt.Println("FAIL")
+ }
+}
+var inp []string = []string {
+ "ab89",
+};
+
+func main() {
+ for _, data := range inp {
+ prepare()
+ exec(data)
+ finish()
+ }
+}