summaryrefslogtreecommitdiff
path: root/test/rlhc.d/case/zlen1_rust.rs-U-F1--var-backend.exp
blob: 5a36288f143cc6a2fb0b13eef8d4a42dd0a7532a (plain)
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
static _zlen1_trans_keys: [u8 ; 6] = [ 1, 0, 1, 0, 0 , 0 ];
static _zlen1_char_class: [i8 ; 2] = [ 0 , 0 ];
static _zlen1_index_offsets: [i8 ; 4] = [ 0, 0, 0 , 0 ];
static _zlen1_indicies: [i8 ; 2] = [ 0 , 0 ];
static _zlen1_index_defaults: [i8 ; 4] = [ 0, 0, 0 , 0 ];
static _zlen1_trans_cond_spaces: [i8 ; 3] = [ -1, 0 , 0 ];
static _zlen1_cond_targs: [i8 ; 3] = [ 0, 0 , 0 ];
static _zlen1_cond_actions: [i8 ; 3] = [ 0, 0 , 0 ];
static _zlen1_nfa_targs: [i8 ; 3] = [ 0, 0 , 0 ];
static _zlen1_nfa_offsets: [i8 ; 4] = [ 0, 0, 0 , 0 ];
static _zlen1_nfa_push_actions: [i8 ; 3] = [ 0, 0 , 0 ];
static _zlen1_nfa_pop_trans: [i8 ; 3] = [ 0, 0 , 0 ];
static zlen1_start : i32 = 1;
static zlen1_first_final : i32 = 1;
static zlen1_error : i32 = 0;
static zlen1_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 = ( zlen1_start ) as i32;
	}
	
	{
		let mut _trans  = 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  ) {
						{
							_trans = ( _zlen1_index_defaults[(cs) as usize] ) as u32;
						}
						
					}
					if ( _cont == 1  ) {
						{
							cs = ( _zlen1_cond_targs[(_trans) as usize] ) as i32;
							if ( cs == 0  ) {
								_cont = 0;
								
							}
							if ( _cont == 1  ) {
								p += 1;
								
							}
						}
					}
				}
				
			}
		}
		
	}
	if ( cs >= zlen1_first_final ) {
		println!( "ACCEPT" );
	}
	else {
		println!( "FAIL" );
	}
}

fn main()
{
	unsafe { m( "".to_string() ); }
	unsafe { m( "x".to_string() ); }
}