In this program you are going to implement a recursive descent parser for recognizing sentences in the language defined by the following grammar.
<pop>-> [<bop>, <pop>]| <bop> <bop>-> <boop>| (<pop>) <boop>-> x| y| z
You may write this program in Java, C, C++, C# or any other language you know which can be run on onyx. You may work in groups of two people for this assignment.
I should be able to compile and run your program by typing
make run < testfilewhere testfile is a file containing a string to be recognized (and nothing else) and I should be able to list the contents of your source file(s) to the console by typing
make listYour program must run on onyx. It is your responsibility to test this.
The directory on onyx has a makefile with rules for compiling and running the languages listed explicitly above and for running an executable file. For other languages, you need to figure out what command(s) are needed to run your program.
The handouts directory also contains some files containing both valid and invalid sentences from this language. You can use these to test your recognizer. If the name ends in a b, the sentence it contains is invalid. Try to come up with some tests of your own as well. Create a directory called tests and put your test files there. (These test files should be potential sentences that can be redirected into your program as input, similar to the examples I provided. If you write a test script or a JUnit test class, leave it in the main directory, document it in your README file and add a test rule to your makefile.)
You should include a text file called README with your submission. This file should describe how to run the program, explain the files included in the submission (including any test files) and tell who implemented what part of the program if you worked with someone else. Include any other information that you think is needed.
Clean any extraneous files from your directory before submitting.
Put all the required files for the assignment in a single directory, change
to that directory and submit using the following command:
submit tcole cs354 1