diff options
Diffstat (limited to 'test/rlhc.d/case/cppscan6_rust.rs-U-T1--var-backend.in')
-rw-r--r-- | test/rlhc.d/case/cppscan6_rust.rs-U-T1--var-backend.in | 802 |
1 files changed, 802 insertions, 0 deletions
diff --git a/test/rlhc.d/case/cppscan6_rust.rs-U-T1--var-backend.in b/test/rlhc.d/case/cppscan6_rust.rs-U-T1--var-backend.in new file mode 100644 index 00000000..d326659b --- /dev/null +++ b/test/rlhc.d/case/cppscan6_rust.rs-U-T1--var-backend.in @@ -0,0 +1,802 @@ +host( "working/cppscan6_rust.rl", 1 ) @{// + // @@LANG: rust + // @@GENERATED: true + // + + static mut ts : i32 + = 0; + static mut te : i32 + = 0; + static mut act : i32 = 0; + static mut token : i32 = 0; + + + + + +}@ +array s16 _scanner_key_offsets( 0, 145 ) = { 0, 0, 3, 3, 6, 6, 7, 11, 13, 14, 16, 17, 23, 54, 56, 57, 58, 60, 61, 63, 66, 67, 71, 79, 85, 88, 98, 107, 117, 126, 127, 128, 135, 144, 145, 0 }; + +array u8 _scanner_trans_keys( 0, 126 ) = { 10, 34, 92, 10, 39, 92, 46, 43, 45, 48, 57, 48, 57, 33, 33, 47, 10, 48, 57, 65, 70, 97, 102, 33, 34, 37, 38, 39, 42, 43, 45, 46, 47, 48, 58, 61, 76, 94, 95, 124, 35, 44, 49, 57, 59, 64, 65, 90, 91, 96, 97, 122, 123, 126, 33, 126, 61, 61, 38, 61, 61, 43, 61, 45, 61, 62, 42, 42, 46, 48, 57, 69, 70, 76, 101, 102, 108, 48, 57, 70, 76, 102, 108, 48, 57, 33, 47, 61, 46, 69, 76, 85, 101, 108, 117, 120, 48, 57, 46, 69, 76, 85, 101, 108, 117, 48, 57, 76, 85, 108, 117, 48, 57, 65, 70, 97, 102, 46, 69, 76, 85, 101, 108, 117, 48, 57, 58, 61, 95, 48, 57, 65, 90, 97, 122, 34, 39, 95, 48, 57, 65, 90, 97, 122, 61, 61, 124, 0 }; + +array s8 _scanner_single_lengths( 0, 17 ) = { 0, 3, 0, 3, 0, 1, 2, 0, 1, 2, 1, 0, 17, 0, 1, 1, 2, 1, 2, 3, 1, 2, 6, 4, 3, 8, 7, 4, 7, 1, 1, 1, 3, 1, 2, 0 }; + +array s8 _scanner_range_lengths( 0, 7 ) = { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 3, 7, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 3, 1, 0, 0, 3, 3, 0, 0, 0 }; + +array s16 _scanner_index_offsets( 0, 150 ) = { 0, 0, 4, 5, 9, 10, 12, 16, 18, 20, 23, 25, 29, 54, 56, 58, 60, 63, 65, 68, 72, 74, 78, 86, 92, 96, 106, 115, 123, 132, 134, 136, 141, 148, 150, 0 }; + +array s8 _scanner_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, -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, -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 s16 _scanner_trans_offsets( 0, 185 ) = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 0 }; + +array s8 _scanner_trans_lengths( 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, 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, 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 _scanner_cond_keys( 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, 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 s8 _scanner_cond_targs( 0, 34 ) = { 12, 12, 2, 1, 1, 12, 12, 4, 3, 3, 12, 12, 7, 7, 23, 12, 23, 12, 9, 8, 9, 12, 8, 12, 10, 27, 27, 27, 12, 14, 1, 15, 16, 3, 17, 18, 19, 21, 24, 25, 29, 30, 32, 33, 31, 34, 12, 28, 12, 31, 12, 31, 12, 13, 12, 13, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 20, 12, 12, 12, 12, 5, 22, 12, 6, 12, 12, 6, 12, 12, 22, 12, 12, 12, 12, 12, 23, 12, 8, 10, 12, 12, 22, 6, 12, 12, 6, 12, 12, 11, 26, 12, 22, 6, 12, 12, 6, 12, 12, 26, 12, 12, 12, 12, 12, 27, 27, 27, 12, 22, 6, 12, 12, 6, 12, 12, 28, 12, 12, 12, 12, 12, 31, 31, 31, 31, 12, 1, 3, 31, 31, 31, 31, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0 }; + +array s8 _scanner_cond_actions( 0, 45 ) = { 1, 2, 0, 0, 0, 1, 3, 0, 0, 0, 5, 4, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 7, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 13, 0, 0, 14, 0, 0, 0, 11, 13, 11, 0, 11, 0, 11, 0, 15, 0, 17, 16, 18, 16, 19, 20, 16, 21, 16, 22, 23, 16, 24, 25, 0, 16, 27, 26, 28, 0, 29, 16, 0, 31, 31, 0, 31, 31, 29, 30, 31, 31, 31, 31, 0, 30, 0, 0, 32, 16, 29, 0, 35, 35, 0, 35, 35, 0, 34, 33, 29, 0, 37, 37, 0, 37, 37, 34, 36, 39, 39, 39, 39, 0, 0, 0, 38, 29, 0, 35, 35, 0, 35, 35, 13, 33, 40, 16, 41, 16, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 42, 43, 16, 44, 45, 16, 1, 1, 1, 1, 4, 1, 1, 4, 4, 4, 8, 15, 16, 16, 16, 16, 16, 16, 26, 16, 30, 30, 16, 33, 36, 38, 33, 16, 16, 42, 42, 16, 16, 0 }; + +array s8 _scanner_to_state_actions( 0, 9 ) = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + +array s8 _scanner_from_state_actions( 0, 10 ) = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + +array s8 _scanner_eof_trans_indexed( 0, 46 ) = { 0, 12, 12, 12, 12, 15, 12, 12, 15, 15, 15, 19, 0, 21, 22, 22, 22, 22, 22, 22, 32, 22, 35, 35, 22, 38, 40, 42, 38, 22, 22, 46, 46, 22, 22, 0 }; + +array s16 _scanner_eof_trans_direct( 0, 186 ) = { 0, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 0, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 0 }; + +array s8 _scanner_nfa_targs( 0, 0 ) = { 0, 0 }; + +array s8 _scanner_nfa_offsets( 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 s8 _scanner_nfa_push_actions( 0, 0 ) = { 0, 0 }; + +array s8 _scanner_nfa_pop_trans( 0, 0 ) = { 0, 0 }; + +value int scanner_start = 12; +value int scanner_first_final = 12; +value int scanner_error = 0; + +value int scanner_en_main = 12; + +host( "working/cppscan6_rust.rl", 379 ) @{ + + unsafe fn m( s: String ) + { + let data: &[u8] = s.as_bytes(); + let mut p:i32 = 0; + let mut pe:i32 = s.len() as i32; + let mut eof:i32 = s.len() as i32; + let mut cs: i32 = 0; + let mut buffer = String::new(); + + }@ + { + cs = cast(int)scanner_start; + ts = nil; + te = nil; + act = 0; + } + host( "working/cppscan6_rust.rl", 390 ) @{ + }@ + { + int _klen; + index u8 _keys; + index s8 _ckeys; + int _cpc; + uint _trans; + uint _cond = 0; + uint _have = 0; + uint _cont = 1; + while ( _cont == 1 ) { + + if ( cs == 0 ) + _cont = 0; + _have = 0; + if ( p == pe ) { + if ( p == eof ) + { + if ( _scanner_eof_trans_direct[cs] > 0 ) { + _trans = cast(uint)_scanner_eof_trans_direct[cs] - 1; + _cond = cast(uint)_scanner_trans_offsets[_trans]; + _have = 1; + } + if ( _have == 0 ) { + } + } + + if ( _have == 0 ) + _cont = 0; + } + if ( _cont == 1 ) { + if ( _have == 0 ) { + switch ( _scanner_from_state_actions[cs] ) { + case 10 { + host( "NONE", 1 ) ${${ts = p;}$}$ + } + } + + _keys = offset( _scanner_trans_keys, _scanner_key_offsets[cs] ); + _trans = cast(uint)_scanner_index_offsets[cs]; + _have = 0; + + _klen = cast(int)_scanner_single_lengths[cs]; + if ( _klen > 0 ) { + index u8 _lower; + index u8 _mid; + index u8 _upper; + _lower = _keys; + _upper = _keys + _klen - 1; + while ( _upper >= _lower && _have == 0 ) { + _mid = _lower + ((_upper-_lower) >> 1); + if ( ( deref( data, p )) < deref( _scanner_trans_keys, _mid ) ) + _upper = _mid - 1; + else if ( ( deref( data, p )) > deref( _scanner_trans_keys, _mid ) ) + _lower = _mid + 1; + else { + _trans += cast(uint)(_mid - _keys); + _have = 1; + } + } + if ( _have == 0 ) { + _keys += _klen; + _trans += cast(uint)_klen; + } + } + + if ( _have == 0 ) { + _klen = cast(int)_scanner_range_lengths[cs]; + if ( _klen > 0 ) { + index u8 _lower; + index u8 _mid; + index u8 _upper; + _lower = _keys; + _upper = _keys + (_klen<<1) - 2; + while ( _have == 0 && _lower <= _upper ) { + _mid = _lower + (((_upper-_lower) >> 1) & ~1); + if ( ( deref( data, p )) < deref( _scanner_trans_keys, _mid ) ) + _upper = _mid - 2; + else if ( ( deref( data, p )) > deref( _scanner_trans_keys, _mid + 1 ) ) + _lower = _mid + 2; + else { + _trans += cast(uint)((_mid - _keys)>>1); + _have = 1; + } + } + if ( _have == 0 ) + _trans += cast(uint)_klen; + } + } + + _ckeys = offset( _scanner_cond_keys, _scanner_trans_offsets[_trans] ); + _klen = cast(int)_scanner_trans_lengths[_trans]; + _cond = cast(uint)_scanner_trans_offsets[_trans]; + _have = 0; + + _cpc = 0; + { + index s8 _lower; + index s8 _mid; + index s8 _upper; + _lower = _ckeys; + _upper = _ckeys + _klen - 1; + while ( _have == 0 && _lower <= _upper ) { + _mid = _lower + ((_upper-_lower) >> 1); + if ( _cpc < cast(int)deref( _scanner_cond_keys, _mid ) ) + _upper = _mid - 1; + else if ( _cpc > cast(int)deref( _scanner_cond_keys, _mid ) ) + _lower = _mid + 1; + else { + _cond += cast(uint)(_mid - _ckeys); + _have = 1; + } + } + if ( _have == 0 ) { + cs = 0; + _cont = 0; + } + } + } + if ( _cont == 1 ) { + cs = cast(int)_scanner_cond_targs[_cond]; + + switch ( _scanner_cond_actions[_cond] ) { + case 12 { + host( "NONE", 1 ) ${${te = p+1;}$}$ + } + case 3 { + host( "working/cppscan6_rust.rl", 33 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 33 ) ${token = 193; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 2 { + host( "working/cppscan6_rust.rl", 45 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 45 ) ${token = 192; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 31 { + host( "working/cppscan6_rust.rl", 78 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 78 ) ${token = 194; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 35 { + host( "working/cppscan6_rust.rl", 92 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 92 ) ${token = 218; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 37 { + host( "working/cppscan6_rust.rl", 106 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 106 ) ${token = 219; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 39 { + host( "working/cppscan6_rust.rl", 120 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 120 ) ${token = 220; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 40 { + host( "working/cppscan6_rust.rl", 133 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 133 ) ${token = 197; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 41 { + host( "working/cppscan6_rust.rl", 144 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 144 ) ${token = 223; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 17 { + host( "working/cppscan6_rust.rl", 155 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 155 ) ${token = 224; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 19 { + host( "working/cppscan6_rust.rl", 166 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 166 ) ${token = 225; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 45 { + host( "working/cppscan6_rust.rl", 177 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 177 ) ${token = 226; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 21 { + host( "working/cppscan6_rust.rl", 188 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 188 ) ${token = 227; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 32 { + host( "working/cppscan6_rust.rl", 199 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 199 ) ${token = 228; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 18 { + host( "working/cppscan6_rust.rl", 210 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 210 ) ${token = 229; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 23 { + host( "working/cppscan6_rust.rl", 221 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 221 ) ${token = 230; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 25 { + host( "working/cppscan6_rust.rl", 232 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 232 ) ${token = 231; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 20 { + host( "working/cppscan6_rust.rl", 243 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 243 ) ${token = 232; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 43 { + host( "working/cppscan6_rust.rl", 254 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 254 ) ${token = 233; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 44 { + host( "working/cppscan6_rust.rl", 265 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 265 ) ${token = 234; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 22 { + host( "working/cppscan6_rust.rl", 276 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 276 ) ${token = 212; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 24 { + host( "working/cppscan6_rust.rl", 287 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 287 ) ${token = 213; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 27 { + host( "working/cppscan6_rust.rl", 309 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 309 ) ${token = 214; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 28 { + host( "working/cppscan6_rust.rl", 320 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 320 ) ${token = 215; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 5 { + host( "working/cppscan6_rust.rl", 333 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 333 ) ${token = 240; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 11 { + host( "working/cppscan6_rust.rl", 346 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 346 ) ${token = ( ( data[ts as usize] ) as i32 ) + ; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 6 { + host( "working/cppscan6_rust.rl", 16 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 16 ) ${token = 242; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 7 { + host( "working/cppscan6_rust.rl", 16 ) ${${te = p+1;host( "working/cppscan6_rust.rl", 16 ) ${token = 242; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 42 { + host( "working/cppscan6_rust.rl", 59 ) ${${te = p;p = p - 1;host( "working/cppscan6_rust.rl", 59 ) ${token = 195; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 30 { + host( "working/cppscan6_rust.rl", 78 ) ${${te = p;p = p - 1;host( "working/cppscan6_rust.rl", 78 ) ${token = 194; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 33 { + host( "working/cppscan6_rust.rl", 92 ) ${${te = p;p = p - 1;host( "working/cppscan6_rust.rl", 92 ) ${token = 218; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 36 { + host( "working/cppscan6_rust.rl", 106 ) ${${te = p;p = p - 1;host( "working/cppscan6_rust.rl", 106 ) ${token = 219; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 38 { + host( "working/cppscan6_rust.rl", 120 ) ${${te = p;p = p - 1;host( "working/cppscan6_rust.rl", 120 ) ${token = 220; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 26 { + host( "working/cppscan6_rust.rl", 298 ) ${${te = p;p = p - 1;host( "working/cppscan6_rust.rl", 298 ) ${token = 211; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 16 { + host( "working/cppscan6_rust.rl", 346 ) ${${te = p;p = p - 1;host( "working/cppscan6_rust.rl", 346 ) ${token = ( ( data[ts as usize] ) as i32 ) + ; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 15 { + host( "working/cppscan6_rust.rl", 362 ) ${${te = p;p = p - 1;host( "working/cppscan6_rust.rl", 362 ) ${token = 241; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 8 { + host( "working/cppscan6_rust.rl", 92 ) ${${p = ((te))-1; + host( "working/cppscan6_rust.rl", 92 ) ${token = 218; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 4 { + host( "working/cppscan6_rust.rl", 346 ) ${${p = ((te))-1; + host( "working/cppscan6_rust.rl", 346 ) ${token = ( ( data[ts as usize] ) as i32 ) + ; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$}$}$ + } + case 1 { + host( "NONE", 1 ) ${${switch( act ) { + case 0 { + host( "NONE", 1 ) ${${cs = 0;}$}$ } + case 3 { + p = ((te))-1; + host( "working/cppscan6_rust.rl", 59 ) ${token = 195; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$ } + case 4 { + p = ((te))-1; + host( "working/cppscan6_rust.rl", 78 ) ${token = 194; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$ } + case 5 { + p = ((te))-1; + host( "working/cppscan6_rust.rl", 92 ) ${token = 218; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$ } + case 6 { + p = ((te))-1; + host( "working/cppscan6_rust.rl", 106 ) ${token = 219; + print!( "{}", "<" ); + print!( "{}", token ); + print!( "{}", "> " ); + let s = match std::str::from_utf8(&data[ts as usize .. te as usize]) { + Ok(v) => v, + Err(e) => panic!("Invalid UTF-8 sequence: {}", e), + }; + print!( "{}", s ); + print!( "{}", "\n" ); + }$ } + }}$ + }$ + } + case 14 { + host( "NONE", 1 ) ${${te = p+1;}$}$ + host( "working/cppscan6_rust.rl", 59 ) ${${act = 3;}$}$ + } + case 29 { + host( "NONE", 1 ) ${${te = p+1;}$}$ + host( "working/cppscan6_rust.rl", 78 ) ${${act = 4;}$}$ + } + case 13 { + host( "NONE", 1 ) ${${te = p+1;}$}$ + host( "working/cppscan6_rust.rl", 92 ) ${${act = 5;}$}$ + } + case 34 { + host( "NONE", 1 ) ${${te = p+1;}$}$ + host( "working/cppscan6_rust.rl", 106 ) ${${act = 6;}$}$ + } + } + + switch ( _scanner_to_state_actions[cs] ) { + case 9 { + host( "NONE", 1 ) ${${ts = nil;}$}$ + host( "NONE", 1 ) ${${act = 0;}$}$ + } + } + + if ( cs == 0 ) + _cont = 0; + if ( _cont == 1 ) + p += 1; + + }} + } + } + host( "working/cppscan6_rust.rl", 391 ) @{ + + if ( cs >= scanner_first_final ) { + println!( "ACCEPT" ); + } + else { + println!( "FAIL" ); + } + } + + fn main() + { + unsafe { m( "\"\\\"hi\" /!\n!/\n44 .44\n44. 44\n44 . 44\n44.44\n_hithere22".to_string() ); } + unsafe { m( "'\\''\"\\n\\d'\\\"\"\nhi\n99\n.99\n99e-4\n->*\n||\n0x98\n0x\n//\n/! * !/".to_string() ); } + unsafe { m( "'\n'\n".to_string() ); } + } + +}@
\ No newline at end of file |