diff options
Diffstat (limited to 'test/rlhc.d/case/scan1_crack.crk-K-F1--var-backend.exp')
-rw-r--r-- | test/rlhc.d/case/scan1_crack.crk-K-F1--var-backend.exp | 392 |
1 files changed, 392 insertions, 0 deletions
diff --git a/test/rlhc.d/case/scan1_crack.crk-K-F1--var-backend.exp b/test/rlhc.d/case/scan1_crack.crk-K-F1--var-backend.exp new file mode 100644 index 00000000..c8268e76 --- /dev/null +++ b/test/rlhc.d/case/scan1_crack.crk-K-F1--var-backend.exp @@ -0,0 +1,392 @@ +import crack.io cout; +import crack.lang Buffer; + +int +ts; +int +te; +int act; +int token; + + + + + +const array[byte ] _scanner_trans_keys = [ 1, 0, 2, 9, 4, 4, 10, 10, 10, 10, 10, 10, 2, 9, 0, 9, 7, 7, 9, 9, 2, 9, 0, ]; +const array[int16 ] _scanner_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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 4, 5, 3, 3, 3, 3, 3, 3, 3, 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, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 0 , ]; +const array[int16 ] _scanner_index_offsets = [ 0, 0, 8, 9, 10, 11, 12, 20, 30, 31, 32, 0 , ]; +const array[int16 ] _scanner_indicies = [ 1, 2, 2, 2, 0, 0, 0, 2, 3, 6, 7, 8, 1, 2, 9, 10, 4, 4, 4, 2, 11, 4, 4, 2, 2, 2, 12, 13, 14, 15, 13, 18, 1, 2, 2, 2, 0, 0, 0, 2, 0 , ]; +const array[int16 ] _scanner_index_defaults = [ 0, 0, 4, 5, 5, 5, 4, 4, 16, 17, 0, 0 , ]; +const array[int16 ] _scanner_trans_cond_spaces = [ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0 , ]; +const array[int16 ] _scanner_cond_targs = [ 7, 7, 1, 9, 0, 7, 4, 5, 7, 10, 10, 7, 7, 8, 2, 6, 7, 7, 3, 0 , ]; +const array[int16 ] _scanner_cond_actions = [ 1, 2, 0, 3, 0, 4, 0, 0, 5, 6, 7, 10, 11, 0, 0, 0, 12, 13, 0, 0 , ]; +const array[int16 ] _scanner_to_state_actions = [ 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0 , ]; +const array[int16 ] _scanner_from_state_actions = [ 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0 , ]; +const array[int16 ] _scanner_eof_trans = [ 0, 1, 0, 6, 6, 6, 0, 0, 17, 18, 1, 0 , ]; +const array[int16 ] _scanner_nfa_targs = [ 0, 0 , ]; +const array[int16 ] _scanner_nfa_offsets = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , ]; +const array[int16 ] _scanner_nfa_push_actions = [ 0, 0 , ]; +const array[int16 ] _scanner_nfa_pop_trans = [ 0, 0 , ]; +const int scanner_start = 7; +const int scanner_first_final = 7; +const int scanner_error = 0; +const int scanner_en_main = 7; +void m( String s ) +{ + byteptr data = s.buffer; + int p = 0; + int pe = s.size; + int cs; + String buffer; + int eof = pe; + + if ( 1 ) { + cs = int ( scanner_start ); + ts = 0; + te = 0; + act = 0; + + } + if ( 1 ) { + uint32 _trans = 0; + uint32 _have = 0; + uint32 _cont = 1; + int _keys = 0; + int _inds = 0; + while ( _cont == 1 ) + { + if ( cs == 0 ) + _cont = 0; + + _have = 0; + if ( p == pe ) + { + if ( p == eof ) + { + if ( _scanner_eof_trans[cs]> 0 ) + { + _trans = uint32 ( _scanner_eof_trans[cs] )- 1; + _have = 1; + + } + + if ( _have == 0 ) + { + + } + + + } + + if ( _have == 0 ) + _cont = 0; + + + } + + if ( _cont == 1 ) + { + if ( _have == 0 ) + { + if ( _scanner_from_state_actions[cs] == 9 ) { + if ( 1 ) { + if ( 1 ) { + ts = p; + + } + + } + + } + ; + _keys = (cs<<1); + _inds = _scanner_index_offsets[cs]; + if ( (data[p ])<= 120 && (data[p ])>= 10 ) + { + int _ic = int ( _scanner_char_class[int ( (data[p ]) )- 10] ); + if ( _ic <= int ( _scanner_trans_keys[_keys+1 ] )&& _ic >= int ( _scanner_trans_keys[_keys ] ) ) + _trans = uint32 ( _scanner_indicies[_inds + int ( (_ic - int ( _scanner_trans_keys[_keys ] )) )] ); + + else + _trans = uint32 ( _scanner_index_defaults[cs] ); + + + } + + else + { + _trans = uint32 ( _scanner_index_defaults[cs] ); + + } + + + } + + if ( _cont == 1 ) + { + cs = int ( _scanner_cond_targs[_trans] ); + if ( _scanner_cond_actions[_trans] == 3 ) { + if ( 1 ) { + if ( 1 ) { + te = p+1; + + } + + } + + } + else if ( _scanner_cond_actions[_trans] == 11 ) { + if ( 1 ) { + if ( 1 ) { + te = p+1; + if ( 1 ) { + cout.format( "on last " ); + if ( p + 1 == te ) + { + cout.format( "yes" ); + + } + cout.format( "\n" ); + + } + + } + + } + + } + else if ( _scanner_cond_actions[_trans] == 5 ) { + if ( 1 ) { + if ( 1 ) { + te = p+1; + if ( 1 ) { + cout.format( "on lag " ); + if ( p + 1 == te ) + { + cout.format( "yes" ); + + } + cout.format( "\n" ); + + } + + } + + } + + } + else if ( _scanner_cond_actions[_trans] == 2 ) { + if ( 1 ) { + if ( 1 ) { + te = p+1; + + } + + } + + } + else if ( _scanner_cond_actions[_trans] == 10 ) { + if ( 1 ) { + if ( 1 ) { + te = p+1; + + } + + } + + } + else if ( _scanner_cond_actions[_trans] == 12 ) { + if ( 1 ) { + if ( 1 ) { + te = p; + p = p - 1; + if ( 1 ) { + cout.format( "on next " ); + if ( p + 1 == te ) + { + cout.format( "yes" ); + + } + cout.format( "\n" ); + + } + + } + + } + + } + else if ( _scanner_cond_actions[_trans] == 13 ) { + if ( 1 ) { + if ( 1 ) { + te = p; + p = p - 1; + if ( 1 ) { + cout.format( "on lag " ); + if ( p + 1 == te ) + { + cout.format( "yes" ); + + } + cout.format( "\n" ); + + } + + } + + } + + } + else if ( _scanner_cond_actions[_trans] == 4 ) { + if ( 1 ) { + if ( 1 ) { + p = ((te))-1; + if ( 1 ) { + cout.format( "on lag " ); + if ( p + 1 == te ) + { + cout.format( "yes" ); + + } + cout.format( "\n" ); + + } + + } + + } + + } + else if ( _scanner_cond_actions[_trans] == 1 ) { + if ( 1 ) { + if ( 1 ) { + if ( act == 0 ) { + if ( 1 ) { + if ( 1 ) { + cs = 0; + + } + + } + + } + else if ( act == 4 ) { + p = ((te))-1; + if ( 1 ) { + cout.format( "lm switch1 " ); + if ( p + 1 == te ) + { + cout.format( "yes" ); + + } + cout.format( "\n" ); + + } + + } + else if ( act == 5 ) { + p = ((te))-1; + if ( 1 ) { + cout.format( "lm switch2 " ); + if ( p + 1 == te ) + { + cout.format( "yes" ); + + } + cout.format( "\n" ); + + } + + } + ; + + } + + + } + + } + else if ( _scanner_cond_actions[_trans] == 6 ) { + if ( 1 ) { + if ( 1 ) { + te = p+1; + + } + + } + if ( 1 ) { + if ( 1 ) { + act = 4; + + } + + } + + } + else if ( _scanner_cond_actions[_trans] == 7 ) { + if ( 1 ) { + if ( 1 ) { + te = p+1; + + } + + } + if ( 1 ) { + if ( 1 ) { + act = 5; + + } + + } + + } + ; + if ( _scanner_to_state_actions[cs] == 8 ) { + if ( 1 ) { + if ( 1 ) { + ts = 0; + + } + + } + if ( 1 ) { + if ( 1 ) { + act = 0; + + } + + } + + } + ; + if ( cs == 0 ) + _cont = 0; + + if ( _cont == 1 ) + p += 1; + + + } + + + } + + + } + + + } + if ( cs >= scanner_first_final ) { + cout `ACCEPT\n`; + } + else { + cout `FAIL\n`; + } +} + +void main() +{ + m( "abbc1d1d2\n" ); +} + +main(); |