diff options
Diffstat (limited to 'test/rlhc.d/case/erract2_java.java-J-T0--goto-backend.exp')
-rw-r--r-- | test/rlhc.d/case/erract2_java.java-J-T0--goto-backend.exp | 404 |
1 files changed, 404 insertions, 0 deletions
diff --git a/test/rlhc.d/case/erract2_java.java-J-T0--goto-backend.exp b/test/rlhc.d/case/erract2_java.java-J-T0--goto-backend.exp new file mode 100644 index 00000000..34700d13 --- /dev/null +++ b/test/rlhc.d/case/erract2_java.java-J-T0--goto-backend.exp @@ -0,0 +1,404 @@ +class erract2_java +{ + + + + + + + + private static byte _erract_actions [] = { 0, 2, 0, 1, 2, 1, 2, 2, 1, 3, 4, 0, 4, 1, 5, 4, 1, 2, 5, 6, 4, 1, 3, 5, 7, 0 , }; + private static byte _erract_key_offsets [] = { 0, 0, 1, 2, 3, 4, 5, 6, 0 , }; + private static char _erract_trans_keys [] = { 104, 101, 108, 108, 111, 10, 0, }; + private static byte _erract_single_lengths [] = { 0, 1, 1, 1, 1, 1, 1, 0, 0 , }; + private static byte _erract_range_lengths [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 , }; + private static byte _erract_index_offsets [] = { 0, 0, 2, 4, 6, 8, 10, 12, 0 , }; + private static byte _erract_trans_cond_spaces [] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0 , }; + private static byte _erract_trans_offsets [] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0 , }; + private static byte _erract_trans_lengths [] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 , }; + private static byte _erract_cond_keys [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , }; + private static byte _erract_cond_targs [] = { 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 0, 0 , }; + private static byte _erract_cond_actions [] = { 0, 1, 0, 4, 0, 4, 0, 4, 0, 4, 0, 7, 0, 0 , }; + private static byte _erract_eof_actions [] = { 0, 10, 15, 15, 15, 15, 20, 0, 0 , }; + private static byte _erract_nfa_targs [] = { 0, 0 , }; + private static byte _erract_nfa_offsets [] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 , }; + private static byte _erract_nfa_push_actions [] = { 0, 0 , }; + private static byte _erract_nfa_pop_trans [] = { 0, 0 , }; + private static int erract_start = 1; + private static int erract_first_final = 7; + private static int erract_error = 0; + private static int erract_en_main = 1; + int cs; + + void init() + { + { + cs = (int)erract_start; + + } + } + + void exec( char data[], int len ) + { + char buffer [] = new char[1024]; + int blen = 0; + int p = 0; + int pe = len; + + int eof = len; + String _s; + { + int _klen; + int _trans = 0; + int _cond = 0; + int _acts; + int _nacts; + int _keys; + int _ckeys; + int _cpc; + int _goto_targ = 0; + _goto: while ( true ) { + switch ( _goto_targ ) { + case 0: + if ( p == pe ) + { + _goto_targ = 5; + if (true) + continue _goto; + } + + if ( cs == 0 ) + { + _goto_targ = 6; + if (true) + continue _goto; + } + + case 1: + _keys = _erract_key_offsets[cs] ; + _trans = (int )_erract_index_offsets[cs]; + _klen = (int)_erract_single_lengths[cs]; + if ( _klen > 0 ) + { + int _lower; + int _mid; + int _upper; + _lower = _keys; + _upper = _keys + _klen - 1; + while ( true ) + { + if ( _upper < _lower ) + break; + + + _mid = _lower + ((_upper-_lower) >> 1); + if ( ( data[p ]) < _erract_trans_keys[_mid ] ) + _upper = _mid - 1; + + else if ( ( data[p ]) > _erract_trans_keys[_mid ] ) + _lower = _mid + 1; + + else + { + _trans += (int )(_mid - _keys); + { + _goto_targ = 2; + if (true) + continue _goto; + } + + } + + + } + + _keys += _klen; + _trans += (int )_klen; + + } + + _klen = (int)_erract_range_lengths[cs]; + if ( _klen > 0 ) + { + int _lower; + int _mid; + int _upper; + _lower = _keys; + _upper = _keys + (_klen<<1) - 2; + while ( true ) + { + if ( _upper < _lower ) + break; + + + _mid = _lower + (((_upper-_lower) >> 1) & ~1); + if ( ( data[p ]) < _erract_trans_keys[_mid ] ) + _upper = _mid - 2; + + else if ( ( data[p ]) > _erract_trans_keys[_mid + 1 ] ) + _lower = _mid + 2; + + else + { + _trans += (int )((_mid - _keys)>>1); + { + _goto_targ = 2; + if (true) + continue _goto; + } + + } + + + } + + _trans += (int )_klen; + + } + + + case 2: + _ckeys = _erract_trans_offsets[_trans] ; + _klen = (int)_erract_trans_lengths[_trans]; + _cond = (int )_erract_trans_offsets[_trans]; + _cpc = 0; + { + int _lower; + int _mid; + int _upper; + _lower = _ckeys; + _upper = _ckeys + _klen - 1; + while ( true ) + { + if ( _upper < _lower ) + break; + + + _mid = _lower + ((_upper-_lower) >> 1); + if ( _cpc < (int)_erract_cond_keys[_mid ] ) + _upper = _mid - 1; + + else if ( _cpc > (int)_erract_cond_keys[_mid ] ) + _lower = _mid + 1; + + else + { + _cond += (int )(_mid - _ckeys); + { + _goto_targ = 3; + if (true) + continue _goto; + } + + } + + + } + + cs = 0; + { + _goto_targ = 4; + if (true) + continue _goto; + } + + } + + case 3: + cs = (int)_erract_cond_targs[_cond]; + if ( _erract_cond_actions[_cond] == 0 ) + { + _goto_targ = 4; + if (true) + continue _goto; + } + + _acts = _erract_cond_actions[_cond] ; + _nacts = (int )_erract_actions[_acts ]; + _acts += 1; + while ( _nacts > 0 ) + { + switch ( _erract_actions[_acts ] ) { + case 0 : + { + System.out.print( "err_start\n" ); + + } + + break; + case 1 : + { + System.out.print( "err_all\n" ); + + } + + break; + case 2 : + { + System.out.print( "err_middle\n" ); + + } + + break; + case 3 : + { + System.out.print( "err_out\n" ); + + } + + break; + + } + _nacts -= 1; + _acts += 1; + + } + + + case 4: + if ( cs == 0 ) + { + _goto_targ = 6; + if (true) + continue _goto; + } + + p += 1; + if ( p != pe ) + { + _goto_targ = 1; + if (true) + continue _goto; + } + + + case 5: + { + + } + if ( p == eof ) + { + int __acts; + int __nacts; + __acts = _erract_eof_actions[cs] ; + __nacts = (int )_erract_actions[__acts ]; + __acts += 1; + while ( __nacts > 0 ) + { + switch ( _erract_actions[__acts ] ) { + case 0 : + { + System.out.print( "err_start\n" ); + + } + + break; + case 1 : + { + System.out.print( "err_all\n" ); + + } + + break; + case 2 : + { + System.out.print( "err_middle\n" ); + + } + + break; + case 3 : + { + System.out.print( "err_out\n" ); + + } + + break; + case 4 : + { + System.out.print( "eof_start\n" ); + + } + + break; + case 5 : + { + System.out.print( "eof_all\n" ); + + } + + break; + case 6 : + { + System.out.print( "eof_middle\n" ); + + } + + break; + case 7 : + { + System.out.print( "eof_out\n" ); + + } + + break; + + } + __nacts -= 1; + __acts += 1; + + } + + + } + + + case 6: + { + + } + + + } + break; + } + + } + } + + void finish( ) + { + if ( cs >= erract_first_final ) + System.out.println( "ACCEPT" ); + else + System.out.println( "FAIL" ); + } + + static final String inp[] = { + "", + "h", + "x", + "he", + "hx", + "hel", + "hex", + "hell", + "helx", + "hello", + "hellx", + "hello\n", + "hellox", + }; + + static final int inplen = 13; + + public static void main (String[] args) + { + erract2_java machine = new erract2_java(); + for ( int i = 0; i < inplen; i++ ) { + machine.init(); + machine.exec( inp[i].toCharArray(), inp[i].length() ); + machine.finish(); + } + } +} |