Cobol 85 Grammar for ANTLR4
This is an approximate grammar for Cobol 85. It is akin but neither copied from nor identical to Cobol.jj, Cobol.kg and VS COBOL II grammars. Tested against the NIST test suite.
Characteristics:
-
Passes the NIST tests.
-
To be used in conjunction with the provided preprocessor, which executes COPY and REPLACE statements.
Known limitations (work under progress):
-
Picture strings are parsed as (groups of) terminal symbols.
-
Comments are skipped.
Build process:
- The build process is based on Maven.
- The test suite executes tests against NIST, CICS and some GPLed Cobol test files.
- NIST test files come from Koopa repo.
Release process:
- Milestones are published in the ANTLR grammars repo.
VM Args
- For parsing large Cobol source code files, VM args have to be set: -Xmx2048m -XX:MaxPermSize=256m
- Intellij Plugin for ANTLR 4 has to be provided with those VM args in file idea.vmoptions.