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

Commit7f660ad

Browse files
author
Michael Meskes
committed
- Fixed some parser bugs.
- Removed some simple rules to work arounf bison limit for now. - Update c_keywords.c to reflect changes in keywords.c.
1 parent0d7c58a commit7f660ad

File tree

5 files changed

+81
-101
lines changed

5 files changed

+81
-101
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,6 +1254,12 @@ Sun May 19 19:21:34 CEST 2002
12541254
- Synced preproc.y with gram.y.
12551255
- Synced pgc.l with scan.l.
12561256
- Synced keywords.c.
1257+
1258+
Mon May 20 10:58:36 CEST 2002
1259+
1260+
- Fixed some parser bugs.
1261+
- Removed some simple rules to work arounf bison limit for now.
1262+
- Update c_keywords.c to reflect changes in keywords.c.
12571263
- Set ecpg version to 2.10.0.
12581264
- Set library version to 3.4.0.
12591265

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static ScanKeyword ScanKeywords[] = {
2929
{"enum",SQL_ENUM},
3030
{"extern",S_EXTERN},
3131
{"float",FLOAT},
32-
{"int",SQL_INT},
32+
{"int",INT},
3333
{"long",SQL_LONG},
3434
{"register",S_REGISTER},
3535
{"short",SQL_SHORT},

‎src/interfaces/ecpg/preproc/extern.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ extern char *descriptor_index;
1818
externchar*descriptor_name;
1919
externchar*connection;
2020
externchar*input_filename;
21-
externchar*yytext,
21+
externchar*yytext,*token_start,
2222
errortext[128];
2323

2424
#ifdefYYDEBUG

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

Lines changed: 8 additions & 22 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.91 2002/05/19 20:00:53 meskes Exp $
15+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.92 2002/05/20 09:29:41 meskes Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -50,9 +50,8 @@ static intliteralalloc;/* current allocated buffer size */
5050
#definestartlit()(literalbuf[0] ='\0', literallen =0)
5151
staticvoidaddlit(char *ytext,int yleng);
5252
staticvoidaddlitchar (unsignedchar);
53-
staticunsignedcharunescape_single_char(unsignedchar);
5453

55-
staticchar *token_start;
54+
char *token_start;
5655
int state_before;
5756

5857
struct_yy_buffer
@@ -307,7 +306,7 @@ cppline{space}*#(.*\\{space})*.*
307306
ECHO;
308307
if (xcdepth <=0)
309308
{
310-
BEGIN(INITIAL);
309+
BEGIN(state_before);
311310
token_start =NULL;
312311
}
313312
else
@@ -377,7 +376,7 @@ cppline{space}*#(.*\\{space})*.*
377376
}
378377
<xq>{xqdouble}{addlitchar('\''); }
379378
<xq>{xqinside}{addlit(yytext, yyleng); }
380-
<xq>{xqescape} {addlitchar(unescape_single_char(yytext[1])); }
379+
<xq>{xqescape} {addlit(yytext, yyleng); }
381380
<xq>{xqoctesc}{unsignedchar c =strtoul(yytext+1,NULL,8);
382381
addlitchar(c); }
383382
<xq>{xqcat}{/* ignore */ }
@@ -936,22 +935,9 @@ addlitchar(unsigned char ychar)
936935
literalbuf[literallen] ='\0';
937936
}
938937

939-
unsignedchar
940-
unescape_single_char(unsignedchar c)
938+
int
939+
yywrap(void)
941940
{
942-
switch (c)
943-
{
944-
case'b':
945-
return'\b';
946-
case'f':
947-
return'\f';
948-
case'n':
949-
return'\n';
950-
case'r':
951-
return'\r';
952-
case't':
953-
return'\t';
954-
default:
955-
return c;
956-
}
941+
return(1);
957942
}
943+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp