Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated readme

  • Loading branch information...
commit 9b8422f12fa406640d2f4ac7e2985ec54ec9a641 1 parent 97d1923
@thejoshwolfe thejoshwolfe authored
Showing with 20 additions and 110 deletions.
  1. +20 −110 README
View
130 README
@@ -1,5 +1,5 @@
___________________
-< CSE 440 Project 1 >
+< CSE 440 Project 4 >
-------------------
\ ^__^
\ (oo)\_______
@@ -22,7 +22,7 @@
Description:
- Semantically checks a useless pascal-like language.
+ Compiles a pascal-like language to MIPS assembly.
Comment policy:
@@ -32,120 +32,30 @@
2. Building and running instructions
To compile the project, cd to the project directory and run:
-
- make
- To run the test suite, ensure that you have Python 2.6 or later and run:
-
- make test
+ make
You can run the program manually like this:
- ./opc tests/test_name.p
+ ./opc tests/test_name.p > out.mips
+
+ To run the MIPS program, you must have spim (or some other MIPS interpreter):
+
+ to install spim in Ubuntu/Debian:
+
+ sudo apt-get install spim
+
+ to run the MIPS program:
+
+ spim -file out.mips
+
+ To run the test suite, you must have Python 2.6 or later and spim:
+
+ make test
3. What cases are handled
-
- array assignment invalid
- array assignment valid
- array bounds declare invalid
- array bounds invalid
- array bounds valid
- array dim2
- array dim4
- array index boolean
- array index boolean variable
- array index class
- array multi bounds invalid
- array multi bounds valid
- attribute designator complex
- attribute designator multi
- attribute designator multi this
- attribute designator simple
- boolean assignment invalid
- boolean assignment valid
- class assignment base type invalid
- class assignment base type valid
- class equivalence invalid order
- class equivalence invalid types
- class equivalence valid
- class preuse assignment valid
- class preuse function valid
- class preuse invalid
- class preuse valid
- datatype defined
- datatype not defined
- expression complex2
- expression complex
- expression simple
- function args few
- function call arg array
- function call arg object
- function call base
- function call class byref
- function call class noargs
- function call class
- function call multi
- function call object extend
- function call object missing
- function call object
- function declared
- function list
- function local variable declared base class
- function local variable declared
- function local variable list
- function local variable not declared other function
- function local variable not declared
- function not declared complex
- function not declared
- function return invalid complex
- function return invalid
- function return valid
- function variable same
- if then else
- indexed variable complex
- indexed variable not array
- invalid class definition undeclared vars
- invalid class definition underscores
- many nots
- many signs
- method designator complex
- method designator complex this
- missing base class
- missing program class
- object instantiation
- this global variable invalid
- this global variable valid
- this variable disambiguation extend
- this variable disambiguation
- this variable not declared
- type mismatch array integer
- type mismatch integer
- valid class definition
- variable declared base class
- variable declared global extend
- variable declared global
- variable declared
- variable invalid name tf
- variable not declared complex
- variable not declared
- while do
-
- arg casting
- broken syntax
- deep broken
- deep
- equivalence parameter invalid
- equivalence parameter
- extend loop
- forward references broken
- forward references
- main construcor too many args
- method duplication
- min syntax
- operators
- same name different class
- too many args
- wrong arg type
+
+ all the tests in tests/ that have a .p, a .p.errors, and a .p.out.
4. What the parse tree looks like
Please sign in to comment.
Something went wrong with that request. Please try again.