uwol / proleap-cobol-parser

ProLeap ANTLR4-based parser for COBOL
MIT License
136 stars 74 forks source link

Extra spaces in ID division lead to parsing errors #44

Closed albertolovato closed 6 years ago

albertolovato commented 6 years ago

Extra spaces before some paragraphs in identification division lead to errors, as in the following example, with 8 spaces instead of 7 before AUTHOR and DATE-WRITTEN:

`

   IDENTIFICATION DIVISION.
    PROGRAM-ID.       test1.
    AUTHOR.           Alberto.
    DATE-WRITTEN.     6/12/17.

`

java.lang.RuntimeException: syntax error in line 3:26 mismatched input 'Alberto' expecting <EOF> ...

Extra spaces don't seem to matter before PROGRAM-ID

uwol commented 6 years ago

Oh, you are right, thanks! Fixed in 04c46dd2bd7df9888a5fd09580ac3e12aa42416f and added 3 unit tests so it doesn't happen again.