projects
/
external
/
ragel.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Started on the frontend support for pointer-based length conditions.
[external/ragel.git]
/
test
/
scan2.rl
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
19
[ab]+ . 'c' => {
20
prints "pat2\n";
21
};
22
23
any => {
24
prints "any\n";
25
};
26
*|;
27
}%%
28
/* _____INPUT_____
29
"a"
30
_____INPUT_____ */
31
/* _____OUTPUT_____
32
pat1
33
ACCEPT
34
_____OUTPUT_____ */