summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/rangei_rust.rs-U-T1--var-backend.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/rlhc.d/case/rangei_rust.rs-U-T1--var-backend.exp')
-rw-r--r--test/rlhc.d/case/rangei_rust.rs-U-T1--var-backend.exp235
1 files changed, 235 insertions, 0 deletions
diff --git a/test/rlhc.d/case/rangei_rust.rs-U-T1--var-backend.exp b/test/rlhc.d/case/rangei_rust.rs-U-T1--var-backend.exp
new file mode 100644
index 00000000..30a7a3c5
--- /dev/null
+++ b/test/rlhc.d/case/rangei_rust.rs-U-T1--var-backend.exp
@@ -0,0 +1,235 @@
+static _rangei_key_offsets: [i8 ; 10] = [ 0, 0, 4, 8, 12, 16, 22, 24, 0 , 0 ];
+static _rangei_trans_keys: [u8 ; 26] = [ 65, 90, 97, 122, 65, 90, 97, 122, 60, 93, 97, 122, 65, 90, 94, 125, 65, 69, 86, 101, 118, 122, 60, 125, 0 , 0 ];
+static _rangei_single_lengths: [i8 ; 10] = [ 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0 ];
+static _rangei_range_lengths: [i8 ; 10] = [ 0, 2, 2, 2, 2, 3, 1, 0, 0 , 0 ];
+static _rangei_index_offsets: [i8 ; 10] = [ 0, 0, 3, 6, 9, 12, 16, 18, 0 , 0 ];
+static _rangei_trans_cond_spaces: [i8 ; 21] = [ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0 , 0 ];
+static _rangei_trans_offsets: [i8 ; 21] = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 0 , 0 ];
+static _rangei_trans_lengths: [i8 ; 21] = [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 , 0 ];
+static _rangei_cond_keys: [i8 ; 21] = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0 ];
+static _rangei_cond_targs: [i8 ; 21] = [ 2, 2, 0, 3, 3, 0, 4, 4, 0, 5, 5, 0, 6, 6, 6, 0, 7, 0, 0, 0 , 0 ];
+static _rangei_cond_actions: [i8 ; 21] = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0 ];
+static _rangei_nfa_targs: [i8 ; 3] = [ 0, 0 , 0 ];
+static _rangei_nfa_offsets: [i8 ; 10] = [ 0, 0, 0, 0, 0, 0, 0, 0, 0 , 0 ];
+static _rangei_nfa_push_actions: [i8 ; 3] = [ 0, 0 , 0 ];
+static _rangei_nfa_pop_trans: [i8 ; 3] = [ 0, 0 , 0 ];
+static rangei_start : i32 = 1;
+static rangei_first_final : i32 = 7;
+static rangei_error : i32 = 0;
+static rangei_en_main : i32 = 1;
+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 = ( rangei_start ) as i32;
+ }
+
+ {
+ let mut _klen = 0;
+ let mut _keys :i32 = 0;
+ let mut _ckeys :i32 = 0;
+ let mut _cpc = 0;
+ let mut _trans = 0;
+ let mut _cond = 0;
+ let mut _have = 0;
+ let mut _cont = 1;
+ while ( _cont == 1 )
+ {
+
+ if ( cs == 0 ) {
+ _cont = 0;
+
+ }
+ _have = 0;
+ if ( p == pe ) {
+ {
+ if ( _have == 0 ) {
+ _cont = 0;
+
+ }
+ }
+
+ }
+ if ( _cont == 1 ) {
+ {
+ if ( _have == 0 ) {
+ {
+ _keys = ( _rangei_key_offsets[(cs) as usize] ) as i32;
+ _trans = ( _rangei_index_offsets[(cs) as usize] ) as u32;
+ _have = 0;
+ _klen = ( _rangei_single_lengths[(cs) as usize] ) as i32;
+ if ( _klen > 0 ) {
+ {
+ let mut _lower :i32 = 0;
+ let mut _mid :i32 = 0;
+ let mut _upper :i32 = 0;
+ _lower = _keys;
+ _upper = _keys + _klen - 1;
+ while ( _upper >= _lower && _have == 0 )
+ {
+ _mid = _lower + ((_upper-_lower) >> 1);
+ if ( ( data[(p ) as usize]
+ ) < _rangei_trans_keys[(_mid ) as usize]
+ ) {
+ _upper = _mid - 1;
+
+ }
+ else if ( ( data[(p ) as usize]
+ ) > _rangei_trans_keys[(_mid ) as usize]
+ ) {
+ _lower = _mid + 1;
+
+ }
+ else {
+ {
+ _trans += ( (_mid - _keys) ) as u32;
+ _have = 1;
+ }
+
+ }
+ }
+
+ if ( _have == 0 ) {
+ {
+ _keys += _klen;
+ _trans += ( _klen ) as u32;
+ }
+
+ }
+ }
+
+
+ }
+ if ( _have == 0 ) {
+ {
+ _klen = ( _rangei_range_lengths[(cs) as usize] ) as i32;
+ if ( _klen > 0 ) {
+ {
+ let mut _lower :i32 = 0;
+ let mut _mid :i32 = 0;
+ let mut _upper :i32 = 0;
+ _lower = _keys;
+ _upper = _keys + (_klen<<1) - 2;
+ while ( _have == 0 && _lower <= _upper )
+ {
+ _mid = _lower + (((_upper-_lower) >> 1) & !1
+ );
+ if ( ( data[(p ) as usize]
+ ) < _rangei_trans_keys[(_mid ) as usize]
+ ) {
+ _upper = _mid - 2;
+
+ }
+ else if ( ( data[(p ) as usize]
+ ) > _rangei_trans_keys[(_mid + 1 ) as usize]
+ ) {
+ _lower = _mid + 2;
+
+ }
+ else {
+ {
+ _trans += ( ((_mid - _keys)>>1) ) as u32;
+ _have = 1;
+ }
+
+ }
+ }
+
+ if ( _have == 0 ) {
+ _trans += ( _klen ) as u32;
+
+ }
+ }
+
+ }
+ }
+
+
+ }
+ _ckeys = ( _rangei_trans_offsets[(_trans) as usize] ) as i32;
+ _klen = ( _rangei_trans_lengths[(_trans) as usize] ) as i32;
+ _cond = ( _rangei_trans_offsets[(_trans) as usize] ) as u32;
+ _have = 0;
+ _cpc = 0;
+ {
+ let mut _lower :i32 = 0;
+ let mut _mid :i32 = 0;
+ let mut _upper :i32 = 0;
+ _lower = _ckeys;
+ _upper = _ckeys + _klen - 1;
+ while ( _have == 0 && _lower <= _upper )
+ {
+ _mid = _lower + ((_upper-_lower) >> 1);
+ if ( _cpc < ( _rangei_cond_keys[(_mid ) as usize]
+ ) as i32 ) {
+ _upper = _mid - 1;
+
+ }
+ else if ( _cpc > ( _rangei_cond_keys[(_mid ) as usize]
+ ) as i32 ) {
+ _lower = _mid + 1;
+
+ }
+ else {
+ {
+ _cond += ( (_mid - _ckeys) ) as u32;
+ _have = 1;
+ }
+
+ }
+ }
+
+ if ( _have == 0 ) {
+ {
+ cs = 0;
+ _cont = 0;
+ }
+
+ }
+ }
+ }
+
+ }
+ if ( _cont == 1 ) {
+ {
+ cs = ( _rangei_cond_targs[(_cond) as usize] ) as i32;
+ if ( cs == 0 ) {
+ _cont = 0;
+
+ }
+ if ( _cont == 1 ) {
+ p += 1;
+
+ }
+ }
+ }
+ }
+
+ }
+ }
+
+ }
+ if ( cs >= rangei_first_final ) {
+ println!( "ACCEPT" );
+ }
+ else {
+ println!( "FAIL" );
+ }
+}
+
+fn main()
+{
+ unsafe { m( "AaBbAa".to_string() ); }
+ unsafe { m( "Aa`bAa".to_string() ); }
+ unsafe { m( "AaB@Aa".to_string() ); }
+ unsafe { m( "AaBbMa".to_string() ); }
+ unsafe { m( "AaBbma".to_string() ); }
+}
+