repo.or.cz
/
ragel.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Added Mitchell Foral.
[ragel.git]
/
test
/
scan3.rl
blob
ca1a1361e150c169bb465b3021774c1c8fd758d3
1
/*
2
* @LANG: indep
3
*/
4
ptr ts;
5
ptr te;
6
int act;
7
int token;
8
%%
9
%%{
10
machine scanner;
11
12
# Warning: changing the patterns or the input string will affect the
13
# coverage of the scanner action types.
14
main := |*
15
'a' => {
16
prints "pat1\n";
17
};
18
'b' => {
19
prints "pat2\n";
20
};
21
[ab] any* => {
22
prints "pat3\n";
23
};
24
*|;
25
}%%
26
/* _____INPUT_____
27
"ab89"
28
_____INPUT_____ */
29
/* _____OUTPUT_____
30
pat3
31
ACCEPT
32
_____OUTPUT_____ */