Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
361f9e7f
Commit
361f9e7f
authored
Nov 30, 1997
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments and move a few declaration blocks to help readability.
No functional changes this time!
parent
b12ba5f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
247 additions
and
221 deletions
+247
-221
src/backend/parser/scan.c
src/backend/parser/scan.c
+199
-187
src/backend/parser/scan.l
src/backend/parser/scan.l
+48
-34
No files found.
src/backend/parser/scan.c
View file @
361f9e7f
/* A lexical scanner generated by flex */
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
/* Scanner skeleton version:
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.
3 1997/11/26 01:11:38 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.
4 1997/11/30 23:05:39 thomas
Exp $
*/
*/
#define FLEX_SCANNER
#define FLEX_SCANNER
...
@@ -288,20 +288,20 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
...
@@ -288,20 +288,20 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
#define YY_END_OF_BUFFER 41
#define YY_END_OF_BUFFER 41
static
yyconst
short
int
yy_acclist
[
163
]
=
static
yyconst
short
int
yy_acclist
[
163
]
=
{
0
,
{
0
,
10
,
10
,
6
,
6
,
24
,
24
,
9
,
9
,
18
,
18
,
10
,
10
,
6
,
6
,
24
,
24
,
9
,
9
,
25
,
25
,
25
,
25
,
41
,
39
,
40
,
38
,
39
,
40
,
38
,
40
,
18
,
18
,
41
,
39
,
40
,
38
,
39
,
40
,
38
,
40
,
31
,
39
,
40
,
22
,
39
,
40
,
29
,
31
,
39
,
40
,
31
,
39
,
40
,
22
,
39
,
40
,
29
,
31
,
39
,
40
,
15
,
39
,
40
,
29
,
39
,
40
,
29
,
31
,
39
,
40
,
15
,
39
,
40
,
29
,
39
,
40
,
29
,
31
,
39
,
40
,
29
,
31
,
39
,
40
,
29
,
31
,
39
,
40
,
35
,
39
,
29
,
31
,
39
,
40
,
29
,
31
,
39
,
40
,
35
,
39
,
40
,
16417
,
29
,
31
,
39
,
40
,
37
,
39
,
40
,
37
,
40
,
16417
,
29
,
31
,
39
,
40
,
37
,
39
,
40
,
37
,
39
,
40
,
37
,
39
,
40
,
10
,
40
,
8
,
40
,
3
,
39
,
40
,
37
,
39
,
40
,
10
,
40
,
8
,
40
,
3
,
6
,
40
,
3
,
6
,
40
,
3
,
40
,
6
,
40
,
24
,
6
,
40
,
3
,
6
,
40
,
3
,
40
,
6
,
40
,
24
,
40
,
23
,
40
,
9
,
40
,
14
,
40
,
18
,
40
,
16
,
40
,
23
,
40
,
9
,
40
,
14
,
40
,
40
,
25
,
40
,
40
,
40
,
40
,
25
,
40
,
26
,
40
,
31
,
31
,
31
,
26
,
40
,
18
,
40
,
16
,
40
,
40
,
31
,
31
,
31
,
32
,
31
,
31
,
35
,
16417
,
4
,
31
,
31
,
27
,
31
,
32
,
31
,
31
,
35
,
16417
,
4
,
31
,
31
,
27
,
31
,
37
,
7
,
13
,
10
,
6
,
6
,
5
,
24
,
9
,
18
,
37
,
7
,
13
,
10
,
6
,
6
,
5
,
24
,
9
,
25
,
1
7
,
20
,
19
,
20
,
25
,
30
,
28
,
30
,
28
,
30
,
1
8
,
17
,
20
,
19
,
20
,
30
,
28
,
30
,
28
,
30
,
32
,
28
,
1
,
31
,
31
,
28
,
30
,
4
,
31
,
4
,
32
,
28
,
1
,
31
,
31
,
28
,
30
,
4
,
31
,
4
,
31
,
4
,
31
,
8225
,
36
,
16418
,
12
,
5
,
11
,
21
,
31
,
4
,
31
,
8225
,
36
,
16418
,
12
,
5
,
11
,
21
,
30
,
2
,
4
,
31
,
30
,
2
,
2
,
2
,
8226
,
36
,
30
,
2
,
4
,
31
,
30
,
2
,
2
,
2
,
8226
,
36
,
...
@@ -314,11 +314,11 @@ static yyconst short int yy_accept[125] =
...
@@ -314,11 +314,11 @@ static yyconst short int yy_accept[125] =
9
,
10
,
11
,
12
,
13
,
14
,
16
,
19
,
21
,
24
,
9
,
10
,
11
,
12
,
13
,
14
,
16
,
19
,
21
,
24
,
27
,
31
,
34
,
37
,
41
,
45
,
49
,
53
,
57
,
60
,
27
,
31
,
34
,
37
,
41
,
45
,
49
,
53
,
57
,
60
,
63
,
66
,
68
,
70
,
73
,
76
,
78
,
80
,
82
,
84
,
63
,
66
,
68
,
70
,
73
,
76
,
78
,
80
,
82
,
84
,
86
,
88
,
90
,
92
,
93
,
94
,
96
,
98
,
99
,
100
,
86
,
88
,
89
,
91
,
93
,
95
,
97
,
98
,
99
,
100
,
101
,
102
,
102
,
103
,
104
,
106
,
108
,
109
,
109
,
109
,
101
,
102
,
102
,
103
,
104
,
106
,
108
,
109
,
109
,
109
,
109
,
111
,
112
,
113
,
114
,
115
,
115
,
115
,
116
,
117
,
109
,
111
,
112
,
113
,
114
,
115
,
115
,
115
,
116
,
117
,
117
,
117
,
118
,
119
,
120
,
120
,
120
,
121
,
12
1
,
121
,
117
,
117
,
118
,
119
,
120
,
120
,
120
,
121
,
12
2
,
122
,
122
,
123
,
12
5
,
126
,
127
,
129
,
132
,
133
,
133
,
134
,
122
,
123
,
12
4
,
126
,
127
,
129
,
132
,
133
,
133
,
134
,
135
,
136
,
138
,
138
,
140
,
142
,
144
,
145
,
147
,
147
,
135
,
136
,
138
,
138
,
140
,
142
,
144
,
145
,
147
,
147
,
147
,
148
,
149
,
149
,
149
,
150
,
150
,
150
,
151
,
152
,
147
,
148
,
149
,
149
,
149
,
150
,
150
,
150
,
151
,
152
,
...
@@ -367,22 +367,22 @@ static yyconst int yy_meta[22] =
...
@@ -367,22 +367,22 @@ static yyconst int yy_meta[22] =
static
yyconst
short
int
yy_base
[
142
]
=
static
yyconst
short
int
yy_base
[
142
]
=
{
0
,
{
0
,
0
,
0
,
3
23
,
311
,
18
,
31
,
304
,
303
,
232
,
224
,
0
,
0
,
3
55
,
344
,
18
,
31
,
334
,
328
,
325
,
318
,
18
,
29
,
46
,
49
,
221
,
401
,
401
,
401
,
204
,
401
,
46
,
48
,
18
,
31
,
313
,
396
,
396
,
396
,
293
,
396
,
12
,
401
,
196
,
189
,
42
,
50
,
62
,
43
,
0
,
186
,
12
,
396
,
292
,
203
,
42
,
49
,
61
,
21
,
0
,
199
,
1
64
,
0
,
64
,
0
,
73
,
59
,
0
,
0
,
401
,
0
,
1
96
,
0
,
52
,
0
,
72
,
52
,
0
,
0
,
396
,
0
,
6
7
,
0
,
78
,
154
,
401
,
88
,
401
,
144
,
81
,
18
,
6
4
,
396
,
66
,
396
,
0
,
77
,
192
,
181
,
78
,
31
,
1
35
,
31
,
129
,
95
,
0
,
113
,
106
,
128
,
0
,
120
,
1
69
,
79
,
165
,
93
,
0
,
111
,
104
,
126
,
0
,
156
,
1
10
,
0
,
401
,
401
,
0
,
130
,
133
,
0
,
0
,
62
,
1
35
,
0
,
396
,
396
,
0
,
68
,
128
,
0
,
0
,
110
,
85
,
135
,
0
,
0
,
139
,
143
,
0
,
145
,
149
,
401
,
129
,
130
,
0
,
0
,
138
,
140
,
142
,
0
,
146
,
148
,
401
,
401
,
151
,
401
,
401
,
73
,
401
,
153
,
401
,
166
,
396
,
396
,
396
,
396
,
396
,
111
,
396
,
152
,
396
,
165
,
1
13
,
0
,
69
,
179
,
49
,
146
,
401
,
194
,
171
,
184
,
1
22
,
0
,
77
,
178
,
64
,
140
,
396
,
193
,
170
,
183
,
401
,
196
,
199
,
207
,
401
,
209
,
215
,
401
,
0
,
171
,
396
,
157
,
195
,
198
,
396
,
206
,
208
,
396
,
0
,
144
,
2
01
,
46
,
217
,
0
,
213
,
223
,
227
,
231
,
401
,
24
,
2
14
,
65
,
216
,
0
,
210
,
220
,
223
,
228
,
396
,
16
,
2
21
,
235
,
401
,
240
,
251
,
262
,
273
,
284
,
295
,
304
,
2
14
,
232
,
396
,
235
,
246
,
257
,
268
,
279
,
290
,
299
,
303
,
313
,
324
,
333
,
340
,
351
,
362
,
372
,
383
,
388
,
298
,
308
,
319
,
328
,
335
,
346
,
357
,
367
,
378
,
383
,
3
91
3
86
}
;
}
;
static
yyconst
short
int
yy_def
[
142
]
=
static
yyconst
short
int
yy_def
[
142
]
=
...
@@ -391,10 +391,10 @@ static yyconst short int yy_def[142] =
...
@@ -391,10 +391,10 @@ static yyconst short int yy_def[142] =
128
,
128
,
129
,
129
,
123
,
123
,
123
,
123
,
130
,
123
,
128
,
128
,
129
,
129
,
123
,
123
,
123
,
123
,
130
,
123
,
130
,
123
,
123
,
130
,
130
,
130
,
123
,
130
,
131
,
131
,
130
,
123
,
123
,
130
,
130
,
130
,
123
,
130
,
131
,
131
,
131
,
132
,
123
,
133
,
133
,
134
,
35
,
135
,
123
,
136
,
131
,
132
,
123
,
133
,
133
,
134
,
35
,
135
,
123
,
136
,
123
,
1
37
,
123
,
138
,
123
,
123
,
123
,
130
,
130
,
49
,
123
,
1
23
,
123
,
123
,
137
,
123
,
138
,
130
,
130
,
49
,
123
,
123
,
50
,
123
,
27
,
139
,
54
,
123
,
140
,
123
,
123
,
123
,
50
,
123
,
27
,
139
,
54
,
123
,
140
,
123
,
130
,
131
,
123
,
123
,
132
,
123
,
123
,
133
,
35
,
134
,
130
,
131
,
123
,
123
,
132
,
123
,
123
,
133
,
35
,
134
,
134
,
134
,
135
,
136
,
123
,
123
,
1
37
,
123
,
123
,
123
,
134
,
134
,
135
,
136
,
123
,
123
,
1
23
,
137
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
54
,
123
,
88
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
54
,
123
,
88
,
90
,
88
,
139
,
139
,
94
,
94
,
123
,
123
,
123
,
123
,
90
,
88
,
139
,
139
,
94
,
94
,
123
,
123
,
123
,
123
,
...
@@ -405,106 +405,104 @@ static yyconst short int yy_def[142] =
...
@@ -405,106 +405,104 @@ static yyconst short int yy_def[142] =
123
123
}
;
}
;
static
yyconst
short
int
yy_nxt
[
4
23
]
=
static
yyconst
short
int
yy_nxt
[
4
18
]
=
{
0
,
{
0
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
,
24
,
24
,
16
,
17
,
18
,
19
,
20
,
21
,
22
,
23
,
24
,
24
,
25
,
23
,
26
,
27
,
28
,
24
,
29
,
30
,
29
,
31
,
25
,
23
,
26
,
27
,
28
,
24
,
29
,
30
,
29
,
31
,
16
,
35
,
50
,
35
,
43
,
51
,
36
,
35
,
35
,
85
,
16
,
35
,
50
,
35
,
46
,
51
,
36
,
35
,
35
,
121
,
37
,
86
,
35
,
35
,
35
,
43
,
35
,
121
,
44
,
36
,
37
,
53
,
35
,
35
,
35
,
61
,
35
,
46
,
47
,
36
,
35
,
35
,
87
,
37
,
87
,
35
,
35
,
46
,
46
,
44
,
35
,
35
,
85
,
37
,
86
,
35
,
35
,
43
,
43
,
43
,
46
,
46
,
54
,
53
,
110
,
55
,
47
,
61
,
56
,
47
,
43
,
47
,
54
,
66
,
67
,
55
,
44
,
56
,
44
,
53
,
53
,
111
,
57
,
58
,
58
,
66
,
67
,
70
,
75
,
76
,
70
,
57
,
58
,
58
,
72
,
75
,
76
,
77
,
77
,
66
,
70
,
72
,
59
,
60
,
72
,
55
,
69
,
110
,
69
,
78
,
67
,
59
,
60
,
110
,
55
,
69
,
111
,
69
,
79
,
80
,
79
,
70
,
69
,
69
,
80
,
69
,
51
,
69
,
69
,
83
,
70
,
69
,
69
,
81
,
69
,
110
,
69
,
69
,
49
,
84
,
83
,
49
,
84
,
70
,
84
,
88
,
88
,
89
,
90
,
88
,
87
,
84
,
87
,
88
,
88
,
89
,
90
,
88
,
90
,
88
,
90
,
88
,
88
,
90
,
90
,
91
,
92
,
90
,
92
,
90
,
88
,
90
,
90
,
91
,
92
,
90
,
92
,
90
,
90
,
88
,
90
,
88
,
88
,
88
,
88
,
88
,
94
,
88
,
94
,
88
,
88
,
88
,
88
,
88
,
94
,
88
,
94
,
88
,
70
,
95
,
49
,
95
,
94
,
96
,
109
,
94
,
109
,
94
,
94
,
58
,
94
,
96
,
72
,
94
,
51
,
94
,
94
,
58
,
58
,
99
,
58
,
66
,
67
,
98
,
99
,
100
,
102
,
102
,
59
,
101
,
100
,
102
,
102
,
109
,
101
,
109
,
59
,
70
,
70
,
75
,
75
,
76
,
85
,
70
,
103
,
104
,
78
,
79
,
51
,
105
,
76
,
103
,
104
,
77
,
77
,
49
,
105
,
79
,
80
,
106
,
106
,
107
,
83
,
83
,
49
,
108
,
88
,
112
,
88
,
112
,
107
,
112
,
110
,
112
,
108
,
88
,
116
,
88
,
102
,
102
,
82
,
88
,
88
,
88
,
88
,
88
,
88
,
88
,
88
,
90
,
88
,
88
,
88
,
88
,
88
,
88
,
88
,
88
,
90
,
98
,
64
,
90
,
99
,
100
,
90
,
90
,
91
,
101
,
90
,
110
,
90
,
99
,
100
,
90
,
90
,
91
,
101
,
90
,
85
,
90
,
90
,
90
,
94
,
116
,
94
,
99
,
100
,
95
,
94
,
96
,
90
,
94
,
51
,
94
,
99
,
100
,
95
,
94
,
96
,
101
,
101
,
94
,
63
,
94
,
94
,
113
,
113
,
102
,
102
,
53
,
94
,
49
,
94
,
94
,
113
,
113
,
103
,
104
,
83
,
103
,
103
,
104
,
117
,
118
,
114
,
105
,
52
,
98
,
103
,
104
,
104
,
105
,
64
,
114
,
105
,
63
,
98
,
106
,
107
,
106
,
106
,
107
,
115
,
105
,
49
,
108
,
106
,
107
,
113
,
113
,
107
,
115
,
108
,
53
,
108
,
117
,
118
,
113
,
113
,
120
,
123
,
108
,
120
,
120
,
117
,
118
,
121
,
114
,
117
,
118
,
120
,
117
,
118
,
121
,
117
,
118
,
114
,
121
,
110
,
122
,
41
,
110
,
122
,
118
,
121
,
110
,
122
,
118
,
41
,
123
,
118
,
110
,
123
,
122
,
118
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
32
,
34
,
34
,
34
,
34
,
32
,
34
,
34
,
34
,
34
,
34
,
34
,
34
,
34
,
34
,
34
,
34
,
34
,
34
,
34
,
34
,
34
,
38
,
38
,
38
,
34
,
34
,
38
,
38
,
38
,
38
,
38
,
38
,
38
,
38
,
38
,
38
,
38
,
38
,
38
,
38
,
38
,
38
,
40
,
40
,
38
,
38
,
38
,
40
,
40
,
40
,
40
,
40
,
40
,
40
,
40
,
40
,
40
,
40
,
40
,
40
,
40
,
40
,
40
,
42
,
40
,
40
,
40
,
40
,
42
,
42
,
42
,
42
,
42
,
42
,
42
,
42
,
42
,
42
,
42
,
42
,
42
,
42
,
42
,
42
,
42
,
42
,
42
,
42
,
42
,
45
,
45
,
45
,
45
,
45
,
45
,
45
,
45
,
45
,
45
,
45
,
45
,
45
,
45
,
45
,
45
,
45
,
45
,
45
,
45
,
45
,
48
,
39
,
39
,
48
,
45
,
48
,
52
,
49
,
48
,
48
,
62
,
62
,
65
,
65
,
48
,
62
,
62
,
65
,
65
,
65
,
65
,
33
,
65
,
65
,
65
,
65
,
123
,
65
,
65
,
65
,
65
,
65
,
65
,
68
,
65
,
65
,
65
,
65
,
68
,
68
,
68
,
68
,
68
,
33
,
68
,
68
,
68
,
68
,
41
,
68
,
68
,
68
,
68
,
68
,
68
,
68
,
68
,
68
,
68
,
71
,
123
,
123
,
71
,
71
,
71
,
41
,
39
,
71
,
71
,
73
,
73
,
73
,
39
,
73
,
73
,
73
,
73
,
123
,
73
,
73
,
73
,
73
,
73
,
73
,
73
,
73
,
73
,
73
,
73
,
73
,
74
,
74
,
74
,
74
,
73
,
74
,
74
,
74
,
74
,
123
,
74
,
74
,
74
,
74
,
33
,
74
,
74
,
74
,
74
,
74
,
74
,
78
,
78
,
78
,
74
,
74
,
77
,
77
,
77
,
77
,
123
,
77
,
77
,
77
,
78
,
33
,
78
,
78
,
78
,
78
,
78
,
82
,
82
,
82
,
77
,
77
,
81
,
81
,
81
,
81
,
81
,
81
,
81
,
81
,
82
,
82
,
82
,
82
,
82
,
82
,
82
,
82
,
93
,
123
,
81
,
81
,
81
,
93
,
123
,
93
,
93
,
93
,
93
,
93
,
93
,
93
,
93
,
93
,
93
,
93
,
93
,
93
,
93
,
97
,
93
,
93
,
93
,
93
,
97
,
97
,
97
,
119
,
119
,
119
,
97
,
97
,
119
,
119
,
119
,
15
,
123
,
123
,
123
,
123
,
15
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
123
,
123
,
123
,
123
,
123
,
123
,
123
}
;
}
;
static
yyconst
short
int
yy_chk
[
4
23
]
=
static
yyconst
short
int
yy_chk
[
4
18
]
=
{
0
,
{
0
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
1
,
5
,
21
,
5
,
1
1
,
21
,
5
,
5
,
5
,
5
0
,
1
,
5
,
21
,
5
,
1
3
,
21
,
5
,
5
,
5
,
12
0
,
5
,
50
,
5
,
5
,
6
,
12
,
6
,
120
,
11
,
6
,
5
,
28
,
5
,
5
,
6
,
28
,
6
,
14
,
13
,
6
,
6
,
6
,
5
2
,
6
,
52
,
6
,
6
,
13
,
13
,
12
,
6
,
6
,
5
0
,
6
,
50
,
6
,
6
,
11
,
11
,
12
,
1
4
,
14
,
25
,
28
,
112
,
25
,
13
,
28
,
26
,
14
,
1
2
,
14
,
25
,
33
,
33
,
25
,
11
,
26
,
12
,
26
,
26
,
95
,
26
,
27
,
27
,
33
,
33
,
36
,
41
,
41
,
36
,
26
,
27
,
27
,
36
,
41
,
41
,
43
,
43
,
66
,
70
,
36
,
27
,
27
,
70
,
27
,
35
,
93
,
35
,
43
,
66
,
27
,
27
,
112
,
27
,
35
,
95
,
35
,
46
,
46
,
43
,
35
,
35
,
35
,
43
,
35
,
86
,
35
,
35
,
46
,
35
,
35
,
35
,
46
,
35
,
93
,
35
,
35
,
49
,
49
,
46
,
49
,
49
,
71
,
49
,
54
,
54
,
54
,
54
,
54
,
52
,
49
,
52
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
54
,
5
4
,
54
,
56
,
57
,
56
,
57
,
54
,
54
,
54
,
54
,
5
6
,
57
,
56
,
57
,
70
,
56
,
61
,
56
,
56
,
56
,
91
,
56
,
91
,
56
,
56
,
58
,
56
,
56
,
70
,
56
,
86
,
56
,
56
,
58
,
58
,
67
,
58
,
66
,
66
,
60
,
67
,
67
,
72
,
72
,
58
,
67
,
67
,
72
,
72
,
91
,
67
,
91
,
58
,
71
,
72
,
75
,
75
,
7
5
,
53
,
72
,
76
,
76
,
78
,
78
,
51
,
76
,
75
,
7
6
,
76
,
77
,
77
,
61
,
76
,
79
,
79
,
80
,
79
,
79
,
83
,
83
,
48
,
79
,
88
,
96
,
88
,
96
,
80
,
96
,
110
,
96
,
80
,
88
,
110
,
88
,
102
,
102
,
44
,
88
,
88
,
88
,
88
,
88
,
88
,
88
,
88
,
9
0
,
88
,
88
,
88
,
88
,
88
,
88
,
88
,
88
,
90
,
6
0
,
31
,
90
,
99
,
99
,
90
,
90
,
90
,
99
,
90
,
11
0
,
90
,
99
,
99
,
90
,
90
,
90
,
99
,
90
,
53
,
9
0
,
90
,
9
0
,
94
,
110
,
94
,
100
,
100
,
94
,
94
,
94
,
90
,
9
4
,
51
,
94
,
100
,
100
,
94
,
94
,
94
,
100
,
100
,
94
,
30
,
94
,
94
,
98
,
98
,
102
,
102
,
2
4
,
94
,
48
,
94
,
94
,
98
,
98
,
103
,
103
,
47
,
10
4
,
10
3
,
103
,
111
,
111
,
98
,
103
,
23
,
98
,
104
,
104
,
10
4
,
103
,
31
,
98
,
104
,
30
,
98
,
106
,
106
,
107
,
10
6
,
106
,
98
,
104
,
19
,
106
,
107
,
107
,
113
,
113
,
10
7
,
98
,
106
,
24
,
107
,
111
,
111
,
113
,
113
,
115
,
15
,
107
,
115
,
115
,
116
,
116
,
115
,
113
,
117
,
117
,
115
,
116
,
116
,
115
,
117
,
117
,
113
,
121
,
116
,
118
,
10
,
116
,
118
,
118
,
121
,
117
,
122
,
122
,
9
,
121
,
118
,
117
,
121
,
122
,
122
,
124
,
124
,
124
,
124
,
124
,
124
,
124
,
124
,
124
,
124
,
124
,
12
4
,
124
,
124
,
124
,
124
,
124
,
124
,
124
,
124
,
124
,
12
5
,
125
,
125
,
125
,
12
4
,
125
,
125
,
125
,
125
,
125
,
125
,
125
,
125
,
125
,
12
5
,
125
,
125
,
125
,
125
,
125
,
125
,
126
,
126
,
126
,
12
5
,
125
,
126
,
126
,
126
,
126
,
126
,
126
,
126
,
126
,
12
6
,
126
,
126
,
126
,
126
,
126
,
126
,
126
,
127
,
127
,
12
6
,
126
,
126
,
127
,
127
,
127
,
127
,
127
,
127
,
127
,
12
7
,
127
,
127
,
127
,
127
,
127
,
127
,
127
,
127
,
128
,
12
7
,
127
,
127
,
127
,
128
,
128
,
128
,
128
,
128
,
128
,
12
8
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
128
,
12
8
,
128
,
128
,
128
,
128
,
129
,
129
,
129
,
129
,
129
,
12
9
,
129
,
129
,
129
,
129
,
129
,
129
,
129
,
129
,
129
,
129
,
1
29
,
129
,
129
,
129
,
129
,
130
,
8
,
7
,
130
,
129
,
1
30
,
23
,
19
,
130
,
130
,
131
,
131
,
132
,
132
,
13
0
,
131
,
131
,
132
,
132
,
132
,
132
,
4
,
132
,
132
,
13
2
,
132
,
15
,
132
,
132
,
132
,
132
,
132
,
132
,
133
,
13
2
,
132
,
132
,
132
,
133
,
133
,
133
,
133
,
133
,
3
,
13
3
,
133
,
133
,
133
,
10
,
133
,
133
,
133
,
133
,
13
3
,
13
3
,
133
,
133
,
133
,
133
,
134
,
0
,
0
,
134
,
134
,
13
4
,
9
,
8
,
134
,
134
,
135
,
135
,
135
,
7
,
135
,
135
,
135
,
135
,
0
,
135
,
135
,
135
,
135
,
135
,
135
,
135
,
135
,
135
,
135
,
135
,
135
,
136
,
136
,
136
,
136
,
135
,
136
,
136
,
136
,
136
,
0
,
136
,
136
,
136
,
136
,
4
,
136
,
136
,
136
,
136
,
136
,
136
,
137
,
137
,
137
,
13
6
,
136
,
137
,
137
,
137
,
137
,
0
,
137
,
137
,
137
,
13
7
,
3
,
137
,
137
,
137
,
137
,
137
,
138
,
138
,
138
,
13
7
,
137
,
138
,
138
,
138
,
138
,
138
,
138
,
138
,
138
,
13
8
,
138
,
138
,
138
,
138
,
138
,
138
,
138
,
139
,
0
,
13
8
,
138
,
138
,
139
,
0
,
139
,
139
,
139
,
139
,
139
,
13
9
,
139
,
139
,
139
,
139
,
139
,
139
,
139
,
139
,
140
,
1
39
,
139
,
139
,
139
,
140
,
140
,
140
,
141
,
141
,
141
,
1
40
,
140
,
141
,
141
,
141
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
,
123
123
,
123
}
;
}
;
static
yy_state_type
yy_state_buf
[
YY_BUF_SIZE
+
2
],
*
yy_state_ptr
;
static
yy_state_type
yy_state_buf
[
YY_BUF_SIZE
+
2
],
*
yy_state_ptr
;
...
@@ -541,7 +539,7 @@ char *yytext;
...
@@ -541,7 +539,7 @@ char *yytext;
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.
3 1997/11/26 01:11:38 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.
4 1997/11/30 23:05:39 thomas
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -593,28 +591,28 @@ int llen;
...
@@ -593,28 +591,28 @@ int llen;
char
literal
[
MAX_PARSE_BUFFER
];
char
literal
[
MAX_PARSE_BUFFER
];
/* OK, here is a short description of lex/flex rules behavior.
/* OK, here is a short description of lex/flex rules behavior.
* The longest pattern which matches an input string is always chosen.
* The longest pattern which matches an input string is always chosen.
* For equal-length patterns, the first occurring in the rules list is chosen.
* For equal-length patterns, the first occurring in the rules list is chosen.
* INITIAL is the starting condition, to which all non-conditional rules apply.
* INITIAL is the starting condition, to which all non-conditional rules apply.
* When in an exclusive condition, only those rules defined for that condition apply.
* When in an exclusive condition, only those rules defined for that condition apply.
*
*
* Exclusive states change parsing rules while the state is active.
* Exclusive states change parsing rules while the state is active.
* There are exclusive states for quoted strings, extended comments,
* There are exclusive states for quoted strings, extended comments,
* and to eliminate parsing troubles for numeric strings.
* and to eliminate parsing troubles for numeric strings.
* Exclusive states:
* Exclusive states:
* <xb> binary numeric string - thomas 1997-11-16
* <xb> binary numeric string - thomas 1997-11-16
* <xh> hexadecimal numeric string - thomas 1997-11-16
* <xc> extended C-style comments - tgl 1997-07-12
* <xc> extended C-style comments - tgl 1997-07-12
* <xd> delimited identifiers (double-quoted identifiers) - tgl 1997-10-27
* <xq> quoted strings - tgl 1997-07-30
* <xh> hexadecimal numeric string - thomas 1997-11-16
* <xm> numeric strings with embedded minus sign - tgl 1997-09-05
* <xm> numeric strings with embedded minus sign - tgl 1997-09-05
* <xd> delimited identifiers (double-quoted identifiers) - tgl 1997-10-27
* <xq> quoted strings - tgl 1997-07-30
*
*
* The "extended comment" syntax closely resembles allowable operator syntax.
* The "extended comment" syntax closely resembles allowable operator syntax.
* So, when in condition <xc>, only strings which would terminate the
* So, when in condition <xc>, only strings which would terminate the
* "extended comment" trigger any action other than "ignore".
* "extended comment" trigger any action other than "ignore".
* Be sure to match _any_ candidate comment, including those with appended
* Be sure to match _any_ candidate comment, including those with appended
* operator-like symbols. - thomas 1997-07-14
* operator-like symbols. - thomas 1997-07-14
*/
*/
#define xb 1
#define xb 1
#define xc 2
#define xc 2
...
@@ -623,10 +621,24 @@ char literal[MAX_PARSE_BUFFER];
...
@@ -623,10 +621,24 @@ char literal[MAX_PARSE_BUFFER];
#define xh 4
#define xh 4
#define x
q
5
#define x
m
5
#define x
m
6
#define x
q
6
/* Binary number
*/
/* Hexadecimal number
*/
/* Extended quote
* xqdouble implements SQL92 embedded quote
* xqcat allows strings to cross input lines
*/
/* Delimited quote
* Allows embedded spaces and other special characters into identifiers.
*/
/* Comments
* Ignored by the scanner and parser.
*/
/* DO NOT PUT ANY COMMENTS IN THE FOLLOWING SECTION.
/* DO NOT PUT ANY COMMENTS IN THE FOLLOWING SECTION.
* AT&T lex does not properly handle C-style comments in this second lex block.
* AT&T lex does not properly handle C-style comments in this second lex block.
* So, put comments here. tgl - 1997-09-08
* So, put comments here. tgl - 1997-09-08
...
@@ -639,7 +651,7 @@ char literal[MAX_PARSE_BUFFER];
...
@@ -639,7 +651,7 @@ char literal[MAX_PARSE_BUFFER];
* Other embedded escaped characters are matched explicitly and the leading
* Other embedded escaped characters are matched explicitly and the leading
* backslash is dropped from the string. - thomas 1997-09-24
* backslash is dropped from the string. - thomas 1997-09-24
*/
*/
#line 6
43
"lex.yy.c"
#line 6
55
"lex.yy.c"
/* Macros after this point can all be overridden by user definitions in
/* Macros after this point can all be overridden by user definitions in
* section 1.
* section 1.
...
@@ -790,9 +802,9 @@ YY_DECL
...
@@ -790,9 +802,9 @@ YY_DECL
register
char
*
yy_cp
,
*
yy_bp
;
register
char
*
yy_cp
,
*
yy_bp
;
register
int
yy_act
;
register
int
yy_act
;
#line 1
64
"scan.l"
#line 1
78
"scan.l"
#line
796
"lex.yy.c"
#line
808
"lex.yy.c"
if
(
yy_init
)
if
(
yy_init
)
{
{
...
@@ -847,7 +859,7 @@ yy_match:
...
@@ -847,7 +859,7 @@ yy_match:
*
yy_state_ptr
++
=
yy_current_state
;
*
yy_state_ptr
++
=
yy_current_state
;
++
yy_cp
;
++
yy_cp
;
}
}
while
(
yy_base
[
yy_current_state
]
!=
401
);
while
(
yy_base
[
yy_current_state
]
!=
396
);
yy_find_action:
yy_find_action:
yy_current_state
=
*--
yy_state_ptr
;
yy_current_state
=
*--
yy_state_ptr
;
...
@@ -898,34 +910,34 @@ do_action: /* This label is used only to access EOF actions. */
...
@@ -898,34 +910,34 @@ do_action: /* This label is used only to access EOF actions. */
{
/* beginning of action switch */
{
/* beginning of action switch */
case
1
:
case
1
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 1
65
"scan.l"
#line 1
79
"scan.l"
{
/* ignore */
}
{
/* ignore */
}
YY_BREAK
YY_BREAK
case
2
:
case
2
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 1
67
"scan.l"
#line 1
81
"scan.l"
{
/* ignore */
}
{
/* ignore */
}
YY_BREAK
YY_BREAK
case
3
:
case
3
:
#line 1
70
"scan.l"
#line 1
84
"scan.l"
case
4
:
case
4
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 1
70
"scan.l"
#line 1
84
"scan.l"
{
BEGIN
(
xc
);
}
{
BEGIN
(
xc
);
}
YY_BREAK
YY_BREAK
case
5
:
case
5
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 1
72
"scan.l"
#line 1
86
"scan.l"
{
BEGIN
(
INITIAL
);
}
{
BEGIN
(
INITIAL
);
}
YY_BREAK
YY_BREAK
case
6
:
case
6
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 1
74
"scan.l"
#line 1
88
"scan.l"
{
/* ignore */
}
{
/* ignore */
}
YY_BREAK
YY_BREAK
case
7
:
case
7
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 1
76
"scan.l"
#line 1
90
"scan.l"
{
{
BEGIN
(
xb
);
BEGIN
(
xb
);
llen
=
0
;
llen
=
0
;
...
@@ -934,7 +946,7 @@ YY_RULE_SETUP
...
@@ -934,7 +946,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
8
:
case
8
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 1
81
"scan.l"
#line 1
95
"scan.l"
{
{
char
*
endptr
;
char
*
endptr
;
...
@@ -947,10 +959,10 @@ YY_RULE_SETUP
...
@@ -947,10 +959,10 @@ YY_RULE_SETUP
}
}
YY_BREAK
YY_BREAK
case
9
:
case
9
:
#line
192
"scan.l"
#line
206
"scan.l"
case
10
:
case
10
:
YY_RULE_SETUP
YY_RULE_SETUP
#line
192
"scan.l"
#line
206
"scan.l"
{
{
if
((
llen
+
yyleng
)
>
(
MAX_PARSE_BUFFER
-
1
))
if
((
llen
+
yyleng
)
>
(
MAX_PARSE_BUFFER
-
1
))
elog
(
WARN
,
"quoted string parse buffer of %d chars exceeded"
,
MAX_PARSE_BUFFER
);
elog
(
WARN
,
"quoted string parse buffer of %d chars exceeded"
,
MAX_PARSE_BUFFER
);
...
@@ -959,16 +971,16 @@ YY_RULE_SETUP
...
@@ -959,16 +971,16 @@ YY_RULE_SETUP
}
}
YY_BREAK
YY_BREAK
case
11
:
case
11
:
#line
199
"scan.l"
#line
213
"scan.l"
case
12
:
case
12
:
YY_RULE_SETUP
YY_RULE_SETUP
#line
199
"scan.l"
#line
213
"scan.l"
{
{
}
}
YY_BREAK
YY_BREAK
case
13
:
case
13
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
02
"scan.l"
#line 2
16
"scan.l"
{
{
BEGIN
(
xh
);
BEGIN
(
xh
);
llen
=
0
;
llen
=
0
;
...
@@ -977,7 +989,7 @@ YY_RULE_SETUP
...
@@ -977,7 +989,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
14
:
case
14
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
07
"scan.l"
#line 2
21
"scan.l"
{
{
char
*
endptr
;
char
*
endptr
;
...
@@ -991,7 +1003,7 @@ YY_RULE_SETUP
...
@@ -991,7 +1003,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
15
:
case
15
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
18
"scan.l"
#line 2
32
"scan.l"
{
{
BEGIN
(
xq
);
BEGIN
(
xq
);
llen
=
0
;
llen
=
0
;
...
@@ -1000,7 +1012,7 @@ YY_RULE_SETUP
...
@@ -1000,7 +1012,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
16
:
case
16
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
23
"scan.l"
#line 2
37
"scan.l"
{
{
BEGIN
(
INITIAL
);
BEGIN
(
INITIAL
);
yylval
.
str
=
pstrdup
(
scanstr
(
literal
));
yylval
.
str
=
pstrdup
(
scanstr
(
literal
));
...
@@ -1008,10 +1020,10 @@ YY_RULE_SETUP
...
@@ -1008,10 +1020,10 @@ YY_RULE_SETUP
}
}
YY_BREAK
YY_BREAK
case
17
:
case
17
:
#line 2
29
"scan.l"
#line 2
43
"scan.l"
case
18
:
case
18
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
29
"scan.l"
#line 2
43
"scan.l"
{
{
if
((
llen
+
yyleng
)
>
(
MAX_PARSE_BUFFER
-
1
))
if
((
llen
+
yyleng
)
>
(
MAX_PARSE_BUFFER
-
1
))
elog
(
WARN
,
"quoted string parse buffer of %d chars exceeded"
,
MAX_PARSE_BUFFER
);
elog
(
WARN
,
"quoted string parse buffer of %d chars exceeded"
,
MAX_PARSE_BUFFER
);
...
@@ -1021,7 +1033,7 @@ YY_RULE_SETUP
...
@@ -1021,7 +1033,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
19
:
case
19
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
35
"scan.l"
#line 2
49
"scan.l"
{
{
if
((
llen
+
yyleng
-
1
)
>
(
MAX_PARSE_BUFFER
-
1
))
if
((
llen
+
yyleng
-
1
)
>
(
MAX_PARSE_BUFFER
-
1
))
elog
(
WARN
,
"quoted string parse buffer of %d chars exceeded"
,
MAX_PARSE_BUFFER
);
elog
(
WARN
,
"quoted string parse buffer of %d chars exceeded"
,
MAX_PARSE_BUFFER
);
...
@@ -1032,7 +1044,7 @@ YY_RULE_SETUP
...
@@ -1032,7 +1044,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
20
:
case
20
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
43
"scan.l"
#line 2
57
"scan.l"
{
{
if
((
llen
+
yyleng
-
1
)
>
(
MAX_PARSE_BUFFER
-
1
))
if
((
llen
+
yyleng
-
1
)
>
(
MAX_PARSE_BUFFER
-
1
))
elog
(
WARN
,
"quoted string parse buffer of %d chars exceeded"
,
MAX_PARSE_BUFFER
);
elog
(
WARN
,
"quoted string parse buffer of %d chars exceeded"
,
MAX_PARSE_BUFFER
);
...
@@ -1042,13 +1054,13 @@ YY_RULE_SETUP
...
@@ -1042,13 +1054,13 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
21
:
case
21
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
49
"scan.l"
#line 2
63
"scan.l"
{
{
}
}
YY_BREAK
YY_BREAK
case
22
:
case
22
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
53
"scan.l"
#line 2
67
"scan.l"
{
{
BEGIN
(
xd
);
BEGIN
(
xd
);
llen
=
0
;
llen
=
0
;
...
@@ -1057,7 +1069,7 @@ YY_RULE_SETUP
...
@@ -1057,7 +1069,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
23
:
case
23
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
58
"scan.l"
#line 2
72
"scan.l"
{
{
BEGIN
(
INITIAL
);
BEGIN
(
INITIAL
);
yylval
.
str
=
pstrdup
(
literal
);
yylval
.
str
=
pstrdup
(
literal
);
...
@@ -1066,7 +1078,7 @@ YY_RULE_SETUP
...
@@ -1066,7 +1078,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
24
:
case
24
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
63
"scan.l"
#line 2
77
"scan.l"
{
{
if
((
llen
+
yyleng
)
>
(
MAX_PARSE_BUFFER
-
1
))
if
((
llen
+
yyleng
)
>
(
MAX_PARSE_BUFFER
-
1
))
elog
(
WARN
,
"quoted string parse buffer of %d chars exceeded"
,
MAX_PARSE_BUFFER
);
elog
(
WARN
,
"quoted string parse buffer of %d chars exceeded"
,
MAX_PARSE_BUFFER
);
...
@@ -1076,12 +1088,12 @@ YY_RULE_SETUP
...
@@ -1076,12 +1088,12 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
25
:
case
25
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
71
"scan.l"
#line 2
85
"scan.l"
{
/* ignore */
}
{
/* ignore */
}
YY_BREAK
YY_BREAK
case
26
:
case
26
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
72
"scan.l"
#line 2
86
"scan.l"
{
{
BEGIN
(
INITIAL
);
BEGIN
(
INITIAL
);
return
(
yytext
[
0
]);
return
(
yytext
[
0
]);
...
@@ -1089,7 +1101,7 @@ YY_RULE_SETUP
...
@@ -1089,7 +1101,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
27
:
case
27
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
78
"scan.l"
#line 2
92
"scan.l"
{
return
TYPECAST
;
}
{
return
TYPECAST
;
}
YY_BREAK
YY_BREAK
case
28
:
case
28
:
...
@@ -1097,14 +1109,14 @@ case 28:
...
@@ -1097,14 +1109,14 @@ case 28:
yy_c_buf_p
=
yy_cp
=
yy_bp
+
1
;
yy_c_buf_p
=
yy_cp
=
yy_bp
+
1
;
YY_DO_BEFORE_ACTION
;
/* set up yytext again */
YY_DO_BEFORE_ACTION
;
/* set up yytext again */
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
80
"scan.l"
#line 2
94
"scan.l"
{
{
return
(
yytext
[
0
]);
return
(
yytext
[
0
]);
}
}
YY_BREAK
YY_BREAK
case
29
:
case
29
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
83
"scan.l"
#line 2
97
"scan.l"
{
return
(
yytext
[
0
]);
}
{
return
(
yytext
[
0
]);
}
YY_BREAK
YY_BREAK
case
30
:
case
30
:
...
@@ -1112,7 +1124,7 @@ case 30:
...
@@ -1112,7 +1124,7 @@ case 30:
yy_c_buf_p
=
yy_cp
-=
2
;
yy_c_buf_p
=
yy_cp
-=
2
;
YY_DO_BEFORE_ACTION
;
/* set up yytext again */
YY_DO_BEFORE_ACTION
;
/* set up yytext again */
YY_RULE_SETUP
YY_RULE_SETUP
#line 2
84
"scan.l"
#line 2
98
"scan.l"
{
{
yylval
.
str
=
pstrdup
((
char
*
)
yytext
);
yylval
.
str
=
pstrdup
((
char
*
)
yytext
);
return
(
Op
);
return
(
Op
);
...
@@ -1120,7 +1132,7 @@ YY_RULE_SETUP
...
@@ -1120,7 +1132,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
31
:
case
31
:
YY_RULE_SETUP
YY_RULE_SETUP
#line
288
"scan.l"
#line
302
"scan.l"
{
{
if
(
strcmp
((
char
*
)
yytext
,
"!="
)
==
0
)
if
(
strcmp
((
char
*
)
yytext
,
"!="
)
==
0
)
yylval
.
str
=
pstrdup
(
"<>"
);
/* compatability */
yylval
.
str
=
pstrdup
(
"<>"
);
/* compatability */
...
@@ -1131,7 +1143,7 @@ YY_RULE_SETUP
...
@@ -1131,7 +1143,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
32
:
case
32
:
YY_RULE_SETUP
YY_RULE_SETUP
#line
295
"scan.l"
#line
309
"scan.l"
{
{
yylval
.
ival
=
atoi
((
char
*
)
&
yytext
[
1
]);
yylval
.
ival
=
atoi
((
char
*
)
&
yytext
[
1
]);
return
(
PARAM
);
return
(
PARAM
);
...
@@ -1139,7 +1151,7 @@ YY_RULE_SETUP
...
@@ -1139,7 +1151,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
33
:
case
33
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 3
00
"scan.l"
#line 3
14
"scan.l"
{
{
char
*
endptr
;
char
*
endptr
;
...
@@ -1153,7 +1165,7 @@ YY_RULE_SETUP
...
@@ -1153,7 +1165,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
34
:
case
34
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 3
10
"scan.l"
#line 3
24
"scan.l"
{
{
char
*
endptr
;
char
*
endptr
;
...
@@ -1168,7 +1180,7 @@ YY_RULE_SETUP
...
@@ -1168,7 +1180,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
35
:
case
35
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 3
21
"scan.l"
#line 3
35
"scan.l"
{
{
char
*
endptr
;
char
*
endptr
;
...
@@ -1181,7 +1193,7 @@ YY_RULE_SETUP
...
@@ -1181,7 +1193,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
36
:
case
36
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 3
30
"scan.l"
#line 3
44
"scan.l"
{
{
char
*
endptr
;
char
*
endptr
;
...
@@ -1195,7 +1207,7 @@ YY_RULE_SETUP
...
@@ -1195,7 +1207,7 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
37
:
case
37
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 3
40
"scan.l"
#line 3
54
"scan.l"
{
{
int
i
;
int
i
;
ScanKeyword
*
keyword
;
ScanKeyword
*
keyword
;
...
@@ -1217,27 +1229,27 @@ YY_RULE_SETUP
...
@@ -1217,27 +1229,27 @@ YY_RULE_SETUP
YY_BREAK
YY_BREAK
case
38
:
case
38
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 3
58
"scan.l"
#line 3
72
"scan.l"
{
/* ignore */
}
{
/* ignore */
}
YY_BREAK
YY_BREAK
case
39
:
case
39
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 3
60
"scan.l"
#line 3
74
"scan.l"
{
return
(
yytext
[
0
]);
}
{
return
(
yytext
[
0
]);
}
YY_BREAK
YY_BREAK
case
40
:
case
40
:
YY_RULE_SETUP
YY_RULE_SETUP
#line 3
62
"scan.l"
#line 3
76
"scan.l"
ECHO
;
ECHO
;
YY_BREAK
YY_BREAK
#line 12
34
"lex.yy.c"
#line 12
46
"lex.yy.c"
case
YY_STATE_EOF
(
INITIAL
):
case
YY_STATE_EOF
(
INITIAL
):
case
YY_STATE_EOF
(
xb
):
case
YY_STATE_EOF
(
xb
):
case
YY_STATE_EOF
(
xc
):
case
YY_STATE_EOF
(
xc
):
case
YY_STATE_EOF
(
xd
):
case
YY_STATE_EOF
(
xd
):
case
YY_STATE_EOF
(
xh
):
case
YY_STATE_EOF
(
xh
):
case
YY_STATE_EOF
(
xq
):
case
YY_STATE_EOF
(
xm
):
case
YY_STATE_EOF
(
xm
):
case
YY_STATE_EOF
(
xq
):
yyterminate
();
yyterminate
();
case
YY_END_OF_BUFFER
:
case
YY_END_OF_BUFFER
:
...
@@ -2116,7 +2128,7 @@ int main()
...
@@ -2116,7 +2128,7 @@ int main()
return
0
;
return
0
;
}
}
#endif
#endif
#line 3
62
"scan.l"
#line 3
76
"scan.l"
void
yyerror
(
char
message
[])
void
yyerror
(
char
message
[])
...
...
src/backend/parser/scan.l
View file @
361f9e7f
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.3
0 1997/11/20 23:22:25 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.3
1 1997/11/30 23:05:36 thomas
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -60,61 +60,75 @@ int llen;
...
@@ -60,61 +60,75 @@ int llen;
char literal[MAX_PARSE_BUFFER];
char literal[MAX_PARSE_BUFFER];
%}
%}
/* OK, here is a short description of lex/flex rules behavior.
/* OK, here is a short description of lex/flex rules behavior.
* The longest pattern which matches an input string is always chosen.
* The longest pattern which matches an input string is always chosen.
* For equal-length patterns, the first occurring in the rules list is chosen.
* For equal-length patterns, the first occurring in the rules list is chosen.
* INITIAL is the starting condition, to which all non-conditional rules apply.
* INITIAL is the starting condition, to which all non-conditional rules apply.
* When in an exclusive condition, only those rules defined for that condition apply.
* When in an exclusive condition, only those rules defined for that condition apply.
*
*
* Exclusive states change parsing rules while the state is active.
* Exclusive states change parsing rules while the state is active.
* There are exclusive states for quoted strings, extended comments,
* There are exclusive states for quoted strings, extended comments,
* and to eliminate parsing troubles for numeric strings.
* and to eliminate parsing troubles for numeric strings.
* Exclusive states:
* Exclusive states:
* <xb> binary numeric string - thomas 1997-11-16
* <xb> binary numeric string - thomas 1997-11-16
* <xh> hexadecimal numeric string - thomas 1997-11-16
* <xc> extended C-style comments - tgl 1997-07-12
* <xc> extended C-style comments - tgl 1997-07-12
* <xd> delimited identifiers (double-quoted identifiers) - tgl 1997-10-27
* <xq> quoted strings - tgl 1997-07-30
* <xh> hexadecimal numeric string - thomas 1997-11-16
* <xm> numeric strings with embedded minus sign - tgl 1997-09-05
* <xm> numeric strings with embedded minus sign - tgl 1997-09-05
* <xd> delimited identifiers (double-quoted identifiers) - tgl 1997-10-27
* <xq> quoted strings - tgl 1997-07-30
*
*
* The "extended comment" syntax closely resembles allowable operator syntax.
* The "extended comment" syntax closely resembles allowable operator syntax.
* So, when in condition <xc>, only strings which would terminate the
* So, when in condition <xc>, only strings which would terminate the
* "extended comment" trigger any action other than "ignore".
* "extended comment" trigger any action other than "ignore".
* Be sure to match _any_ candidate comment, including those with appended
* Be sure to match _any_ candidate comment, including those with appended
* operator-like symbols. - thomas 1997-07-14
* operator-like symbols. - thomas 1997-07-14
*/
*/
%x xb
%x xb
%x xc
%x xc
%x xd
%x xd
%x xh
%x xh
%x xq
%x xm
%x xm
%x xq
quote '
/* Binary number
xqstart {quote}
*/
xqstop {quote}
xqdouble {quote}{quote}
xqinside [^\\']*
xqembedded "\\'"
xqliteral [\\](.|\n)
xqcat {quote}{space}*\n{space}*{quote}
xbstart [bB]{quote}
xbstart [bB]{quote}
xbstop {quote}
xbstop {quote}
xbinside [^']*
xbinside [^']*
xbcat {quote}{space}*\n{space}*{quote}
xbcat {quote}{space}*\n{space}*{quote}
/* Hexadecimal number
*/
xhstart [xX]{quote}
xhstart [xX]{quote}
xhstop {quote}
xhstop {quote}
xhinside [^']*
xhinside [^']*
xhcat {quote}{space}*\n{space}*{quote}
xhcat {quote}{space}*\n{space}*{quote}
/* Extended quote
* xqdouble implements SQL92 embedded quote
* xqcat allows strings to cross input lines
*/
quote '
xqstart {quote}
xqstop {quote}
xqdouble {quote}{quote}
xqinside [^\\']*
xqembedded "\\'"
xqliteral [\\](.|\n)
xqcat {quote}{space}*\n{space}*{quote}
/* Delimited quote
* Allows embedded spaces and other special characters into identifiers.
*/
dquote \"
dquote \"
xdstart {dquote}
xdstart {dquote}
xdstop {dquote}
xdstop {dquote}
xdinside [^"]*
xdinside [^"]*
/* Comments
* Ignored by the scanner and parser.
*/
xcline [\/][\*].*[\*][\/]{space}*\n*
xcline [\/][\*].*[\*][\/]{space}*\n*
xcstart [\/][\*]{op_and_self}*
xcstart [\/][\*]{op_and_self}*
xcstop {op_and_self}*[\*][\/]({space}*|\n)
xcstop {op_and_self}*[\*][\/]({space}*|\n)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment