Hi, @Aunsiels!
First of all, thanks a lot for the wonderful library!
I was translating the context-free grammar into the Chomsky normal form by using to_normal_form() function and noticed this strange bug.
>>> from pyformlang.cfg import CFG
>>> cfg = CFG.from_text("S -> a S b S")
>>> cnf = cfg.to_normal_form()
>>> cnf.productions
set()
However, I was expecting to see something like this.
S -> S0 S
S0 -> S2 S1
S1 -> b
S2 -> S3 S
S3 -> a
Environment
OS: Ubuntu 20.04
Python: 3.8.5
Pyformlang: 0.1.24, 0.1.23, 0.1.22, 0.1.21, 0.1.20
Yes, on all these versions of the library, the bug is also reproduced.
Hi, @Aunsiels! First of all, thanks a lot for the wonderful library! I was translating the context-free grammar into the Chomsky normal form by using
to_normal_form()
function and noticed this strange bug.However, I was expecting to see something like this.
Environment
Ubuntu 20.04
3.8.5
0.1.24
,0.1.23
,0.1.22
,0.1.21
,0.1.20
Yes, on all these versions of the library, the bug is also reproduced.