Wed Nov 10 14:43:50 CET 2004
- List VALUE as a keyword.
+
+Mon Dec 6 21:27:34 CET 2004
+
+ - Fixed bug in parsing of typedef'ed array sizes.
+ - Synced parser.
- Set ecpg version to 3.2.0.
- Set compat library version to 1.2.
- Set ecpg library version to 4.2.
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.301 2004/11/10 13:48:10 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.302 2004/12/06 20:35:35 meskes Exp $ */
/* Copyright comment */
%{
adjust_informix(struct arguments *list)
{
/* Informix accepts DECLARE with variables that are out of scope when OPEN is called.
- * for instance you can declare variables in a function, and then subsequently use them
- * {
- * declare_vars();
- * exec sql ... which uses vars declared in the above function
- *
+ * for instance you can declare variables in a function, and then subsequently use them
+ * {
+ * declare_vars();
+ * exec sql ... which uses vars declared in the above function
+ *
* This breaks standard and leads to some very dangerous programming.
* Since they do, we have to work around and accept their syntax as well.
* But we will do so ONLY in Informix mode.
* We have to change the variables to our own struct and just store the pointer instead of the variable
- */
+ */
struct arguments *ptr;
char *result = make_str("");
| ColId attrs { $$ = cat2_str($1, $2); }
;
-/*
- * The slightly convoluted way of writing this production avoids reduce/reduce
- * errors against indirection_el.
- */
attrs: '.' attr_name { $$ = cat2_str(make_str("."), $2); }
- | '.' attr_name attrs { $$ = cat_str(3, make_str("."), $2, $3); }
+ | attrs '.' attr_name { $$ = cat_str(3, $1, make_str("."), $3); }
;
/*****************************************************************************
qualified_name: relation_name
{ $$ = $1; }
- | relation_name attrs
+ | relation_name indirection
{ $$ = cat2_str($1, $2); }
;
else
sprintf(variable, "&(%s%s)", prefix ? prefix : "", name);
- sprintf(offset, "%s*sizeof(char)", strcmp(varcharsize, "0") == 0 ? "1" : varcharsize);
+ sprintf(offset, "(%s)*sizeof(char)", strcmp(varcharsize, "0") == 0 ? "1" : varcharsize);
break;
case ECPGt_numeric: