Aunsiels / pyformlang

A python library to manipulate formal languages and various automata
https://pypi.org/project/pyformlang/
MIT License
45 stars 10 forks source link

RSA: added from_cfg method #11

Closed IlyaEp closed 3 years ago

IlyaEp commented 3 years ago

Hello @Aunsiels

I propose a new method for RSA.

Example:

from pyformlang.cfg import CFG
from pyformlang.rsa import RecursiveAutomaton

my_rsa = RecursiveAutomaton.from_cfg(CFG.from_text("S -> a S b | a b"))
vadyushkins commented 3 years ago

Wow! :open_mouth: Looking forward to seeing it in the new release!

Aunsiels commented 3 years ago

Perfect! Thank you again for your contribution!

Aunsiels commented 3 years ago

The new version is out :)