File: getstate_autogen_use_before_normal.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 (111 lines) | stat: -rw-r--r-- 2,083 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
101
102
103
104
105
106
107
108
109
110
111
/* Generated by re2c */
// re2c $INPUT -o $OUTPUT -if
// This tests that a use block (that always has its own state switch)
// preceding a non-use block does not affect the generation of a global
// implicit state switch for non-use blocks.



// expect local state switch for a use block

	switch (YYGETSTATE()) {
		case 0: goto yyFillLabel0;
		default: goto yy0;
	}
yy0:
	goto yy1;
yy2:
	++YYCURSOR;
yy1:
	if (YYLIMIT <= YYCURSOR) {
		YYSETSTATE(0);
		YYFILL(1);
	}
yyFillLabel0:
	yych = *YYCURSOR;
	switch (yych) {
		case 'a': goto yy2;
		default: goto yy3;
	}
yy3:
	YYSETSTATE(-1);
	{ return 1; }


// expect global implicit state switch for blocks 'b' and 'c'

	switch (YYGETSTATE()) {
		case 1: goto yyFillLabel1;
		case 3: goto yyFillLabel3;
		default: goto yy4;
	}
yy4:
	goto yy5;
yy6:
	++YYCURSOR;
yy5:
	if (YYLIMIT <= YYCURSOR) {
		YYSETSTATE(1);
		YYFILL(1);
	}
yyFillLabel1:
	yych = *YYCURSOR;
	switch (yych) {
		case 'b': goto yy6;
		default: goto yy7;
	}
yy7:
	YYSETSTATE(-1);
	{ return 2; }


// expect local state switch for a use block

	switch (YYGETSTATE()) {
		case 2: goto yyFillLabel2;
		default: goto yy8;
	}
yy8:
	goto yy9;
yy10:
	++YYCURSOR;
yy9:
	if (YYLIMIT <= YYCURSOR) {
		YYSETSTATE(2);
		YYFILL(1);
	}
yyFillLabel2:
	yych = *YYCURSOR;
	switch (yych) {
		case 'a': goto yy10;
		default: goto yy11;
	}
yy11:
	YYSETSTATE(-1);
	{ return 1; }


// expect no state switch

	goto yy13;
yy14:
	++YYCURSOR;
yy13:
	if (YYLIMIT <= YYCURSOR) {
		YYSETSTATE(3);
		YYFILL(1);
	}
yyFillLabel3:
	yych = *YYCURSOR;
	switch (yych) {
		case 'c': goto yy14;
		default: goto yy15;
	}
yy15:
	YYSETSTATE(-1);
	{ return 3; }

directives/getstate_autogen_use_before_normal.re:7:9: warning: rule matches empty string [-Wmatch-empty-string]
directives/getstate_autogen_use_before_normal.re:15:9: warning: rule matches empty string [-Wmatch-empty-string]
directives/getstate_autogen_use_before_normal.re:7:9: warning: rule matches empty string [-Wmatch-empty-string]
directives/getstate_autogen_use_before_normal.re:23:9: warning: rule matches empty string [-Wmatch-empty-string]