[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] syntax error from compiler.
From: |
Keisuke Nishida |
Subject: |
Re: [open-cobol-list] syntax error from compiler. |
Date: |
Fri Jan 30 16:31:52 2004 |
User-agent: |
Wanderlust/2.10.0 (Venus) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (UnebigoryĆmae) APEL/10.3 Emacs/21.2 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI) |
At Wed, 28 Jan 2004 18:48:48 -0500 (EST),
David Korn wrote:
>
> Thanks, also I have come across code the
> COPY name
> without the trailing period. I was told that this is legal
> with COBOL2 but I get a syntax error with open-cobol.
Can you try this patch?
Keisuke
--- ppparse.y.~1.9.~ 2003-08-23 16:47:07.000000000 +0900
+++ ppparse.y 2004-01-30 14:10:09.000000000 +0900
@@ -64,7 +64,7 @@
_is: | IS ;
copy_statement:
- COPY NAME copy_in copy_replacing '.'
+ COPY NAME copy_in copy_replacing dot
{
fputc ('\n', ppout);
ppcopy ($2, $3, $4);
@@ -79,11 +79,12 @@
| REPLACING replacing_list { $$ = $2; }
;
replace_statement:
- REPLACE replacing_list '.'
-| REPLACE OFF '.'
+ REPLACE replacing_list dot
+| REPLACE OFF dot
;
replacing_list:
text BY text { $$ = add_replacement (NULL, $1, $3); }
| replacing_list text BY text { $$ = add_replacement ($1, $2, $4); }
;
text: NAME | TEXT ;
+dot: | '.'