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

Commit9786223

Browse files
author
Michael Meskes
committed
Committing parser changes. Note, however, that the development bison seems ot have a problem on my home machine. So these go in untested for the time being. But at least I have them in the archive.
Michael
1 parent95a5f7d commit9786223

File tree

3 files changed

+207
-119
lines changed

3 files changed

+207
-119
lines changed

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

Lines changed: 11 additions & 1 deletion
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 2002/06/20 20:29:53 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.51 2002/06/30 09:34:13 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},
@@ -98,6 +99,7 @@ static ScanKeyword ScanKeywords[] = {
9899
{"deferred",DEFERRED},
99100
{"definer",DEFINER},
100101
{"delete",DELETE_P},
102+
{"delimiter",DELIMITER},
101103
{"delimiters",DELIMITERS},
102104
{"desc",DESC},
103105
{"distinct",DISTINCT},
@@ -171,6 +173,8 @@ static ScanKeyword ScanKeywords[] = {
171173
{"listen",LISTEN},
172174
{"load",LOAD},
173175
{"local",LOCAL},
176+
{"localtime",LOCALTIME},
177+
{"localtimestamp",LOCALTIMESTAMP},
174178
{"location",LOCATION},
175179
{"lock",LOCK_P},
176180
{"match",MATCH},
@@ -211,11 +215,13 @@ static ScanKeyword ScanKeywords[] = {
211215
{"out",OUT_P},
212216
{"outer",OUTER_P},
213217
{"overlaps",OVERLAPS},
218+
{"overlay",OVERLAY},
214219
{"owner",OWNER},
215220
{"partial",PARTIAL},
216221
{"password",PASSWORD},
217222
{"path",PATH_P},
218223
{"pendant",PENDANT},
224+
{"placing",PLACING},
219225
{"position",POSITION},
220226
{"precision",PRECISION},
221227
{"primary",PRIMARY},
@@ -251,6 +257,8 @@ static ScanKeyword ScanKeywords[] = {
251257
{"setof",SETOF},
252258
{"share",SHARE},
253259
{"show",SHOW},
260+
{"similar",SIMILAR},
261+
{"simple",SIMPLE},
254262
{"smallint",SMALLINT},
255263
{"some",SOME},
256264
{"stable",STABLE},
@@ -292,6 +300,7 @@ static ScanKeyword ScanKeywords[] = {
292300
{"using",USING},
293301
{"vacuum",VACUUM},
294302
{"valid",VALID},
303+
{"validator",VALIDATOR},
295304
{"values",VALUES},
296305
{"varchar",VARCHAR},
297306
{"varying",VARYING},
@@ -304,6 +313,7 @@ static ScanKeyword ScanKeywords[] = {
304313
{"with",WITH},
305314
{"without",WITHOUT},
306315
{"work",WORK},
316+
{"write",WRITE},
307317
{"year",YEAR_P},
308318
{"zone",ZONE},
309319
};

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

Lines changed: 14 additions & 14 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 2002/06/20 20:29:53 momjian Exp $
15+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.95 2002/06/30 09:34:13 meskes Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -89,14 +89,14 @@ static struct _if_value
8989
* We use exclusive states for quoted strings, extended comments,
9090
* and to eliminate parsing troubles for numeric strings.
9191
* Exclusive states:
92-
*<xbit> bit string literal
92+
*<xb> bit string literal
9393
*<xc> extended C-style comments - thomas 1997-07-12
9494
*<xd> delimited identifiers (double-quoted identifiers) - thomas 1997-10-27
9595
*<xh> hexadecimal numeric string - thomas 1997-11-16
9696
*<xq> quoted strings - thomas 1997-07-30
9797
*/
9898

99-
%xxbit
99+
%xxb
100100
%xxc
101101
%xxd
102102
%xxdc
@@ -108,10 +108,10 @@ static struct _if_value
108108

109109
/* Bit string
110110
*/
111-
xbitstart[bB]{quote}
112-
xbitstop{quote}
113-
xbitinside[^']*
114-
xbitcat{quote}{whitespace_with_newline}{quote}
111+
xbstart[bB]{quote}
112+
xbstop{quote}
113+
xbinside[^']*
114+
xbcat{quote}{whitespace_with_newline}{quote}
115115

116116
/* Hexadecimal number
117117
*/
@@ -318,13 +318,13 @@ cppline{space}*#(.*\\{space})*.*
318318

319319
<xc><<EOF>>{mmerror(PARSE_ERROR, ET_ERROR,"Unterminated /* comment"); }
320320

321-
<SQL>{xbitstart}{
321+
<SQL>{xbstart}{
322322
token_start = yytext;
323-
BEGIN(xbit);
323+
BEGIN(xb);
324324
startlit();
325325
addlitchar('b');
326326
}
327-
<xbit>{xbitstop}{
327+
<xb>{xbstop}{
328328
BEGIN(SQL);
329329
if (literalbuf[strspn(literalbuf,"01") +1] !='\0')
330330
mmerror(PARSE_ERROR, ET_ERROR,"invalid bit string input.");
@@ -333,10 +333,10 @@ cppline{space}*#(.*\\{space})*.*
333333
}
334334

335335
<xh>{xhinside}|
336-
<xbit>{xbitinside}{addlit(yytext, yyleng); }
336+
<xb>{xbinside}{addlit(yytext, yyleng); }
337337
<xh>{xhcat}|
338-
<xbit>{xbitcat}{/* ignore */ }
339-
<xbit><<EOF>>{mmerror(PARSE_ERROR, ET_ERROR,"Unterminated bit string"); }
338+
<xb>{xbcat}{/* ignore */ }
339+
<xb><<EOF>>{mmerror(PARSE_ERROR, ET_ERROR,"Unterminated bit string"); }
340340

341341
<SQL>{xhstart}{
342342
token_start = yytext;
@@ -378,7 +378,7 @@ cppline{space}*#(.*\\{space})*.*
378378
<xq>{xqdouble}{addlitchar('\''); }
379379
<xq>{xqinside}{addlit(yytext, yyleng); }
380380
<xq>{xqescape} {addlit(yytext, yyleng); }
381-
<xq>{xqoctesc} {addlit(yytext, yyleng); }
381+
<xq>{xqoctesc} {addlit(yytext, yyleng); }/* addlitchar does not work here since character must remain octal */
382382
<xq>{xqcat}{/* ignore */ }
383383

384384
<xq><<EOF>>{mmerror(PARSE_ERROR, ET_ERROR,"Unterminated quoted string"); }

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp