diff options
Diffstat (limited to 'test/rlhc.d/case/noignore.c-C-G2--goto-backend.exp')
-rw-r--r-- | test/rlhc.d/case/noignore.c-C-G2--goto-backend.exp | 209 |
1 files changed, 209 insertions, 0 deletions
diff --git a/test/rlhc.d/case/noignore.c-C-G2--goto-backend.exp b/test/rlhc.d/case/noignore.c-C-G2--goto-backend.exp new file mode 100644 index 00000000..af7b1768 --- /dev/null +++ b/test/rlhc.d/case/noignore.c-C-G2--goto-backend.exp @@ -0,0 +1,209 @@ +#include <string.h> +#include <stdio.h> + + + +#define DEF 1 + +static const int atoi_start = 1; +static const int atoi_first_final = 7; +static const int atoi_error = 0; +static const int atoi_en_main = 1; +static const char _atoi_nfa_targs [] = { 0, 0 , }; +static const char _atoi_nfa_offsets [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 , }; +static const char _atoi_nfa_push_actions [] = { 0, 0 , }; +static const char _atoi_nfa_pop_trans [] = { 0, 0 , }; +int cs; +int blen; +char buffer[1024]; + +void init() +{ + + { + cs = ( int ) atoi_start; + } +} + +void exec( char *data, int len ) +{ + char *p = data; + char *pe = data + len; + + { + if ( p == pe ) + goto _test_eof; + + switch ( cs ) { + case 1: + goto st_case_1; + case 0: + goto st_case_0; + case 2: + goto st_case_2; + case 3: + goto st_case_3; + case 4: + goto st_case_4; + case 5: + goto st_case_5; + case 6: + goto st_case_6; + case 7: + goto st_case_7; + + } + goto st_out; + st_case_1: + if ( ((*( p )) + )== 104 ) + { + goto st2; + } + + { + goto st0; + } + st_case_0: + st0: + cs = 0; + goto _out; + st2: + p+= 1; + if ( p == pe ) + goto _test_eof2; + + st_case_2: + if ( ((*( p )) + )== 101 ) + { + goto st3; + } + + { + goto st0; + } + st3: + p+= 1; + if ( p == pe ) + goto _test_eof3; + + st_case_3: + if ( ((*( p )) + )== 108 ) + { + goto st4; + } + + { + goto st0; + } + st4: + p+= 1; + if ( p == pe ) + goto _test_eof4; + + st_case_4: + if ( ((*( p )) + )== 108 ) + { + goto st5; + } + + { + goto st0; + } + st5: + p+= 1; + if ( p == pe ) + goto _test_eof5; + + st_case_5: + if ( ((*( p )) + )== 111 ) + { + goto st6; + } + + { + goto st0; + } + st6: + p+= 1; + if ( p == pe ) + goto _test_eof6; + + st_case_6: + if ( ((*( p )) + )== 10 ) + { + goto ctr6; + } + + { + goto st0; + } + ctr6: + { + printf( "hello\n" ); + } + + + goto st7; + st7: + p+= 1; + if ( p == pe ) + goto _test_eof7; + + st_case_7: + { + goto st0; + } + st_out: + _test_eof2: cs = 2; + goto _test_eof; + _test_eof3: cs = 3; + goto _test_eof; + _test_eof4: cs = 4; + goto _test_eof; + _test_eof5: cs = 5; + goto _test_eof; + _test_eof6: cs = 6; + goto _test_eof; + _test_eof7: cs = 7; + goto _test_eof; + + _test_eof: {} + _out: {} + } +} + +void finish( ) +{ + if ( cs >= atoi_first_final ) + printf( "ACCEPT\n" ); + else + printf( "FAIL\n" ); +} + +char *inp[] = { + "hello\n", +}; + +int inplen = 9; + +int main( ) +{ + #ifndef DEF + printf("DEF not defined -- noignore problem\n" ); + #else + int i; + for ( i = 0; i < inplen; i++ ) { + init(); + exec( inp[i], strlen(inp[i]) ); + finish(); + } + #endif + return 0; +} + |