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

Commitb111331

Browse files
author
Michael Meskes
committed
Synced preproc.y with gram.y.
1 parentf9453f4 commitb111331

File tree

2 files changed

+23
-36
lines changed

2 files changed

+23
-36
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,5 +985,9 @@ Sun Oct 22 15:35:53 CEST 2000
985985
Wed Oct 25 08:53:07 CEST 2000
986986

987987
- Added some more C constructs to the parser.
988+
989+
Wed Oct 25 21:22:17 CEST 2000
990+
991+
- Synced gram.y and preproc.y.
988992
- Set ecpg version to 2.8.0.
989993
- Set library version to 3.2.0.

‎src/interfaces/ecpg/preproc/preproc.y

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ make_name(void)
286286
%type<str>CreateAsElementOptCreateAsCreateAsListCreateAsStmt
287287
%type<str>OptUnderkey_referencecomment_textConstraintDeferrabilitySpec
288288
%type<str>key_matchColLabelSpecialRuleRelationColIdcolumnDef
289-
%type<str>ColConstraintColConstraintElem
289+
%type<str>ColConstraintColConstraintElemdrop_type
290290
%type<str>OptTableElementListOptTableElementTableConstraint
291291
%type<str>ConstraintElemkey_actionsColQualListTokenIdDropSchemaStmt
292292
%type<str>target_listtarget_elupdate_target_listalias_clause
@@ -321,7 +321,7 @@ make_name(void)
321321
%type<str>RuleActionStmtOrEmptyRuleActionMultifunc_asreindex_type
322322
%type<str>RuleStmtopt_columnopt_nameoper_argtypessysid_clause
323323
%type<str>MathOpRemoveFuncStmtaggr_argtypefor_update_clause
324-
%type<str>RemoveAggrStmtremove_typeRemoveStmtExtendStmt
324+
%type<str>RemoveAggrStmtExtendStmt
325325
%type<str>RemoveOperStmtRenameStmtall_Opuser_valid_clause
326326
%type<str>VariableSetStmtvar_valuezone_valueVariableShowStmt
327327
%type<str>VariableResetStmtAlterTableStmtDropUserStmtfrom_list
@@ -434,7 +434,6 @@ stmt: AlterSchemaStmt { output_statement($1, 0, NULL, connection); }
434434
|RemoveAggrStmt{ output_statement($1,0,NULL, connection); }
435435
|RemoveOperStmt{ output_statement($1,0,NULL, connection); }
436436
|RemoveFuncStmt{ output_statement($1,0,NULL, connection); }
437-
|RemoveStmt{ output_statement($1,0,NULL, connection); }
438437
|RenameStmt{ output_statement($1,0,NULL, connection); }
439438
|RevokeStmt{ output_statement($1,0,NULL, connection); }
440439
|OptimizableStmt{
@@ -1553,20 +1552,25 @@ def_arg: func_return{ $$ = $1; }
15531552
/*****************************************************************************
15541553
*
15551554
*QUERY:
1556-
*drop <relname1> [, <relname2> .. <relnameN> ]
1555+
*
1556+
* DROP itemtype itemname [, itemname ...]
15571557
*
15581558
*****************************************************************************/
15591559

1560-
DropStmt:DROPTABLErelation_name_list
1561-
{
1562-
$$ = cat2_str(make_str("drop table"),$3);
1563-
}
1564-
|DROPSEQUENCErelation_name_list
1560+
DropStmt:DROPdrop_typerelation_name_list
15651561
{
1566-
$$ =cat2_str(make_str("drop sequence"),$3);
1562+
$$ =cat_str(3,make_str("drop"),$2,$3);
15671563
}
15681564
;
15691565

1566+
drop_type:TABLE{$$ = make_str("table"); }
1567+
|SEQUENCE{$$ = make_str("sequence"); }
1568+
|VIEW{$$ = make_str("view"); }
1569+
|INDEX{$$ = make_str("index"); }
1570+
|RULE{$$ = make_str("rule"); }
1571+
|TYPE_P{$$ = make_str("type"); }
1572+
;
1573+
15701574
/*****************************************************************************
15711575
*
15721576
* QUERY:
@@ -1985,32 +1989,18 @@ func_return: Typename
19851989
*
19861990
*QUERY:
19871991
*
1988-
*remove function <funcname>
1989-
*(REMOVE FUNCTION "funcname" (arg1, arg2, ...))
1990-
*remove aggregate <aggname>
1991-
*(REMOVE AGGREGATE "aggname" "aggtype")
1992-
*remove operator <opname>
1993-
*(REMOVE OPERATOR "opname" (leftoperand_typ rightoperand_typ))
1994-
*remove type <typename>
1995-
*(REMOVE TYPE "typename")
1996-
*remove rule <rulename>
1997-
*(REMOVE RULE "rulename")
1992+
* DROP FUNCTION funcname (arg1, arg2, ...)
1993+
* DROP AGGREGATE aggname aggtype
1994+
* DROP OPERATOR opname (leftoperand_typ rightoperand_typ)
19981995
*
19991996
*****************************************************************************/
20001997

2001-
RemoveStmt:DROPremove_typename
1998+
RemoveFuncStmt:DROPFUNCTIONfunc_namefunc_args
20021999
{
2003-
$$ = cat_str(3, make_str("drop"),$2,$3);
2000+
$$ = cat_str(3, make_str("drop function"),$3,$4);
20042001
}
20052002
;
20062003

2007-
remove_type:TYPE_P{$$ = make_str("type"); }
2008-
|INDEX{$$ = make_str("index"); }
2009-
|RULE{$$ = make_str("rule"); }
2010-
|VIEW{$$ = make_str("view"); }
2011-
;
2012-
2013-
20142004
RemoveAggrStmt:DROPAGGREGATEnameaggr_argtype
20152005
{
20162006
$$ = cat_str(3, make_str("drop aggregate"),$3,$4);
@@ -2022,13 +2012,6 @@ aggr_argtype: Typename{ $$ = $1; }
20222012
;
20232013

20242014

2025-
RemoveFuncStmt:DROPFUNCTIONfunc_namefunc_args
2026-
{
2027-
$$ = cat_str(3, make_str("drop function"),$3,$4);
2028-
}
2029-
;
2030-
2031-
20322015
RemoveOperStmt:DROPOPERATORall_Op'('oper_argtypes')'
20332016
{
20342017
$$ = cat_str(5, make_str("drop operator"),$3, make_str("("),$5, make_str(")"));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp