blob: d5ec87ec15d7b1cf1fed4dec7584afd0b0d30b81 (
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
|
/*
* @LANG: indep
* @NEEDS_EOF: yes
*/
ptr ts;
ptr te;
%%{
machine lmnfa1;
main := :nfa |*
"hello" %when {false} => { print_str "hello --fail\n"; };
"hello" => { print_str "hello\n"; };
[a-z]+ %when {false} => { print_str "other --fail\n"; };
[a-z]+ => { print_str "other\n"; };
' ' => { print_str "<space>\n"; };
*|;
}%%
##### INPUT #####
"hello hellos hello"
##### OUTPUT #####
hello
<space>
other
<space>
hello
ACCEPT
|