summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/clang4_cs.cs-A-F0--goto-backend.in
diff options
context:
space:
mode:
Diffstat (limited to 'test/rlhc.d/case/clang4_cs.cs-A-F0--goto-backend.in')
-rw-r--r--test/rlhc.d/case/clang4_cs.cs-A-F0--goto-backend.in242
1 files changed, 242 insertions, 0 deletions
diff --git a/test/rlhc.d/case/clang4_cs.cs-A-F0--goto-backend.in b/test/rlhc.d/case/clang4_cs.cs-A-F0--goto-backend.in
new file mode 100644
index 00000000..052c1b01
--- /dev/null
+++ b/test/rlhc.d/case/clang4_cs.cs-A-F0--goto-backend.in
@@ -0,0 +1,242 @@
+host( "working/clang4_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 pos;
+ int line;
+
+
+
+
+ }@
+ array s8 _clang_actions( 0, 8 ) = { 0, 1, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 2, 0, 2, 2, 1, 0, 2, 3, 1, 2, 3, 2, 2, 4, 1, 2, 4, 2, 2, 5, 1, 2, 5, 2, 2, 6, 1, 2, 6, 2, 2, 7, 1, 2, 7, 2, 2, 8, 1, 2, 8, 2, 3, 3, 1, 0, 3, 4, 1, 0, 3, 5, 1, 0, 3, 6, 1, 0, 3, 7, 1, 0, 3, 8, 1, 0, 0 };
+
+ array char _clang_trans_keys( 0, 13 ) = { c(1), c(0), c(0), c(13), c(0), c(13), c(0), c(13), c(0), c(13), c(0), c(13), c(0), c(13), c(8), c(9), c(8), c(10), c(0), c(13), c(1), c(13), c(1), c(13), c(1), c(13), c(1), c(13), c(1), c(13), c(1), c(13), c(1), c(13), c(1), c(13), c(1), c(13), c(0) };
+
+ array s8 _clang_char_class( 0, 13 ) = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 4, 6, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 4, 4, 4, 4, 4, 4, 4, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 4, 12, 4, 4, 11, 4, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 11, 11, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ array s16 _clang_index_offsets( 0, 207 ) = { 0, 0, 14, 28, 42, 56, 70, 84, 86, 89, 103, 116, 129, 142, 155, 168, 181, 194, 207, 0 };
+
+ array s8 _clang_indicies( 0, 72 ) = { 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 5, 6, 5, 5, 5, 2, 5, 5, 5, 5, 5, 5, 7, 5, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 9, 10, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 10, 8, 8, 8, 8, 11, 8, 8, 8, 8, 8, 8, 12, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 14, 14, 15, 15, 15, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 16, 17, 16, 18, 16, 19, 20, 21, 22, 22, 16, 22, 24, 25, 26, 25, 27, 25, 28, 29, 30, 31, 31, 25, 31, 33, 34, 35, 34, 36, 34, 37, 38, 39, 40, 40, 34, 40, 24, 8, 26, 25, 27, 25, 12, 29, 30, 31, 31, 25, 31, 42, 43, 44, 43, 45, 46, 47, 48, 48, 49, 49, 43, 50, 52, 53, 54, 53, 55, 53, 56, 14, 14, 57, 57, 53, 57, 59, 60, 61, 60, 62, 60, 63, 64, 64, 64, 64, 60, 64, 42, 43, 44, 43, 45, 46, 47, 48, 48, 49, 49, 43, 49, 66, 67, 68, 67, 69, 67, 70, 71, 71, 71, 72, 67, 72, 0 };
+
+ array s8 _clang_index_defaults( 0, 65 ) = { 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 11, 23, 32, 23, 41, 51, 58, 41, 65, 0 };
+
+ array s8 _clang_trans_cond_spaces( -1, 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, -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, 0 };
+
+ array s8 _clang_cond_targs( 0, 18 ) = { 1, 1, 12, 9, 0, 2, 2, 3, 4, 4, 5, 10, 6, 10, 15, 18, 11, 1, 2, 13, 14, 17, 16, 10, 10, 11, 1, 2, 13, 14, 17, 16, 10, 10, 11, 1, 2, 13, 14, 17, 16, 10, 10, 11, 1, 2, 7, 13, 17, 16, 8, 10, 10, 11, 1, 2, 13, 16, 10, 10, 11, 1, 2, 13, 16, 10, 10, 11, 1, 2, 13, 18, 16, 0 };
+
+ array s8 _clang_cond_actions( 0, 81 ) = { 1, 19, 0, 0, 0, 1, 19, 0, 0, 5, 0, 0, 0, 5, 1, 22, 22, 3, 3, 22, 22, 22, 22, 17, 58, 81, 55, 55, 81, 81, 81, 81, 9, 34, 65, 31, 31, 65, 65, 65, 65, 13, 46, 73, 43, 43, 1, 73, 1, 73, 0, 11, 40, 69, 37, 37, 69, 69, 7, 28, 61, 25, 25, 61, 1, 15, 52, 77, 49, 49, 77, 1, 77, 0 };
+
+ array s8 _clang_eof_actions( 0, 17 ) = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 9, 17, 13, 11, 7, 13, 15, 0 };
+
+ array s8 _clang_nfa_targs( 0, 0 ) = { 0, 0 };
+
+ array s8 _clang_nfa_offsets( 0, 0 ) = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+ array s8 _clang_nfa_push_actions( 0, 0 ) = { 0, 0 };
+
+ array s8 _clang_nfa_pop_trans( 0, 0 ) = { 0, 0 };
+
+ value int clang_start = 10;
+ value int clang_first_final = 10;
+ value int clang_error = 0;
+
+ value int clang_en_main = 10;
+
+ host( "working/clang4_cs.rl", 123 ) @{
+ int cs;
+
+ void init()
+ {
+ pos = 0;
+ line = 1;
+ }@
+ {
+ cs = cast(int)clang_start;
+ }
+ host( "working/clang4_cs.rl", 130 ) @{
+ }
+
+ 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 _trans = 0;
+ index s8 _acts;
+ uint _nacts;
+ index char _keys;
+ index s8 _inds;
+ entry {
+
+ if ( p == pe )
+ goto _test_eof;
+ if ( cs == 0 )
+ goto _out;
+ label _resume {
+ _keys = offset( _clang_trans_keys, (cs<<1) );
+ _inds = offset( _clang_indicies, _clang_index_offsets[cs] );
+
+ if ( ( deref( data, p )) <= 255 )
+ {
+ int _ic = cast(int)_clang_char_class[cast(int)( deref( data, p )) - 0];
+ if ( _ic <= cast(int)deref( _clang_trans_keys, _keys+1 ) && _ic >= cast(int)deref( _clang_trans_keys, _keys ) )
+ _trans = cast(int)deref( _clang_indicies, _inds + cast(int)( _ic - cast(int)deref( _clang_trans_keys, _keys ) ) );
+ else
+ _trans = cast(int)_clang_index_defaults[cs];
+ }
+ else {
+ _trans = cast(int)_clang_index_defaults[cs];
+ }
+
+ goto _match_cond;
+ }
+ label _match_cond {
+ cs = cast(int)_clang_cond_targs[_trans];
+
+ if ( _clang_cond_actions[_trans] == 0 )
+ goto _again;
+
+ _acts = offset( _clang_actions, _clang_cond_actions[_trans] );
+ _nacts = cast(uint)deref( _clang_actions, _acts );
+ _acts += 1;
+ while ( _nacts > 0 ) {
+ switch ( deref( _clang_actions, _acts ) )
+ {
+ case 0 {
+ host( "working/clang4_cs.rl", 19 ) ${ buffer[blen++] = ={( deref( data, p ))}=;
+ }$
+ }
+ case 1 {
+ host( "working/clang4_cs.rl", 23 ) ${ blen = 0;
+ }$
+ }
+ case 2 {
+ host( "working/clang4_cs.rl", 26 ) ${line = line + 1;
+ }$
+ }
+ case 3 {
+ host( "working/clang4_cs.rl", 30 ) ${Console.Write( "ident(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
+ );Console.Write( "\n" );}$
+ }
+ case 4 {
+ host( "working/clang4_cs.rl", 32 ) ${Console.Write( "literal(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
+ );Console.Write( "\n" );}$
+ }
+ case 5 {
+ host( "working/clang4_cs.rl", 34 ) ${Console.Write( "float(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
+ );Console.Write( "\n" );}$
+ }
+ case 6 {
+ host( "working/clang4_cs.rl", 36 ) ${Console.Write( "int(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
+ );Console.Write( "\n" );}$
+ }
+ case 7 {
+ host( "working/clang4_cs.rl", 38 ) ${Console.Write( "hex(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
+ );Console.Write( "\n" );}$
+ }
+ case 8 {
+ host( "working/clang4_cs.rl", 40 ) ${Console.Write( "symbol(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
+ );Console.Write( "\n" );}$
+ }
+ }
+ _nacts -= 1;
+ _acts += 1;
+ }
+
+
+ }
+ label _again {
+ if ( cs == 0 )
+ goto _out;
+ p += 1;
+ if ( p != pe )
+ goto _resume;
+ }
+ label _test_eof { {}
+ if ( p == eof )
+ {
+ index s8 __acts;
+ uint __nacts;
+ __acts = offset( _clang_actions, _clang_eof_actions[cs] );
+ __nacts = cast(uint)deref( _clang_actions, __acts ); __acts += 1;
+ while ( __nacts > 0 ) {
+ switch ( deref( _clang_actions, __acts ) ) {
+ case 3 {
+ host( "working/clang4_cs.rl", 30 ) ${Console.Write( "ident(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
+ );Console.Write( "\n" );}$
+ }
+ case 4 {
+ host( "working/clang4_cs.rl", 32 ) ${Console.Write( "literal(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
+ );Console.Write( "\n" );}$
+ }
+ case 5 {
+ host( "working/clang4_cs.rl", 34 ) ${Console.Write( "float(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
+ );Console.Write( "\n" );}$
+ }
+ case 6 {
+ host( "working/clang4_cs.rl", 36 ) ${Console.Write( "int(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
+ );Console.Write( "\n" );}$
+ }
+ case 7 {
+ host( "working/clang4_cs.rl", 38 ) ${Console.Write( "hex(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
+ );Console.Write( "\n" );}$
+ }
+ case 8 {
+ host( "working/clang4_cs.rl", 40 ) ${Console.Write( "symbol(" );Console.Write( line );Console.Write( "," );Console.Write( blen );Console.Write( "): " );Console.Write( new String( buffer, 0, blen )
+ );Console.Write( "\n" );}$
+ }
+ }
+ __nacts -= 1;
+ __acts += 1;
+ }
+ }
+
+ }
+ label _out { {}
+ }
+ }
+ }
+ host( "working/clang4_cs.rl", 141 ) @{
+ }
+
+ void finish( )
+ {
+ if ( cs >= clang_first_final )
+ Console.WriteLine( "ACCEPT" );
+ else
+ Console.WriteLine( "FAIL" );
+ }
+
+ static readonly string[] inp = {
+ "999 0xaAFF99 99.99 /!\n!/ 'lksdj' //\n\"\n\nliteral\n\n\n\"0x00aba foobardd.ddsf 0x0.9\n",
+ "wordwithnum00asdf\n000wordfollowsnum,makes new symbol\n\nfinishing early /! unfinished ...\n",
+ };
+
+
+ static readonly int inplen = 2;
+
+ 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