diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index bf5d468a9ca..463b59385d2 100644 --- a/src/interfaces/ecpg/preproc/preproc.y +++ b/src/interfaces/ecpg/preproc/preproc.y @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.263.2.7 2004/02/15 13:50:02 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.263.2.8 2004/02/15 15:40:54 meskes Exp $ */ /* Copyright comment */ %{ @@ -528,7 +528,7 @@ add_additional_variables(char *name, bool insert) %type user_name opt_user char_variable ora_user ident opt_reference %type var_type_declarations quoted_ident_stringvar ECPGKeywords_rest %type db_prefix server opt_options opt_connection_name c_list -%type ECPGSetConnection ECPGTypedef c_args ECPGKeywords +%type ECPGSetConnection ECPGTypedef c_args ECPGKeywords ECPGCKeywords %type enum_type civar civarind ECPGCursorStmt ECPGDeallocate %type ECPGFree ECPGDeclare ECPGVar opt_at enum_definition %type struct_union_type s_struct_union vt_declarations execute_rest @@ -5745,6 +5745,7 @@ ColId: ident { $$ = $1; } | unreserved_keyword { $$ = $1; } | col_name_keyword { $$ = $1; } | ECPGKeywords { $$ = $1; } + | ECPGCKeywords { $$ = $1; } | CHAR_P { $$ = make_str("char"); } ; @@ -5754,6 +5755,7 @@ type_name: ident { $$ = $1; } | unreserved_keyword { $$ = $1; } | ECPGKeywords { $$ = $1; } | ECPGTypeName { $$ = $1; } + | ECPGCKeywords { $$ = $1; } ; /* Function identifier --- names that can be function names. @@ -5762,6 +5764,7 @@ function_name: ident { $$ = $1; } | unreserved_keyword { $$ = $1; } | func_name_keyword { $$ = $1; } | ECPGKeywords { $$ = $1; } + | ECPGCKeywords { $$ = $1; } ; /* Column label --- allowed labels in "AS" clauses. @@ -5773,6 +5776,7 @@ ColLabel: ECPGColLabel { $$ = $1; } | INPUT_P { $$ = make_str("input"); } | INT_P { $$ = make_str("int"); } | UNION { $$ = make_str("union"); } + | ECPGCKeywords { $$ = $1; } ; ECPGColLabelCommon: ident { $$ = $1; } @@ -5787,6 +5791,14 @@ ECPGColLabel: ECPGColLabelCommon { $$ = $1; } | ECPGKeywords_rest { $$ = $1; } ; +ECPGCKeywords: S_AUTO { $$ = make_str("auto"); } + | S_CONST { $$ = make_str("const"); } + | S_EXTERN { $$ = make_str("extern"); } + | S_REGISTER { $$ = make_str("register"); } + | S_STATIC { $$ = make_str("static"); } + | S_TYPEDEF { $$ = make_str("typedef"); } + ; + /* * Keyword classification lists. Generally, every keyword present in * the Postgres grammar should appear in exactly one of these lists.