bnfgenversion
Random text generator that takes context-free grammars from BNF files
BNFGen generates random texts based on user-defined context-free grammars specified in a BNF-like syntax. There are descriptive syntax error messages and tracing options.
You can specify "weight" for rules with alternation to influence their probabilities.
For example, in <foo> ::= 10 <foo> "foo" | "foo";
the first (recursive) option will be
taken ten times more often.
You can also specify deterministic repetition ranges, like <foo>{4}
(exactly four of <foo>
)
or <foo>{1,5}
(from one to five of <foo>
).
This package includes both a library and a CLI tool based on it.
Author | Daniil Baturin <daniil@baturin.org> |
---|---|
License | MIT |
Published | |
Homepage | https://baturin.org/tools/bnfgen |
Issue Tracker | https://github.com/dmbaturin/bnfgen/issues |
Maintainer | Daniil Baturin <daniil@baturin.org> |
Dependencies | |
Source [http] | https://github.com/dmbaturin/bnfgen/archive/refs/tags/4.0.0.tar.gz md5=0caf99c1e3293bb7c3e72a7fb3f78fd7 sha512=4e8e4f87531b0e295e4f8c095745d4395a9ed487fff3133d4d493f9d8b8ea7e470dde44639b0891c5e1fca71cde4585500db57cbb710d5d5220e1ef7a7f98b74 |
Edit | https://github.com/ocaml/opam-repository/tree/master/packages/bnfgen/bnfgen.4.0.0/opam |
Required by