Skip to content

jmltoolkit/jmlparser

This branch is 322 commits ahead of, 125 commits behind javaparser/javaparser:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ccdd990 · Jan 23, 2025
Nov 15, 2024
Nov 15, 2024
Apr 29, 2024
Apr 7, 2023
Feb 11, 2023
Jan 23, 2025
Jan 23, 2025
Jan 23, 2025
Jan 23, 2025
Jan 23, 2025
Jan 23, 2025
Jan 23, 2025
Jan 23, 2025
Jan 23, 2025
Oct 5, 2021
Jun 12, 2024
Sep 8, 2021
Nov 15, 2024
Jan 29, 2023
Jun 13, 2022
Jul 26, 2022
May 23, 2020
Nov 15, 2024
Jan 29, 2023
May 24, 2024
May 24, 2024
Jan 23, 2025
Jan 29, 2023
Jan 29, 2023
Jun 12, 2024
Oct 6, 2022
Jan 9, 2022
Jan 9, 2022
Jan 9, 2022

Repository files navigation

jmlparser -- A Parser for Java and Java Modeling Language

Build and test (using maven) License LGPL-3

This project provides a library for Java and Java Modeling Language (JML). JML is a formal specification language for Java which is used by verification (OpenJML, KeY) and test tools (JMLUnitNG).

Features The library provides features:

  • Parsing of Java files (incl. 17) including JML specification
  • Providing a (mutable) unified abstract syntax tree (AST) for Java and JML
  • Name resolution for JML
  • Common code transformation for JML
  • Validation checks

This project builds upon the JavaParser project.

Setup

The project binaries are available via Github Packages. Note, that Github Packages currently requires an authenthication.

Gradle:

repositories {
    maven {
        url = uri("https://maven.pkg.github.com/wadoon/jmlparser")
        credentials {
            username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME")
            password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN")
        }
    }
}

dependencies{ ... 
  implementation("io.github.wadoon:jmlparser-symbol-solver-core:3.24.3-SNAPSHOT")
}

How To Compile Sources

If you checked out the project's source code from GitHub, you can build the project with maven using:

./mvnw clean install

If you want to generate the packaged jar files from the source files, you run the following maven command:

mvnw package

NOTE the jar files for the two modules can be found in:

  • javaparser-core/target/javaparser-core-\<version\>.jar
  • javaparser-symbol-solver-core/target/javaparser-symbol-solver-core-\<version\>.jar

If you checkout the sources and want to view the project in an IDE, it is best to first generate some of the source files; otherwise you will get many compilation complaints in the IDE. (mvnw clean install already does this for you.)

mvnw javacc:javacc

If you modify the code of the AST nodes, specifically if you add or remove fields or node classes, the code generators will update a lot of code for you. The run_metamodel_generator.sh script will rebuild the metamodel, which is used by the code generators which are run by run_core_generators.sh Make sure that javaparser-core at least compiles before you run these.

Note: for Eclipse IDE follow the steps described in the wiki: https://github.com/javaparser/javaparser/wiki/Eclipse-Project-Setup-Guide

License

jmlparser is available either under the terms of the LGPL License or the Apache License. You as the user are entitled to choose the terms under which adopt JavaParser.

For details about the LGPL License please refer to LICENSE.LGPL.

Packages

No packages published

Languages

  • Java 99.7%
  • Other 0.3%