blob: fc7939e26435ca117ab7e00c589e4f480426cace (
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
|
//
// @LANG: rust
// @GENERATED: true
//
%%{
machine any1;
main := any;
}%%
%% write data;
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();
%% write init;
%% write exec;
if ( cs >= any1_first_final ) {
println!( "ACCEPT" );
}
else {
println!( "FAIL" );
}
}
fn main()
{
unsafe { m( "".to_string() ); }
unsafe { m( "x".to_string() ); }
unsafe { m( "xx".to_string() ); }
}
|