bison -d P1.y
flex P1.l
gcc P1.tab.c lex.yy.c -lfl -o P1
./P1 < X.java > Y.java
should generate the correct minijava code in Y.java.
Note, your program must take input from standard input and write to standard output (so that we can use the redirection).
The format for the minijava programs is given by the minijava grammar.
If the input macrojava code does not parse then output
"// Failed to parse macrojava code."
Grading policy
Your homework will be graded for a total of 100 marks.
[ under development ]