Crates.io | regen-lang |
lib.rs | regen-lang |
version | 0.0.7 |
source | src |
created_at | 2023-04-15 08:05:16.940841 |
updated_at | 2023-10-08 03:01:23.219281 |
description | A language for defining languages |
homepage | |
repository | https://github.com/Pistonite/regen-lang |
max_upload_size | |
id | 839823 |
size | 202,210 |
Regen is a language that defines languages. The regen
compiler generates a parser for the language defined with the Regen language in supported general-purpose programming languages:
Regen is suitable for small application-specific grammars, such as a custom string-interpolation function or a custom command parser. It is meant to replace parse(cmd.split(" "))
with a more robust and easy-to-use parser. It is not meant to replace full-fledged parsers for existing programming languages, as those are more optimized and have more features like error recovery and better error messages.
Here is the grammar of Regen, defined in Regen, and highlighted with the generated parser with a Prism.js theme.
Install the compiler
cargo install regen-lang
If you are generating for Rust, you also need to add the library
cargo add regen-lang
You can use --no-default-features
if you don't need the CLI to avoid dependency on clap
Documentation on https://docs.rs/regen-lang.