Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
3d564953
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,发现更多精彩内容 >>
提交
3d564953
编写于
6月 18, 2002
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve rule action ordering in gram.y, more cleanups.
上级
e25f9e4f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
50 addition
and
75 deletion
+50
-75
src/backend/parser/gram.y
src/backend/parser/gram.y
+50
-75
未找到文件。
src/backend/parser/gram.y
浏览文件 @
3d564953
%{
%{
/*#define YYDEBUG 1*/
/*#define YYDEBUG 1*/
/*-------------------------------------------------------------------------
/*-------------------------------------------------------------------------
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.32
7 2002/06/17 20:38:04
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.32
8 2002/06/18 00:28:11
momjian Exp $
*
*
* HISTORY
* HISTORY
* AUTHOR DATE MAJOR EVENT
* AUTHOR DATE MAJOR EVENT
...
@@ -659,14 +659,8 @@ OptUserElem:
...
@@ -659,14 +659,8 @@ OptUserElem:
}
}
;
;
user_list: user_list ',' UserId
user_list: user_list ',' UserId { $$ = lappend($1, makeString($3)); }
{
| UserId { $$ = makeList1(makeString($1)); }
$$ = lappend($1, makeString($3));
}
| UserId
{
$$ = makeList1(makeString($1));
}
;
;
...
@@ -913,8 +907,7 @@ var_list_or_default:
...
@@ -913,8 +907,7 @@ var_list_or_default:
| DEFAULT { $$ = NIL; }
| DEFAULT { $$ = NIL; }
;
;
var_list:
var_list: var_value { $$ = makeList1($1); }
var_value { $$ = makeList1($1); }
| var_list ',' var_value { $$ = lappend($1, $3); }
| var_list ',' var_value { $$ = lappend($1, $3); }
;
;
...
@@ -1654,8 +1647,9 @@ opt_column_list:
...
@@ -1654,8 +1647,9 @@ opt_column_list:
| /*EMPTY*/ { $$ = NIL; }
| /*EMPTY*/ { $$ = NIL; }
;
;
columnList: columnList ',' columnElem { $$ = lappend($1, $3); }
columnList:
| columnElem { $$ = makeList1($1); }
columnElem { $$ = makeList1($1); }
| columnList ',' columnElem { $$ = lappend($1, $3); }
;
;
columnElem: ColId
columnElem: ColId
...
@@ -1742,8 +1736,8 @@ OptCreateAs:
...
@@ -1742,8 +1736,8 @@ OptCreateAs:
;
;
CreateAsList:
CreateAsList:
CreateAs
List ',' CreateAsElement { $$ = lappend($1, $3
); }
CreateAs
Element { $$ = makeList1($1
); }
| CreateAs
Element { $$ = makeList1($1
); }
| CreateAs
List ',' CreateAsElement { $$ = lappend($1, $3
); }
;
;
CreateAsElement:
CreateAsElement:
...
@@ -2015,8 +2009,7 @@ TriggerForType:
...
@@ -2015,8 +2009,7 @@ TriggerForType:
TriggerFuncArgs:
TriggerFuncArgs:
TriggerFuncArg { $$ = makeList1($1); }
TriggerFuncArg { $$ = makeList1($1); }
| TriggerFuncArgs ',' TriggerFuncArg
| TriggerFuncArgs ',' TriggerFuncArg { $$ = lappend($1, $3); }
{ $$ = lappend($1, $3); }
| /*EMPTY*/ { $$ = NIL; }
| /*EMPTY*/ { $$ = NIL; }
;
;
...
@@ -2169,7 +2162,7 @@ DefineStmt:
...
@@ -2169,7 +2162,7 @@ DefineStmt:
definition: '(' def_list ')' { $$ = $2; }
definition: '(' def_list ')' { $$ = $2; }
;
;
def_list:
def_elem
{ $$ = makeList1($1); }
def_list:
def_elem
{ $$ = makeList1($1); }
| def_list ',' def_elem { $$ = lappend($1, $3); }
| def_list ',' def_elem { $$ = lappend($1, $3); }
;
;
...
@@ -2659,10 +2652,9 @@ opt_revoke_grant_option:
...
@@ -2659,10 +2652,9 @@ opt_revoke_grant_option:
function_with_argtypes_list:
function_with_argtypes_list:
function_with_argtypes
function_with_argtypes { $$ = makeList1($1); }
{ $$ = makeList1($1); }
| function_with_argtypes_list ',' function_with_argtypes
| function_with_argtypes_list ',' function_with_argtypes
{ $$ = lappend($1, $3); }
{ $$ = lappend($1, $3); }
;
;
function_with_argtypes:
function_with_argtypes:
...
@@ -2700,23 +2692,23 @@ IndexStmt: CREATE index_opt_unique INDEX index_name ON qualified_name
...
@@ -2700,23 +2692,23 @@ IndexStmt: CREATE index_opt_unique INDEX index_name ON qualified_name
;
;
index_opt_unique:
index_opt_unique:
UNIQUE
{ $$ = TRUE; }
UNIQUE { $$ = TRUE; }
| /*EMPTY*/
{ $$ = FALSE; }
| /*EMPTY*/ { $$ = FALSE; }
;
;
access_method_clause:
access_method_clause:
USING access_method
{ $$ = $2; }
USING access_method { $$ = $2; }
/* If btree changes as our default, update pg_get_indexdef() */
/* If btree changes as our default, update pg_get_indexdef() */
| /*EMPTY*/
{ $$ = DEFAULT_INDEX_TYPE; }
| /*EMPTY*/ { $$ = DEFAULT_INDEX_TYPE; }
;
;
index_params:
index_params:
index_list
{ $$ = $1; }
index_list { $$ = $1; }
| func_index
{ $$ = makeList1($1); }
| func_index { $$ = makeList1($1); }
;
;
index_list:
index_list ',' index_elem { $$ = lappend($1, $3
); }
index_list:
index_elem { $$ = makeList1($1
); }
| index_
elem { $$ = makeList1($1
); }
| index_
list ',' index_elem { $$ = lappend($1, $3
); }
;
;
func_index: func_name '(' name_list ')' opt_class
func_index: func_name '(' name_list ')' opt_class
...
@@ -2770,8 +2762,8 @@ opt_class: any_name
...
@@ -2770,8 +2762,8 @@ opt_class: any_name
else
else
$$ = $1;
$$ = $1;
}
}
| USING any_name
{ $$ = $2; }
| USING any_name { $$ = $2; }
| /*EMPTY*/
{ $$ = NIL; }
| /*EMPTY*/ { $$ = NIL; }
;
;
/*****************************************************************************
/*****************************************************************************
...
@@ -2882,9 +2874,10 @@ func_type: Typename { $$ = $1; }
...
@@ -2882,9 +2874,10 @@ func_type: Typename { $$ = $1; }
createfunc_opt_list:
createfunc_opt_list:
createfunc_opt_item { $$ = makeList1($1); }
/* Must be at least one to prevent conflict */
| createfunc_opt_list createfunc_opt_item { $$ = lappend($1, $2); }
createfunc_opt_item { $$ = makeList1($1); }
;
| createfunc_opt_list createfunc_opt_item { $$ = lappend($1, $2); }
;
createfunc_opt_item:
createfunc_opt_item:
AS func_as
AS func_as
...
@@ -3389,21 +3382,11 @@ CreatedbStmt:
...
@@ -3389,21 +3382,11 @@ CreatedbStmt:
}
}
$$ = (Node *)n;
$$ = (Node *)n;
}
}
| CREATE DATABASE database_name
{
CreatedbStmt *n = makeNode(CreatedbStmt);
n->dbname = $3;
n->dbowner = NULL;
n->dbpath = NULL;
n->dbtemplate = NULL;
n->encoding = -1;
$$ = (Node *)n;
}
;
;
createdb_opt_list:
createdb_opt_list:
createdb_opt_
item { $$ = makeList1($1
); }
createdb_opt_
list createdb_opt_item { $$ = lappend($1, $2
); }
|
createdb_opt_list createdb_opt_item { $$ = lappend($1, $2)
; }
|
/* EMPTY */ { $$ = NIL
; }
;
;
/*
/*
...
@@ -3756,8 +3739,8 @@ insert_rest:
...
@@ -3756,8 +3739,8 @@ insert_rest:
;
;
insert_column_list:
insert_column_list:
insert_column_
list ',' insert_column_item { $$ = lappend($1, $3
); }
insert_column_
item { $$ = makeList1($1
); }
| insert_column_
item { $$ = makeList1($1
); }
| insert_column_
list ',' insert_column_item { $$ = lappend($1, $3
); }
;
;
insert_column_item:
insert_column_item:
...
@@ -4226,8 +4209,9 @@ from_clause:
...
@@ -4226,8 +4209,9 @@ from_clause:
| /*EMPTY*/ { $$ = NIL; }
| /*EMPTY*/ { $$ = NIL; }
;
;
from_list: from_list ',' table_ref { $$ = lappend($1, $3); }
from_list:
| table_ref { $$ = makeList1($1); }
table_ref { $$ = makeList1($1); }
| from_list ',' table_ref { $$ = lappend($1, $3); }
;
;
/*
/*
...
@@ -4993,20 +4977,11 @@ row_expr: '(' row_descriptor ')' IN_P select_with_parens
...
@@ -4993,20 +4977,11 @@ row_expr: '(' row_descriptor ')' IN_P select_with_parens
;
;
row_descriptor:
row_descriptor:
row_list ',' a_expr
row_list ',' a_expr { $$ = lappend($1, $3); }
{
$$ = lappend($1, $3);
}
;
;
row_list: row_list ',' a_expr
row_list: a_expr { $$ = makeList1($1); }
{
| row_list ',' a_expr { $$ = lappend($1, $3); }
$$ = lappend($1, $3);
}
| a_expr
{
$$ = makeList1($1);
}
;
;
sub_type: ANY { $$ = ANY_SUBLINK; }
sub_type: ANY { $$ = ANY_SUBLINK; }
...
@@ -5030,12 +5005,12 @@ MathOp: '+' { $$ = "+"; }
...
@@ -5030,12 +5005,12 @@ MathOp: '+' { $$ = "+"; }
;
;
qual_Op: Op { $$ = makeList1(makeString($1)); }
qual_Op: Op { $$ = makeList1(makeString($1)); }
|
OPERATOR '(' any_operator ')'
{ $$ = $3; }
|
OPERATOR '(' any_operator ')'
{ $$ = $3; }
;
;
qual_all_Op:
qual_all_Op:
all_Op { $$ = makeList1(makeString($1)); }
all_Op { $$ = makeList1(makeString($1)); }
|
OPERATOR '(' any_operator ')'
{ $$ = $3; }
|
OPERATOR '(' any_operator ')'
{ $$ = $3; }
;
;
/*
/*
...
@@ -5445,8 +5420,7 @@ c_expr: columnref { $$ = (Node *) $1; }
...
@@ -5445,8 +5420,7 @@ c_expr: columnref { $$ = (Node *) $1; }
n->indirection = $3;
n->indirection = $3;
$$ = (Node *)n;
$$ = (Node *)n;
}
}
| '(' a_expr ')'
| '(' a_expr ')' { $$ = $2; }
{ $$ = $2; }
| '(' a_expr ')' attrs opt_indirection
| '(' a_expr ')' attrs opt_indirection
{
{
ExprFieldSelect *n = makeNode(ExprFieldSelect);
ExprFieldSelect *n = makeNode(ExprFieldSelect);
...
@@ -6056,8 +6030,9 @@ case_expr: CASE case_arg when_clause_list case_default END_TRANS
...
@@ -6056,8 +6030,9 @@ case_expr: CASE case_arg when_clause_list case_default END_TRANS
;
;
when_clause_list:
when_clause_list:
when_clause_list when_clause { $$ = lappend($1, $2); }
/* There must be at least one */
| when_clause { $$ = makeList1($1); }
when_clause { $$ = makeList1($1); }
| when_clause_list when_clause { $$ = lappend($1, $2); }
;
;
when_clause:
when_clause:
...
@@ -6117,8 +6092,8 @@ attrs: '.' attr_name { $$ = makeList1(makeString($2)); }
...
@@ -6117,8 +6092,8 @@ attrs: '.' attr_name { $$ = makeList1(makeString($2)); }
/* Target lists as found in SELECT ... and INSERT VALUES ( ... ) */
/* Target lists as found in SELECT ... and INSERT VALUES ( ... ) */
target_list:
target_list:
target_
list ',' target_el { $$ = lappend($1, $3
); }
target_
el { $$ = makeList1($1
); }
| target_
el { $$ = makeList1($1
); }
| target_
list ',' target_el { $$ = lappend($1, $3
); }
;
;
/* AS is not optional because shift/red conflict with unary ops */
/* AS is not optional because shift/red conflict with unary ops */
...
@@ -6155,8 +6130,8 @@ target_el: a_expr AS ColLabel
...
@@ -6155,8 +6130,8 @@ target_el: a_expr AS ColLabel
}
}
*/
*/
update_target_list:
update_target_list:
update_target_
list ',' update_target_el { $$ = lappend($1,$3
); }
update_target_
el { $$ = makeList1($1
); }
| update_target_
el { $$ = makeList1($1
); }
| update_target_
list ',' update_target_el { $$ = lappend($1,$3
); }
;
;
update_target_el:
update_target_el:
...
@@ -6170,8 +6145,8 @@ update_target_el:
...
@@ -6170,8 +6145,8 @@ update_target_el:
;
;
insert_target_list:
insert_target_list:
insert_target_
list ',' insert_target_el { $$ = lappend($1, $3
); }
insert_target_
el { $$ = makeList1($1
); }
| insert_target_
el { $$ = makeList1($1
); }
| insert_target_
list ',' insert_target_el { $$ = lappend($1, $3
); }
;
;
insert_target_el:
insert_target_el:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录