Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcf8da4e

Browse files
author
Michael Meskes
committed
Merged ecpg_big_bison back into HEAD
1 parent79382cb commitcf8da4e

File tree

7 files changed

+549
-279
lines changed

7 files changed

+549
-279
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1271,11 +1271,39 @@ Mon Jun 17 15:23:51 CEST 2002
12711271
- Fixed parser bug in pgc.l. Octal numbers in single quotes are now
12721272
correctly handled.
12731273

1274-
Sat Jul 20 10:09:58 CEST 2002
1274+
Tue Jun 18 15:13:15 CEST 2002
1275+
1276+
- Fixed parser bug concerning foreign keys.
1277+
- Synced preproc.y with gram.y.
1278+
- Synced pgc.l with scan.l.
1279+
- Synced keywords.c.
12751280

1281+
Sun Aug 18 16:09:06 CEST 2002
1282+
12761283
- Synced preproc.y with gram.y.
12771284
- Synced pgc.l with scan.l.
1285+
- Synced keywords.c.
1286+
1287+
Tue Aug 20 14:13:34 CEST 2002
1288+
1289+
- Removed ',' from preproc.y for bison 1.49b.
1290+
1291+
Sun Sep 1 11:13:04 CEST 2002
1292+
1293+
- Synced preproc.y with gram.y.
1294+
- Synced keywords.c.
1295+
1296+
Wed Sep 11 10:43:17 CEST 2002
1297+
1298+
- Synced preproc.y with gram.y.
1299+
1300+
1301+
Fri Sep 20 07:57:42 CEST 2002
1302+
1303+
- Synced preproc.y with gram.y.
12781304
- Synced keywords.c.
1305+
- Deactivated backend functions PREPARE, EXECUTE and DEALLOCATE for
1306+
the time being.
12791307
- Set ecpg version to 2.10.0.
12801308
- Set library version to 3.4.0.
12811309

‎src/interfaces/ecpg/lib/execute.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.39 2002/09/04 20:31:46 momjian Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.40 2002/10/21 13:09:31 meskes Exp $ */
22

