CS 445 HW#6
Due: Friday Dec 13 11:50am
Generate final code for VGo. Please turnin via bblearn an electronic copy
of your whole project in a hw6.zip.
Take your VGo compiler, and add target code generation. The default target
is x86_64 assembler code.
You may generate code for some other target if the instructor approves of
the target in advance; generally, approvals will be granted for lower
level language targets that run on cs-course42.
Finals week demos: you are encouraged to demonstrate your compiler
to your professor in its final state. This allows you to show what works
and ensures that you get credit for as much as you are able to accomplish.
Minor corrections and resubmission will be allowed in reponse to a finals
week demo.
Notes
- your executable should still be named "vgo"
- your program should accept and process an arbitrary
number of source filenames on the command line
- take in files with .go extensions and write out corresponding
final code in files with an appropriate (e.g. .s) extension.
- write out the name of the file to standard out when you open it
- do NOT write out the tree, or other debugging information, by default;
you may add command line options to print that info if you want.
- error messages should be written to standard error not stdout
- If no errors and -s was given, generate assembler (as)
- If no errors and -c was given, call the assembler (as) or compiler (cc)
to produce an object code file in your target language.
- If no errors and no -c was given, call the assembler or compiler to
produce a .o file, and if that was successful, go ahead and call a
linker and produce an executable
- if ANY file has a lexical error,
your process exit status should return 1,
for a syntax error 2, for a semantic error 3, and for no errors,
return 0.