gramforge is a Python library for efficient multi-language generation from context-free or context-sensitive grammars (CFG/CSG). It supports generating strings and structures from grammar definitions, suitable for tasks like fuzzing, test generation, and language prototyping. Current version is 1.0.9, with a stable release cadence.
pip install gramforgeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a grammar and generates a string from it.
Refer to the official documentation for grammar syntax (e.g., S = 'hello' Name).
Use gen = Generator(grammar, seed=42) for reproducible output.
Wrap in try-except: try: grammar = Grammar.from_string(rule) except Exception as e: print(e).
No dependency data recorded yet.