- Notifications
You must be signed in to change notification settings - Fork2
Python program to convert a Context Free Grammar to Chomsky Normal Form.
License
BaseMax/CFG2CNF
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Python tool able to convert a Context Free Grammar in Chomsky Normal Form
Python program to convert a Context Free Grammar to Chomsky Normal Form.
I read 7 chapters of the book and the result of my study was writing this program.
An Introduction to Formal Languages and Automataby Peter Linz
Chomsky Normal Form is a context-free grammar that has been put into a specific format. It was developed by Noam Chomsky in 1978 and is part of formal language theory.
https://en.wikipedia.org/wiki/Chomsky_normal_form
https://en.wikipedia.org/wiki/Context-free_grammar
git clone https://github.com/BaseMax/CFG2CNFcd CFG2CNFpython main.pyS -> SaB | aBB -> bB | $*The above grammar is equivalent to the following grammar:
S -> SaBS -> aBB -> bBB -> $*The image below will change your think of the Automata:
Sure, We are need this subject all of the day, Also programming languages!
Follow this way by reading followingbook.
If you find a problem or bugs in program, please sendIssue orPR, i'm a new member in this study...
Learn in some videos:
- https://www.youtube.com/watch?v=5_tfVe7ED3g
- https://stackoverflow.com/questions/3510109/how-can-i-determine-if-a-language-is-context-free-or-not#:~:text=First%2C%20you%20should%20attempt%20to,the%20language%20is%20context-free
- https://www.youtube.com/watch?v=mlXYQ8ug2v4&list=PLBlnK6fEyqRgp46KUv4ZY69yXmpwKOIev&index=77
- https://www.youtube.com/watch?v=Mh-UQVmAxnw&list=PLBlnK6fEyqRgp46KUv4ZY69yXmpwKOIev&index=78
- https://www.youtube.com/watch?v=FNPSlnj3Vt0&list=PLBlnK6fEyqRgp46KUv4ZY69yXmpwKOIev&index=79
- https://www.youtube.com/watch?v=ZCbJan6CGNM&list=PLBlnK6fEyqRgp46KUv4ZY69yXmpwKOIev&index=80
- ...
Thanks to Khalilian for providing these videos and the great help he did.
Good for start to checkMini Calculator Interpreter project.
My nickname is Max, Programming language developer, Full-stack programmer. I love computer scientists, researchers, and compilers. (Max Base)
A team includes some programmer, developer, designer, researcher(s) especially Max Base.
About
Python program to convert a Context Free Grammar to Chomsky Normal Form.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.

