Skip to content

uwol/proleap-cobol

Repository files navigation

ProLeap ANTLR4-based analyzer, interpreter & transformer for COBOL

This is an analyzer, interpreter & transformer for COBOL based on ProLeap COBOL parser. The parser generates an Abstract Syntax Tree (AST) and Abstract Semantic Graph (ASG) for COBOL code, which then is processed by this analyzer, interpreter & transformer.

💫 Star if you like our work.

License: AGPL v3 ProLeap on Twitter

Getting started

In Eclipse open ProLeapCobolEmbeddedJetty and run the main method as Java application. A Jetty will start.

Support

This program is free software under AGPL v3 license and in this form comes without support.

License

This program is free software under AGPL v3 license. Source code generated by this program is NOT subject to AGPLv3 licensing. You can use this program to transform COBOL to Java and keep the copyright for your code.

The AGPLv3 license is only meant for this program itself. Our idea is that a joint effort in the industry is needed to build an open source tooling for COBOL modernization. Hopefully, future source code contributions from the industry are flowing back into this program, making COBOL modernization increasingly feasible for companies.

Where to look next

Build dependency proleap-cobol-parser

$ mvn clean install
  • Now your local ~/.m2/repository should contain dependency io/github/uwol/proleap-cobol-parser.
  • In Eclipse import the directory proleap-cobol-parser as an existing Maven project.

Build Process

The build process is based on Maven (version 3 or higher). Building requires a JDK 17.

  • Clone or download the repository.
  • In Eclipse import the directory as a an existing Maven project. Important: Open Eclipse > Preferences > Maven > Annotation Processing and select "Automatically configure JDT APT", so that dependency injection framework Micronaut automatically processes all @Inject annotations.
  • To build, run:
$ mvn clean package
  • The test suite executes tests against COBOL test code.
  • If error Missing artifact io.github.uwol:proleap-cobol-parser:jar:4.0.0 comes up, please check that dependency proleap-cobol-parser has been properly installed by Maven as described above.
  • If error io.micronaut.context.exceptions.NoSuchBeanException: No bean of type ... comes up, please check that Annotation Processing has been properly configured in Eclipse as described above. Optionally in Eclipse right-click the project then Maven > Update project.
  • You should see output like this:
[INFO] Scanning for projects...
...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for proleap-cobol 1.0.0:
[INFO] 
[INFO] proleap-cobol ...................................... SUCCESS [  0.066 s]
[INFO] proleap-cobol-commons .............................. SUCCESS [  3.431 s]
[INFO] proleap-cobol-analysis ............................. SUCCESS [  6.682 s]
[INFO] proleap-cobol-interpreter .......................... SUCCESS [  4.164 s]
[INFO] proleap-cobol-transform ............................ SUCCESS [  4.180 s]
[INFO] proleap-cobol-app .................................. SUCCESS [ 14.306 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
  • To install the JAR in your local Maven repository:
$ mvn clean install
  • To only run the tests:
$ mvn clean test
  • To deploy to Google Cloud (requires authentication):
$ mvn clean package -P jib-app