aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-08-05 20:59:25 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-08-05 21:16:46 -0400
commitee6c598892518d956388bb008095de6d4d7fe123 (patch)
tree0e0f2b7ee8a7a0c538854edc4c1d22feab90c5ed
parenta359edde7c8806687c4f0307dbfc6f77077ba063 (diff)
Add gitignore and checklists
-rw-r--r--.gitignore6
-rw-r--r--CHECKLIST.txt55
-rw-r--r--SemanticCheckList.txt37
3 files changed, 98 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..21840e8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*~
+*.bak
+*.o
+y.*
+mypc
+lex.yy.c
diff --git a/CHECKLIST.txt b/CHECKLIST.txt
new file mode 100644
index 0000000..ce22f78
--- /dev/null
+++ b/CHECKLIST.txt
@@ -0,0 +1,55 @@
+Project: DRAGON
+===============
+
+- Arrange an online demo of your compiler during Finals week (15min).
+
+- Send a self-contained compressed tar source of your compiler by
+ email. Your compiler must run on the ITL machines.
+
+- Submit a hardcopy of your compiler documentation: design document,
+ user manual, testing report, status report (limitations, caveats, or
+ bugs), and a "dragon" haiku. Indicate clearly in your report an
+ extra feature that is unique to your compiler.
+
+CHECK LIST
+----------
+[X] (1.0) Lexical Analysis
+[X] a. Line numbering
+[X] b. Two styles of comments
+[X] c. (optional) Scientific notation
+
+[ ] (1.5) Syntax Analysis: grammar adjustments
+[X] a. Unlimited nesting of subprograms
+[ ] b. Array access on both sides of assignment
+[X] c. Allow for statements.
+ d. (optional) Another loop construct
+ e. (optional) Multidimensional arrays
+[ ] f. (optional) Records and pointers
+[ ]
+[ ] (2.0) Symbol Table
+[ ] a. Memory-leak handler
+ b. (optional) Statistical analysis of hashpjw
+[ ]
+[ ] (2.5) Syntax Tree (Intermediate Code Generation)
+[ ] a. Visual print
+[ ] b. Memory-leak handler
+
+[ ] (3.0) Semantic Analysis & Type Checking
+[ ] a. Check list
+[ ] b. Error reporting
+[ ] c. (optional) Error recovery
+
+[ ] (4.0) Code Generation
+[ ] a. Input/Output statements
+[ ] b. Simple expressions (arithmetic and relational): gencode
+[ ] c. Statements (assignment, conditional, loop)
+[ ] d. Nonlocal names: base frame pointer (static scope parent)
+[ ] e. Recursive routines (example: GCD program)
+[ ] f. Complex expressions (register spilling)
+[ ] g. (optional) Arrays (L-value, R-value, parameters, nonlocal)
+[ ] h. (optional) Floating-point support
+
+[ ] Extra Trails (under construction)
+[ ] - Lambda or Objects.
+[ ] - Code generator for IA64 or SPARC (RISC architecture).
+[ ] - Code optimization.
diff --git a/SemanticCheckList.txt b/SemanticCheckList.txt
new file mode 100644
index 0000000..9bd2c2c
--- /dev/null
+++ b/SemanticCheckList.txt
@@ -0,0 +1,37 @@
+DRAGON Semantic Checklist
+=========================
+
+[ ] 1. Semantic rules for Scoping
+[ ] 1.1. Local objects cannot be declared more than once
+[ ] 1.2. Local objects hide non-local objects with the same name
+[ ] 1.3. Non-local objects should be visible from inner scopes (unless a local object of the same name exists)
+[ ] 1.4. Function and procedure names exist in the scope they are defined (and not in their own scopes)
+[ ] 1.5. Local objects cease to exist once their scopes cease to exist
+
+[ ] 2. Semantic rules for Expressions
+[ ] 2.1. Expressions return typed-values
+[ ] 2.2. Objects must be declared before they used in expressions
+[ ] 2.3. Objects of different types cannot appear in the same expression (no type promotions)
+
+[ ] 3. Semantic rules for Statements
+[ ] 3.1. Statements do not return values
+[ ] 3.2. The test expression for IF-THEN, IF-THEN-ELSE, WHILE-DO must be Boolean-valued;
+[ ] note that the Boolean type must be implicitly defined
+[ ] 3.3. The ELSE clause always binds to the closest IF (resolution of the dangling ELSE problem)
+[ ] 3.4. The variable type in FOR-DO must match the types of lower bound and upper bound expressions
+
+[ ] 4. Semantic rules for Arrays
+[ ] 4.1. Non-integer valued expressions cannot be used for indexing arrays
+
+[ ] 5. Semantic rules for Functions
+[ ] 5.1. Function calls return values of type Integer or Real
+[ ] 5.2. Function must contain a "return" statement within its own body;
+[ ] this is of the form: <function_name> := <expression>
+[ ] 5.3. Functions must accept exactly the same number of arguments as is
+[ ] declared in its header, with the correct sequence of types
+[X] 5.4. Functions are not allowed to update the value of nonlocal objects (via assignment statements)
+
+[ ] 6. Semantic rules for Procedures
+[ ] 6.1. Procedure calls do not return values
+[ ] 6.2. Procedures must accept exactly the same number of arguments as is
+[ ] declared in its header, with the correct sequence of types