We developed a commercial Cobol parser which handles Cobol 85 and all of its dialects that we are aware of.
We offer it for an yearly license, with the permission of redistributing it.
We have battle tested against the hardest testsuites we could find. In any case we offer full support: every single parsing issue that will ever be reported will be handled it in the shorter delay possible.
The parser can handle the whole Cobol standard. Of course it can also handle the different preprocessing statements such as copy and replace.
How can the parser be used?
The parser can be used in two different ways:
- As a Java library (usable from Java, Kotlin, Scala, Groovy and all possible JVM languages)
- As a command line tool that produces an Abstract Syntax Tree in JSON or XML format. In this way the parser can be integrated with any software able to process JSON or XML
Why buying an off-the-shelf parser?
Because we can offer it for a lower price than a parser developed for a specific client. At the same time it is better tested as we have used it across a series of projects.
What the parser could be used for?
The parser can be used to analyze Cobol tools ans as the basis for other tools such as:
- Editor for Cobol
- Compilers for Cobol
- Interpreters for Cobol
- Source code analyzers for Cobol
- Transpilers from Cobol to other languages
- Transpilers from other languages to Cobol
- Documentation generator/visualizer for Cobol
How the AST looks like?
The AST produced contains:
- A list of lexical, syntactical, and semantic errors recognized
- The precise position of each element in the source files
- The complete information on every statement, expression, and data structure recognized
How to learn more?
We are willing to extend this parser, as needed, following the requests of our clients.
We are also considering building parsers for JCL and PL1 to complement our Cobol parser, if we find clients interested in them.