summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/clang4_c.c-C-F0--goto-backend.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/rlhc.d/case/clang4_c.c-C-F0--goto-backend.exp')
-rw-r--r--test/rlhc.d/case/clang4_c.c-C-F0--goto-backend.exp355
1 files changed, 355 insertions, 0 deletions
diff --git a/test/rlhc.d/case/clang4_c.c-C-F0--goto-backend.exp b/test/rlhc.d/case/clang4_c.c-C-F0--goto-backend.exp
new file mode 100644
index 00000000..f52f9684
--- /dev/null
+++ b/test/rlhc.d/case/clang4_c.c-C-F0--goto-backend.exp
@@ -0,0 +1,355 @@
+#include <string.h>
+#include <stdio.h>
+
+int pos ;
+int line ;
+
+
+
+
+
+static const char _clang_actions [] = { 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 , };
+static const char _clang_trans_keys [] = { 1, 0, 0, 12, 0, 12, 0, 0, 0, 2, 0, 7, 0, 0, 8, 9, 8, 10, 0, 0, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0, 13, 0 , };
+static const char _clang_char_class [] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 , };
+static const short _clang_index_offsets [] = { 0, 0, 13, 26, 27, 30, 38, 39, 41, 44, 45, 59, 73, 87, 101, 115, 129, 143, 157, 0 , };
+static const char _clang_indicies [] = { 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 4, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 6, 5, 8, 7, 9, 8, 7, 9, 7, 7, 7, 7, 10, 12, 13, 13, 15, 15, 15, 1, 12, 10, 16, 17, 16, 18, 16, 19, 20, 21, 22, 22, 16, 22, 24, 23, 25, 26, 25, 27, 25, 28, 29, 30, 31, 31, 25, 31, 33, 32, 34, 35, 34, 36, 34, 37, 38, 39, 40, 40, 34, 40, 24, 23, 7, 26, 25, 27, 25, 11, 29, 30, 31, 31, 25, 31, 42, 41, 43, 44, 43, 45, 46, 47, 48, 48, 49, 49, 43, 50, 52, 51, 53, 54, 53, 55, 53, 56, 13, 13, 57, 57, 53, 57, 59, 58, 60, 61, 60, 62, 60, 63, 64, 64, 64, 64, 60, 64, 42, 41, 43, 44, 43, 45, 46, 47, 48, 48, 49, 49, 43, 49, 66, 65, 67, 68, 67, 69, 67, 70, 71, 71, 71, 72, 67, 72, 0 , };
+static const char _clang_index_defaults [] = { 0, 0, 4, 4, 7, 7, 11, 14, 14, 0, 10, 23, 32, 23, 41, 51, 58, 41, 65, 0 , };
+static const char _clang_trans_cond_spaces [] = { -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 , };
+static const char _clang_cond_targs [] = { 1, 1, 12, 9, 2, 2, 3, 4, 4, 5, 10, 6, 10, 15, 0, 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 , };
+static const char _clang_cond_actions [] = { 1, 19, 0, 0, 1, 19, 0, 0, 5, 0, 0, 0, 5, 1, 0, 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 , };
+static const char _clang_eof_actions [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 9, 17, 13, 11, 7, 13, 15, 0 , };
+static const char _clang_nfa_targs [] = { 0, 0 , };
+static const char _clang_nfa_offsets [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , };
+static const char _clang_nfa_push_actions [] = { 0, 0 , };
+static const char _clang_nfa_pop_trans [] = { 0, 0 , };
+static const int clang_start = 10;
+static const int clang_first_final = 10;
+static const int clang_error = 0;
+static const int clang_en_main = 10;
+int cs;
+int blen;
+char buffer[1024];
+
+void init()
+{
+ pos = 0;
+ line = 1;
+
+ {
+ cs = ( int ) clang_start;
+ }
+}
+
+void exec( char *data, int len )
+{
+ char *p = data;
+ char *pe = data + len;
+ char *eof = pe;
+
+ {
+ int _trans = 0;
+ const char *_acts;
+ unsigned int _nacts;
+ const char *_keys;
+ const char *_inds;
+ if ( p == pe )
+ goto _test_eof;
+
+ if ( cs == 0 )
+ goto _out;
+
+ _resume :
+ _keys = _clang_trans_keys + (cs<<1);
+ _inds = _clang_indicies + _clang_index_offsets[cs];
+ if ( ((*( p ))
+ )<= 126 && ((*( p ))
+ )>= 10 )
+ {
+ int _ic = ( int ) _clang_char_class[( int ) ((*( p ))
+ )- 10];
+ if ( _ic <= ( int ) (*( _keys+1 ))
+ && _ic >= ( int ) (*( _keys ))
+ )
+ _trans = ( int ) (*( _inds + ( int ) (_ic - ( int ) (*( _keys ))
+ ) ))
+ ;
+
+ else
+ _trans = ( int ) _clang_index_defaults[cs];
+
+ }
+
+ else
+ {
+ _trans = ( int ) _clang_index_defaults[cs];
+ }
+
+
+ goto _match_cond;
+
+ _match_cond :
+ cs = ( int ) _clang_cond_targs[_trans];
+ if ( _clang_cond_actions[_trans]== 0 )
+ goto _again;
+
+
+ _acts = _clang_actions + _clang_cond_actions[_trans];
+ _nacts = ( unsigned int ) (*( _acts ))
+ ;
+ _acts += 1;
+ while ( _nacts > 0 )
+ {
+ switch ( (*( _acts ))
+ ) {
+ case 0 :
+ {
+ buffer[blen++] = *p;
+ buffer[blen] = 0;
+
+ }
+
+ break;
+ case 1 :
+ {
+ blen = 0;
+
+ }
+
+ break;
+ case 2 :
+ {
+ line = line + 1;
+
+ }
+
+ break;
+ case 3 :
+ {
+ printf( "%s", "ident(" );
+ printf( "%d", line );
+ printf( "%s", "," );
+ printf( "%d", blen );
+ printf( "%s", "): " );
+ printf( "%s", buffer );
+ printf( "%s", "\n" );
+
+ }
+
+ break;
+ case 4 :
+ {
+ printf( "%s", "literal(" );
+ printf( "%d", line );
+ printf( "%s", "," );
+ printf( "%d", blen );
+ printf( "%s", "): " );
+ printf( "%s", buffer );
+ printf( "%s", "\n" );
+
+ }
+
+ break;
+ case 5 :
+ {
+ printf( "%s", "float(" );
+ printf( "%d", line );
+ printf( "%s", "," );
+ printf( "%d", blen );
+ printf( "%s", "): " );
+ printf( "%s", buffer );
+ printf( "%s", "\n" );
+
+ }
+
+ break;
+ case 6 :
+ {
+ printf( "%s", "int(" );
+ printf( "%d", line );
+ printf( "%s", "," );
+ printf( "%d", blen );
+ printf( "%s", "): " );
+ printf( "%s", buffer );
+ printf( "%s", "\n" );
+
+ }
+
+ break;
+ case 7 :
+ {
+ printf( "%s", "hex(" );
+ printf( "%d", line );
+ printf( "%s", "," );
+ printf( "%d", blen );
+ printf( "%s", "): " );
+ printf( "%s", buffer );
+ printf( "%s", "\n" );
+
+ }
+
+ break;
+ case 8 :
+ {
+ printf( "%s", "symbol(" );
+ printf( "%d", line );
+ printf( "%s", "," );
+ printf( "%d", blen );
+ printf( "%s", "): " );
+ printf( "%s", buffer );
+ printf( "%s", "\n" );
+
+ }
+
+ break;
+
+ }
+ _nacts -= 1;
+ _acts += 1;
+ }
+
+
+
+
+ _again :
+ if ( cs == 0 )
+ goto _out;
+
+ p += 1;
+ if ( p != pe )
+ goto _resume;
+
+
+ _test_eof :
+ {}
+ if ( p == eof )
+ {
+ const char *__acts;
+ unsigned int __nacts;
+ __acts = _clang_actions + _clang_eof_actions[cs];
+ __nacts = ( unsigned int ) (*( __acts ))
+ ;
+ __acts += 1;
+ while ( __nacts > 0 )
+ {
+ switch ( (*( __acts ))
+ ) {
+ case 3 :
+ {
+ printf( "%s", "ident(" );
+ printf( "%d", line );
+ printf( "%s", "," );
+ printf( "%d", blen );
+ printf( "%s", "): " );
+ printf( "%s", buffer );
+ printf( "%s", "\n" );
+
+ }
+
+ break;
+ case 4 :
+ {
+ printf( "%s", "literal(" );
+ printf( "%d", line );
+ printf( "%s", "," );
+ printf( "%d", blen );
+ printf( "%s", "): " );
+ printf( "%s", buffer );
+ printf( "%s", "\n" );
+
+ }
+
+ break;
+ case 5 :
+ {
+ printf( "%s", "float(" );
+ printf( "%d", line );
+ printf( "%s", "," );
+ printf( "%d", blen );
+ printf( "%s", "): " );
+ printf( "%s", buffer );
+ printf( "%s", "\n" );
+
+ }
+
+ break;
+ case 6 :
+ {
+ printf( "%s", "int(" );
+ printf( "%d", line );
+ printf( "%s", "," );
+ printf( "%d", blen );
+ printf( "%s", "): " );
+ printf( "%s", buffer );
+ printf( "%s", "\n" );
+
+ }
+
+ break;
+ case 7 :
+ {
+ printf( "%s", "hex(" );
+ printf( "%d", line );
+ printf( "%s", "," );
+ printf( "%d", blen );
+ printf( "%s", "): " );
+ printf( "%s", buffer );
+ printf( "%s", "\n" );
+
+ }
+
+ break;
+ case 8 :
+ {
+ printf( "%s", "symbol(" );
+ printf( "%d", line );
+ printf( "%s", "," );
+ printf( "%d", blen );
+ printf( "%s", "): " );
+ printf( "%s", buffer );
+ printf( "%s", "\n" );
+
+ }
+
+ break;
+
+ }
+ __nacts -= 1;
+ __acts += 1;
+ }
+
+ }
+
+
+
+ _out :
+ {}
+
+ }
+}
+
+void finish( )
+{
+ if ( cs >= clang_first_final )
+ printf( "ACCEPT\n" );
+ else
+ printf( "FAIL\n" );
+}
+
+char *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",
+};
+
+int inplen = 2;
+
+int main( )
+{
+ int i;
+ for ( i = 0; i < inplen; i++ ) {
+ init();
+ exec( inp[i], strlen(inp[i]) );
+ finish();
+ }
+ return 0;
+}
+