Skip to content

Commit

Permalink
add more links to README
Browse files Browse the repository at this point in the history
  • Loading branch information
paulzfm committed Sep 25, 2019
1 parent 1d1c1ff commit 0f888cb
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ Decaf is a Java-like, but much smaller programming language mainly for education
We now have at least three different implementations of the compiler in Java, Scala and Rust.
Since the standard language has quite a limited set of language features, students are welcome to add their own new features.

We are happy to announce that this new compiler, written in Java, is now tested upon a partial set of Decaf programs, from parsing to emitting MIPS assembly code. However, a lot of work will be done in a couple of weeks -- refactoring, documenting and revising to meet the new Decaf language standard. More materials are coming soon.

The final version for the compiler course will be ready right before the publication of the first PA assignment.

## Getting Started

This project requires JDK 12.
Expand Down Expand Up @@ -39,10 +35,29 @@ to display the usage help.
Possible targets/tasks are:

- PA1: parse source code and output the pretty printed tree, or error messages
- PA1-LL: like PA1, but use hand-coded LL parsing algorithm, with the help of a LL table generator [ll1pg](https://github.com/paulzfm/ll1pg)
- PA2: type check and output the pretty printed scopes, or error messages
- PA3: generate TAC (three-address code), dump it to a .tac file, and then output the execution result using our built-in simulator
- PA4: currently same with PA3, will be reserved for students to do a bunch of optimizations on TAC
- PA5: (default target) allocate registers and emit assembly code, currently we are using a very brute-force algorithm and only generates MIPS assembly code (with pseudo-ops, and no delayed branches)

To run the MIPS assembly code, you may need [spim](http://spimsimulator.sourceforge.net), a MIPS32 simulator.
For Mac OS users, simply install `spim` with `brew install spim` and run with `spim -file your_file.s`.

## Releases

See https://github.com/decaf-lang/decaf/releases for releases, including separate frameworks for PA1 -- PA3.

## Materials

We have a couple of Chinese documents on the language specification and implementation outlines:

- https://decaf-lang.gitbook.io
- https://decaf-project.gitbook.io

## Development & Contribution

In future, we will develop on (possibly variates of) development branches,
and only merge release versions into the master branch.

Issues and pull requests for fixing bugs are welcome. However, adding new language features will not be considered, because that's students' work!

0 comments on commit 0f888cb

Please sign in to comment.