summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/targs1_cs.cs-A-G0--goto-backend.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/rlhc.d/case/targs1_cs.cs-A-G0--goto-backend.exp')
-rw-r--r--test/rlhc.d/case/targs1_cs.cs-A-G0--goto-backend.exp311
1 files changed, 311 insertions, 0 deletions
diff --git a/test/rlhc.d/case/targs1_cs.cs-A-G0--goto-backend.exp b/test/rlhc.d/case/targs1_cs.cs-A-G0--goto-backend.exp
new file mode 100644
index 00000000..b52f2765
--- /dev/null
+++ b/test/rlhc.d/case/targs1_cs.cs-A-G0--goto-backend.exp
@@ -0,0 +1,311 @@
+using System;
+// Disables lots of warnings that appear in the test suite
+#pragma warning disable 0168, 0169, 0219, 0162, 0414
+namespace Test {
+ class Test
+ {
+ int return_to;
+
+
+
+
+ static readonly sbyte []_targs1_actions = { 0, 1, 0, 1, 1, 1, 2, 1, 3, 0, };
+ static readonly sbyte []_targs1_nfa_targs = { 0, 0, };
+ static readonly sbyte []_targs1_nfa_offsets = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
+ static readonly sbyte []_targs1_nfa_push_actions = { 0, 0, };
+ static readonly sbyte []_targs1_nfa_pop_trans = { 0, 0, };
+ static readonly int targs1_start = 13;
+ static readonly int targs1_first_final = 13;
+ static readonly int targs1_error = 0;
+ static readonly int targs1_en_unused = 1;
+ static readonly int targs1_en_one = 7;
+ static readonly int targs1_en_two = 10;
+ static readonly int targs1_en_main = 13;
+ int cs;
+
+ void init()
+ {
+
+ {
+ cs = (int)targs1_start;
+ }
+ }
+
+ void exec( char[] data, int len )
+ {
+ int p = 0;
+ int pe = len;
+ int eof = len;
+ string _s;
+ char [] buffer = new char [1024];
+ int blen = 0;
+
+ {
+ int _acts;
+ uint _nacts;
+
+ if ( p == pe )
+ goto _test_eof;
+
+ if ( cs == 0 )
+ goto _out;
+
+ _resume:
+ switch ( cs ) {
+ case 13:
+ switch ( ( data[p ]) ) {
+ case '\u000a':
+ {
+ goto ctr13;
+ }
+ case '\u0031':
+ {
+ goto ctr14;
+ }
+ case '\u0032':
+ {
+ goto ctr15;
+ }
+
+ }
+ {
+ goto ctr1;
+ }
+ case 0:
+ goto _out;
+ case 1:
+ if ( ( data[p ]) == '\u0075' )
+ {
+ goto ctr0;
+ }
+
+ {
+ goto ctr1;
+ }
+ case 2:
+ if ( ( data[p ]) == '\u006e' )
+ {
+ goto ctr2;
+ }
+
+ {
+ goto ctr1;
+ }
+ case 3:
+ if ( ( data[p ]) == '\u0075' )
+ {
+ goto ctr3;
+ }
+
+ {
+ goto ctr1;
+ }
+ case 4:
+ if ( ( data[p ]) == '\u0073' )
+ {
+ goto ctr4;
+ }
+
+ {
+ goto ctr1;
+ }
+ case 5:
+ if ( ( data[p ]) == '\u0065' )
+ {
+ goto ctr5;
+ }
+
+ {
+ goto ctr1;
+ }
+ case 6:
+ if ( ( data[p ]) == '\u0064' )
+ {
+ goto ctr6;
+ }
+
+ {
+ goto ctr1;
+ }
+ case 14:
+ {
+ goto ctr1;
+ }
+ case 7:
+ if ( ( data[p ]) == '\u006f' )
+ {
+ goto ctr7;
+ }
+
+ {
+ goto ctr1;
+ }
+ case 8:
+ if ( ( data[p ]) == '\u006e' )
+ {
+ goto ctr8;
+ }
+
+ {
+ goto ctr1;
+ }
+ case 9:
+ if ( ( data[p ]) == '\u0065' )
+ {
+ goto ctr9;
+ }
+
+ {
+ goto ctr1;
+ }
+ case 15:
+ {
+ goto ctr1;
+ }
+ case 10:
+ if ( ( data[p ]) == '\u0074' )
+ {
+ goto ctr10;
+ }
+
+ {
+ goto ctr1;
+ }
+ case 11:
+ if ( ( data[p ]) == '\u0077' )
+ {
+ goto ctr11;
+ }
+
+ {
+ goto ctr1;
+ }
+ case 12:
+ if ( ( data[p ]) == '\u006f' )
+ {
+ goto ctr12;
+ }
+
+ {
+ goto ctr1;
+ }
+ case 16:
+ {
+ goto ctr1;
+ }
+
+ }
+ ctr1: cs = 0;
+ goto _again;
+ ctr0: cs = 2;
+ goto _again;
+ ctr2: cs = 3;
+ goto _again;
+ ctr3: cs = 4;
+ goto _again;
+ ctr4: cs = 5;
+ goto _again;
+ ctr5: cs = 6;
+ goto _again;
+ ctr7: cs = 8;
+ goto _again;
+ ctr8: cs = 9;
+ goto _again;
+ ctr10: cs = 11;
+ goto _again;
+ ctr11: cs = 12;
+ goto _again;
+ ctr13: cs = 13;
+ goto _again;
+ ctr14: cs = 13;
+ goto f2;
+ ctr15: cs = 13;
+ goto f3;
+ ctr6: cs = 14;
+ goto _again;
+ ctr9: cs = 15;
+ goto f0;
+ ctr12: cs = 16;
+ goto f1;
+
+ f0: _acts = 1;
+ goto execFuncs;
+ f1: _acts = 3;
+ goto execFuncs;
+ f2: _acts = 5;
+ goto execFuncs;
+ f3: _acts = 7;
+ goto execFuncs;
+
+ execFuncs:
+ _nacts = (uint )_targs1_actions[_acts ];
+ _acts += 1;
+ while ( _nacts > 0 )
+ {
+ switch ( _targs1_actions[_acts ] ) {
+ case 0:
+ {Console.Write( "one\n" );cs = (return_to);}
+
+ break;
+ case 1:
+ {Console.Write( "two\n" );cs = (return_to);}
+
+ break;
+ case 2:
+ {return_to = (cs);
+ cs = 7;}
+
+ break;
+ case 3:
+ {return_to = (cs);
+ cs = 10;}
+
+ break;
+
+ }
+ _acts += 1;
+ _nacts -= 1;
+ }
+
+
+ goto _again;
+
+ _again:
+ if ( cs == 0 )
+ goto _out;
+
+ p += 1;
+ if ( p != pe )
+ goto _resume;
+
+ _test_eof: {}
+ _out: {}
+ }
+ }
+
+ void finish( )
+ {
+ if ( cs >= targs1_first_final )
+ Console.WriteLine( "ACCEPT" );
+ else
+ Console.WriteLine( "FAIL" );
+ }
+
+ static readonly string[] inp = {
+ "1one2two1one\n",
+ };
+
+
+ static readonly int inplen = 1;
+
+ public static void Main (string[] args)
+ {
+ Test machine = new Test();
+ for ( int i = 0; i < inplen; i++ ) {
+ machine.init();
+ machine.exec( inp[i].ToCharArray(), inp[i].Length );
+ machine.finish();
+ }
+ }
+ }
+}