Decaf scanner/parser/checker/MIPS code generator
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The following front-end scripts are available:
	decaf-lint - check a Decaf source file for semantic errors
	mips-decafc - compile a Decaf source file to MIPS assembler
	mips-sim - simulate a MIPS assembler file
	decaf-sim - simulate a Decaf source file

Each of these in turn calls the following binaries:
	lexan - scan and tokenize input
	parse - create a parse tree of the input
	decafc - check a Decaf parse tree for semantic errors
	mips-decaft - translate a Decaf parse tree to MIPS assembler

For only slightly more information on each, see its respective manual
page.


Semantic Checking
~~~~~~~~~~~~~~~~~

The following semantic checks are performed:
	assignment in a field declaration agrees with the rhs constant
	break/continue statement occurs within a loop
	return statement agrees with the return type of the function
	lvalue of assignment agrees with the rhs expression
	lvalue and rhs expression are basic types
	method call is performed on a method
	arguments are of the appropriate number
	arguments are of the appropriate type
	array indexing is performed on an array
	array index is of integer type
	unary minus operand is of integer type
	not operand is of boolean type
	operands of arithmetic operators are of integer type
	operands of relative operators are of integer type
	operands of equality operators agree in type
	operands of equality operators are basic types
	operands of conditional operators are of boolean type
	integer constants are in the range [0, 2147483647].
	symbols are in scope when they are referenced (except methods)
	the method main exists
	the method main returns void
	the method main takes zero arguments

note: The Decaf to MIPS translator performs very little semantic
checking. It assumes that the source file it is compiling has already
passed the semantic checker. Running the translator on a source with
semantic errors will produce undefined results.


Copyright
~~~~~~~~~

Copyright 2004 Shaun Jackman

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
