aboutsummaryrefslogtreecommitdiffstats
path: root/3-compiler.md
blob: b05d373f18740586446d4c1b9079eab7581c9e45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Create a compiler for the C language
====================================

Your program should accept C source code on
`stdin` and write a heirarchical representation on `stdout`.

Input Format
------------

The input format is C90.

Output Format
-------------

The output format should be MIPS1 assembly code.

It should be possible to assemble and link this code
against a C run-time, and have it execute correctly
on a MIPS processor as emulated by `qemu-mips`.

Compilation
-----------

Your compiler should be built using:
````
make bin/c_compiler
````
and the resulting program should be called `bin/c_compiler`.

The target environment remains Ubuntu 16.04.

Deliverables
------------

There are actually three deliverables here:

1 - The compiler itself

2 - A [test framework](3-compiler-test_deliverable.md)

3 - [Documentation](3-compiler-documentation.md)