Skip to content

Commit 8a2aa79

Browse files
author
Michael Meskes
committed
Fixed several more parsing bugs.
1 parent f12f899 commit 8a2aa79

File tree

4 files changed

+22
-18
lines changed

4 files changed

+22
-18
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,6 +1492,10 @@ Sun Jun 15 11:18:58 CEST 2003
14921492

14931493
- Applied multi-threading patch by Lee Kindess <lkindness@csl.co.uk>
14941494
- Changed order of types in enum to make working with these easier.
1495+
1496+
Tue Jun 17 08:45:14 CEST 2003
1497+
1498+
- Fixed several parsing bugs.
14951499
- Set ecpg version to 3.0.0
14961500
- Set ecpg library to 4.0.0
14971501
- Set pgtypes library to 1.0.0

src/interfaces/ecpg/ecpglib/typename.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/typename.c,v 1.4 2003/06/15 04:07:58 momjian Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/typename.c,v 1.5 2003/06/17 07:28:22 meskes Exp $ */
22

33
#define POSTGRES_ECPG_INTERNAL
44
#include "postgres_fe.h"
@@ -49,13 +49,13 @@ ECPGtype_name(enum ECPGttype typ)
4949
case ECPGt_char_variable:
5050
return "char";
5151
case ECPGt_numeric:
52-
return "numeric";
52+
return "Numeric";
5353
case ECPGt_date:
54-
return "date";
54+
return "Date";
5555
case ECPGt_timestamp:
56-
return "timestamp";
56+
return "Timestamp";
5757
case ECPGt_interval:
58-
return "interval";
58+
return "Interval";
5959
default:
6060
abort();
6161
}

src/interfaces/ecpg/preproc/pgc.l

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.115 2003/06/16 16:58:10 meskes Exp $
15+
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.116 2003/06/17 07:28:22 meskes Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -231,7 +231,7 @@ ccomment "//".*\n
231231

232232
space [ \t\n\r\f]
233233
horiz_space [ \t\f]
234-
newline [\n\r]
234+
newline [\n\r]
235235
non_newline [^\n\r]
236236

237237
comment ("--"{non_newline}*)
@@ -613,7 +613,7 @@ cppline {space}*#(.*\\{space})+.*
613613
else
614614
return S_ANYTHING;
615615
}
616-
<C>{ccomment} { /* ignore */ }
616+
<C>{ccomment} { ECHO; }
617617
<C>{xch} {
618618
char* endptr;
619619

src/interfaces/ecpg/preproc/preproc.y

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.232 2003/06/16 16:58:11 meskes Exp $ */
1+
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.233 2003/06/17 07:28:22 meskes Exp $ */
22

33
/* Copyright comment */
44
%{
@@ -4417,15 +4417,15 @@ single_vt_type: common_type
44174417
else if (strcmp($1, "numeric") == 0)
44184418
{
44194419
$$.type_enum = ECPGt_numeric;
4420-
$$.type_str = EMPTY;
4420+
$$.type_str = make_str("Numeric");
44214421
$$.type_dimension = make_str("-1");
44224422
$$.type_index = make_str("-1");
44234423
$$.type_sizeof = NULL;
44244424
}
44254425
else if (strcmp($1, "decimal") == 0)
44264426
{
44274427
$$.type_enum = ECPGt_numeric;
4428-
$$.type_str = EMPTY;
4428+
$$.type_str = make_str("Numeric");
44294429
$$.type_dimension = make_str("-1");
44304430
$$.type_index = make_str("-1");
44314431
$$.type_sizeof = NULL;
@@ -4457,7 +4457,7 @@ single_vt_type: common_type
44574457
else if (strcmp($1, "interval") == 0)
44584458
{
44594459
$$.type_enum = ECPGt_interval;
4460-
$$.type_str = EMPTY;
4460+
$$.type_str = make_str("Interval");
44614461
$$.type_dimension = make_str("-1");
44624462
$$.type_index = make_str("-1");
44634463
$$.type_sizeof = NULL;
@@ -4727,7 +4727,7 @@ common_type: simple_type
47274727
mmerror(PARSE_ERROR, ET_ERROR, "Only numeric/decimal have precision/scale argument");
47284728

47294729
$$.type_enum = ECPGt_numeric;
4730-
$$.type_str = EMPTY;
4730+
$$.type_str = make_str("Numeric");
47314731
$$.type_dimension = make_str("-1");
47324732
$$.type_index = make_str("-1");
47334733
$$.type_sizeof = NULL;
@@ -4771,15 +4771,15 @@ var_type: common_type
47714771
else if (strcmp($1, "numeric") == 0)
47724772
{
47734773
$$.type_enum = ECPGt_numeric;
4774-
$$.type_str = EMPTY;
4774+
$$.type_str = make_str("Numeric");
47754775
$$.type_dimension = make_str("-1");
47764776
$$.type_index = make_str("-1");
47774777
$$.type_sizeof = NULL;
47784778
}
47794779
else if (strcmp($1, "decimal") == 0)
47804780
{
47814781
$$.type_enum = ECPGt_numeric;
4782-
$$.type_str = EMPTY;
4782+
$$.type_str = make_str("Numeric");
47834783
$$.type_dimension = make_str("-1");
47844784
$$.type_index = make_str("-1");
47854785
$$.type_sizeof = NULL;
@@ -4803,7 +4803,7 @@ var_type: common_type
48034803
else if (strcmp($1, "interval") == 0)
48044804
{
48054805
$$.type_enum = ECPGt_interval;
4806-
$$.type_str = EMPTY;
4806+
$$.type_str = make_str("Interval");
48074807
$$.type_dimension = make_str("-1");
48084808
$$.type_index = make_str("-1");
48094809
$$.type_sizeof = NULL;
@@ -5048,7 +5048,7 @@ variable: opt_pointer ECPGColLabelCommon opt_array_bounds opt_initializer
50485048
$$ = cat_str(4, $1, mm_strdup($2), $3.str, $4);
50495049
break;
50505050

5051-
case ECPGt_numeric:
5051+
/*case ECPGt_numeric:
50525052
if (atoi(dimension) < 0)
50535053
type = ECPGmake_simple_type(actual_type[struct_level].type_enum, length);
50545054
else
@@ -5070,7 +5070,7 @@ variable: opt_pointer ECPGColLabelCommon opt_array_bounds opt_initializer
50705070
$$ = cat_str(4, mm_strdup(actual_storage[struct_level]), make_str("Interval"), mm_strdup($2), $4);
50715071
else
50725072
$$ = cat_str(5, mm_strdup(actual_storage[struct_level]), make_str("Interval"), mm_strdup($2), mm_strdup(dim), $4);
5073-
break;
5073+
break;*/
50745074

50755075
default:
50765076
if (atoi(dimension) < 0)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy