summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/cond1_go.go-Z-F1--var-backend.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/rlhc.d/case/cond1_go.go-Z-F1--var-backend.exp')
-rw-r--r--test/rlhc.d/case/cond1_go.go-Z-F1--var-backend.exp283
1 files changed, 283 insertions, 0 deletions
diff --git a/test/rlhc.d/case/cond1_go.go-Z-F1--var-backend.exp b/test/rlhc.d/case/cond1_go.go-Z-F1--var-backend.exp
new file mode 100644
index 00000000..67654728
--- /dev/null
+++ b/test/rlhc.d/case/cond1_go.go-Z-F1--var-backend.exp
@@ -0,0 +1,283 @@
+package main
+import "fmt"
+
+var i int ;
+var j int ;
+var k int ;
+
+
+
+
+var cs int;
+var blen int;
+var buffer [1024] byte;
+
+var _foo_trans_keys [] byte = [] byte { 1, 0, 2, 2, 2, 2, 2, 2, 3, 4, 3, 4, 3, 4, 5, 5, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 0, 0 }
+var _foo_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, 2, 2, 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, 3, 4, 5, 0 }
+var _foo_index_offsets [] int8 = [] int8 { 0, 0, 1, 2, 3, 5, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0 }
+var _foo_indicies [] int8 = [] int8 { 0, 2, 3, 4, 5, 6, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0 }
+var _foo_index_defaults [] int8 = [] int8 { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 }
+var _foo_trans_cond_spaces [] int8 = [] int8 { -1, -1, -1, -1, -1, 1, -1, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, 0 }
+var _foo_trans_offsets [] int8 = [] int8 { 0, 1, 2, 3, 4, 5, 7, 8, 16, 20, 21, 22, 23, 24, 25, 26, 27, 0 }
+var _foo_cond_targs [] int8 = [] int8 { 2, 0, 3, 4, 5, 0, 7, 6, 0, 11, 7, 12, 9, 13, 10, 14, 0, 7, 9, 10, 8, 15, 8, 8, 8, 8, 8, 8, 0 }
+var _foo_cond_actions [] int8 = [] int8 { 1, 0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, 6, 7, 8, 9, 10, 11, 0 }
+var _foo_nfa_targs [] int8 = [] int8 { 0, 0 }
+var _foo_nfa_offsets [] int8 = [] int8 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+var _foo_nfa_push_actions [] int8 = [] int8 { 0, 0 }
+var _foo_nfa_pop_trans [] int8 = [] int8 { 0, 0 }
+var foo_start int = 1
+var foo_first_final int = 15
+var foo_error int = 0
+var foo_en_main int = 1
+func prepare() {
+
+ {
+ cs = int(foo_start);
+ }
+}
+
+func exec(data string) {
+ var p int = 0
+ var pe int = len(data)
+
+ {
+ var _cpc int
+ var _trans uint = 0
+ var _have uint = 0
+ var _cont uint = 1
+ var _cond uint = 0
+ var _keys int
+ var _inds int
+ for _cont == 1 {
+ {
+
+ if cs == 0 {
+ _cont = 0;
+
+ }
+ _have = 0;
+ if p == pe {
+ {
+ if _have == 0 {
+ _cont = 0;
+
+ }
+ }
+
+ }
+ if _cont == 1 {
+ {
+ if _have == 0 {
+ {
+ _keys = int((cs<<1) );
+ _inds = int(_foo_index_offsets[cs] );
+ switch {
+ case ( data[p ]) <= 99 && ( data[p ]) >= 10 :
+ {
+ var _ic int = int(_foo_char_class[int(( data[p ]) )- 10])
+ switch {
+ case _ic <= int(_foo_trans_keys[_keys+1 ])&& _ic >= int(_foo_trans_keys[_keys ]):
+ _trans = uint(_foo_indicies[_inds + int(( _ic - int(_foo_trans_keys[_keys ])) )]);
+
+ default:
+ _trans = uint(_foo_index_defaults[cs]);
+
+ }
+ }
+
+ default:
+ {
+ _trans = uint(_foo_index_defaults[cs]);
+ }
+
+
+ }
+ _cond = uint(_foo_trans_offsets[_trans]);
+ _cpc = 0;
+ switch _foo_trans_cond_spaces[_trans] {
+ case 0 :
+ if (i != 0) {
+ _cpc += 1;
+
+ }
+
+ break;
+ case 1 :
+ if (j != 0) {
+ _cpc += 1;
+
+ }
+
+ break;
+ case 2 :
+ if (k != 0) {
+ _cpc += 1;
+
+ }
+
+ break;
+ case 3 :
+ if (i != 0) {
+ _cpc += 1;
+
+ }
+ if (j != 0) {
+ _cpc += 2;
+
+ }
+
+ break;
+ case 4 :
+ if (j != 0) {
+ _cpc += 1;
+
+ }
+ if (k != 0) {
+ _cpc += 2;
+
+ }
+
+ break;
+ case 5 :
+ if (i != 0) {
+ _cpc += 1;
+
+ }
+ if (j != 0) {
+ _cpc += 2;
+
+ }
+ if (k != 0) {
+ _cpc += 4;
+
+ }
+
+ break;
+
+ }
+ _cond += uint(_cpc);
+ }
+
+ }
+ if _cont == 1 {
+ {
+ cs = int(_foo_cond_targs[_cond]);
+ switch _foo_cond_actions[_cond] {
+ case 8 :
+ {fmt.Print( " one\n" );}
+
+ break;
+ case 4 :
+ {fmt.Print( " two\n" );}
+
+ break;
+ case 6 :
+ {fmt.Print( " three\n" );}
+
+ break;
+ case 1 :
+ {if ( (( data[p ])) == 48 ) {
+ i = 0;
+
+ } else {
+ i = 1;
+
+ }
+ }
+
+ break;
+ case 2 :
+ {if ( (( data[p ])) == 48 ) {
+ j = 0;
+
+ } else {
+ j = 1;
+
+ }
+ }
+
+ break;
+ case 3 :
+ {if ( (( data[p ])) == 48 ) {
+ k = 0;
+
+ } else {
+ k = 1;
+
+ }
+ }
+
+ break;
+ case 5 :
+ {{p+= 1;
+ _cont = 0;
+ }
+ }
+
+ break;
+ case 9 :
+ {fmt.Print( " one\n" );}
+ {fmt.Print( " two\n" );}
+
+ break;
+ case 10 :
+ {fmt.Print( " one\n" );}
+ {fmt.Print( " three\n" );}
+
+ break;
+ case 7 :
+ {fmt.Print( " two\n" );}
+ {fmt.Print( " three\n" );}
+
+ break;
+ case 11 :
+ {fmt.Print( " one\n" );}
+ {fmt.Print( " two\n" );}
+ {fmt.Print( " three\n" );}
+
+ break;
+
+ }
+ if cs == 0 {
+ _cont = 0;
+
+ }
+ if _cont == 1 {
+ p += 1;
+
+ }
+ }
+ }
+ }
+
+ }
+ }
+
+ }
+ }
+}
+func finish() {
+ if cs >= foo_first_final {
+ fmt.Println("ACCEPT")
+ } else {
+ fmt.Println("FAIL")
+ }
+}
+var inp []string = []string {
+ "000abc\n",
+ "100abc\n",
+ "010abc\n",
+ "110abc\n",
+ "001abc\n",
+ "101abc\n",
+ "011abc\n",
+ "111abc\n",
+};
+
+func main() {
+ for _, data := range inp {
+ prepare()
+ exec(data)
+ finish()
+ }
+}