This project converts a given Context-Free Grammar (CFG) into Chomsky Normal Form (CNF). The purpose of this transformation is to simplify the grammar and prepare it for parsing algorithms such as CYK. This program is implemented in C++ as part of a Theory of Automata and Formal Language course and based on an object-oriented programming (OOP).
- Reads a context-free grammar from input.
- Input include: terminal symbols, non-terminal symbols, and production rules.
- Converts the CFG to CNF step by step using standard transformation rules.
- Outputs the resulting CNF grammar in the same format as the input.
- Implemented in C++
- The core concept of the project is the transformation of CFGs into Chomsky Normal Form (CNF)
/CFGtoChomskyConverterProject
βββ main.cpp
βββ ProductionRule.h / .cpp
βββ Terminal.h / .cpp
βββ Variable.h / .cpp
βββ README.md