lmntalc

Crates.iolmntalc
lib.rslmntalc
version0.12.0
sourcesrc
created_at2023-12-07 12:33:25.732838
updated_at2024-03-29 08:15:37.929749
descriptionA compiler for the LMNtal language
homepage
repositoryhttps://gitlab.ueda.info.waseda.ac.jp/wang/lmntalc
max_upload_size
id1060945
size326,112
Qirui Wang (QRWells)

documentation

README

LMNtalc

LMNtal compiler written in Rust (WIP).

Installation

Install from crates.io

cargo install lmntalc

Install from source

git clone https://github.com/lmntal/lmntalc.git
cd lmntalc
cargo install --path .

Usage

lmntalc <input-file>

or

lmntalc -t <target-language> <input-file>

Then, the compiled code will be written to the file with the same name as the input file, but with the extension of the target language. To specify the output file, use -o option.

lmntalc -t <target-language> -o <output-file> <input-file>

For more information, use lmntalc --help.

Features

  • Full support of parsing HyperLMNtal.
  • Simple static analysis on parse tree level.
  • Support of compiling Flat HyperLMNtal to target languages.

Target Languages

  • C++ 20
  • Java 17
  • Python 3.11

Behavioral Difference from lmntal-compiler

Expression

a + b is the same with '+'(a, b) in lmntal-compiler, but they are different in LMNtalc.

Known Issues

  • Rules in membranes in top level rule is not supported. i.e. Cannot generate membranes with rules.

License

This software is released under the MIT License, see LICENSE.

Commit count: 0

cargo fmt