Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a9c1508d
Commit
a9c1508d
authored
Aug 23, 2002
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
merge with 3.23 tree
parents
7dac7062
fb3f13aa
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1465 additions
and
6244 deletions
+1465
-6244
Docs/manual.texi
Docs/manual.texi
+2
-0
innobase/configure.in
innobase/configure.in
+2
-2
innobase/include/pars0grm.h
innobase/include/pars0grm.h
+84
-84
innobase/pars/lexyy.c
innobase/pars/lexyy.c
+889
-5777
innobase/pars/pars0grm.c
innobase/pars/pars0grm.c
+371
-291
innobase/pars/pars0grm.h
innobase/pars/pars0grm.h
+84
-84
innobase/pars/pars0grm.y
innobase/pars/pars0grm.y
+7
-3
innobase/pars/pars0lex.l
innobase/pars/pars0lex.l
+26
-3
No files found.
Docs/manual.texi
View file @
a9c1508d
...
...
@@ -51007,6 +51007,8 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.53
@itemize @bullet
@item
Fixed problem with @code{configure ... --localstatedir=...}.
@item
Fixed problem with @code{UNSIGNED BIGINT} on AIX (again).
@item
Fixed bug in pthread_mutex_trylock() on HPUX 11.0
innobase/configure.in
View file @
a9c1508d
...
...
@@ -97,8 +97,8 @@ case "$target_os" in
sysv5uw7*)
# Problem when linking on SCO
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
openbsd*)
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
openbsd*)
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
esac
case "$target" in
...
...
innobase/include/pars0grm.h
View file @
a9c1508d
#ifndef YYSTYPE
#define YYSTYPE int
#endif
#define PARS_INT_LIT 25
8
#define PARS_FLOAT_LIT 25
9
#define PARS_STR_LIT 2
60
#define PARS_NULL_LIT 26
1
#define PARS_ID_TOKEN 26
2
#define PARS_AND_TOKEN 26
3
#define PARS_OR_TOKEN 26
4
#define PARS_NOT_TOKEN 26
5
#define PARS_GE_TOKEN 26
6
#define PARS_LE_TOKEN 26
7
#define PARS_NE_TOKEN 26
8
#define PARS_PROCEDURE_TOKEN 26
9
#define PARS_IN_TOKEN 2
70
#define PARS_OUT_TOKEN 27
1
#define PARS_INT_TOKEN 27
2
#define PARS_INTEGER_TOKEN 27
3
#define PARS_FLOAT_TOKEN 27
4
#define PARS_CHAR_TOKEN 27
5
#define PARS_IS_TOKEN 27
6
#define PARS_BEGIN_TOKEN 27
7
#define PARS_END_TOKEN 27
8
#define PARS_IF_TOKEN 27
9
#define PARS_THEN_TOKEN 2
80
#define PARS_ELSE_TOKEN 28
1
#define PARS_ELSIF_TOKEN 28
2
#define PARS_LOOP_TOKEN 28
3
#define PARS_WHILE_TOKEN 28
4
#define PARS_RETURN_TOKEN 28
5
#define PARS_SELECT_TOKEN 28
6
#define PARS_SUM_TOKEN 28
7
#define PARS_COUNT_TOKEN 28
8
#define PARS_DISTINCT_TOKEN 28
9
#define PARS_FROM_TOKEN 2
90
#define PARS_WHERE_TOKEN 29
1
#define PARS_FOR_TOKEN 29
2
#define PARS_DDOT_TOKEN 29
3
#define PARS_CONSISTENT_TOKEN 29
4
#define PARS_READ_TOKEN 29
5
#define PARS_ORDER_TOKEN 29
6
#define PARS_BY_TOKEN 29
7
#define PARS_ASC_TOKEN 29
8
#define PARS_DESC_TOKEN 29
9
#define PARS_INSERT_TOKEN
300
#define PARS_INTO_TOKEN 30
1
#define PARS_VALUES_TOKEN 30
2
#define PARS_UPDATE_TOKEN 30
3
#define PARS_SET_TOKEN 30
4
#define PARS_DELETE_TOKEN 30
5
#define PARS_CURRENT_TOKEN 30
6
#define PARS_OF_TOKEN 30
7
#define PARS_CREATE_TOKEN 30
8
#define PARS_TABLE_TOKEN 30
9
#define PARS_INDEX_TOKEN 3
10
#define PARS_UNIQUE_TOKEN 31
1
#define PARS_CLUSTERED_TOKEN 31
2
#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 31
3
#define PARS_ON_TOKEN 31
4
#define PARS_ASSIGN_TOKEN 31
5
#define PARS_DECLARE_TOKEN 31
6
#define PARS_CURSOR_TOKEN 31
7
#define PARS_SQL_TOKEN 31
8
#define PARS_OPEN_TOKEN 31
9
#define PARS_FETCH_TOKEN 3
20
#define PARS_CLOSE_TOKEN 32
1
#define PARS_NOTFOUND_TOKEN 32
2
#define PARS_TO_CHAR_TOKEN 32
3
#define PARS_TO_NUMBER_TOKEN 32
4
#define PARS_TO_BINARY_TOKEN 32
5
#define PARS_BINARY_TO_NUMBER_TOKEN 32
6
#define PARS_SUBSTR_TOKEN 32
7
#define PARS_REPLSTR_TOKEN 32
8
#define PARS_CONCAT_TOKEN 32
9
#define PARS_INSTR_TOKEN 3
30
#define PARS_LENGTH_TOKEN 33
1
#define PARS_SYSDATE_TOKEN 33
2
#define PARS_PRINTF_TOKEN 33
3
#define PARS_ASSERT_TOKEN 33
4
#define PARS_RND_TOKEN 33
5
#define PARS_RND_STR_TOKEN 33
6
#define PARS_ROW_PRINTF_TOKEN 33
7
#define PARS_COMMIT_TOKEN 33
8
#define PARS_ROLLBACK_TOKEN 33
9
#define PARS_WORK_TOKEN 3
40
#define NEG 34
1
#define PARS_INT_LIT 25
7
#define PARS_FLOAT_LIT 25
8
#define PARS_STR_LIT 2
59
#define PARS_NULL_LIT 26
0
#define PARS_ID_TOKEN 26
1
#define PARS_AND_TOKEN 26
2
#define PARS_OR_TOKEN 26
3
#define PARS_NOT_TOKEN 26
4
#define PARS_GE_TOKEN 26
5
#define PARS_LE_TOKEN 26
6
#define PARS_NE_TOKEN 26
7
#define PARS_PROCEDURE_TOKEN 26
8
#define PARS_IN_TOKEN 2
69
#define PARS_OUT_TOKEN 27
0
#define PARS_INT_TOKEN 27
1
#define PARS_INTEGER_TOKEN 27
2
#define PARS_FLOAT_TOKEN 27
3
#define PARS_CHAR_TOKEN 27
4
#define PARS_IS_TOKEN 27
5
#define PARS_BEGIN_TOKEN 27
6
#define PARS_END_TOKEN 27
7
#define PARS_IF_TOKEN 27
8
#define PARS_THEN_TOKEN 2
79
#define PARS_ELSE_TOKEN 28
0
#define PARS_ELSIF_TOKEN 28
1
#define PARS_LOOP_TOKEN 28
2
#define PARS_WHILE_TOKEN 28
3
#define PARS_RETURN_TOKEN 28
4
#define PARS_SELECT_TOKEN 28
5
#define PARS_SUM_TOKEN 28
6
#define PARS_COUNT_TOKEN 28
7
#define PARS_DISTINCT_TOKEN 28
8
#define PARS_FROM_TOKEN 2
89
#define PARS_WHERE_TOKEN 29
0
#define PARS_FOR_TOKEN 29
1
#define PARS_DDOT_TOKEN 29
2
#define PARS_CONSISTENT_TOKEN 29
3
#define PARS_READ_TOKEN 29
4
#define PARS_ORDER_TOKEN 29
5
#define PARS_BY_TOKEN 29
6
#define PARS_ASC_TOKEN 29
7
#define PARS_DESC_TOKEN 29
8
#define PARS_INSERT_TOKEN
299
#define PARS_INTO_TOKEN 30
0
#define PARS_VALUES_TOKEN 30
1
#define PARS_UPDATE_TOKEN 30
2
#define PARS_SET_TOKEN 30
3
#define PARS_DELETE_TOKEN 30
4
#define PARS_CURRENT_TOKEN 30
5
#define PARS_OF_TOKEN 30
6
#define PARS_CREATE_TOKEN 30
7
#define PARS_TABLE_TOKEN 30
8
#define PARS_INDEX_TOKEN 3
09
#define PARS_UNIQUE_TOKEN 31
0
#define PARS_CLUSTERED_TOKEN 31
1
#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 31
2
#define PARS_ON_TOKEN 31
3
#define PARS_ASSIGN_TOKEN 31
4
#define PARS_DECLARE_TOKEN 31
5
#define PARS_CURSOR_TOKEN 31
6
#define PARS_SQL_TOKEN 31
7
#define PARS_OPEN_TOKEN 31
8
#define PARS_FETCH_TOKEN 3
19
#define PARS_CLOSE_TOKEN 32
0
#define PARS_NOTFOUND_TOKEN 32
1
#define PARS_TO_CHAR_TOKEN 32
2
#define PARS_TO_NUMBER_TOKEN 32
3
#define PARS_TO_BINARY_TOKEN 32
4
#define PARS_BINARY_TO_NUMBER_TOKEN 32
5
#define PARS_SUBSTR_TOKEN 32
6
#define PARS_REPLSTR_TOKEN 32
7
#define PARS_CONCAT_TOKEN 32
8
#define PARS_INSTR_TOKEN 3
29
#define PARS_LENGTH_TOKEN 33
0
#define PARS_SYSDATE_TOKEN 33
1
#define PARS_PRINTF_TOKEN 33
2
#define PARS_ASSERT_TOKEN 33
3
#define PARS_RND_TOKEN 33
4
#define PARS_RND_STR_TOKEN 33
5
#define PARS_ROW_PRINTF_TOKEN 33
6
#define PARS_COMMIT_TOKEN 33
7
#define PARS_ROLLBACK_TOKEN 33
8
#define PARS_WORK_TOKEN 3
39
#define NEG 34
0
extern
YYSTYPE
yylval
;
innobase/pars/lexyy.c
View file @
a9c1508d
This source diff could not be displayed because it is too large. You can
view the blob
instead.
innobase/pars/pars0grm.c
View file @
a9c1508d
/* A Bison parser, made from pars0grm.y
by GNU Bison version 1.25
*/
by GNU Bison version 1.28 */
#define YYBISON 1
/* Identify Bison output. */
#define PARS_INT_LIT 25
8
#define PARS_FLOAT_LIT 25
9
#define PARS_STR_LIT 2
60
#define PARS_NULL_LIT 26
1
#define PARS_ID_TOKEN 26
2
#define PARS_AND_TOKEN 26
3
#define PARS_OR_TOKEN 26
4
#define PARS_NOT_TOKEN 26
5
#define PARS_GE_TOKEN 26
6
#define PARS_LE_TOKEN 26
7
#define PARS_NE_TOKEN 26
8
#define PARS_PROCEDURE_TOKEN 26
9
#define PARS_IN_TOKEN 2
70
#define PARS_OUT_TOKEN 27
1
#define PARS_INT_TOKEN 27
2
#define PARS_INTEGER_TOKEN 27
3
#define PARS_FLOAT_TOKEN 27
4
#define PARS_CHAR_TOKEN 27
5
#define PARS_IS_TOKEN 27
6
#define PARS_BEGIN_TOKEN 27
7
#define PARS_END_TOKEN 27
8
#define PARS_IF_TOKEN 27
9
#define PARS_THEN_TOKEN 2
80
#define PARS_ELSE_TOKEN 28
1
#define PARS_ELSIF_TOKEN 28
2
#define PARS_LOOP_TOKEN 28
3
#define PARS_WHILE_TOKEN 28
4
#define PARS_RETURN_TOKEN 28
5
#define PARS_SELECT_TOKEN 28
6
#define PARS_SUM_TOKEN 28
7
#define PARS_COUNT_TOKEN 28
8
#define PARS_DISTINCT_TOKEN 28
9
#define PARS_FROM_TOKEN 2
90
#define PARS_WHERE_TOKEN 29
1
#define PARS_FOR_TOKEN 29
2
#define PARS_DDOT_TOKEN 29
3
#define PARS_CONSISTENT_TOKEN 29
4
#define PARS_READ_TOKEN 29
5
#define PARS_ORDER_TOKEN 29
6
#define PARS_BY_TOKEN 29
7
#define PARS_ASC_TOKEN 29
8
#define PARS_DESC_TOKEN 29
9
#define PARS_INSERT_TOKEN
300
#define PARS_INTO_TOKEN 30
1
#define PARS_VALUES_TOKEN 30
2
#define PARS_UPDATE_TOKEN 30
3
#define PARS_SET_TOKEN 30
4
#define PARS_DELETE_TOKEN 30
5
#define PARS_CURRENT_TOKEN 30
6
#define PARS_OF_TOKEN 30
7
#define PARS_CREATE_TOKEN 30
8
#define PARS_TABLE_TOKEN 30
9
#define PARS_INDEX_TOKEN 3
10
#define PARS_UNIQUE_TOKEN 31
1
#define PARS_CLUSTERED_TOKEN 31
2
#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 31
3
#define PARS_ON_TOKEN 31
4
#define PARS_ASSIGN_TOKEN 31
5
#define PARS_DECLARE_TOKEN 31
6
#define PARS_CURSOR_TOKEN 31
7
#define PARS_SQL_TOKEN 31
8
#define PARS_OPEN_TOKEN 31
9
#define PARS_FETCH_TOKEN 3
20
#define PARS_CLOSE_TOKEN 32
1
#define PARS_NOTFOUND_TOKEN 32
2
#define PARS_TO_CHAR_TOKEN 32
3
#define PARS_TO_NUMBER_TOKEN 32
4
#define PARS_TO_BINARY_TOKEN 32
5
#define PARS_BINARY_TO_NUMBER_TOKEN 32
6
#define PARS_SUBSTR_TOKEN 32
7
#define PARS_REPLSTR_TOKEN 32
8
#define PARS_CONCAT_TOKEN 32
9
#define PARS_INSTR_TOKEN 3
30
#define PARS_LENGTH_TOKEN 33
1
#define PARS_SYSDATE_TOKEN 33
2
#define PARS_PRINTF_TOKEN 33
3
#define PARS_ASSERT_TOKEN 33
4
#define PARS_RND_TOKEN 33
5
#define PARS_RND_STR_TOKEN 33
6
#define PARS_ROW_PRINTF_TOKEN 33
7
#define PARS_COMMIT_TOKEN 33
8
#define PARS_ROLLBACK_TOKEN 33
9
#define PARS_WORK_TOKEN 3
40
#define NEG 34
1
#line
9
"pars0grm.y"
#define PARS_INT_LIT 25
7
#define PARS_FLOAT_LIT 25
8
#define PARS_STR_LIT 2
59
#define PARS_NULL_LIT 26
0
#define PARS_ID_TOKEN 26
1
#define PARS_AND_TOKEN 26
2
#define PARS_OR_TOKEN 26
3
#define PARS_NOT_TOKEN 26
4
#define PARS_GE_TOKEN 26
5
#define PARS_LE_TOKEN 26
6
#define PARS_NE_TOKEN 26
7
#define PARS_PROCEDURE_TOKEN 26
8
#define PARS_IN_TOKEN 2
69
#define PARS_OUT_TOKEN 27
0
#define PARS_INT_TOKEN 27
1
#define PARS_INTEGER_TOKEN 27
2
#define PARS_FLOAT_TOKEN 27
3
#define PARS_CHAR_TOKEN 27
4
#define PARS_IS_TOKEN 27
5
#define PARS_BEGIN_TOKEN 27
6
#define PARS_END_TOKEN 27
7
#define PARS_IF_TOKEN 27
8
#define PARS_THEN_TOKEN 2
79
#define PARS_ELSE_TOKEN 28
0
#define PARS_ELSIF_TOKEN 28
1
#define PARS_LOOP_TOKEN 28
2
#define PARS_WHILE_TOKEN 28
3
#define PARS_RETURN_TOKEN 28
4
#define PARS_SELECT_TOKEN 28
5
#define PARS_SUM_TOKEN 28
6
#define PARS_COUNT_TOKEN 28
7
#define PARS_DISTINCT_TOKEN 28
8
#define PARS_FROM_TOKEN 2
89
#define PARS_WHERE_TOKEN 29
0
#define PARS_FOR_TOKEN 29
1
#define PARS_DDOT_TOKEN 29
2
#define PARS_CONSISTENT_TOKEN 29
3
#define PARS_READ_TOKEN 29
4
#define PARS_ORDER_TOKEN 29
5
#define PARS_BY_TOKEN 29
6
#define PARS_ASC_TOKEN 29
7
#define PARS_DESC_TOKEN 29
8
#define PARS_INSERT_TOKEN
299
#define PARS_INTO_TOKEN 30
0
#define PARS_VALUES_TOKEN 30
1
#define PARS_UPDATE_TOKEN 30
2
#define PARS_SET_TOKEN 30
3
#define PARS_DELETE_TOKEN 30
4
#define PARS_CURRENT_TOKEN 30
5
#define PARS_OF_TOKEN 30
6
#define PARS_CREATE_TOKEN 30
7
#define PARS_TABLE_TOKEN 30
8
#define PARS_INDEX_TOKEN 3
09
#define PARS_UNIQUE_TOKEN 31
0
#define PARS_CLUSTERED_TOKEN 31
1
#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 31
2
#define PARS_ON_TOKEN 31
3
#define PARS_ASSIGN_TOKEN 31
4
#define PARS_DECLARE_TOKEN 31
5
#define PARS_CURSOR_TOKEN 31
6
#define PARS_SQL_TOKEN 31
7
#define PARS_OPEN_TOKEN 31
8
#define PARS_FETCH_TOKEN 3
19
#define PARS_CLOSE_TOKEN 32
0
#define PARS_NOTFOUND_TOKEN 32
1
#define PARS_TO_CHAR_TOKEN 32
2
#define PARS_TO_NUMBER_TOKEN 32
3
#define PARS_TO_BINARY_TOKEN 32
4
#define PARS_BINARY_TO_NUMBER_TOKEN 32
5
#define PARS_SUBSTR_TOKEN 32
6
#define PARS_REPLSTR_TOKEN 32
7
#define PARS_CONCAT_TOKEN 32
8
#define PARS_INSTR_TOKEN 3
29
#define PARS_LENGTH_TOKEN 33
0
#define PARS_SYSDATE_TOKEN 33
1
#define PARS_PRINTF_TOKEN 33
2
#define PARS_ASSERT_TOKEN 33
3
#define PARS_RND_TOKEN 33
4
#define PARS_RND_STR_TOKEN 33
5
#define PARS_ROW_PRINTF_TOKEN 33
6
#define PARS_COMMIT_TOKEN 33
7
#define PARS_ROLLBACK_TOKEN 33
8
#define PARS_WORK_TOKEN 3
39
#define NEG 34
0
#line
10
"pars0grm.y"
/* The value of the semantic attribute is a pointer to a query tree node
que_node_t */
#define YYSTYPE que_node_t*
#define alloca mem_alloc
#include "univ.i"
#include <math.h>
#include "univ.i"
#include "pars0pars.h"
#include "mem0mem.h"
#include "que0types.h"
#include "que0que.h"
#include "row0sel.h"
...
...
@@ -124,7 +126,7 @@ yylex(void);
#define YYFLAG -32768
#define YYNTBASE 102
#define YYTRANSLATE(x) ((unsigned)(x) <= 34
1
? yytranslate[x] : 163)
#define YYTRANSLATE(x) ((unsigned)(x) <= 34
0
? yytranslate[x] : 163)
static
const
char
yytranslate
[]
=
{
0
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
...
...
@@ -152,16 +154,15 @@ static const char yytranslate[] = { 0,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
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
,
93
2
,
2
,
2
,
2
,
2
,
1
,
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
,
93
};
#if YYDEBUG != 0
...
...
@@ -241,22 +242,22 @@ static const short yyrhs[] = { 162,
#if YYDEBUG != 0
static
const
short
yyrline
[]
=
{
0
,
12
5
,
127
,
128
,
129
,
130
,
131
,
132
,
133
,
134
,
135
,
13
6
,
137
,
138
,
139
,
140
,
141
,
142
,
143
,
144
,
145
,
14
6
,
147
,
150
,
152
,
156
,
158
,
160
,
161
,
162
,
163
,
16
4
,
165
,
166
,
167
,
168
,
169
,
170
,
171
,
172
,
173
,
17
4
,
175
,
176
,
177
,
178
,
179
,
180
,
182
,
186
,
188
,
1
89
,
190
,
192
,
193
,
194
,
195
,
196
,
197
,
198
,
201
,
20
3
,
204
,
207
,
212
,
217
,
219
,
220
,
223
,
225
,
229
,
23
1
,
232
,
236
,
238
,
239
,
242
,
244
,
249
,
255
,
261
,
26
3
,
264
,
268
,
271
,
273
,
276
,
278
,
281
,
283
,
287
,
2
89
,
293
,
295
,
296
,
299
,
301
,
305
,
315
,
320
,
323
,
32
7
,
331
,
333
,
337
,
343
,
350
,
355
,
360
,
366
,
371
,
37
6
,
381
,
386
,
392
,
394
,
398
,
400
,
402
,
405
,
412
,
41
8
,
426
,
430
,
436
,
442
,
447
,
451
,
453
,
457
,
459
,
46
4
,
470
,
472
,
476
,
478
,
481
,
483
,
486
,
494
,
499
,
50
4
,
506
,
509
,
513
,
518
,
520
,
521
,
525
,
530
,
532
,
53
3
,
536
,
542
,
544
,
545
,
548
12
6
,
128
,
129
,
130
,
131
,
132
,
133
,
134
,
135
,
136
,
13
7
,
138
,
139
,
140
,
141
,
142
,
143
,
144
,
145
,
146
,
14
7
,
148
,
151
,
153
,
157
,
159
,
161
,
162
,
163
,
164
,
16
5
,
166
,
167
,
168
,
169
,
170
,
171
,
172
,
173
,
174
,
17
5
,
176
,
177
,
178
,
179
,
180
,
181
,
183
,
187
,
189
,
1
90
,
191
,
193
,
194
,
195
,
196
,
197
,
198
,
199
,
202
,
20
4
,
205
,
208
,
213
,
218
,
220
,
221
,
224
,
226
,
230
,
23
2
,
233
,
237
,
239
,
240
,
243
,
245
,
250
,
256
,
262
,
26
4
,
265
,
269
,
272
,
274
,
277
,
279
,
282
,
284
,
288
,
2
90
,
294
,
296
,
297
,
300
,
302
,
306
,
316
,
321
,
324
,
32
8
,
332
,
334
,
338
,
344
,
351
,
356
,
361
,
367
,
372
,
37
7
,
382
,
387
,
393
,
395
,
399
,
401
,
403
,
406
,
413
,
41
9
,
427
,
431
,
437
,
443
,
448
,
452
,
454
,
458
,
460
,
46
5
,
471
,
473
,
477
,
479
,
482
,
484
,
487
,
495
,
500
,
50
5
,
507
,
510
,
514
,
519
,
521
,
522
,
526
,
531
,
533
,
53
4
,
537
,
543
,
545
,
546
,
549
};
#endif
...
...
@@ -567,7 +568,8 @@ static const short yycheck[] = { 0,
91
,
92
,
-
1
,
86
,
87
,
88
,
89
,
90
,
91
,
92
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "bison.simple"
#line 3 "/usr/share/bison.simple"
/* This file comes from bison-1.28. */
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
...
...
@@ -584,46 +586,71 @@ static const short yycheck[] = { 0,
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
#ifndef alloca
/* This is the parser code that is written into each bison parser
when the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
#ifndef YYPARSE_RETURN_TYPE
#define YYPARSE_RETURN_TYPE int
#endif
#ifndef YYSTACK_USE_ALLOCA
#ifdef alloca
#define YYSTACK_USE_ALLOCA
#else
/* alloca not defined */
#ifdef __GNUC__
#define YYSTACK_USE_ALLOCA
#define alloca __builtin_alloca
#else
/* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
#define YYSTACK_USE_ALLOCA
#include <alloca.h>
#else
/* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
/* We think this test detects Watcom and Microsoft C. */
/* This used to test MSDOS, but that is a bad idea
since that symbol is in the user namespace. */
#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
#if 0 /* No need for malloc.h, which pollutes the namespace;
instead, just don't use alloca. */
#include <malloc.h>
#endif
#else
/* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
#include <malloc.h>
/* I don't know what this was needed for, but it pollutes the namespace.
So I turned it off. rms, 2 May 1997. */
/* #include <malloc.h> */
#pragma alloca
#else
/* not MSDOS, __TURBOC__, or _AIX */
#ifdef __hpux
#ifdef __cplusplus
extern
"C"
{
void
*
alloca
(
unsigned
int
);
};
#else
/* not __cplusplus */
void
*
alloca
();
#endif
/* not __cplusplus */
#define YYSTACK_USE_ALLOCA
#else
/* not MSDOS, or __TURBOC__, or _AIX */
#if 0
#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
and on HPUX 10. Eventually we can turn this on. */
#define YYSTACK_USE_ALLOCA
#define alloca __builtin_alloca
#endif /* __hpux */
#endif
#endif
/* not _AIX */
#endif
/* not MSDOS, or __TURBOC__ */
#endif
/* not sparc. */
#endif
/* not GNU C. */
#endif
/* alloca not defined. */
#endif
/* not sparc */
#endif
/* not GNU C */
#endif
/* alloca not defined */
#endif
/* YYSTACK_USE_ALLOCA not defined */
/* This is the parser code that is written into each bison parser
when the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
#ifdef YYSTACK_USE_ALLOCA
#define YYSTACK_ALLOC alloca
#else
#define YYSTACK_ALLOC malloc
#endif
/* Note: there must be only one dollar sign in this file.
It is replaced by the list of actions, each action
...
...
@@ -633,8 +660,8 @@ void *alloca ();
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
#define YYACCEPT
return(0)
#define YYABORT
return(1)
#define YYACCEPT
goto yyacceptlab
#define YYABORT
goto yyabortlab
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror.
This remains here temporarily to ease the
...
...
@@ -702,7 +729,7 @@ int yydebug; /* nonzero means print parse trace */
/* YYINITDEPTH indicates the initial size of the parser's stacks */
#ifndef YYINITDEPTH
#define YYINITDEPTH
10
00
#define YYINITDEPTH
2
00
#endif
/* YYMAXDEPTH is the maximum size the stacks can grow to
...
...
@@ -715,12 +742,12 @@ int yydebug; /* nonzero means print parse trace */
#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif
/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
int
yyparse
(
void
);
#endif
/* Define __yy_memcpy. Note that the size argument
should be passed with type unsigned int, because that is what the non-GCC
definitions require. With GCC, __builtin_memcpy takes an arg
of type size_t, but it can handle unsigned int. */
#if __GNUC__ > 1
/* GNU C and GNU C++ define this. */
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
#else
/* not GNU C or C++ */
...
...
@@ -732,7 +759,7 @@ static void
__yy_memcpy
(
to
,
from
,
count
)
char
*
to
;
char
*
from
;
int
count
;
unsigned
int
count
;
{
register
char
*
f
=
from
;
register
char
*
t
=
to
;
...
...
@@ -747,10 +774,10 @@ __yy_memcpy (to, from, count)
/* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */
static
void
__yy_memcpy
(
char
*
to
,
char
*
from
,
int
count
)
__yy_memcpy
(
char
*
to
,
char
*
from
,
unsigned
int
count
)
{
register
char
*
f
=
from
;
register
char
*
t
=
to
;
register
char
*
f
=
from
;
register
int
i
=
count
;
while
(
i
--
>
0
)
...
...
@@ -760,7 +787,7 @@ __yy_memcpy (char *to, char *from, int count)
#endif
#endif
#line
196 "
bison.simple"
#line
222 "/usr/share/
bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
...
...
@@ -781,7 +808,18 @@ __yy_memcpy (char *to, char *from, int count)
#define YYPARSE_PARAM_DECL
#endif
/* not YYPARSE_PARAM */
int
/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
#ifdef YYPARSE_PARAM
YYPARSE_RETURN_TYPE
yyparse
(
void
*
);
#else
YYPARSE_RETURN_TYPE
yyparse
(
void
);
#endif
#endif
YYPARSE_RETURN_TYPE
yyparse
(
YYPARSE_PARAM_ARG
)
YYPARSE_PARAM_DECL
{
...
...
@@ -809,6 +847,9 @@ yyparse(YYPARSE_PARAM_ARG)
#endif
int
yystacksize
=
YYINITDEPTH
;
#ifndef YYSTACK_USE_ALLOCA
int
yyfree_stacks
=
0
;
#endif
#ifdef YYPURE
int
yychar
;
...
...
@@ -893,23 +934,34 @@ yynewstate:
if
(
yystacksize
>=
YYMAXDEPTH
)
{
yyerror
(
"parser stack overflow"
);
ut_a
(
0
);
#ifndef YYSTACK_USE_ALLOCA
if
(
yyfree_stacks
)
{
free
(
yyss
);
free
(
yyvs
);
#ifdef YYLSP_NEEDED
free
(
yyls
);
#endif
}
#endif
return
2
;
}
yystacksize
*=
2
;
if
(
yystacksize
>
YYMAXDEPTH
)
yystacksize
=
YYMAXDEPTH
;
ut_a
(
0
);
/* Prevent possible memory leaks through the following
mem_alloc's */
yyss
=
(
short
*
)
mem_alloc
(
yystacksize
*
sizeof
(
*
yyssp
));
__yy_memcpy
((
char
*
)
yyss
,
(
char
*
)
yyss1
,
size
*
sizeof
(
*
yyssp
));
yyvs
=
(
YYSTYPE
*
)
mem_alloc
(
yystacksize
*
sizeof
(
*
yyvsp
));
__yy_memcpy
((
char
*
)
yyvs
,
(
char
*
)
yyvs1
,
size
*
sizeof
(
*
yyvsp
));
#ifndef YYSTACK_USE_ALLOCA
yyfree_stacks
=
1
;
#endif
yyss
=
(
short
*
)
YYSTACK_ALLOC
(
yystacksize
*
sizeof
(
*
yyssp
));
__yy_memcpy
((
char
*
)
yyss
,
(
char
*
)
yyss1
,
size
*
(
unsigned
int
)
sizeof
(
*
yyssp
));
yyvs
=
(
YYSTYPE
*
)
YYSTACK_ALLOC
(
yystacksize
*
sizeof
(
*
yyvsp
));
__yy_memcpy
((
char
*
)
yyvs
,
(
char
*
)
yyvs1
,
size
*
(
unsigned
int
)
sizeof
(
*
yyvsp
));
#ifdef YYLSP_NEEDED
yyls
=
(
YYLTYPE
*
)
mem_alloc
(
yystacksize
*
sizeof
(
*
yylsp
));
__yy_memcpy
((
char
*
)
yyls
,
(
char
*
)
yyls1
,
size
*
sizeof
(
*
yylsp
));
yyls
=
(
YYLTYPE
*
)
YYSTACK_ALLOC
(
yystacksize
*
sizeof
(
*
yylsp
));
__yy_memcpy
((
char
*
)
yyls
,
(
char
*
)
yyls1
,
size
*
(
unsigned
int
)
sizeof
(
*
yylsp
));
#endif
#endif
/* no yyoverflow */
...
...
@@ -1070,218 +1122,218 @@ yyreduce:
switch
(
yyn
)
{
case
23
:
#line 15
1
"pars0grm.y"
#line 15
2
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
NULL
,
yyvsp
[
0
]);
;
break
;}
case
24
:
#line 15
3
"pars0grm.y"
#line 15
4
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
yyvsp
[
-
1
],
yyvsp
[
0
]);
;
break
;}
case
25
:
#line 15
7
"pars0grm.y"
#line 15
8
"pars0grm.y"
{
yyval
=
yyvsp
[
0
];;
break
;}
case
26
:
#line 1
59
"pars0grm.y"
#line 1
60
"pars0grm.y"
{
yyval
=
pars_func
(
yyvsp
[
-
3
],
yyvsp
[
-
1
]);
;
break
;}
case
27
:
#line 16
0
"pars0grm.y"
#line 16
1
"pars0grm.y"
{
yyval
=
yyvsp
[
0
];;
break
;}
case
28
:
#line 16
1
"pars0grm.y"
#line 16
2
"pars0grm.y"
{
yyval
=
yyvsp
[
0
];;
break
;}
case
29
:
#line 16
2
"pars0grm.y"
#line 16
3
"pars0grm.y"
{
yyval
=
yyvsp
[
0
];;
break
;}
case
30
:
#line 16
3
"pars0grm.y"
#line 16
4
"pars0grm.y"
{
yyval
=
yyvsp
[
0
];;
break
;}
case
31
:
#line 16
4
"pars0grm.y"
#line 16
5
"pars0grm.y"
{
yyval
=
yyvsp
[
0
];;
break
;}
case
32
:
#line 16
5
"pars0grm.y"
#line 16
6
"pars0grm.y"
{
yyval
=
pars_op
(
'+'
,
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
33
:
#line 16
6
"pars0grm.y"
#line 16
7
"pars0grm.y"
{
yyval
=
pars_op
(
'-'
,
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
34
:
#line 16
7
"pars0grm.y"
#line 16
8
"pars0grm.y"
{
yyval
=
pars_op
(
'*'
,
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
35
:
#line 16
8
"pars0grm.y"
#line 16
9
"pars0grm.y"
{
yyval
=
pars_op
(
'/'
,
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
36
:
#line 1
69
"pars0grm.y"
#line 1
70
"pars0grm.y"
{
yyval
=
pars_op
(
'-'
,
yyvsp
[
0
],
NULL
);
;
break
;}
case
37
:
#line 17
0
"pars0grm.y"
#line 17
1
"pars0grm.y"
{
yyval
=
yyvsp
[
-
1
];
;
break
;}
case
38
:
#line 17
1
"pars0grm.y"
#line 17
2
"pars0grm.y"
{
yyval
=
pars_op
(
'='
,
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
39
:
#line 17
2
"pars0grm.y"
#line 17
3
"pars0grm.y"
{
yyval
=
pars_op
(
'<'
,
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
40
:
#line 17
3
"pars0grm.y"
#line 17
4
"pars0grm.y"
{
yyval
=
pars_op
(
'>'
,
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
41
:
#line 17
4
"pars0grm.y"
#line 17
5
"pars0grm.y"
{
yyval
=
pars_op
(
PARS_GE_TOKEN
,
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
42
:
#line 17
5
"pars0grm.y"
#line 17
6
"pars0grm.y"
{
yyval
=
pars_op
(
PARS_LE_TOKEN
,
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
43
:
#line 17
6
"pars0grm.y"
#line 17
7
"pars0grm.y"
{
yyval
=
pars_op
(
PARS_NE_TOKEN
,
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
44
:
#line 17
7
"pars0grm.y"
#line 17
8
"pars0grm.y"
{
yyval
=
pars_op
(
PARS_AND_TOKEN
,
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
45
:
#line 17
8
"pars0grm.y"
#line 17
9
"pars0grm.y"
{
yyval
=
pars_op
(
PARS_OR_TOKEN
,
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
46
:
#line 1
79
"pars0grm.y"
#line 1
80
"pars0grm.y"
{
yyval
=
pars_op
(
PARS_NOT_TOKEN
,
yyvsp
[
0
],
NULL
);
;
break
;}
case
47
:
#line 18
1
"pars0grm.y"
#line 18
2
"pars0grm.y"
{
yyval
=
pars_op
(
PARS_NOTFOUND_TOKEN
,
yyvsp
[
-
2
],
NULL
);
;
break
;}
case
48
:
#line 18
3
"pars0grm.y"
#line 18
4
"pars0grm.y"
{
yyval
=
pars_op
(
PARS_NOTFOUND_TOKEN
,
yyvsp
[
-
2
],
NULL
);
;
break
;}
case
49
:
#line 18
7
"pars0grm.y"
#line 18
8
"pars0grm.y"
{
yyval
=
&
pars_to_char_token
;
;
break
;}
case
50
:
#line 18
8
"pars0grm.y"
#line 18
9
"pars0grm.y"
{
yyval
=
&
pars_to_number_token
;
;
break
;}
case
51
:
#line 1
89
"pars0grm.y"
#line 1
90
"pars0grm.y"
{
yyval
=
&
pars_to_binary_token
;
;
break
;}
case
52
:
#line 19
1
"pars0grm.y"
#line 19
2
"pars0grm.y"
{
yyval
=
&
pars_binary_to_number_token
;
;
break
;}
case
53
:
#line 19
2
"pars0grm.y"
#line 19
3
"pars0grm.y"
{
yyval
=
&
pars_substr_token
;
;
break
;}
case
54
:
#line 19
3
"pars0grm.y"
#line 19
4
"pars0grm.y"
{
yyval
=
&
pars_concat_token
;
;
break
;}
case
55
:
#line 19
4
"pars0grm.y"
#line 19
5
"pars0grm.y"
{
yyval
=
&
pars_instr_token
;
;
break
;}
case
56
:
#line 19
5
"pars0grm.y"
#line 19
6
"pars0grm.y"
{
yyval
=
&
pars_length_token
;
;
break
;}
case
57
:
#line 19
6
"pars0grm.y"
#line 19
7
"pars0grm.y"
{
yyval
=
&
pars_sysdate_token
;
;
break
;}
case
58
:
#line 19
7
"pars0grm.y"
#line 19
8
"pars0grm.y"
{
yyval
=
&
pars_rnd_token
;
;
break
;}
case
59
:
#line 19
8
"pars0grm.y"
#line 19
9
"pars0grm.y"
{
yyval
=
&
pars_rnd_str_token
;
;
break
;}
case
63
:
#line 2
09
"pars0grm.y"
#line 2
10
"pars0grm.y"
{
yyval
=
pars_stored_procedure_call
(
yyvsp
[
-
4
]);
;
break
;}
case
64
:
#line 21
4
"pars0grm.y"
#line 21
5
"pars0grm.y"
{
yyval
=
pars_procedure_call
(
yyvsp
[
-
3
],
yyvsp
[
-
1
]);
;
break
;}
case
65
:
#line 21
8
"pars0grm.y"
#line 21
9
"pars0grm.y"
{
yyval
=
&
pars_replstr_token
;
;
break
;}
case
66
:
#line 2
19
"pars0grm.y"
#line 2
20
"pars0grm.y"
{
yyval
=
&
pars_printf_token
;
;
break
;}
case
67
:
#line 22
0
"pars0grm.y"
#line 22
1
"pars0grm.y"
{
yyval
=
&
pars_assert_token
;
;
break
;}
case
68
:
#line 22
4
"pars0grm.y"
#line 22
5
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
NULL
,
yyvsp
[
0
]);
;
break
;}
case
69
:
#line 22
6
"pars0grm.y"
#line 22
7
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
70
:
#line 23
0
"pars0grm.y"
#line 23
1
"pars0grm.y"
{
yyval
=
NULL
;
;
break
;}
case
71
:
#line 23
1
"pars0grm.y"
#line 23
2
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
NULL
,
yyvsp
[
0
]);
;
break
;}
case
72
:
#line 23
3
"pars0grm.y"
#line 23
4
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
73
:
#line 23
7
"pars0grm.y"
#line 23
8
"pars0grm.y"
{
yyval
=
NULL
;
;
break
;}
case
74
:
#line 23
8
"pars0grm.y"
#line 23
9
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
NULL
,
yyvsp
[
0
]);;
break
;}
case
75
:
#line 2
39
"pars0grm.y"
#line 2
40
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
76
:
#line 24
3
"pars0grm.y"
#line 24
4
"pars0grm.y"
{
yyval
=
yyvsp
[
0
];
;
break
;}
case
77
:
#line 24
5
"pars0grm.y"
#line 24
6
"pars0grm.y"
{
yyval
=
pars_func
(
&
pars_count_token
,
que_node_list_add_last
(
NULL
,
sym_tab_add_int_lit
(
pars_sym_tab_global
,
1
)));
;
break
;}
case
78
:
#line 25
0
"pars0grm.y"
#line 25
1
"pars0grm.y"
{
yyval
=
pars_func
(
&
pars_count_token
,
que_node_list_add_last
(
NULL
,
pars_func
(
&
pars_distinct_token
,
...
...
@@ -1289,308 +1341,308 @@ case 78:
NULL
,
yyvsp
[
-
1
]))));
;
break
;}
case
79
:
#line 25
6
"pars0grm.y"
#line 25
7
"pars0grm.y"
{
yyval
=
pars_func
(
&
pars_sum_token
,
que_node_list_add_last
(
NULL
,
yyvsp
[
-
1
]));
;
break
;}
case
80
:
#line 26
2
"pars0grm.y"
#line 26
3
"pars0grm.y"
{
yyval
=
NULL
;
;
break
;}
case
81
:
#line 26
3
"pars0grm.y"
#line 26
4
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
NULL
,
yyvsp
[
0
]);
;
break
;}
case
82
:
#line 26
5
"pars0grm.y"
#line 26
6
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
83
:
#line 2
69
"pars0grm.y"
#line 2
70
"pars0grm.y"
{
yyval
=
pars_select_list
(
&
pars_star_denoter
,
NULL
);
;
break
;}
case
84
:
#line 27
2
"pars0grm.y"
#line 27
3
"pars0grm.y"
{
yyval
=
pars_select_list
(
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
85
:
#line 27
3
"pars0grm.y"
#line 27
4
"pars0grm.y"
{
yyval
=
pars_select_list
(
yyvsp
[
0
],
NULL
);
;
break
;}
case
86
:
#line 27
7
"pars0grm.y"
#line 27
8
"pars0grm.y"
{
yyval
=
NULL
;
;
break
;}
case
87
:
#line 27
8
"pars0grm.y"
#line 27
9
"pars0grm.y"
{
yyval
=
yyvsp
[
0
];
;
break
;}
case
88
:
#line 28
2
"pars0grm.y"
#line 28
3
"pars0grm.y"
{
yyval
=
NULL
;
;
break
;}
case
89
:
#line 28
4
"pars0grm.y"
#line 28
5
"pars0grm.y"
{
yyval
=
&
pars_update_token
;
;
break
;}
case
90
:
#line 28
8
"pars0grm.y"
#line 28
9
"pars0grm.y"
{
yyval
=
NULL
;
;
break
;}
case
91
:
#line 29
0
"pars0grm.y"
#line 29
1
"pars0grm.y"
{
yyval
=
&
pars_consistent_token
;
;
break
;}
case
92
:
#line 29
4
"pars0grm.y"
#line 29
5
"pars0grm.y"
{
yyval
=
&
pars_asc_token
;
;
break
;}
case
93
:
#line 29
5
"pars0grm.y"
#line 29
6
"pars0grm.y"
{
yyval
=
&
pars_asc_token
;
;
break
;}
case
94
:
#line 29
6
"pars0grm.y"
#line 29
7
"pars0grm.y"
{
yyval
=
&
pars_desc_token
;
;
break
;}
case
95
:
#line 30
0
"pars0grm.y"
#line 30
1
"pars0grm.y"
{
yyval
=
NULL
;
;
break
;}
case
96
:
#line 30
2
"pars0grm.y"
#line 30
3
"pars0grm.y"
{
yyval
=
pars_order_by
(
yyvsp
[
-
1
],
yyvsp
[
0
]);
;
break
;}
case
97
:
#line 31
1
"pars0grm.y"
#line 31
2
"pars0grm.y"
{
yyval
=
pars_select_statement
(
yyvsp
[
-
6
],
yyvsp
[
-
4
],
yyvsp
[
-
3
],
yyvsp
[
-
2
],
yyvsp
[
-
1
],
yyvsp
[
0
]);
;
break
;}
case
98
:
#line 31
7
"pars0grm.y"
#line 31
8
"pars0grm.y"
{
yyval
=
yyvsp
[
0
];
;
break
;}
case
99
:
#line 32
2
"pars0grm.y"
#line 32
3
"pars0grm.y"
{
yyval
=
pars_insert_statement
(
yyvsp
[
-
4
],
yyvsp
[
-
1
],
NULL
);
;
break
;}
case
100
:
#line 32
4
"pars0grm.y"
#line 32
5
"pars0grm.y"
{
yyval
=
pars_insert_statement
(
yyvsp
[
-
1
],
NULL
,
yyvsp
[
0
]);
;
break
;}
case
101
:
#line 32
8
"pars0grm.y"
#line 32
9
"pars0grm.y"
{
yyval
=
pars_column_assignment
(
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
102
:
#line 33
2
"pars0grm.y"
#line 33
3
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
NULL
,
yyvsp
[
0
]);
;
break
;}
case
103
:
#line 33
4
"pars0grm.y"
#line 33
5
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
104
:
#line 34
0
"pars0grm.y"
#line 34
1
"pars0grm.y"
{
yyval
=
yyvsp
[
0
];
;
break
;}
case
105
:
#line 34
6
"pars0grm.y"
#line 34
7
"pars0grm.y"
{
yyval
=
pars_update_statement_start
(
FALSE
,
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
106
:
#line 35
2
"pars0grm.y"
#line 35
3
"pars0grm.y"
{
yyval
=
pars_update_statement
(
yyvsp
[
-
1
],
NULL
,
yyvsp
[
0
]);
;
break
;}
case
107
:
#line 35
7
"pars0grm.y"
#line 35
8
"pars0grm.y"
{
yyval
=
pars_update_statement
(
yyvsp
[
-
1
],
yyvsp
[
0
],
NULL
);
;
break
;}
case
108
:
#line 36
2
"pars0grm.y"
#line 36
3
"pars0grm.y"
{
yyval
=
pars_update_statement_start
(
TRUE
,
yyvsp
[
0
],
NULL
);
;
break
;}
case
109
:
#line 36
8
"pars0grm.y"
#line 36
9
"pars0grm.y"
{
yyval
=
pars_update_statement
(
yyvsp
[
-
1
],
NULL
,
yyvsp
[
0
]);
;
break
;}
case
110
:
#line 37
3
"pars0grm.y"
#line 37
4
"pars0grm.y"
{
yyval
=
pars_update_statement
(
yyvsp
[
-
1
],
yyvsp
[
0
],
NULL
);
;
break
;}
case
111
:
#line 37
8
"pars0grm.y"
#line 37
9
"pars0grm.y"
{
yyval
=
pars_row_printf_statement
(
yyvsp
[
0
]);
;
break
;}
case
112
:
#line 38
3
"pars0grm.y"
#line 38
4
"pars0grm.y"
{
yyval
=
pars_assignment_statement
(
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
113
:
#line 3
89
"pars0grm.y"
#line 3
90
"pars0grm.y"
{
yyval
=
pars_elsif_element
(
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
114
:
#line 39
3
"pars0grm.y"
#line 39
4
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
NULL
,
yyvsp
[
0
]);
;
break
;}
case
115
:
#line 39
5
"pars0grm.y"
#line 39
6
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
yyvsp
[
-
1
],
yyvsp
[
0
]);
;
break
;}
case
116
:
#line
399
"pars0grm.y"
#line
400
"pars0grm.y"
{
yyval
=
NULL
;
;
break
;}
case
117
:
#line 40
1
"pars0grm.y"
#line 40
2
"pars0grm.y"
{
yyval
=
yyvsp
[
0
];
;
break
;}
case
118
:
#line 40
2
"pars0grm.y"
#line 40
3
"pars0grm.y"
{
yyval
=
yyvsp
[
0
];
;
break
;}
case
119
:
#line 4
09
"pars0grm.y"
#line 4
10
"pars0grm.y"
{
yyval
=
pars_if_statement
(
yyvsp
[
-
5
],
yyvsp
[
-
3
],
yyvsp
[
-
2
]);
;
break
;}
case
120
:
#line 41
5
"pars0grm.y"
#line 41
6
"pars0grm.y"
{
yyval
=
pars_while_statement
(
yyvsp
[
-
4
],
yyvsp
[
-
2
]);
;
break
;}
case
121
:
#line 42
3
"pars0grm.y"
#line 42
4
"pars0grm.y"
{
yyval
=
pars_for_statement
(
yyvsp
[
-
8
],
yyvsp
[
-
6
],
yyvsp
[
-
4
],
yyvsp
[
-
2
]);
;
break
;}
case
122
:
#line 42
7
"pars0grm.y"
#line 42
8
"pars0grm.y"
{
yyval
=
pars_return_statement
();
;
break
;}
case
123
:
#line 43
2
"pars0grm.y"
#line 43
3
"pars0grm.y"
{
yyval
=
pars_open_statement
(
ROW_SEL_OPEN_CURSOR
,
yyvsp
[
0
]);
;
break
;}
case
124
:
#line 43
8
"pars0grm.y"
#line 43
9
"pars0grm.y"
{
yyval
=
pars_open_statement
(
ROW_SEL_CLOSE_CURSOR
,
yyvsp
[
0
]);
;
break
;}
case
125
:
#line 44
4
"pars0grm.y"
#line 44
5
"pars0grm.y"
{
yyval
=
pars_fetch_statement
(
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
126
:
#line 44
8
"pars0grm.y"
#line 44
9
"pars0grm.y"
{
yyval
=
pars_column_def
(
yyvsp
[
-
1
],
yyvsp
[
0
]);
;
break
;}
case
127
:
#line 45
2
"pars0grm.y"
#line 45
3
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
NULL
,
yyvsp
[
0
]);
;
break
;}
case
128
:
#line 45
4
"pars0grm.y"
#line 45
5
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
129
:
#line 45
8
"pars0grm.y"
#line 45
9
"pars0grm.y"
{
yyval
=
NULL
;
;
break
;}
case
130
:
#line 46
0
"pars0grm.y"
#line 46
1
"pars0grm.y"
{
yyval
=
&
pars_int_token
;
/* pass any non-NULL pointer */
;
break
;}
case
131
:
#line 46
7
"pars0grm.y"
#line 46
8
"pars0grm.y"
{
yyval
=
pars_create_table
(
yyvsp
[
-
4
],
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
132
:
#line 47
1
"pars0grm.y"
#line 47
2
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
NULL
,
yyvsp
[
0
]);
;
break
;}
case
133
:
#line 47
3
"pars0grm.y"
#line 47
4
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
134
:
#line 47
7
"pars0grm.y"
#line 47
8
"pars0grm.y"
{
yyval
=
NULL
;
;
break
;}
case
135
:
#line 47
8
"pars0grm.y"
#line 47
9
"pars0grm.y"
{
yyval
=
&
pars_unique_token
;
;
break
;}
case
136
:
#line 48
2
"pars0grm.y"
#line 48
3
"pars0grm.y"
{
yyval
=
NULL
;
;
break
;}
case
137
:
#line 48
3
"pars0grm.y"
#line 48
4
"pars0grm.y"
{
yyval
=
&
pars_clustered_token
;
;
break
;}
case
138
:
#line 49
1
"pars0grm.y"
#line 49
2
"pars0grm.y"
{
yyval
=
pars_create_index
(
yyvsp
[
-
8
],
yyvsp
[
-
7
],
yyvsp
[
-
5
],
yyvsp
[
-
3
],
yyvsp
[
-
1
]);
;
break
;}
case
139
:
#line 49
6
"pars0grm.y"
#line 49
7
"pars0grm.y"
{
yyval
=
pars_commit_statement
();
;
break
;}
case
140
:
#line 50
1
"pars0grm.y"
#line 50
2
"pars0grm.y"
{
yyval
=
pars_rollback_statement
();
;
break
;}
case
141
:
#line 50
5
"pars0grm.y"
#line 50
6
"pars0grm.y"
{
yyval
=
&
pars_int_token
;
;
break
;}
case
142
:
#line 50
6
"pars0grm.y"
#line 50
7
"pars0grm.y"
{
yyval
=
&
pars_char_token
;
;
break
;}
case
143
:
#line 51
1
"pars0grm.y"
#line 51
2
"pars0grm.y"
{
yyval
=
pars_parameter_declaration
(
yyvsp
[
-
2
],
PARS_INPUT
,
yyvsp
[
0
]);
;
break
;}
case
144
:
#line 51
4
"pars0grm.y"
#line 51
5
"pars0grm.y"
{
yyval
=
pars_parameter_declaration
(
yyvsp
[
-
2
],
PARS_OUTPUT
,
yyvsp
[
0
]);
;
break
;}
case
145
:
#line 5
19
"pars0grm.y"
#line 5
20
"pars0grm.y"
{
yyval
=
NULL
;
;
break
;}
case
146
:
#line 52
0
"pars0grm.y"
#line 52
1
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
NULL
,
yyvsp
[
0
]);
;
break
;}
case
147
:
#line 52
2
"pars0grm.y"
#line 52
3
"pars0grm.y"
{
yyval
=
que_node_list_add_last
(
yyvsp
[
-
2
],
yyvsp
[
0
]);
;
break
;}
case
148
:
#line 52
7
"pars0grm.y"
#line 52
8
"pars0grm.y"
{
yyval
=
pars_variable_declaration
(
yyvsp
[
-
2
],
yyvsp
[
-
1
]);
;
break
;}
case
152
:
#line 5
39
"pars0grm.y"
#line 5
40
"pars0grm.y"
{
yyval
=
pars_cursor_declaration
(
yyvsp
[
-
3
],
yyvsp
[
-
1
]);
;
break
;}
case
156
:
#line 55
5
"pars0grm.y"
#line 55
6
"pars0grm.y"
{
yyval
=
pars_procedure_definition
(
yyvsp
[
-
9
],
yyvsp
[
-
7
],
yyvsp
[
-
1
]);
;
break
;}
}
/* the action file gets copied in in place of this dollarsign */
#line
498 "
bison.simple"
#line
554 "/usr/share/
bison.simple"
yyvsp
-=
yylen
;
yyssp
-=
yylen
;
...
...
@@ -1665,7 +1717,7 @@ yyerrlab: /* here on detecting error */
x
<
(
sizeof
(
yytname
)
/
sizeof
(
char
*
));
x
++
)
if
(
yycheck
[
x
+
yyn
]
==
x
)
size
+=
strlen
(
yytname
[
x
])
+
15
,
count
++
;
msg
=
(
char
*
)
m
em_
alloc
(
size
+
15
);
msg
=
(
char
*
)
malloc
(
size
+
15
);
if
(
msg
!=
0
)
{
strcpy
(
msg
,
"parse error"
);
...
...
@@ -1684,7 +1736,7 @@ yyerrlab: /* here on detecting error */
}
}
yyerror
(
msg
);
mem_
free
(
msg
);
free
(
msg
);
}
else
yyerror
(
"parse error; also virtual memory exceeded"
);
...
...
@@ -1785,6 +1837,34 @@ yyerrhandle:
yystate
=
yyn
;
goto
yynewstate
;
yyacceptlab:
/* YYACCEPT comes here. */
#ifndef YYSTACK_USE_ALLOCA
if
(
yyfree_stacks
)
{
free
(
yyss
);
free
(
yyvs
);
#ifdef YYLSP_NEEDED
free
(
yyls
);
#endif
}
#endif
return
0
;
yyabortlab:
/* YYABORT comes here. */
#ifndef YYSTACK_USE_ALLOCA
if
(
yyfree_stacks
)
{
free
(
yyss
);
free
(
yyvs
);
#ifdef YYLSP_NEEDED
free
(
yyls
);
#endif
}
#endif
return
1
;
}
#line 5
59
"pars0grm.y"
#line 5
60
"pars0grm.y"
innobase/pars/pars0grm.h
View file @
a9c1508d
#ifndef YYSTYPE
#define YYSTYPE int
#endif
#define PARS_INT_LIT 25
8
#define PARS_FLOAT_LIT 25
9
#define PARS_STR_LIT 2
60
#define PARS_NULL_LIT 26
1
#define PARS_ID_TOKEN 26
2
#define PARS_AND_TOKEN 26
3
#define PARS_OR_TOKEN 26
4
#define PARS_NOT_TOKEN 26
5
#define PARS_GE_TOKEN 26
6
#define PARS_LE_TOKEN 26
7
#define PARS_NE_TOKEN 26
8
#define PARS_PROCEDURE_TOKEN 26
9
#define PARS_IN_TOKEN 2
70
#define PARS_OUT_TOKEN 27
1
#define PARS_INT_TOKEN 27
2
#define PARS_INTEGER_TOKEN 27
3
#define PARS_FLOAT_TOKEN 27
4
#define PARS_CHAR_TOKEN 27
5
#define PARS_IS_TOKEN 27
6
#define PARS_BEGIN_TOKEN 27
7
#define PARS_END_TOKEN 27
8
#define PARS_IF_TOKEN 27
9
#define PARS_THEN_TOKEN 2
80
#define PARS_ELSE_TOKEN 28
1
#define PARS_ELSIF_TOKEN 28
2
#define PARS_LOOP_TOKEN 28
3
#define PARS_WHILE_TOKEN 28
4
#define PARS_RETURN_TOKEN 28
5
#define PARS_SELECT_TOKEN 28
6
#define PARS_SUM_TOKEN 28
7
#define PARS_COUNT_TOKEN 28
8
#define PARS_DISTINCT_TOKEN 28
9
#define PARS_FROM_TOKEN 2
90
#define PARS_WHERE_TOKEN 29
1
#define PARS_FOR_TOKEN 29
2
#define PARS_DDOT_TOKEN 29
3
#define PARS_CONSISTENT_TOKEN 29
4
#define PARS_READ_TOKEN 29
5
#define PARS_ORDER_TOKEN 29
6
#define PARS_BY_TOKEN 29
7
#define PARS_ASC_TOKEN 29
8
#define PARS_DESC_TOKEN 29
9
#define PARS_INSERT_TOKEN
300
#define PARS_INTO_TOKEN 30
1
#define PARS_VALUES_TOKEN 30
2
#define PARS_UPDATE_TOKEN 30
3
#define PARS_SET_TOKEN 30
4
#define PARS_DELETE_TOKEN 30
5
#define PARS_CURRENT_TOKEN 30
6
#define PARS_OF_TOKEN 30
7
#define PARS_CREATE_TOKEN 30
8
#define PARS_TABLE_TOKEN 30
9
#define PARS_INDEX_TOKEN 3
10
#define PARS_UNIQUE_TOKEN 31
1
#define PARS_CLUSTERED_TOKEN 31
2
#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 31
3
#define PARS_ON_TOKEN 31
4
#define PARS_ASSIGN_TOKEN 31
5
#define PARS_DECLARE_TOKEN 31
6
#define PARS_CURSOR_TOKEN 31
7
#define PARS_SQL_TOKEN 31
8
#define PARS_OPEN_TOKEN 31
9
#define PARS_FETCH_TOKEN 3
20
#define PARS_CLOSE_TOKEN 32
1
#define PARS_NOTFOUND_TOKEN 32
2
#define PARS_TO_CHAR_TOKEN 32
3
#define PARS_TO_NUMBER_TOKEN 32
4
#define PARS_TO_BINARY_TOKEN 32
5
#define PARS_BINARY_TO_NUMBER_TOKEN 32
6
#define PARS_SUBSTR_TOKEN 32
7
#define PARS_REPLSTR_TOKEN 32
8
#define PARS_CONCAT_TOKEN 32
9
#define PARS_INSTR_TOKEN 3
30
#define PARS_LENGTH_TOKEN 33
1
#define PARS_SYSDATE_TOKEN 33
2
#define PARS_PRINTF_TOKEN 33
3
#define PARS_ASSERT_TOKEN 33
4
#define PARS_RND_TOKEN 33
5
#define PARS_RND_STR_TOKEN 33
6
#define PARS_ROW_PRINTF_TOKEN 33
7
#define PARS_COMMIT_TOKEN 33
8
#define PARS_ROLLBACK_TOKEN 33
9
#define PARS_WORK_TOKEN 3
40
#define NEG 34
1
#define PARS_INT_LIT 25
7
#define PARS_FLOAT_LIT 25
8
#define PARS_STR_LIT 2
59
#define PARS_NULL_LIT 26
0
#define PARS_ID_TOKEN 26
1
#define PARS_AND_TOKEN 26
2
#define PARS_OR_TOKEN 26
3
#define PARS_NOT_TOKEN 26
4
#define PARS_GE_TOKEN 26
5
#define PARS_LE_TOKEN 26
6
#define PARS_NE_TOKEN 26
7
#define PARS_PROCEDURE_TOKEN 26
8
#define PARS_IN_TOKEN 2
69
#define PARS_OUT_TOKEN 27
0
#define PARS_INT_TOKEN 27
1
#define PARS_INTEGER_TOKEN 27
2
#define PARS_FLOAT_TOKEN 27
3
#define PARS_CHAR_TOKEN 27
4
#define PARS_IS_TOKEN 27
5
#define PARS_BEGIN_TOKEN 27
6
#define PARS_END_TOKEN 27
7
#define PARS_IF_TOKEN 27
8
#define PARS_THEN_TOKEN 2
79
#define PARS_ELSE_TOKEN 28
0
#define PARS_ELSIF_TOKEN 28
1
#define PARS_LOOP_TOKEN 28
2
#define PARS_WHILE_TOKEN 28
3
#define PARS_RETURN_TOKEN 28
4
#define PARS_SELECT_TOKEN 28
5
#define PARS_SUM_TOKEN 28
6
#define PARS_COUNT_TOKEN 28
7
#define PARS_DISTINCT_TOKEN 28
8
#define PARS_FROM_TOKEN 2
89
#define PARS_WHERE_TOKEN 29
0
#define PARS_FOR_TOKEN 29
1
#define PARS_DDOT_TOKEN 29
2
#define PARS_CONSISTENT_TOKEN 29
3
#define PARS_READ_TOKEN 29
4
#define PARS_ORDER_TOKEN 29
5
#define PARS_BY_TOKEN 29
6
#define PARS_ASC_TOKEN 29
7
#define PARS_DESC_TOKEN 29
8
#define PARS_INSERT_TOKEN
299
#define PARS_INTO_TOKEN 30
0
#define PARS_VALUES_TOKEN 30
1
#define PARS_UPDATE_TOKEN 30
2
#define PARS_SET_TOKEN 30
3
#define PARS_DELETE_TOKEN 30
4
#define PARS_CURRENT_TOKEN 30
5
#define PARS_OF_TOKEN 30
6
#define PARS_CREATE_TOKEN 30
7
#define PARS_TABLE_TOKEN 30
8
#define PARS_INDEX_TOKEN 3
09
#define PARS_UNIQUE_TOKEN 31
0
#define PARS_CLUSTERED_TOKEN 31
1
#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 31
2
#define PARS_ON_TOKEN 31
3
#define PARS_ASSIGN_TOKEN 31
4
#define PARS_DECLARE_TOKEN 31
5
#define PARS_CURSOR_TOKEN 31
6
#define PARS_SQL_TOKEN 31
7
#define PARS_OPEN_TOKEN 31
8
#define PARS_FETCH_TOKEN 3
19
#define PARS_CLOSE_TOKEN 32
0
#define PARS_NOTFOUND_TOKEN 32
1
#define PARS_TO_CHAR_TOKEN 32
2
#define PARS_TO_NUMBER_TOKEN 32
3
#define PARS_TO_BINARY_TOKEN 32
4
#define PARS_BINARY_TO_NUMBER_TOKEN 32
5
#define PARS_SUBSTR_TOKEN 32
6
#define PARS_REPLSTR_TOKEN 32
7
#define PARS_CONCAT_TOKEN 32
8
#define PARS_INSTR_TOKEN 3
29
#define PARS_LENGTH_TOKEN 33
0
#define PARS_SYSDATE_TOKEN 33
1
#define PARS_PRINTF_TOKEN 33
2
#define PARS_ASSERT_TOKEN 33
3
#define PARS_RND_TOKEN 33
4
#define PARS_RND_STR_TOKEN 33
5
#define PARS_ROW_PRINTF_TOKEN 33
6
#define PARS_COMMIT_TOKEN 33
7
#define PARS_ROLLBACK_TOKEN 33
8
#define PARS_WORK_TOKEN 3
39
#define NEG 34
0
extern
YYSTYPE
yylval
;
innobase/pars/pars0grm.y
View file @
a9c1508d
...
...
@@ -4,17 +4,21 @@ SQL parser: input file for the GNU Bison parser generator
(c) 1997 Innobase Oy
Created 12/14/1997 Heikki Tuuri
Published under the GPL version 2
Look from pars0lex.l for instructions how to generate the C files for
the InnoDB parser.
*******************************************************/
%{
/* The value of the semantic attribute is a pointer to a query tree node
que_node_t */
#define YYSTYPE que_node_t*
#include "univ.i"
#undef alloca
#define alloca mem_alloc
#include <math.h>
#include "univ.i"
#include "pars0pars.h"
#include "mem0mem.h"
#include "que0types.h"
...
...
innobase/pars/pars0lex.l
View file @
a9c1508d
...
...
@@ -4,6 +4,30 @@ SQL parser lexical analyzer: input file for the GNU Flex lexer generator
(c) 1997 Innobase Oy
Created 12/14/1997 Heikki Tuuri
Published under the GPL version 2
The InnoDB parser is frozen because MySQL takes care of SQL parsing.
Therefore we normally keep the InnoDB parser C files as they are, and do
not automatically generate them from pars0grm.y and pars0lex.l.
How to make the InnoDB parser and lexer C files:
1. First do
bison -d pars0grm.y
That generates pars0grm.tab.c and pars0grm.tab.h.
2. Rename pars0grm.tab.c to pars0grm.c and pars0grm.tab.h to pars0grm.h.
3. Copy pars0grm.h also to /innobase/include
4. Do
flex pars0lex.l
That generates lex.yy.c.
5. Rename lex.yy.c to lexyy.c.
These instructions seem to work at least with bison-1.28 and flex-2.5.4 on
Linux.
*******************************************************/
%{
...
...
@@ -19,11 +43,10 @@ Created 12/14/1997 Heikki Tuuri
#define isatty(A) 0
#define malloc(A) mem_alloc(A)
#define free(A) mem_free(A)
#define realloc(P, A) mem_realloc(P, A)
#define realloc(P, A) mem_realloc(P, A
, __FILE__, __LINE__
)
#define exit(A) ut_a(0)
#define YY_INPUT(buf, result, max_size) pars_get_lex_chars(buf, &result,\
max_size)
#define YY_INPUT(buf, result, max_size) pars_get_lex_chars(buf, &result, max_size)
%}
DIGIT [0-9]
...
...
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