mridoni / gixsql

GixSQL is an ESQL preprocessor and a series of runtime libraries to enable GnuCOBOL to access PostgreSQL, ODBC, MySQL, Oracle and SQLite databases.
GNU General Public License v3.0
16 stars 8 forks source link

COPY not possible with quoted filenames (parser error "unexpected WORD" on COPY) #102

Closed GitMensch closed 1 year ago

GitMensch commented 2 years ago

IBM sample: https://sourceforge.net/p/gnucobol/discussion/cobol/thread/6f24010e48/9542/80b6/d1df/9dc6/dc6d/01c3/ac08/f68b/attachment/DELCURAA.SQB

$> gixsql --version
gixpp - the ESQL preprocessor for Gix-IDE/GixSQL
Version: 1.0.18dev2
libgixpp version: 1.0.18dev2

$> gixsql DELCURAA.SQB DELCURAA.cob
/tmp/DELCURAA.SQB:72: error: syntax error, unexpected WORD

line 72 is the one with the first COPY statement:

       DATA DIVISION.
       WORKING-STORAGE SECTION.

           COPY 'SQLENV.CBL'.
           COPY 'SQLCA.CBL'.
mridoni commented 2 years ago

The problem (bug, actually) is the quoted filename not being handled by the parser, I will have to modify the parser and the copy resolver.

GitMensch commented 2 years ago

Just rechecked, still "featured" in 1.0.18 (not sure how much work it would be to fix that).

mridoni commented 2 years ago

I don't know when I will be able to issue a (pre-)release, but this patch - to be applied against v1.0.18 - should fix it.

issue-102.patch.txt

GitMensch commented 1 year ago

mentioned to be fixed in the released version, so -> closing