From f139617b553e87f4b2a49542ab9b3b74a7348a1b Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Fri, 27 Feb 1998 02:31:20 +0000 Subject: [PATCH] From: Michael Meskes Subject: [PATCHES] ecpg: correct whenever statement --- src/interfaces/Makefile | 4 ++-- src/interfaces/ecpg/ChangeLog | 6 ++++++ src/interfaces/ecpg/TODO | 2 +- src/interfaces/ecpg/preproc/pgc.l | 1 - src/interfaces/ecpg/preproc/preproc.y | 13 ++++--------- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/interfaces/Makefile b/src/interfaces/Makefile index 5dac21202c..e2a70dc6b1 100644 --- a/src/interfaces/Makefile +++ b/src/interfaces/Makefile @@ -7,7 +7,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.7 1998/02/17 01:47:19 scrappy Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/Makefile,v 1.8 1998/02/27 02:31:02 scrappy Exp $ # #------------------------------------------------------------------------- @@ -16,7 +16,7 @@ include $(SRCDIR)/Makefile.global .DEFAULT all: $(MAKE) -C libpq $@ - $(MAKE) -C ecpg $@ +# $(MAKE) -C ecpg $@ ifeq ($(HAVE_Cplusplus), true) $(MAKE) -C libpq++ $@ else diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog index bb39d21394..8501e99dc2 100644 --- a/src/interfaces/ecpg/ChangeLog +++ b/src/interfaces/ecpg/ChangeLog @@ -56,3 +56,9 @@ Thu Feb 24 12:26:12 CET 1998 - allow 'go to' in whenever statement as well as 'goto' - new argument 'stop' for whenever statement + +Wed Feb 25 15:46:50 CET 1998 + + - corrected whenever continue handling + - removed whenever break + diff --git a/src/interfaces/ecpg/TODO b/src/interfaces/ecpg/TODO index dab3e0b4de..a10dbd7521 100644 --- a/src/interfaces/ecpg/TODO +++ b/src/interfaces/ecpg/TODO @@ -47,7 +47,7 @@ The cursor is opened when the declare statement is issued. ecpg does not understand enum datatypes. -The is no exec sql prepare statement. +There is no exec sql prepare statement. The complete structure definition has to be listed inside the declare section for ecpg to be able to understand it. diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l index 5523d0fce7..8bb9b73f0d 100644 --- a/src/interfaces/ecpg/preproc/pgc.l +++ b/src/interfaces/ecpg/preproc/pgc.l @@ -19,7 +19,6 @@ label ({letter}|{digit})* string '[^']*' begin [bB][eE][gG][iI][nN] -break [bB][rR][eE][aA][kK] commit [cC][oO][mM][mM][iI][tT] connect [cC][oO][nN][nN][eE][cC][tT] continue [cC][oO][nN][tT][iI][nN][uU][eE] diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index 2a77c441a6..30b9cb9ade 100644 --- a/src/interfaces/ecpg/preproc/preproc.y +++ b/src/interfaces/ecpg/preproc/preproc.y @@ -228,7 +228,7 @@ dump_variables(struct arguments * list) %token SQL_BEGIN SQL_END SQL_DECLARE SQL_SECTION SQL_INCLUDE %token SQL_CONNECT SQL_OPEN SQL_EXECUTE SQL_IMMEDIATE %token SQL_COMMIT SQL_ROLLBACK SQL_RELEASE SQL_WORK SQL_WHENEVER -%token SQL_SQLERROR SQL_NOT_FOUND SQL_BREAK SQL_CONTINUE +%token SQL_SQLERROR SQL_NOT_FOUND SQL_CONTINUE %token SQL_DO SQL_GOTO SQL_SQLPRINT SQL_STOP %token S_SYMBOL S_LENGTH S_ANYTHING S_LABEL @@ -526,13 +526,8 @@ sqlwhenever : SQL_START SQL_WHENEVER SQL_SQLERROR { fprintf(yyout, "; */\n"); } -action : SQL_BREAK { - $$.code = W_BREAK; - $$.str = NULL; - fprintf(yyout, "break"); -} - | SQL_CONTINUE { - $$.code = W_CONTINUE; +action : SQL_CONTINUE { + $$.code = W_NOTHING; $$.str = NULL; fprintf(yyout, "continue"); } @@ -615,7 +610,7 @@ sqlstatement_word : ':' symbol into_list : ':' symbol { add_variable(&argsresult, find_variable($2)); } - | into_list ',' ':' symbol{ + | into_list ',' ':' symbol { add_variable(&argsresult, find_variable($4)); };