Need help with C programming -- 2

Job ID: 33588039

Budget: $20 – $30 USD

a program is one or more statements, and each statement must end with a ";"
a statement is either 1) a function call with exactly one argument, or 2) an assignment statement. The argument to the function call is an expression.
an expression is either 1) a function call with exactly one argument, 2) a variable, or 3) a non-negative integer
Here's an example program that shows most of the features of the language:
y = 3;
z = y;
x = abs(z);
print(x);
Note that function calls always contain exactly one expression within parentheses. 'abs' and 'print' are just two example function names -- other function names are allowed.
Here is a BNF grammar for the language: (prog is the start symbol)
prog ::= ID stmt1 ; prog1
prog1 ::= ID stmt1 ; prog1 | ""
stmt1 ::= ( expr ) | = expr
expr ::= ID ( expr ) | ID | NUM
I have written the grammar in a form where it is almost ready to be used for predictive parsing.
Your job is to complete the code in prog.tar so that it will parse a program in this language, and then print it. The file prog.tar contains not just code, but a Makefile and some test files you can run.
Here are how the C files in prog.tar fit together:
parser.c contains the parsing code. You will be extending this file so that it contains a function for each non-terminal in your BNF grammar. For example, if your grammar contains a non-terminal 'expr', then you will add a function expr() to parser.c
prog.c, stmt.c, and expr.c are used to build a syntax tree for a program. The function prog() in parser.c has some example code that shows how they can be used to build a parse tree. You will be modifying these files by implementing the print functions in them. For example, in prog.c you will fill in code for the prog_print() function.
you don't need to modify any of the other C files
Please do the following:
Copy the tar file to your own directory, untar it, and understand it. Start with main.c.
Compile the code (see the Makefile). It should compile without errors.
Modify the BNF grammar for the language that is provided above. You need to transform the grammar so it's in the form needed for a predictive parser.
Edit file parser.c to create a predictive parser based on your BNF (see comment "YOUR CODE HERE")
Edit your parser so that it returns a 'prog' object, which in turn contains 'stmt' and 'expr' objects
Edit files prog.c, stmt.c, and expr.c to implement the print functions in those files (see comments "YOUR CODE HERE"
Do NOT edit any other files, and do not edit the files above except as explained in the comments. When I test your code I will only use your parser.c, prog.c, stmt.c, and expr.c files.
The main program will call your parser to get a 'prog' object, then print the 'prog' object to reconstruct the program from its syntax tree.
Testing your code. Tests files tes