fr.cenotelie.hime:hime-redist

Redistributable Java runtime for the parsers generated with Hime


Keywords
glr, nuget, parser-generator, rust
License
LGPL-2.1+

Documentation

README

Build Status

The Hime parser generator is a parser generator that targets the .Net platform, Java and Rust. It primarily supports the LR family of parsing methods, including GLR (Generalized-LR). Key distinguishing features are:

  • Fast LR and GLR parsing.
  • Modern implementation of GLR with the RNGLR algorithm.
  • Robust runtime implementations in .Net, Java and Rust published in public repositories (Nuget, Maven Central, crates.io).
  • Strong emphasis on the separation of data and code. Hime forbids the inclusion of inline code in its grammar definitions in order to have very readable grammars that can be easily understood, debugged, improved. It is still possible to have custom code invoked during parsing with semantic actions.

The generated parsers can be embedded on software that target:

  • The .Net platform:
  • The JVM, with a JRE 7 or later installed.
  • Native platforms (Windows, Linux, MacOS) with Rust.

The parser generator (himecc) can run on:

Note: For the production of compiled parser assemblies in Java, Maven is required.

Note: For the production of compiled native assemblies with Rust, Cargo and the Rust toolchain is required.

Products

How do I use this software?

Repository structure

  • Software components
    • runtime-net: Contains the C# sources for the .Net implementation of the runtime library.
    • runtime-java: Contains the Java sources for the Java implementation of the runtime library.
    • runtime-rust: Contains the Rust sources for the Rust implementation of the runtime library.
    • sdk-net: Contains the C# sources of the SDK API, i.e. the parser generator.
    • himecc: Contains the C# sources of the .Net CLI interface of the parser generator (himecc).
    • parseit-net: Sources of the .Net version of the CLI tool for parsing bits of texts using a previously generated parser assembly.
    • parseit-rust: Sources of the Rust version of the CLI tool for parsing bits of texts using a previously generated parser assembly.
    • tests-driver: Sources of the tests driver for all runtime tests.
    • tests-executor-net: Sources of the test executor for the .Net runtime implementation.
    • tests-executor-java: Sources of the test executor for the Java runtime implementation.
    • tests-executor-rust: Sources of the test executor for the Rust runtime implementation.
  • Others
    • .assets: Contains some extra products, e.g. standard grammars.
    • .releng: Contains the release engineering artifacts.

How to build

To build the code and execute all tests, run

$ sh .releng/build.sh

To build all the release artifacts (requires a GPG key), run

$ sh .releng/release.sh

This requires:

  • A local installation of Mono 4.4, or up (preferably 5.2)
  • A local installation of .Net Core SDK 2.0, or up
  • Java 7 and Maven 3.3, or up
  • Rustc 1.22.1 and Cargo 0.23.0, or up

During the build, a common set of tests are executed on all runtime implementations. The results are output in the JUnit format in TestResults.xml at the repository's root.

How can I contribute?

The simplest way to contribute is to:

  • Fork this repository on GitHub.
  • Fix some issue or implement a new feature.
  • Create a merge request on GitHub.

Patches can also be submitted by email, or through the issue management system.

The isse tracker contains tickets that are accessible to newcomers. Look for tickets with [beginner] in the title. These tickets are good ways to become more familiar with the project and the codebase.