Data Center
Philosophy
RoboWar

About Me
Programming

Updated: 1 June 2000


Programming :
TigerPants


TigerPants is most of a compiler for the tiger99 langauge written in Java. It was written by: Ross Duncan,Lucas Dixon,Stuart Buchanan.

Features

The final (though I wouldn't say finished) version of the compiler lexes and parses tiger files and generates abstract syntax trees.

Sadly the front end doesn't produce very helpful error messages. This is still on the TODO list.

The compiler also type checks and produces good error messages.

If an there is an error in the source program the compiler presses on (somewhat unwisely) to the translate phase, which will usually fall over in this case.

If the program checks OK then the compiler does translation to IR, canonicalisation and then instruction selection. Code for register allocation and liveness analysis exists but does not work at all so has not been linked in.

The output from Main.Main is somewhat messy. First it pretty prints the Abstract syntax tree of the whole program , followed by the IR tree ( in pre-canon, post canon, Basic block and trace scheduled forms) and MIPS code for each fragment.

Note that since we haven't done register allocation the registers that appear in the assembly output are placeholders for registers which are alway 'dx or 'sx where x is a number. Since our pretty printer isn't very good we haven't output the temporary each placeholder represnts either. Thus a certain ammount of insight is required to interpret the assembly output. The provision of a better printer would help enormously but we don't have time to write one.

Download compiler + source:
tigerpants.tar.gz [tar.gz : 328k]

 

 


[ DataCenter ]  [ Philosophy ]  [ Programming ]  [ RoboWar ]  [ AboutMe ]
This web page was created by Lucas, comments can be emailed to me at: lucasd@dai.ed.ac.uk