bnfgen
Random text generator that takes context-free grammars from BNF files
Description
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.
Install
copied = false, 2000)"
:class="{ 'border-gray-700': !copied, 'text-gray-100': !copied, 'focus:ring-orange-500': !copied, 'focus:border-orange-500': !copied, 'border-green-600': copied, 'text-green-600': copied, 'focus:ring-green-500': copied, 'focus:border-green-500': copied }">
- Published
- 18 Feb 2021
- Authors
- Maintainers
Sources
3.0.0.tar.gz
md5=f7e8200ca86a83f188d14e27644ff4a9
sha512=0606e3669cec06eb5d807b126d429346f1df7682811a3ea396b7540eaf0f8fbed4b56259089adacd848ad4d5b0a394f71aec52a34e4054d7ab2a914b065fba5d
Dependencies
Reverse Dependencies