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

Commit7f32f0f

Browse files
author
Michael Meskes
committed
Synced parser with backend.
1 parentfa5c512 commit7f32f0f

File tree

5 files changed

+252
-175
lines changed

5 files changed

+252
-175
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,6 +1277,12 @@ Tue Jun 18 15:13:15 CEST 2002
12771277
- Synced preproc.y with gram.y.
12781278
- Synced pgc.l with scan.l.
12791279
- Synced keywords.c.
1280+
1281+
Sun Aug 18 16:09:06 CEST 2002
1282+
1283+
- Synced preproc.y with gram.y.
1284+
- Synced pgc.l with scan.l.
1285+
- Synced keywords.c.
12801286
- Set ecpg version to 2.10.0.
12811287
- Set library version to 3.4.0.
12821288

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

Lines changed: 1 addition & 2 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.26.2.1 2002/08/18 14:32:21 meskes Exp $
88
*
99
*-------------------------------------------------------------------------
1010
*/
@@ -44,7 +44,6 @@ static ScanKeyword ScanKeywords[] = {
4444
{"enum",SQL_ENUM},
4545
{"found",SQL_FOUND},
4646
{"free",SQL_FREE},
47-
{"get",SQL_GET},
4847
{"go",SQL_GO},
4948
{"goto",SQL_GOTO},
5049
{"identified",SQL_IDENTIFIED},

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

Lines changed: 5 additions & 4 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.50.2.2 2002/07/21 08:26:52 meskes Exp $
11+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.50.2.3 2002/08/18 14:32:21 meskes Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -45,7 +45,6 @@ static ScanKeyword ScanKeywords[] = {
4545
{"asc",ASC},
4646
{"assertion",ASSERTION},
4747
{"assignment",ASSIGNMENT},
48-
{"asymmetric",ASYMMETRIC},
4948
{"at",AT},
5049
{"authorization",AUTHORIZATION},
5150
{"backward",BACKWARD},
@@ -69,6 +68,7 @@ static ScanKeyword ScanKeywords[] = {
6968
{"characteristics",CHARACTERISTICS},
7069
{"check",CHECK},
7170
{"checkpoint",CHECKPOINT},
71+
{"class",CLASS},
7272
{"close",CLOSE},
7373
{"cluster",CLUSTER},
7474
{"coalesce",COALESCE},
@@ -80,6 +80,7 @@ static ScanKeyword ScanKeywords[] = {
8080
{"constraint",CONSTRAINT},
8181
{"constraints",CONSTRAINTS},
8282
{"conversion",CONVERSION_P},
83+
{"convert",CONVERT},
8384
{"copy",COPY},
8485
{"create",CREATE},
8586
{"createdb",CREATEDB},
@@ -133,6 +134,7 @@ static ScanKeyword ScanKeywords[] = {
133134
{"from",FROM},
134135
{"full",FULL},
135136
{"function",FUNCTION},
137+
{"get",GET},
136138
{"global",GLOBAL},
137139
{"grant",GRANT},
138140
{"group",GROUP_P},
@@ -142,7 +144,6 @@ static ScanKeyword ScanKeywords[] = {
142144
{"ilike",ILIKE},
143145
{"immediate",IMMEDIATE},
144146
{"immutable",IMMUTABLE},
145-
{"implicit",IMPLICIT},
146147
{"in",IN_P},
147148
{"increment",INCREMENT},
148149
{"index",INDEX},
@@ -229,6 +230,7 @@ static ScanKeyword ScanKeywords[] = {
229230
{"procedure",PROCEDURE},
230231
{"read",READ},
231232
{"real",REAL},
233+
{"recheck",RECHECK},
232234
{"references",REFERENCES},
233235
{"reindex",REINDEX},
234236
{"relative",RELATIVE},
@@ -268,7 +270,6 @@ static ScanKeyword ScanKeywords[] = {
268270
{"storage",STORAGE},
269271
{"strict",STRICT},
270272
{"substring",SUBSTRING},
271-
{"symmetric",SYMMETRIC},
272273
{"sysid",SYSID},
273274
{"table",TABLE},
274275
{"temp",TEMP},

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

Lines changed: 8 additions & 23 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.94.2.3 2002/07/21 08:26:52 meskes Exp $
15+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.94.2.4 2002/08/18 14:32:21 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,31 +346,16 @@ 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

368-
<xh><<EOF>>{mmerror(PARSE_ERROR, ET_ERROR,"Unterminated hexadecimalinteger"); }
356+
<xh><<EOF>>{mmerror(PARSE_ERROR, ET_ERROR,"Unterminated hexadecimalstring literal"); }
369357
<SQL>{xnstart} {
370-
/* National character.
371-
* Need to remember type info to flow it forward into the parser.
372-
* Not yet implemented. - thomas 2002-06-17
373-
*/
358+
/* National character. */
374359
token_start = yytext;
375360
BEGIN(xq);
376361
startlit();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp