From: Tom Lane Date: Sun, 22 Sep 2002 21:44:43 +0000 (+0000) Subject: Remove commas from %type and %token lists, for compatibility with newer X-Git-Tag: REL7_3~421 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0582874506f4ef300a07cb238e5ab3f9a7393368;p=postgresql Remove commas from %type and %token lists, for compatibility with newer versions of bison. --- diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index bbee009724..007bf46786 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.369 2002/09/22 19:42:51 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.370 2002/09/22 21:44:43 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -127,42 +127,42 @@ static void doNegateFloat(Value *v); VariableSetStmt *vsetstmt; } -%type stmt, schema_stmt, - AlterDatabaseSetStmt, AlterGroupStmt, - AlterTableStmt, AlterUserStmt, AlterUserSetStmt, - AnalyzeStmt, ClosePortalStmt, ClusterStmt, CommentStmt, - ConstraintsSetStmt, CopyStmt, CreateAsStmt, CreateCastStmt, - CreateDomainStmt, CreateGroupStmt, CreateOpClassStmt, CreatePLangStmt, - CreateSchemaStmt, CreateSeqStmt, CreateStmt, - CreateAssertStmt, CreateTrigStmt, CreateUserStmt, - CreatedbStmt, CursorStmt, DefineStmt, DeleteStmt, - DropGroupStmt, DropOpClassStmt, DropPLangStmt, DropStmt, - DropAssertStmt, DropTrigStmt, DropRuleStmt, DropCastStmt, - DropUserStmt, DropdbStmt, ExplainStmt, FetchStmt, - GrantStmt, IndexStmt, InsertStmt, ListenStmt, LoadStmt, - LockStmt, NotifyStmt, OptimizableStmt, - CreateFunctionStmt, ReindexStmt, RemoveAggrStmt, - RemoveFuncStmt, RemoveOperStmt, RenameStmt, RevokeStmt, - RuleActionStmt, RuleActionStmtOrEmpty, RuleStmt, - SelectStmt, TransactionStmt, TruncateStmt, - UnlistenStmt, UpdateStmt, VacuumStmt, - VariableResetStmt, VariableSetStmt, VariableShowStmt, - ViewStmt, CheckPointStmt, CreateConversionStmt, - DeallocateStmt, PrepareStmt, ExecuteStmt - -%type select_no_parens, select_with_parens, select_clause, +%type stmt schema_stmt + AlterDatabaseSetStmt AlterGroupStmt + AlterTableStmt AlterUserStmt AlterUserSetStmt + AnalyzeStmt ClosePortalStmt ClusterStmt CommentStmt + ConstraintsSetStmt CopyStmt CreateAsStmt CreateCastStmt + CreateDomainStmt CreateGroupStmt CreateOpClassStmt CreatePLangStmt + CreateSchemaStmt CreateSeqStmt CreateStmt + CreateAssertStmt CreateTrigStmt CreateUserStmt + CreatedbStmt CursorStmt DefineStmt DeleteStmt + DropGroupStmt DropOpClassStmt DropPLangStmt DropStmt + DropAssertStmt DropTrigStmt DropRuleStmt DropCastStmt + DropUserStmt DropdbStmt ExplainStmt FetchStmt + GrantStmt IndexStmt InsertStmt ListenStmt LoadStmt + LockStmt NotifyStmt OptimizableStmt + CreateFunctionStmt ReindexStmt RemoveAggrStmt + RemoveFuncStmt RemoveOperStmt RenameStmt RevokeStmt + RuleActionStmt RuleActionStmtOrEmpty RuleStmt + SelectStmt TransactionStmt TruncateStmt + UnlistenStmt UpdateStmt VacuumStmt + VariableResetStmt VariableSetStmt VariableShowStmt + ViewStmt CheckPointStmt CreateConversionStmt + DeallocateStmt PrepareStmt ExecuteStmt + +%type select_no_parens select_with_parens select_clause simple_select -%type alter_column_default, opclass_item +%type alter_column_default opclass_item %type add_drop %type opt_drop_behavior -%type createdb_opt_list, copy_opt_list -%type createdb_opt_item, copy_opt_item +%type createdb_opt_list copy_opt_list +%type createdb_opt_item copy_opt_item -%type opt_lock, lock_type, cast_context -%type opt_force, opt_or_replace +%type opt_lock lock_type cast_context +%type opt_force opt_or_replace %type user_list @@ -175,82 +175,82 @@ static void doNegateFloat(Value *v); %type OptSchemaName %type OptSchemaEltList -%type TriggerActionTime, TriggerForSpec, opt_trusted +%type TriggerActionTime TriggerForSpec opt_trusted %type opt_lancompiler %type TriggerEvents %type TriggerFuncArg -%type relation_name, copy_file_name, - database_name, access_method_clause, access_method, attr_name, - index_name, name, function_name, file_name +%type relation_name copy_file_name + database_name access_method_clause access_method attr_name + index_name name function_name file_name -%type func_name, handler_name, qual_Op, qual_all_Op, OptUseOp, - opt_class, opt_validator +%type func_name handler_name qual_Op qual_all_Op OptUseOp + opt_class opt_validator -%type qualified_name, OptConstrFromTable +%type qualified_name OptConstrFromTable -%type opt_id, all_Op, MathOp, opt_name, SpecialRuleRelation +%type opt_id all_Op MathOp opt_name SpecialRuleRelation -%type iso_level, opt_encoding +%type iso_level opt_encoding %type grantee %type grantee_list %type privilege -%type privileges, privilege_list +%type privileges privilege_list %type privilege_target %type function_with_argtypes %type function_with_argtypes_list %type TriggerOneEvent -%type stmtblock, stmtmulti, - OptTableElementList, TableElementList, OptInherit, definition, - opt_distinct, opt_definition, func_args, - func_args_list, func_as, createfunc_opt_list, - oper_argtypes, RuleActionList, RuleActionMulti, - opt_column_list, columnList, opt_name_list, - sort_clause, opt_sort_clause, sortby_list, index_params, - index_list,name_list, from_clause, from_list, opt_array_bounds, - qualified_name_list, any_name, any_name_list, - any_operator, expr_list, dotted_name, attrs, - target_list, update_target_list, insert_column_list, - insert_target_list, def_list, opt_indirection, - group_clause, TriggerFuncArgs, select_limit, - opt_select_limit, opclass_item_list, trans_options, - TableFuncElementList, - convert_args, prep_type_clause, prep_type_list, - execute_param_clause, execute_param_list - -%type into_clause, OptTempTableName +%type stmtblock stmtmulti + OptTableElementList TableElementList OptInherit definition + opt_distinct opt_definition func_args + func_args_list func_as createfunc_opt_list + oper_argtypes RuleActionList RuleActionMulti + opt_column_list columnList opt_name_list + sort_clause opt_sort_clause sortby_list index_params + index_list name_list from_clause from_list opt_array_bounds + qualified_name_list any_name any_name_list + any_operator expr_list dotted_name attrs + target_list update_target_list insert_column_list + insert_target_list def_list opt_indirection + group_clause TriggerFuncArgs select_limit + opt_select_limit opclass_item_list trans_options + TableFuncElementList + convert_args prep_type_clause prep_type_list + execute_param_clause execute_param_list + +%type into_clause OptTempTableName %type createfunc_opt_item -%type func_arg, func_return, func_type, aggr_argtype +%type func_arg func_return func_type aggr_argtype -%type opt_arg, TriggerForType, OptTemp, OptWithOids +%type opt_arg TriggerForType OptTemp OptWithOids -%type for_update_clause, opt_for_update_clause, update_list +%type for_update_clause opt_for_update_clause update_list %type opt_all -%type join_outer, join_qual +%type join_outer join_qual %type join_type -%type extract_list, overlay_list, position_list -%type substr_list, trim_list, convert_list +%type extract_list overlay_list position_list +%type substr_list trim_list convert_list %type opt_interval -%type overlay_placing, substr_from, substr_for +%type overlay_placing substr_from substr_for -%type opt_instead, opt_cursor -%type index_opt_unique, opt_verbose, opt_full -%type opt_freeze, opt_default, opt_recheck -%type opt_binary, opt_oids, copy_delimiter +%type opt_instead opt_cursor +%type index_opt_unique opt_verbose opt_full +%type opt_freeze opt_default opt_recheck +%type opt_binary opt_oids copy_delimiter %type copy_from -%type direction, reindex_type, drop_type, - opt_column, event, comment_type +%type direction reindex_type drop_type + opt_column event comment_type %type fetch_how_many -%type select_limit_value, select_offset_value +%type select_limit_value select_offset_value %type OptSeqList %type OptSeqElem @@ -259,55 +259,55 @@ static void doNegateFloat(Value *v); %type set_rest -%type TableElement, ConstraintElem, TableFuncElement +%type TableElement ConstraintElem TableFuncElement %type columnDef %type def_elem -%type def_arg, columnElem, where_clause, insert_column_item, - a_expr, b_expr, c_expr, r_expr, AexprConst, - in_expr, having_clause, func_table -%type row, row_descriptor, row_list, in_expr_nodes, type_list -%type case_expr, case_arg, when_clause, case_default +%type def_arg columnElem where_clause insert_column_item + a_expr b_expr c_expr r_expr AexprConst + in_expr having_clause func_table +%type row row_descriptor row_list in_expr_nodes type_list +%type case_expr case_arg when_clause case_default %type when_clause_list %type sub_type -%type OptCreateAs, CreateAsList +%type OptCreateAs CreateAsList %type CreateAsElement -%type NumericOnly, FloatOnly, IntegerOnly +%type NumericOnly FloatOnly IntegerOnly %type columnref %type alias_clause %type sortby -%type index_elem, func_index +%type index_elem func_index %type table_ref %type joined_table %type relation_expr -%type target_el, insert_target_el, update_target_el - -%type Typename, SimpleTypename, ConstTypename, - GenericType, Numeric, opt_float, - Character, ConstCharacter, - CharacterWithLength, CharacterWithoutLength, - ConstDatetime, ConstInterval, - Bit, ConstBit, BitWithLength, BitWithoutLength +%type target_el insert_target_el update_target_el + +%type Typename SimpleTypename ConstTypename + GenericType Numeric opt_float + Character ConstCharacter + CharacterWithLength CharacterWithoutLength + ConstDatetime ConstInterval + Bit ConstBit BitWithLength BitWithoutLength %type character %type extract_arg -%type opt_charset, opt_collate -%type opt_numeric, opt_decimal -%type opt_varying, opt_timezone +%type opt_charset opt_collate +%type opt_numeric opt_decimal +%type opt_varying opt_timezone %type Iconst -%type Sconst, comment_text -%type UserId, opt_boolean, ColId_or_Sconst -%type var_list, var_list_or_default -%type ColId, ColLabel, type_name -%type var_value, zone_value +%type Sconst comment_text +%type UserId opt_boolean ColId_or_Sconst +%type var_list var_list_or_default +%type ColId ColLabel type_name +%type var_value zone_value -%type unreserved_keyword, func_name_keyword -%type col_name_keyword, reserved_keyword +%type unreserved_keyword func_name_keyword +%type col_name_keyword reserved_keyword -%type TableConstraint, TableLikeClause +%type TableConstraint TableLikeClause %type ColQualList -%type ColConstraint, ColConstraintElem, ConstraintAttr -%type key_actions, key_delete, key_match, key_update, key_action -%type ConstraintAttributeSpec, ConstraintDeferrabilitySpec, +%type ColConstraint ColConstraintElem ConstraintAttr +%type key_actions key_delete key_match key_update key_action +%type ConstraintAttributeSpec ConstraintDeferrabilitySpec ConstraintTimeSpec %type constraints_set_list @@ -321,82 +321,82 @@ static void doNegateFloat(Value *v); */ /* ordinary key words in alphabetical order */ -%token ABORT_TRANS, ABSOLUTE, ACCESS, ACTION, ADD, AFTER, - AGGREGATE, ALL, ALTER, ANALYSE, ANALYZE, AND, ANY, AS, ASC, - ASSERTION, ASSIGNMENT, AT, AUTHORIZATION, +%token ABORT_TRANS ABSOLUTE ACCESS ACTION ADD AFTER + AGGREGATE ALL ALTER ANALYSE ANALYZE AND ANY AS ASC + ASSERTION ASSIGNMENT AT AUTHORIZATION - BACKWARD, BEFORE, BEGIN_TRANS, BETWEEN, BIGINT, BINARY, BIT, BOTH, - BOOLEAN, BY, + BACKWARD BEFORE BEGIN_TRANS BETWEEN BIGINT BINARY BIT BOTH + BOOLEAN BY - CACHE, CALLED, CASCADE, CASE, CAST, CHAIN, CHAR_P, - CHARACTER, CHARACTERISTICS, CHECK, CHECKPOINT, CLASS, CLOSE, - CLUSTER, COALESCE, COLLATE, COLUMN, COMMENT, COMMIT, - COMMITTED, CONSTRAINT, CONSTRAINTS, CONVERSION_P, CONVERT, COPY, CREATE, CREATEDB, - CREATEUSER, CROSS, CURRENT_DATE, CURRENT_TIME, - CURRENT_TIMESTAMP, CURRENT_USER, CURSOR, CYCLE, + CACHE CALLED CASCADE CASE CAST CHAIN CHAR_P + CHARACTER CHARACTERISTICS CHECK CHECKPOINT CLASS CLOSE + CLUSTER COALESCE COLLATE COLUMN COMMENT COMMIT + COMMITTED CONSTRAINT CONSTRAINTS CONVERSION_P CONVERT COPY CREATE CREATEDB + CREATEUSER CROSS CURRENT_DATE CURRENT_TIME + CURRENT_TIMESTAMP CURRENT_USER CURSOR CYCLE - DATABASE, DAY_P, DEALLOCATE, DEC, DECIMAL, DECLARE, DEFAULT, - DEFERRABLE, DEFERRED, DEFINER, DELETE_P, DELIMITER, DELIMITERS, - DESC, DISTINCT, DO, DOMAIN_P, DOUBLE, DROP, + DATABASE DAY_P DEALLOCATE DEC DECIMAL DECLARE DEFAULT + DEFERRABLE DEFERRED DEFINER DELETE_P DELIMITER DELIMITERS + DESC DISTINCT DO DOMAIN_P DOUBLE DROP - EACH, ELSE, ENCODING, ENCRYPTED, END_TRANS, ESCAPE, EXCEPT, - EXCLUSIVE, EXECUTE, EXISTS, EXPLAIN, EXTERNAL, EXTRACT, + EACH ELSE ENCODING ENCRYPTED END_TRANS ESCAPE EXCEPT + EXCLUSIVE EXECUTE EXISTS EXPLAIN EXTERNAL EXTRACT - FALSE_P, FETCH, FLOAT_P, FOR, FORCE, FOREIGN, FORWARD, - FREEZE, FROM, FULL, FUNCTION, + FALSE_P FETCH FLOAT_P FOR FORCE FOREIGN FORWARD + FREEZE FROM FULL FUNCTION - GET, GLOBAL, GRANT, GROUP_P, + GET GLOBAL GRANT GROUP_P - HANDLER, HAVING, HOUR_P, + HANDLER HAVING HOUR_P - ILIKE, IMMEDIATE, IMMUTABLE, IMPLICIT_P, IN_P, INCREMENT, - INDEX, INHERITS, INITIALLY, INNER_P, INOUT, INPUT, - INSENSITIVE, INSERT, INSTEAD, INT, INTEGER, INTERSECT, - INTERVAL, INTO, INVOKER, IS, ISNULL, ISOLATION, + ILIKE IMMEDIATE IMMUTABLE IMPLICIT_P IN_P INCREMENT + INDEX INHERITS INITIALLY INNER_P INOUT INPUT + INSENSITIVE INSERT INSTEAD INT INTEGER INTERSECT + INTERVAL INTO INVOKER IS ISNULL ISOLATION - JOIN, - KEY, + JOIN + KEY - LANCOMPILER, LANGUAGE, LEADING, LEFT, LEVEL, LIKE, LIMIT, - LISTEN, LOAD, LOCAL, LOCALTIME, LOCALTIMESTAMP, LOCATION, - LOCK_P, + LANCOMPILER LANGUAGE LEADING LEFT LEVEL LIKE LIMIT + LISTEN LOAD LOCAL LOCALTIME LOCALTIMESTAMP LOCATION + LOCK_P - MATCH, MAXVALUE, MINUTE_P, MINVALUE, MODE, MONTH_P, MOVE, + MATCH MAXVALUE MINUTE_P MINVALUE MODE MONTH_P MOVE - NAMES, NATIONAL, NATURAL, NCHAR, NEW, NEXT, NO, NOCREATEDB, - NOCREATEUSER, NONE, NOT, NOTHING, NOTIFY, NOTNULL, NULL_P, - NULLIF, NUMERIC, + NAMES NATIONAL NATURAL NCHAR NEW NEXT NO NOCREATEDB + NOCREATEUSER NONE NOT NOTHING NOTIFY NOTNULL NULL_P + NULLIF NUMERIC - OF, OFF, OFFSET, OIDS, OLD, ON, ONLY, OPERATOR, OPTION, OR, - ORDER, OUT_P, OUTER_P, OVERLAPS, OVERLAY, OWNER, + OF OFF OFFSET OIDS OLD ON ONLY OPERATOR OPTION OR + ORDER OUT_P OUTER_P OVERLAPS OVERLAY OWNER - PARTIAL, PASSWORD, PATH_P, PENDANT, PLACING, POSITION, - PRECISION, PREPARE, PRIMARY, PRIOR, PRIVILEGES, PROCEDURE, - PROCEDURAL, + PARTIAL PASSWORD PATH_P PENDANT PLACING POSITION + PRECISION PREPARE PRIMARY PRIOR PRIVILEGES PROCEDURE + PROCEDURAL - READ, REAL, RECHECK, REFERENCES, REINDEX, RELATIVE, RENAME, REPLACE, - RESET, RESTRICT, RETURNS, REVOKE, RIGHT, ROLLBACK, ROW, - RULE, + READ REAL RECHECK REFERENCES REINDEX RELATIVE RENAME REPLACE + RESET RESTRICT RETURNS REVOKE RIGHT ROLLBACK ROW + RULE - SCHEMA, SCROLL, SECOND_P, SECURITY, SELECT, SEQUENCE, - SERIALIZABLE, SESSION, SESSION_USER, SET, SETOF, SHARE, - SHOW, SIMILAR, SIMPLE, SMALLINT, SOME, STABLE, START, STATEMENT, - STATISTICS, STDIN, STDOUT, STORAGE, STRICT, SUBSTRING, - SYSID, + SCHEMA SCROLL SECOND_P SECURITY SELECT SEQUENCE + SERIALIZABLE SESSION SESSION_USER SET SETOF SHARE + SHOW SIMILAR SIMPLE SMALLINT SOME STABLE START STATEMENT + STATISTICS STDIN STDOUT STORAGE STRICT SUBSTRING + SYSID - TABLE, TEMP, TEMPLATE, TEMPORARY, THEN, TIME, TIMESTAMP, - TO, TOAST, TRAILING, TRANSACTION, TREAT, TRIGGER, TRIM, TRUE_P, - TRUNCATE, TRUSTED, TYPE_P, + TABLE TEMP TEMPLATE TEMPORARY THEN TIME TIMESTAMP + TO TOAST TRAILING TRANSACTION TREAT TRIGGER TRIM TRUE_P + TRUNCATE TRUSTED TYPE_P - UNENCRYPTED, UNION, UNIQUE, UNKNOWN, UNLISTEN, UNTIL, - UPDATE, USAGE, USER, USING, + UNENCRYPTED UNION UNIQUE UNKNOWN UNLISTEN UNTIL + UPDATE USAGE USER USING - VACUUM, VALID, VALIDATOR, VALUES, VARCHAR, VARYING, - VERBOSE, VERSION, VIEW, VOLATILE, + VACUUM VALID VALIDATOR VALUES VARCHAR VARYING + VERBOSE VERSION VIEW VOLATILE - WHEN, WHERE, WITH, WITHOUT, WORK, WRITE, + WHEN WHERE WITH WITHOUT WORK WRITE - YEAR_P, + YEAR_P ZONE @@ -407,8 +407,8 @@ static void doNegateFloat(Value *v); %token UNIONJOIN /* Special keywords, not in the query language - see the "lex" file */ -%token IDENT, FCONST, SCONST, NCONST, BCONST, XCONST, Op -%token ICONST, PARAM +%token IDENT FCONST SCONST NCONST BCONST XCONST Op +%token ICONST PARAM /* these are not real. they are here so that they get generated as #define's*/ %token OP