A small Python script for generating all words (and total count of them) that are part of particular CFG (Context-free Grammar).
It's really straight forward. Change productions
to your specific case. Then, just run it and enter maximum length of a word.
- Learn to properly programm in python (or in general)
- Fix issues
Warning
It is not a fatal issue, but currently this script creates duplicate productions in the middle. Don't worry only unique words are displayed in the end. However, optimizing this would increase the performance significantly.
Found a bug or better solution? Please report to the issue section.