diff options
Diffstat (limited to 'test/ragel.d/cond1.rl')
-rw-r--r-- | test/ragel.d/cond1.rl | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/test/ragel.d/cond1.rl b/test/ragel.d/cond1.rl deleted file mode 100644 index 58a31dca..00000000 --- a/test/ragel.d/cond1.rl +++ /dev/null @@ -1,84 +0,0 @@ -/* - * @LANG: indep - */ - -bool i; -bool j; -bool k; - -%%{ - machine foo; - - action c1 {i} - action c2 {j} - action c3 {k} - action one { print_str " one\n";} - action two { print_str " two\n";} - action three { print_str " three\n";} - - action seti { - if ( fc == 48 ) { - i = false; - } else { - i = true; - } - } - action setj { - if ( fc == 48 ) { - j = false; - } else { - j = true; - } - } - action setk { - if ( fc == 48 ) { - k = false; - } else { - k = true; - } - } - - action break {fnbreak;} - - one = 'a' 'b' when c1 'c' @one; - two = 'a'* 'b' when c2 'c' @two; - three = 'a'+ 'b' when c3 'c' @three; - - main := - [01] @seti - [01] @setj - [01] @setk - ( one | two | three ) '\n' @break; - -}%% - -##### INPUT ##### -"000abc\n" -"100abc\n" -"010abc\n" -"110abc\n" -"001abc\n" -"101abc\n" -"011abc\n" -"111abc\n" -##### OUTPUT ##### -FAIL - one -ACCEPT - two -ACCEPT - one - two -ACCEPT - three -ACCEPT - one - three -ACCEPT - two - three -ACCEPT - one - two - three -ACCEPT |