Question: Project Requirements Design the data structure of representing a context - free grammar. Choose your programming language. Design and implement one program in your selected
Project Requirements
Design the data structure of representing a contextfree grammar.
Choose your programming language.
Design and implement one program in your selected programming language for the following functions:
Take input of a contextfree grammar.Simplify the contextfree grammar by the three simplification algorithms to removing productions, unitproductions, and useless productions.Convert the simplified contextfree grammar to the Chomsky Normal Form and Greibach Normal Form.
Develop test cases and test your implementation. Your test cases should at least include the following two examples that were discussed in our class meeting.
Test Case :S A BA B aBb b
Test Case :S a aA B CA aB B AaC cCDD ddd Cd
Project Submission
The data structure.
The program structure
The source code.
The test data test cases and test results.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
