summaryrefslogtreecommitdiff
path: root/test/repeat-07_default.gir--skeleton.re
blob: ad81553cf084b66d4a6b71b19b0869f7c3beeb73 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// multiple scanners, additional rules, char width change, default rule

void scan(unsigned char* in)
{
/*!rules:re2c

"a" := return "a";
"b" := return "b";
"c" := return "c";
"d" := return "d";
*   := return "DEFAULT";

re2c:indent:top = 1;

*//*!use:re2c

re2c:flags:u = 0;
re2c:flags:w = 0;

re2c:define:YYCTYPE  = 'unsigned char';
re2c:define:YYFILL   = 'fill1';
re2c:define:YYCURSOR = 'cursor1';
re2c:define:YYLIMIT  = 'limit1';

"1"	:= return "1";
.   := return ".";

*/
}

void scan(unsigned short* in)
{
/*!use:re2c

re2c:flags:u = 0;
re2c:flags:w = 1;

re2c:define:YYCTYPE  = 'unsigned short';
re2c:define:YYFILL   = 'fill2';
re2c:define:YYCURSOR = 'cursor2';
re2c:define:YYLIMIT  = 'limit2';

"2"	:= return "2";
.   := return ".";

*/
}

void scan(unsigned int* in)
{
/*!use:re2c

re2c:flags:w = 0;
re2c:flags:u = 1;

re2c:define:YYCTYPE  = 'unsigned int';
re2c:define:YYFILL   = 'fill3';
re2c:define:YYCURSOR = 'cursor3';
re2c:define:YYLIMIT  = 'limit3';

"3"	:= return "3";
.   := return ".";

*/
}