33
/*
44
* The aim is to get a simpler inteface to the database routines.
@@ -89,7 +89,7 @@ quote_postgres(char *arg, int lineno)
8989

9090
res[ri++]='\'';
9191
res[ri]='\0';
92-
92+
9393
returnres;
9494
}
9595

‎src/interfaces/ecpg/preproc/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.85 2002/07/27 20:10:05 petere Exp $
1+
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.86 2002/10/21 13:09:31 meskes Exp $
22

33
subdir = src/interfaces/ecpg/preproc
44
top_builddir = ../../../..
@@ -18,7 +18,8 @@ override CFLAGS += -Wno-error
1818
endif
1919

2020
OBJS=preproc.o pgc.o type.o ecpg.o ecpg_keywords.o output.o\
21-
keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o
21+
keywords.o c_keywords.o ../lib/typename.o descriptor.o variable.o\
22+
$(SNPRINTF)$(STRDUP)
2223

2324
all: submake-libpgport ecpg
2425

‎src/interfaces/ecpg/preproc/ecpg_keywords.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* lexical token lookup for reserved words in postgres embedded SQL
55
*
66
* IDENTIFICATION
7-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg_keywords.c,v 1.26 2002/05/19 20:00:53 meskes Exp $
7+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/ecpg_keywords.c,v 1.27 2002/10/21 13:09:31 meskes Exp $
88
*
99
*-------------------------------------------------------------------------
1010
*/
@@ -38,13 +38,11 @@ static ScanKeyword ScanKeywords[] = {
3838
{"data",SQL_DATA},
3939
{"datetime_interval_code",SQL_DATETIME_INTERVAL_CODE},
4040
{"datetime_interval_precision",SQL_DATETIME_INTERVAL_PRECISION},
41-
{"deallocate",SQL_DEALLOCATE},
4241
{"descriptor",SQL_DESCRIPTOR},
4342
{"disconnect",SQL_DISCONNECT},
4443
{"enum",SQL_ENUM},
4544
{"found",SQL_FOUND},
4645
{"free",SQL_FREE},
47-
{"get",SQL_GET},
4846
{"go",SQL_GO},
4947
{"goto",SQL_GOTO},
5048
{"identified",SQL_IDENTIFIED},
@@ -56,7 +54,6 @@ static ScanKeyword ScanKeywords[] = {
5654
{"nullable",SQL_NULLABLE},
5755
{"octet_length",SQL_OCTET_LENGTH},
5856
{"open",SQL_OPEN},
59-
{"prepare",SQL_PREPARE},
6057
{"reference",SQL_REFERENCE},
6158
{"release",SQL_RELEASE},
6259
{"returned_length",SQL_RETURNED_LENGTH},

‎src/interfaces/ecpg/preproc/keywords.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.54 2002/07/2111:09:41 meskes Exp $
11+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.55 2002/10/2113:09:31 meskes Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -44,6 +44,7 @@ static ScanKeyword ScanKeywords[] = {
4444
{"as",AS},
4545
{"asc",ASC},
4646
{"assertion",ASSERTION},
47+
{"assignment",ASSIGNMENT},
4748
{"at",AT},
4849
{"authorization",AUTHORIZATION},
4950
{"backward",BACKWARD},
@@ -67,6 +68,7 @@ static ScanKeyword ScanKeywords[] = {
6768
{"characteristics",CHARACTERISTICS},
6869
{"check",CHECK},
6970
{"checkpoint",CHECKPOINT},
71+
{"class",CLASS},
7072
{"close",CLOSE},
7173
{"cluster",CLUSTER},
7274
{"coalesce",COALESCE},
@@ -77,6 +79,8 @@ static ScanKeyword ScanKeywords[] = {
7779
{"committed",COMMITTED},
7880
{"constraint",CONSTRAINT},
7981
{"constraints",CONSTRAINTS},
82+
{"conversion",CONVERSION_P},
83+
{"convert",CONVERT},
8084
{"copy",COPY},
8185
{"create",CREATE},
8286
{"createdb",CREATEDB},
@@ -90,6 +94,7 @@ static ScanKeyword ScanKeywords[] = {
9094
{"cycle",CYCLE},
9195
{"database",DATABASE},
9296
{"day",DAY_P},
97+
{"deallocate",DEALLOCATE},
9398
{"dec",DEC},
9499
{"decimal",DECIMAL},
95100
{"declare",DECLARE},
@@ -98,6 +103,7 @@ static ScanKeyword ScanKeywords[] = {
98103
{"deferred",DEFERRED},
99104
{"definer",DEFINER},
100105
{"delete",DELETE_P},
106+
{"delimiter",DELIMITER},
101107
{"delimiters",DELIMITERS},
102108
{"desc",DESC},
103109
{"distinct",DISTINCT},
@@ -129,6 +135,7 @@ static ScanKeyword ScanKeywords[] = {
129135
{"from",FROM},
130136
{"full",FULL},
131137
{"function",FUNCTION},
138+
{"get",GET},
132139
{"global",GLOBAL},
133140
{"grant",GRANT},
134141
{"group",GROUP_P},
@@ -138,7 +145,7 @@ static ScanKeyword ScanKeywords[] = {
138145
{"ilike",ILIKE},
139146
{"immediate",IMMEDIATE},
140147
{"immutable",IMMUTABLE},
141-
{"implicit",IMPLICIT},
148+
{"implicit",IMPLICIT_P},
142149
{"in",IN_P},
143150
{"increment",INCREMENT},
144151
{"index",INDEX},
@@ -218,13 +225,15 @@ static ScanKeyword ScanKeywords[] = {
218225
{"pendant",PENDANT},
219226
{"position",POSITION},
220227
{"precision",PRECISION},
228+
{"prepare",PREPARE},
221229
{"primary",PRIMARY},
222230
{"prior",PRIOR},
223231
{"privileges",PRIVILEGES},
224232
{"procedural",PROCEDURAL},
225233
{"procedure",PROCEDURE},
226234
{"read",READ},
227235
{"real",REAL},
236+
{"recheck",RECHECK},
228237
{"references",REFERENCES},
229238
{"reindex",REINDEX},
230239
{"relative",RELATIVE},
@@ -251,6 +260,8 @@ static ScanKeyword ScanKeywords[] = {
251260
{"setof",SETOF},
252261
{"share",SHARE},
253262
{"show",SHOW},
263+
{"similar",SIMILAR},
264+
{"simple",SIMPLE},
254265
{"smallint",SMALLINT},
255266
{"some",SOME},
256267
{"stable",STABLE},
@@ -274,6 +285,7 @@ static ScanKeyword ScanKeywords[] = {
274285
{"toast",TOAST},
275286
{"trailing",TRAILING},
276287
{"transaction",TRANSACTION},
288+
{"treat",TREAT},
277289
{"trigger",TRIGGER},
278290
{"trim",TRIM},
279291
{"true",TRUE_P},
@@ -304,6 +316,7 @@ static ScanKeyword ScanKeywords[] = {
304316
{"with",WITH},
305317
{"without",WITHOUT},
306318
{"work",WORK},
319+
{"write",WRITE},
307320
{"year",YEAR_P},
308321
{"zone",ZONE},
309322
};

‎src/interfaces/ecpg/preproc/pgc.l

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.99 2002/09/02 06:11:42 momjian Exp $
15+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.100 2002/10/21 13:09:31 meskes Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -117,7 +117,7 @@ xbcat{quote}{whitespace_with_newline}{quote}
117117
*/
118118
xhstart[xX]{quote}
119119
xhstop{quote}
120-
xhinside[^']+
120+
xhinside[^']*
121121
xhcat{quote}{whitespace_with_newline}{quote}
122122

123123
/* National character
@@ -333,7 +333,7 @@ cppline{space}*#(.*\\{space})*.*
333333
if (literalbuf[strspn(literalbuf,"01") +1] !='\0')
334334
mmerror(PARSE_ERROR, ET_ERROR,"invalid bit string input.");
335335
yylval.str = literalbuf;
336-
returnBITCONST;
336+
returnBCONST;
337337
}
338338

339339
<xh>{xhinside}|
@@ -346,23 +346,11 @@ cppline{space}*#(.*\\{space})*.*
346346
token_start = yytext;
347347
BEGIN(xh);
348348
startlit();
349+
addlitchar('x');
349350
}
350351
<xh>{xhstop}{
351-
long val;
352-
char* endptr;
353-
354-
BEGIN(SQL);
355-
errno =0;
356-
val =strtol(literalbuf, &endptr,16);
357-
if (*endptr !='\0' || errno == ERANGE
358-
#ifdef HAVE_LONG_INT_64
359-
/* if long > 32 bits, check for overflow of int4 */
360-
|| val != (long) ((int32) val)
361-
#endif
362-
)
363-
mmerror(PARSE_ERROR, ET_ERROR,"Bad hexadecimal integer input");
364-
yylval.ival = val;
365-
return ICONST;
352+
yylval.str = literalbuf;
353+
return XCONST;
366354
}
367355

368356
<xh><<EOF>>{mmerror(PARSE_ERROR, ET_ERROR,"Unterminated hexadecimal integer"); }

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp