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 context-free grammar.
Choose your programming language.
Design and implement one program in your selected programming language for the following functions:
Take input of a context-free grammar.Simplify the context-free grammar by the three simplification algorithms to removing -productions, unit-productions, and useless productions.Convert the simplified context-free 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 1:S A | B,A ,B aBb | b
Test Case 2:S a | aA | B | C,A aB | , B Aa,C cCD,D 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!