Skip to content

cenotelie/hime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Build Status Crates.io

Hime is a parser generator that targets .Net, Java and Rust. Hime relies on the LR family of parsing techniques, including the state of the art RNGLR algorithm for generalized LR parsing used for ambiguous grammars. Hime provides a powerful, expressive, and feature-rich grammar language with support for template syntactic rules, context-sensitive lexing (useful for contextal keywords), tree actions (useful for clean syntax trees), and more! Hime strongly emphasizes 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 require a runtime, available for the following platforms:

Parser generator

The parser generator (himecc) has native builds for Windows, MacOS and Linux.

Alternatively, himecc can be built and installed from sources with cargo :

cargo install hime_compiler

See all download options in the download page of the doc.

How do I use this software?

License

All software is available under the terms of the Apache License 2.0.

Repository structure

  • Runtime implementations
    • runtime-net: .Net implementation of the runtime.
    • runtime-java: Java implementation of the runtime.
    • runtime-rust: Rust implementation of the runtime.
  • SDK
    • sdk-rust: Rust implementation of the SDK for parser generation.
    • sdk-debugger: CLI tool to inspect and debug generated binary automata.
    • sdk-unicode-gen: CLI tool to generate the code to be put in sdk-rust related to unicode blocks and categories.
  • Final tools
    • himecc: Rust implementation of the parser generator CLI.
    • parseit: Rust implementation of the tool for parsing bits of texts using a previously generated parser assembly.
    • langserv: Language server for the Hime grammar language.
  • Tests
    • 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 build.sh

Note that the development environment is fully dockerized and executing this command requires docker and will pull the required docker image if not locally available.

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.