summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/ncall1_cs.cs-A-G0--goto-backend.in
diff options
context:
space:
mode:
Diffstat (limited to 'test/rlhc.d/case/ncall1_cs.cs-A-G0--goto-backend.in')
-rw-r--r--test/rlhc.d/case/ncall1_cs.cs-A-G0--goto-backend.in272
1 files changed, 272 insertions, 0 deletions
diff --git a/test/rlhc.d/case/ncall1_cs.cs-A-G0--goto-backend.in b/test/rlhc.d/case/ncall1_cs.cs-A-G0--goto-backend.in
new file mode 100644
index 00000000..bbfa4e2e
--- /dev/null
+++ b/test/rlhc.d/case/ncall1_cs.cs-A-G0--goto-backend.in
@@ -0,0 +1,272 @@
+host( "working/ncall1_cs.rl", 1 ) @{/*
+ * @@LANG: csharp
+ * @@GENERATED: true
+ */
+
+ 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 top;
+ int [] stack = new int [32];
+ int target;
+
+
+
+
+ }@
+ array s8 _ncall1_actions( 0, 3 ) = { 0, 1, 0, 1, 1, 1, 2, 1, 3, 0 };
+
+ array s8 _ncall1_nfa_targs( 0, 0 ) = { 0, 0 };
+
+ array s8 _ncall1_nfa_offsets( 0, 0 ) = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ array s8 _ncall1_nfa_push_actions( 0, 0 ) = { 0, 0 };
+
+ array s8 _ncall1_nfa_pop_trans( 0, 0 ) = { 0, 0 };
+
+ value int ncall1_start = 13;
+ value int ncall1_first_final = 13;
+ value int ncall1_error = 0;
+
+ value int ncall1_en_unused = 1;
+ value int ncall1_en_one = 7;
+ value int ncall1_en_two = 10;
+ value int ncall1_en_main = 13;
+
+ host( "working/ncall1_cs.rl", 36 ) @{
+ int cs;
+
+ void init()
+ {
+ }@
+ {
+ cs = cast(int)ncall1_start;
+ top = 0;
+ }
+ host( "working/ncall1_cs.rl", 41 ) @{
+ }
+
+ 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;
+ }@
+ {
+ index s8 _acts;
+ uint _nacts;
+
+ if ( p == pe )
+ goto _test_eof;
+ if ( cs == 0 )
+ goto _out;
+ _resume:
+ switch ( cs ) {
+ case 13:
+ switch( ( deref( data, p )) ) {
+ case c(10): {
+ goto ctr13;
+ }
+ case c(49): {
+ goto ctr14;
+ }
+ case c(50): {
+ goto ctr15;
+ }
+ }
+ {
+ goto ctr1;
+ }
+ case 0:
+ goto _out;
+ case 1:
+ if ( ( deref( data, p )) == c(117) ) {
+ goto ctr0;
+ }
+ {
+ goto ctr1;
+ }
+ case 2:
+ if ( ( deref( data, p )) == c(110) ) {
+ goto ctr2;
+ }
+ {
+ goto ctr1;
+ }
+ case 3:
+ if ( ( deref( data, p )) == c(117) ) {
+ goto ctr3;
+ }
+ {
+ goto ctr1;
+ }
+ case 4:
+ if ( ( deref( data, p )) == c(115) ) {
+ goto ctr4;
+ }
+ {
+ goto ctr1;
+ }
+ case 5:
+ if ( ( deref( data, p )) == c(101) ) {
+ goto ctr5;
+ }
+ {
+ goto ctr1;
+ }
+ case 6:
+ if ( ( deref( data, p )) == c(100) ) {
+ goto ctr6;
+ }
+ {
+ goto ctr1;
+ }
+ case 14:
+ {
+ goto ctr1;
+ }
+ case 7:
+ if ( ( deref( data, p )) == c(111) ) {
+ goto ctr7;
+ }
+ {
+ goto ctr1;
+ }
+ case 8:
+ if ( ( deref( data, p )) == c(110) ) {
+ goto ctr8;
+ }
+ {
+ goto ctr1;
+ }
+ case 9:
+ if ( ( deref( data, p )) == c(101) ) {
+ goto ctr9;
+ }
+ {
+ goto ctr1;
+ }
+ case 15:
+ {
+ goto ctr1;
+ }
+ case 10:
+ if ( ( deref( data, p )) == c(116) ) {
+ goto ctr10;
+ }
+ {
+ goto ctr1;
+ }
+ case 11:
+ if ( ( deref( data, p )) == c(119) ) {
+ goto ctr11;
+ }
+ {
+ goto ctr1;
+ }
+ case 12:
+ if ( ( deref( data, p )) == c(111) ) {
+ 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 = offset( _ncall1_actions, 1 ); goto execFuncs;
+ f1: _acts = offset( _ncall1_actions, 3 ); goto execFuncs;
+ f2: _acts = offset( _ncall1_actions, 5 ); goto execFuncs;
+ f3: _acts = offset( _ncall1_actions, 7 ); goto execFuncs;
+
+ execFuncs:
+ _nacts = cast(uint)deref( _ncall1_actions, _acts );
+ _acts += 1;
+ while ( _nacts > 0 ) {
+ switch ( deref( _ncall1_actions, _acts ) ) {
+ case 0{
+ host( "working/ncall1_cs.rl", 21 ) ${Console.Write( "one\n" );${top-= 1;cs = stack[top];}$}$
+ }
+ case 1{
+ host( "working/ncall1_cs.rl", 23 ) ${Console.Write( "two\n" );${top-= 1;cs = stack[top];}$}$
+ }
+ case 2{
+ host( "working/ncall1_cs.rl", 26 ) ${target = 7;
+ ${stack[top] = cs; top += 1;cs = host( "-", 1 ) ={target}=; }$}$
+ }
+ case 3{
+ host( "working/ncall1_cs.rl", 28 ) ${target = 10;
+ ${stack[top] = cs; top += 1;cs = host( "-", 1 ) ={target}=; }$}$
+ }
+ }
+ _acts += 1;
+ _nacts -= 1;
+ }
+
+ goto _again;
+
+ _again:
+ if ( cs == 0 )
+ goto _out;
+ p += 1;
+ if ( p != pe )
+ goto _resume;
+ _test_eof: {}
+ _out: {}
+ }
+ host( "working/ncall1_cs.rl", 52 ) @{
+ }
+
+ void finish( )
+ {
+ if ( cs >= ncall1_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();
+ }
+ }
+ }
+ }
+}@ \ No newline at end of file