Closed albertolovato closed 6 years ago
You are right, that's a bug. Fixed in b39ca6c92411fe7a8b09ef7e2fe9b22aaf349cc7 and added unit tests. PROCESS and CBL statements are now removed by the preprocessor.
I'm not 100% sure, if the syntax in Cobol85Preprocessor.g4 ist complete. If there are any PROCESS ... and CBL ... statements, which are not removed and thus lead to parsing errors in the parsing step, please let me know.
Thanks!
By the way, since today there is a new version 2.2.0-SNAPSHOT
, so 2.1.0
does not contain the fix. Just in case you are fetching the parser by MAVEN dependencies instead of GIT.
I found a CBL ADV
in one of the files I'm parsing;
java.lang.RuntimeException: syntax error in line 1:7 mismatched input 'CBL' expecting {ID, IDENTIFICATION}...
Thanks, hopefully fixed in f80ccbd1860eacc0e990c3f061b09a0c63f907cf.
Added a unit test.
Added a lot of other compiler options in that commit. Test suite is green. If this large commit produces problems with your files, please let me know.
fixed some errors in f510b3bc30e7001695179708a6e6660c73d367b2
CBL statement specifying compiler options at start of program is not recognized, as in
line 1:7 mismatched input 'CBL' expecting {ID, IDENTIFICATION, PROCESS}