Computer Science 4785/5785 Course Web Page
Syllabus

Final Exam   Mon. Dec. 10 10:15am-12:15pm
         notes on possible questions

Midterm on Oct. 19    Midterm Topics
        LL(1) Practice Problems
        Results
        Midterm Solution - Last Problem   (finished for Antlr  input file)

HW1
HW2    Grad Students:  for/switch sample (sample corrected on 10/10) 
 
HW3      Late homeworks accepted until Friday Nov. 2 at 5:00 PM.
              Simple.java 
              - email me your Translator .java file(s) that can handle Simple.java by Monday 10/22.
              HW3 Start
              Graduate Student Extra Requirements
              HW3  Test File

HW4   Control Structures (while/if) and Arrays (of int)    Due:  Mon. Nov. 12
                                                                                     (Late Wed. Nov. 14 5PM)
           Grad Student Extra Requirements

HW5   Functions and Stack Frames      Due: Wed Nov. 28  (Late Fri. Nov. 30 5PM)

HW6   Object Oriented Features          Due:  Fri  Dec. 7  (Late  Wed. Dec.13 5PM   Mon. Dec. 10 5PM)

MiniJava Project
          MiniJava Grammar
          Book Code   Overview of syntaxtree package
          Operator Precedence

Assembly language hidden inside Visual Studio:  simpleCode.cod
                                                                                  simpleCode.cpp

Antlr - our compiler development tool.  
         How to use... summary

Compiler Overview Slide

Sample Antlr Grammars
         SimpleExpr.g
         Expr.g    (from www.antlr.org)

LL vs. LR parsing
First attempt at LL parsing
Getting Rid of Left Recursion  how to
Expr grammar w & w/o  Left Recursion

Computing nullable
Computing first
Computing follow:  rule1  rule 2
Building the Predictive Parser Table:  rule1 rule2

Grammars 3.12 3.15 here

Antlr Exercise for 9/14

Antlr Exercise on Wed. 9/19  main  .g file

Building our first abstract syntax tree  9/24
Also an ANTLR rule that builds a Program object

What can you do with an AST?   SemiCoCounter.java
                                                   polymorphism note

Our Target Machine (Simulator)
PC-SPIM, a MIPS simulator.    Get it here.
       Simpler Install (for lab use):  here.
Documentation for MIPS
MIPS card  page1, page2

Our first little MIPS program

batch files for Running HW2

Arrays:   layout  notes

Frames in assembler:  simple     The source code
                                  simple assembler code from class
                                   complex assembler code from class
Frame layout:               simple     (complex)
A call using the frame:   simple     (complex)

objects.java  objects.s (now works!)

MiniJava without Inheritance

MiniJava with Inheritance (no polymorphic pointers)

MiniJava with Inheritance (and polymorphic pointers)    exercise

Polymorphic functions in C++  oocode.cpp  oocode.cod