Create a "CodeGenerationVisitor" class that emits IA-32 assembly code.
You will have 10 (and only 10) minutes to present your work. Discuss at least the following points:
Take the name of a C- program as a command-line argument. If no argument is specified read from standard input. Use ".cm" as the extension for C- source files.
Output errors as in the previous assignments. Be sure to include ACCURATE location information.
Output the AST as before.
If there are no syntax or semantic errors, perform the last pass with a "CodeGenerationVisitor" to emit IA-32 assembly to "X.s", where "X" is the base name of the source file. If reading from stdin, output code to "Default.s". Once the assembly file is generated, programmatically invoke "gcc" to assemble and link it into an executable named "X".
For valid programs use the EXACT format below.
Valid! Writing AST to "InsertionSort.ast" Writing executable to "InsertionSort"
Submit a Makefile and all files needed to build your compiler ("CMinus"). Also include a text file "Team.txt" listing your team members, their contributions, what functionality works, what doesn't, and the areas with which you struggled.
NOTE: NO submissions will be accepted after the due time.
You will find the following source files helpful: