In the first milestone, an initial Spoofax project is extended to a basic MiniJava editor, that is able
- to report syntax errors,
- to assist the creation of MiniJava programs with code templates,
- to show the abstract syntax of a MiniJava program,
- to provide an outline view of a MiniJava program,
- to support code folding, and
- to pretty-print a MiniJava program.
We highly recommend to work with a fresh Eclipse and Spoofax installation. Follow the Spoofax download instructions. You may also install some additional Eclipse plug-ins to which you are used to, e.g. for version management.
You should start with a fresh Eclipse workspace and create a new, empty Spoofax project. Since we use automated grading tools, it is important to get the following steps right:
- Start Eclipse.
- Select a fresh workspace.
- Create a new Spoofax project in your workspace:
- Right-click into the Package Explorer.
- Select New from the context menu.
- Choose Project... from the list.
- Select the Spoofax editor project wizard.
- Switch to the Next tab.
- As Project name, use
MiniJava
. - As Language name, use
MiniJava
. - Keep the Plugin ID and package name as suggested by the wizard.
- As File extensions, use
mjv
. - Select both checkboxes.
- Press the Finish button.
You should create a separate project for your test cases and example programs:
- Right-click into the Package Explorer.
- Select New from the context menu.
- Choose Project... from the list.
- Select the Project wizard from General.
- Switch to the Next tab.
- As Project name, use
MiniJava-tests
. - Press the Finish button.
You can find the MiniJava Language Reference Manual in the appendix of the book Modern Compiler Implementation in Java (2nd edition). The relevant pages are available on Google books.
The MiniJava project by Joao Cangussu, Jens Palsberg and Vidyut Samanta provides some example programs and an HTML version of the reference manual.
We provide answers to frequently asked questions for this milestone.