Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
a58930bb
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a58930bb
编写于
7月 20, 2002
作者:
M
Michael Meskes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Synced parser yet again.
Michael
上级
d4803f55
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
272 addition
and
880 deletion
+272
-880
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/ChangeLog
+6
-0
src/interfaces/ecpg/lib/execute.c
src/interfaces/ecpg/lib/execute.c
+3
-4
src/interfaces/ecpg/preproc/keywords.c
src/interfaces/ecpg/preproc/keywords.c
+10
-1
src/interfaces/ecpg/preproc/pgc.l
src/interfaces/ecpg/preproc/pgc.l
+27
-16
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+226
-859
未找到文件。
src/interfaces/ecpg/ChangeLog
浏览文件 @
a58930bb
...
...
@@ -1270,6 +1270,12 @@ Mon Jun 17 15:23:51 CEST 2002
- Fixed parser bug in pgc.l. Octal numbers in single quotes are now
correctly handled.
Sat Jul 20 10:09:58 CEST 2002
- Synced preproc.y with gram.y.
- Synced pgc.l with scan.l.
- Synced keywords.c.
- Set ecpg version to 2.10.0.
- Set library version to 3.4.0.
src/interfaces/ecpg/lib/execute.c
浏览文件 @
a58930bb
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.3
7 2002/06/12 12:06:53
meskes Exp $ */
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/execute.c,v 1.3
8 2002/07/20 08:24:18
meskes Exp $ */
/*
* The aim is to get a simpler inteface to the database routines.
...
...
@@ -56,7 +56,7 @@ struct sqlca sqlca =
};
/* This function returns a newly malloced string that has the \
in the argument quoted with \ and the ' quote with ' as SQL92 says.
in the argument quoted with \ and the ' quote
d
with ' as SQL92 says.
*/
static
char
*
...
...
@@ -84,13 +84,12 @@ quote_postgres(char *arg, int lineno)
default:
;
}
res
[
ri
]
=
arg
[
i
];
}
res
[
ri
++
]
=
'\''
;
res
[
ri
]
=
'\0'
;
return
res
;
}
...
...
src/interfaces/ecpg/preproc/keywords.c
浏览文件 @
a58930bb
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.5
2 2002/07/01 06:56:10
meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/keywords.c,v 1.5
3 2002/07/20 08:24:18
meskes Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -44,6 +44,8 @@ static ScanKeyword ScanKeywords[] = {
{
"as"
,
AS
},
{
"asc"
,
ASC
},
{
"assertion"
,
ASSERTION
},
{
"assignment"
,
ASSIGNMENT
},
{
"asymmetric"
,
ASYMMETRIC
},
{
"at"
,
AT
},
{
"authorization"
,
AUTHORIZATION
},
{
"backward"
,
BACKWARD
},
...
...
@@ -77,6 +79,7 @@ static ScanKeyword ScanKeywords[] = {
{
"committed"
,
COMMITTED
},
{
"constraint"
,
CONSTRAINT
},
{
"constraints"
,
CONSTRAINTS
},
{
"conversion"
,
CONVERSION_P
},
{
"copy"
,
COPY
},
{
"create"
,
CREATE
},
{
"createdb"
,
CREATEDB
},
...
...
@@ -98,6 +101,7 @@ static ScanKeyword ScanKeywords[] = {
{
"deferred"
,
DEFERRED
},
{
"definer"
,
DEFINER
},
{
"delete"
,
DELETE_P
},
{
"delimiter"
,
DELIMITER
},
{
"delimiters"
,
DELIMITERS
},
{
"desc"
,
DESC
},
{
"distinct"
,
DISTINCT
},
...
...
@@ -251,6 +255,8 @@ static ScanKeyword ScanKeywords[] = {
{
"setof"
,
SETOF
},
{
"share"
,
SHARE
},
{
"show"
,
SHOW
},
{
"similar"
,
SIMILAR
},
{
"simple"
,
SIMPLE
},
{
"smallint"
,
SMALLINT
},
{
"some"
,
SOME
},
{
"stable"
,
STABLE
},
...
...
@@ -262,6 +268,7 @@ static ScanKeyword ScanKeywords[] = {
{
"storage"
,
STORAGE
},
{
"strict"
,
STRICT
},
{
"substring"
,
SUBSTRING
},
{
"symmetric"
,
SYMMETRIC
},
{
"sysid"
,
SYSID
},
{
"table"
,
TABLE
},
{
"temp"
,
TEMP
},
...
...
@@ -274,6 +281,7 @@ static ScanKeyword ScanKeywords[] = {
{
"toast"
,
TOAST
},
{
"trailing"
,
TRAILING
},
{
"transaction"
,
TRANSACTION
},
{
"treat"
,
TREAT
},
{
"trigger"
,
TRIGGER
},
{
"trim"
,
TRIM
},
{
"true"
,
TRUE_P
},
...
...
@@ -304,6 +312,7 @@ static ScanKeyword ScanKeywords[] = {
{
"with"
,
WITH
},
{
"without"
,
WITHOUT
},
{
"work"
,
WORK
},
{
"write"
,
WRITE
},
{
"year"
,
YEAR_P
},
{
"zone"
,
ZONE
},
};
...
...
src/interfaces/ecpg/preproc/pgc.l
浏览文件 @
a58930bb
...
...
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.9
6 2002/07/01 06:56:10
meskes Exp $
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.9
7 2002/07/20 08:24:18
meskes Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -89,14 +89,14 @@ static struct _if_value
* We use exclusive states for quoted strings, extended comments,
* and to eliminate parsing troubles for numeric strings.
* Exclusive states:
* <xb
it
> bit string literal
* <xb> bit string literal
* <xc> extended C-style comments - thomas 1997-07-12
* <xd> delimited identifiers (double-quoted identifiers) - thomas 1997-10-27
* <xh> hexadecimal numeric string - thomas 1997-11-16
* <xq> quoted strings - thomas 1997-07-30
*/
%x xb
it
%x xb
%x xc
%x xd
%x xdc
...
...
@@ -108,10 +108,10 @@ static struct _if_value
/* Bit string
*/
xb
itstart
[bB]{quote}
xb
itstop
{quote}
xbi
ti
nside [^']*
xb
it
cat {quote}{whitespace_with_newline}{quote}
xb
start
[bB]{quote}
xb
stop
{quote}
xbinside [^']*
xbcat {quote}{whitespace_with_newline}{quote}
/* Hexadecimal number
*/
...
...
@@ -120,6 +120,10 @@ xhstop {quote}
xhinside [^']+
xhcat {quote}{whitespace_with_newline}{quote}
/* National character
*/
xnstart [nN]{quote}
/* C version of hex number
*/
xch 0[xX][0-9A-Fa-f]*
...
...
@@ -318,13 +322,13 @@ cppline {space}*#(.*\\{space})*.*
<xc><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated /* comment"); }
<SQL>{xb
it
start} {
<SQL>{xbstart} {
token_start = yytext;
BEGIN(xb
it
);
BEGIN(xb);
startlit();
addlitchar('b');
}
<xb
it>{xbit
stop} {
<xb
>{xb
stop} {
BEGIN(SQL);
if (literalbuf[strspn(literalbuf, "01") + 1] != '\0')
mmerror(PARSE_ERROR, ET_ERROR, "invalid bit string input.");
...
...
@@ -333,10 +337,10 @@ cppline {space}*#(.*\\{space})*.*
}
<xh>{xhinside} |
<xb
it>{xbit
inside} { addlit(yytext, yyleng); }
<xb
>{xb
inside} { addlit(yytext, yyleng); }
<xh>{xhcat} |
<xb
it>{xbit
cat} { /* ignore */ }
<xb
it
><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated bit string"); }
<xb
>{xb
cat} { /* ignore */ }
<xb><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated bit string"); }
<SQL>{xhstart} {
token_start = yytext;
...
...
@@ -362,7 +366,15 @@ cppline {space}*#(.*\\{space})*.*
}
<xh><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated hexadecimal integer"); }
<SQL>{xnstart} {
/* National character.
* Need to remember type info to flow it forward into the parser.
* Not yet implemented. - thomas 2002-06-17
*/
token_start = yytext;
BEGIN(xq);
startlit();
}
<C,SQL>{xqstart} {
token_start = yytext;
state_before = YYSTATE;
...
...
@@ -372,7 +384,6 @@ cppline {space}*#(.*\\{space})*.*
<xq>{xqstop} {
BEGIN(state_before);
yylval.str = mm_strdup(literalbuf);
printf("MM: %s\n", yylval.str);
return SCONST;
}
<xq>{xqdouble} { addlitchar('\''); }
...
...
@@ -580,7 +591,7 @@ cppline {space}*#(.*\\{space})*.*
*/
if (ptr == NULL)
{
yylval.str = mm_strdup(
yytext);
yylval.str = mm_strdup(yytext);
return IDENT;
}
}
...
...
src/interfaces/ecpg/preproc/preproc.y
浏览文件 @
a58930bb
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录