1- /* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.272 2004/02/1513:48:54 meskes Exp $*/
1+ /* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.273 2004/02/1515:38:20 meskes Exp $*/
22
33/* Copyright comment*/
44%{
@@ -528,7 +528,7 @@ add_additional_variables(char *name, bool insert)
528528%type <str> user_name opt_user char_variable ora_user ident opt_reference
529529%type <str> var_type_declarations quoted_ident_stringvar ECPGKeywords_rest
530530%type <str> db_prefix server opt_options opt_connection_name c_list
531- %type <str> ECPGSetConnection ECPGTypedef c_args ECPGKeywords
531+ %type <str> ECPGSetConnection ECPGTypedef c_args ECPGKeywords ECPGCKeywords
532532%type <str> enum_type civar civarind ECPGCursorStmt ECPGDeallocate
533533%type <str> ECPGFree ECPGDeclare ECPGVar opt_at enum_definition
534534%type <str> struct_union_type s_struct_union vt_declarations execute_rest
@@ -5747,6 +5747,7 @@ ColId:ident{ $$ = $1; }
57475747| unreserved_keyword {$$ =$1 ; }
57485748| col_name_keyword {$$ =$1 ; }
57495749| ECPGKeywords {$$ =$1 ; }
5750+ | ECPGCKeywords {$$ =$1 ; }
57505751| CHAR_P {$$ = make_str(" char" ); }
57515752;
57525753
@@ -5756,6 +5757,7 @@ type_name:ident{ $$ = $1; }
57565757| unreserved_keyword {$$ =$1 ; }
57575758| ECPGKeywords {$$ =$1 ; }
57585759| ECPGTypeName {$$ =$1 ; }
5760+ | ECPGCKeywords {$$ =$1 ; }
57595761;
57605762
57615763/* Function identifier --- names that can be function names.
@@ -5764,6 +5766,7 @@ function_name:ident{ $$ = $1; }
57645766| unreserved_keyword {$$ =$1 ; }
57655767| func_name_keyword {$$ =$1 ; }
57665768| ECPGKeywords {$$ =$1 ; }
5769+ | ECPGCKeywords {$$ =$1 ; }
57675770;
57685771
57695772/* Column label --- allowed labels in "AS" clauses.
@@ -5775,6 +5778,7 @@ ColLabel: ECPGColLabel{ $$ = $1; }
57755778| INPUT_P {$$ = make_str(" input" ); }
57765779| INT_P {$$ = make_str(" int" ); }
57775780| UNION {$$ = make_str(" union" ); }
5781+ | ECPGCKeywords {$$ =$1 ; }
57785782;
57795783
57805784ECPGColLabelCommon :ident {$$ =$1 ; }
@@ -5789,6 +5793,14 @@ ECPGColLabel: ECPGColLabelCommon{ $$ = $1; }
57895793| ECPGKeywords_rest {$$ =$1 ; }
57905794;
57915795
5796+ ECPGCKeywords :S_AUTO {$$ = make_str(" auto" ); }
5797+ | S_CONST {$$ = make_str(" const" ); }
5798+ | S_EXTERN {$$ = make_str(" extern" ); }
5799+ | S_REGISTER {$$ = make_str(" register" ); }
5800+ | S_STATIC {$$ = make_str(" static" ); }
5801+ | S_TYPEDEF {$$ = make_str(" typedef" ); }
5802+ ;
5803+
57925804/*
57935805 * Keyword classification lists. Generally, every keyword present in
57945806 * the Postgres grammar should appear in exactly one of these lists.