diff options
author | Adrian Thurston <thurston@colm.net> | 2019-09-09 10:19:58 -0600 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2019-09-09 10:19:58 -0600 |
commit | fff52cd5a567ec541cd487b9fee2d89bf9b6f6eb (patch) | |
tree | 046a3f0f457343f7c99bf096863daf023a085051 /test/ragel.d/rust1.rl | |
parent | 2d8e9c3f5c0417d6237c945c50f92bf8d28b32d5 (diff) | |
download | colm-fff52cd5a567ec541cd487b9fee2d89bf9b6f6eb.tar.gz |
base (aapl, colm, ragel) test cases building
Diffstat (limited to 'test/ragel.d/rust1.rl')
-rw-r--r-- | test/ragel.d/rust1.rl | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/ragel.d/rust1.rl b/test/ragel.d/rust1.rl new file mode 100644 index 00000000..8a95425e --- /dev/null +++ b/test/ragel.d/rust1.rl @@ -0,0 +1,37 @@ +// +// @LANG: rust +// + +%%{ + machine atoi; + + main := '-'? [0-9]+ '.' @{ + println!( "match" ); + }; +}%% + +%% write data; + +fn m( s: String ) +{ + let data: &[u8] = s.as_bytes(); + let mut p = 0; + let mut pe = s.len(); + let mut cs: i32 = 0; + + %% write init; + %% write exec; +} + +fn main() +{ + m( "-99.".to_string() ); + m( "100.".to_string() ); + m( "100x.".to_string() ); + m( "1000.".to_string() ); +} + +##### OUTPUT ##### +match +match +match |