Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b111331

Browse files
author
Michael Meskes
committed
Synced preproc.y with gram.y.
1 parent f9453f4 commit b111331

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> CreateAsElement OptCreateAs CreateAsList CreateAsStmt
287287
%type <str> OptUnder key_reference comment_text ConstraintDeferrabilitySpec
288288
%type <str> key_match ColLabel SpecialRuleRelation ColId columnDef
289-
%type <str> ColConstraint ColConstraintElem
289+
%type <str> ColConstraint ColConstraintElem drop_type
290290
%type <str> OptTableElementList OptTableElement TableConstraint
291291
%type <str> ConstraintElem key_actions ColQualList TokenId DropSchemaStmt
292292
%type <str> target_list target_el update_target_list alias_clause
@@ -321,7 +321,7 @@ make_name(void)
321321
%type <str> RuleActionStmtOrEmpty RuleActionMulti func_as reindex_type
322322
%type <str> RuleStmt opt_column opt_name oper_argtypes sysid_clause
323323
%type <str> MathOp RemoveFuncStmt aggr_argtype for_update_clause
324-
%type <str> RemoveAggrStmt remove_type RemoveStmt ExtendStmt
324+
%type <str> RemoveAggrStmt ExtendStmt
325325
%type <str> RemoveOperStmt RenameStmt all_Op user_valid_clause
326326
%type <str> VariableSetStmt var_value zone_value VariableShowStmt
327327
%type <str> VariableResetStmt AlterTableStmt DropUserStmt from_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: DROP TABLE relation_name_list
1561-
{
1562-
$$ = cat2_str(make_str("drop table"), $3);
1563-
}
1564-
| DROP SEQUENCE relation_name_list
1560+
DropStmt: DROP drop_type relation_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: DROP remove_type name
1998+
RemoveFuncStmt: DROP FUNCTION func_name func_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: DROP AGGREGATE name aggr_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: DROP FUNCTION func_name func_args
2026-
{
2027-
$$ = cat_str(3, make_str("drop function"), $3, $4);
2028-
}
2029-
;
2030-
2031-
20322015
RemoveOperStmt: DROP OPERATOR all_Op '(' oper_argtypes ')'
20332016
{
20342017
$$ = cat_str(5, make_str("drop operator"), $3, make_str("("), $5, make_str(")"));

0 commit comments

Comments
 (0)