A Python framework for formal grammars, automata theory, and formal language processing. Current version is 1.0.11. Release cadence is irregular, primarily maintenance updates.
pip install pyformlangNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a context-free grammar and check if a string is generated.
Update imports: `from pyformlang.finite_automaton import DeterministicFiniteAutomaton`.
Use `Regex('a b')` with spaces or explicit '.' for concatenation.Use `cfg.get_reachable_symbols()` and `cfg.get_productive_symbols()` before calling `is_empty()`.
Use `from pyformlang.cfg import CFG` instead of `import pyformlang.cfg`.
Install Microsoft Visual C++ Redistributable for Visual Studio 2015-2022.
No dependency data recorded yet.