summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/rangei_cs.cs-A-G0--goto-backend.in
diff options
context:
space:
mode:
Diffstat (limited to 'test/rlhc.d/case/rangei_cs.cs-A-G0--goto-backend.in')
-rw-r--r--test/rlhc.d/case/rangei_cs.cs-A-G0--goto-backend.in185
1 files changed, 185 insertions, 0 deletions
diff --git a/test/rlhc.d/case/rangei_cs.cs-A-G0--goto-backend.in b/test/rlhc.d/case/rangei_cs.cs-A-G0--goto-backend.in
new file mode 100644
index 00000000..293f1bb4
--- /dev/null
+++ b/test/rlhc.d/case/rangei_cs.cs-A-G0--goto-backend.in
@@ -0,0 +1,185 @@
+host( "working/rangei_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
+ {
+
+
+
+
+
+ }@
+ array s8 _rangei_nfa_targs( 0, 0 ) = { 0, 0 };
+
+ array s8 _rangei_nfa_offsets( 0, 0 ) = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ array s8 _rangei_nfa_push_actions( 0, 0 ) = { 0, 0 };
+
+ array s8 _rangei_nfa_pop_trans( 0, 0 ) = { 0, 0 };
+
+ value int rangei_start = 1;
+ value int rangei_first_final = 7;
+ value int rangei_error = 0;
+
+ value int rangei_en_main = 1;
+
+ host( "working/rangei_cs.rl", 29 ) @{
+ int cs;
+
+ void init()
+ {
+ }@
+ {
+ cs = cast(int)rangei_start;
+ }
+ host( "working/rangei_cs.rl", 34 ) @{
+ }
+
+ 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;
+ }@
+ {
+
+ if ( p == pe )
+ goto _test_eof;
+ if ( cs == 0 )
+ goto _out;
+ _resume:
+ switch ( cs ) {
+ case 1:
+ if ( ( deref( data, p )) > c(90) ) {
+ if ( c(97) <= ( deref( data, p )) && ( deref( data, p )) <= c(122) ) {
+ goto ctr0;
+ }
+ } else if ( ( deref( data, p )) >= c(65) ) {
+ goto ctr0;
+ }
+ {
+ goto ctr1;
+ }
+ case 0:
+ goto _out;
+ case 2:
+ if ( ( deref( data, p )) > c(90) ) {
+ if ( c(97) <= ( deref( data, p )) && ( deref( data, p )) <= c(122) ) {
+ goto ctr2;
+ }
+ } else if ( ( deref( data, p )) >= c(65) ) {
+ goto ctr2;
+ }
+ {
+ goto ctr1;
+ }
+ case 3:
+ if ( ( deref( data, p )) > c(93) ) {
+ if ( c(97) <= ( deref( data, p )) && ( deref( data, p )) <= c(122) ) {
+ goto ctr3;
+ }
+ } else if ( ( deref( data, p )) >= c(60) ) {
+ goto ctr3;
+ }
+ {
+ goto ctr1;
+ }
+ case 4:
+ if ( ( deref( data, p )) > c(90) ) {
+ if ( c(94) <= ( deref( data, p )) && ( deref( data, p )) <= c(125) ) {
+ goto ctr4;
+ }
+ } else if ( ( deref( data, p )) >= c(65) ) {
+ goto ctr4;
+ }
+ {
+ goto ctr1;
+ }
+ case 5:
+ if ( ( deref( data, p )) < c(86) ) {
+ if ( c(65) <= ( deref( data, p )) && ( deref( data, p )) <= c(69) ) {
+ goto ctr5;
+ }
+ } else if ( ( deref( data, p )) > c(101) ) {
+ if ( c(118) <= ( deref( data, p )) && ( deref( data, p )) <= c(122) ) {
+ goto ctr5;
+ }
+ } else {
+ goto ctr5;
+ }
+ {
+ goto ctr1;
+ }
+ case 6:
+ if ( c(60) <= ( deref( data, p )) && ( deref( data, p )) <= c(125) ) {
+ goto ctr6;
+ }
+ {
+ goto ctr1;
+ }
+ case 7:
+ {
+ 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;
+ ctr6: cs = 7; goto _again;
+
+ _again:
+ if ( cs == 0 )
+ goto _out;
+ p += 1;
+ if ( p != pe )
+ goto _resume;
+ _test_eof: {}
+ _out: {}
+ }
+ host( "working/rangei_cs.rl", 45 ) @{
+ }
+
+ void finish( )
+ {
+ if ( cs >= rangei_first_final )
+ Console.WriteLine( "ACCEPT" );
+ else
+ Console.WriteLine( "FAIL" );
+ }
+
+ static readonly string[] inp = {
+ "AaBbAa",
+ "Aa`bAa",
+ "AaB@@Aa",
+ "AaBbMa",
+ "AaBbma",
+ };
+
+
+ static readonly int inplen = 5;
+
+ 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