From f8257734e4add3204f4d6d38f3edea0c827b245f Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Wed, 18 Feb 2004 08:42:02 +0000 Subject: [PATCH] Added missing rule for DOUBLE variables. --- src/interfaces/ecpg/preproc/preproc.y | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index b20ddbb4a5..9d15a4ef97 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.274 2004/02/16 07:41:54 meskes Exp $ */ +/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.275 2004/02/18 08:42:02 meskes Exp $ */ /* Copyright comment */ %{ @@ -551,7 +551,7 @@ add_additional_variables(char *name, bool insert) %type descriptor_item desc_header_item -%type var_type single_vt_type +%type var_type %type action @@ -4416,7 +4416,7 @@ single_vt_declaration: type_declaration { $$ = $1; } ; single_var_declaration: storage_declaration - single_vt_type + var_type { actual_type[struct_level].type_enum = $2.type_enum; actual_type[struct_level].type_dimension = $2.type_dimension; @@ -4427,7 +4427,7 @@ single_var_declaration: storage_declaration { $$ = cat_str(5, actual_startline[struct_level], $1, $2.type_str, $4, make_str(";\n")); } - | single_vt_type + | var_type { actual_type[struct_level].type_enum = $1.type_enum; actual_type[struct_level].type_dimension = $1.type_dimension; @@ -4460,17 +4460,6 @@ ecpg_interval: opt_interval { $$ = $1; } | MONTH_P TO MONTH_P { $$ = make_str("month to month"); } ; -single_vt_type: var_type - | DOUBLE_P - { - $$.type_enum = ECPGt_double; - $$.type_str = make_str("double"); - $$.type_dimension = make_str("-1"); - $$.type_index = make_str("-1"); - $$.type_sizeof = NULL; - } - ; - /* * variable declaration inside exec sql declare block */ @@ -4960,6 +4949,7 @@ signed_type: SQL_SHORT { $$ = ECPGt_short; } } | SQL_BOOL { $$ = ECPGt_bool; } | CHAR_P { $$ = ECPGt_char; } + | DOUBLE_P { $$ = ECPGt_double; } ; opt_signed: SQL_SIGNED