.RAR

# Project 3

If ε belongs in the set, represent it as #
If ε belongs in the set, it should be listed before any other elements
All other elements of the set should be sorted in dictionary order (specifically, the C function strcmp from string.h defines the sorting order)
OutputThe output for the example grammar given previously when run with the command line argument of 1 like ./a.out 1:FIRST(decl) = { ID } FIRST(idList1) = { #, COMMA } FIRST(iDList) = { ID } Task 2: FOLLOW SetsFor each of the non-terminals of the input grammar, in the order that they appear in the non-terminals section of the input, compute the FOLLOW set for that non-terminal and output one line in the following format:FOLLOW(<symbol) = { <set_items } Where <symbol should be replaced by the non-terminal and <set_items should be replaced by the comma-separated list of elements of the FOLLOW set ordered in the following manner:
If EOF belongs in the set, represent it as \$
If EOF belongs in the set, it should be listed before any other elements
All other elements of the set should be sorted in dictionary order (specifically, the C function strcmp from string.h defines the sorting order)
OutputThe output for the example grammar given previously when run with the command line argument of 2 like ./a.out 2:FOLLOW(decl) = { \$ } FOLLOW(idList1) = { colon } FOLLOW(idList) = { colon } EvaluationYour submission will be graded on passing the automated test cases.The test cases (there will be multiple test cases in each category, each with equal weight) will be broken down in the following way (out of 105 points):
Task 0 for all grammars: 20 points
Calculating FIRST sets for grammars without ε: 30 points
Calculating FIRST sets for grammars with ε: 20 points
Calculating FOLLOW sets for grammars without ε: 25 points
Calculating FOLLOW sets for grammars with ε: 10 points
Note that the output produced by your program should exactly match the expected output, and no partial credit will be given.For every test case, there are 3 expected output files respectively for each task. For example, for the input file test01.txt, there is test01.txt.expected0 for the expected output of task 0, test01.txt.expected1 for the expected output of task 1 and test01.txt.expected2 for the expected output of task 2. There is also a modified version of the test script test1.sh that you should use to test your code with the provided test cases for this project. You can find this test script along with the project material.SubmissionSubmit your code on the course submission website:https://cse340.fulton.asu.edu/cse340/