File: getstate_global_with_use.c

package info (click to toggle)
re2c 4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 50,052 kB
  • sloc: cpp: 32,477; ml: 8,279; sh: 5,265; makefile: 968; haskell: 612; python: 428; ansic: 227; javascript: 111; java: 3
file content (100 lines) | stat: -rw-r--r-- 1,590 bytes parent folder | download | duplicates (2)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/* Generated by re2c */
// re2c $INPUT -o $OUTPUT -if
// This test is for global `getstate:re2c` with `use:re2c` and non-use blocks.

// global `getstate:re2c` including y, z and unnamed blocks,
// with start label in the first unnamed block
switch (YYGETSTATE()) {
	case 1: goto yyFillLabel1;
	case 2: goto yyFillLabel2;
	case 3: goto yyFillLabel3;
	case 4: goto yyFillLabel4;
	default: goto yy2;
}


// rules block


// use block (expect a local state switch for this block only)

	switch (YYGETSTATE()) {
		case 0: goto yyFillLabel0;
		default: goto yy0;
	}
yy0:
	if (YYLIMIT <= YYCURSOR) {
		YYSETSTATE(0);
		YYFILL(1);
	}
yyFillLabel0:
	++YYCURSOR;
	YYSETSTATE(-1);
	{ x }


// unnamed global block that includes x (has start label)

yy2:
	if (YYLIMIT <= YYCURSOR) {
		YYSETSTATE(1);
		YYFILL(1);
	}
yyFillLabel1:
	++YYCURSOR;
	YYSETSTATE(-1);
	{ x }


// local block y (no start label)

	if (YYLIMIT <= YYCURSOR) {
		YYSETSTATE(2);
		YYFILL(1);
	}
yyFillLabel2:
	++YYCURSOR;
	YYSETSTATE(-1);
	{ y }


// global block z that includes x (no start label)

	if (YYLIMIT <= YYCURSOR) {
		YYSETSTATE(3);
		YYFILL(1);
	}
yyFillLabel3:
	++YYCURSOR;
	YYSETSTATE(-1);
	{ x }


// unnamed local block (no start label)

	if (YYLIMIT <= YYCURSOR) {
		YYSETSTATE(4);
		YYFILL(1);
	}
yyFillLabel4:
	++YYCURSOR;
	YYSETSTATE(-1);
	{ ? }


// use block (expect a local state switch for this block only)

	switch (YYGETSTATE()) {
		case 5: goto yyFillLabel5;
		default: goto yy10;
	}
yy10:
	if (YYLIMIT <= YYCURSOR) {
		YYSETSTATE(5);
		YYFILL(1);
	}
yyFillLabel5:
	++YYCURSOR;
	YYSETSTATE(-1);
	{ x }