MiniJava
JExpr - a parser for a very small subset of Java. It was created to help me understand what would be necessary to develop a full compiler starting from a JavaCC-generated parser - in effect to answer the FAQ "OK, I have written a parser. Now how do I get it to execute my code?".
Only a very small subset of Java can be compiled -
see expr.txt as
an example.
This system consists of the following components:
- A JavaCC parser, JExpr.jj
- A set of Abstract Syntax Tree classes.
- A Contextual (semantic) Analsys visitor.
- A type resolution class used by the Contextual Visitor.