uwol / proleap-cobol-parser

ProLeap ANTLR4-based parser for COBOL
MIT License
137 stars 76 forks source link

Line number before EXEC SQL DECLARE causes syntax error #68

Open albertolovato opened 6 years ago

albertolovato commented 6 years ago

I get the error java.lang.RuntimeException: syntax error in line 38:6 extraneous input '*>EXECSQL EXEC SQL DECLARE BLABLA TABLE\n' expecting {ABORT, ALIGNED, ALL,... when parsing the following code: ` ...

   WORKING-STORAGE SECTION.
       01 x PIC 99.
       01 y PIC 99.   00043200
        EXEC SQL DECLARE BLABLA TABLE
       ( A               DECIMAL(2, 0) NOT NULL,
         B               DECIMAL(3, 0) NOT NULL
       ) END-EXEC.

...`

The same error doesn't show if definitions of x and y are switched (number must precede immediately EXEC SQL)