Jack Compiler Extensions

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Jack Compiler Extensions

cadet1620
Administrator
This post was updated on .
Here are some fairly straightforward modifications that can be made to your Jack compiler.

All of these mods are strictly extensions of the book specified Jack language. Jack programs that compile with the supplied JackCompiler will be compatible with your extended compiler, except for identifier name clashes with new keywords.

Easy

These projects are basically cookbook recipes if you wrote a recursive descent compiler following the modules and methods recommended in projects 10 and 11.

Making "let" optional in the Jack Compiler

Removing the Requirement for Braces in Jack's "if" and "while" Statements

Adding Hexadecimal and Character Constants to Jack

Medium

These projects are more narrative in nature. They require more extensive changes to the compiler and have less detailed implementation information.

Adding Standard Operator Precedence to the Jack Compiler

Adding "break" and "continue" to Jack's while loops

Adding Named Constants to Jack

Add missing compare, logical, and augmentation ops to Jack

Adding "switch/case" and "for" statements to Jack

Complex

These projects require extensive changes to underlying objects like SymbolTable and VmWriter, multiple source code passes through multiple .jack files, or the implementation may require some non-standard techniques to work around limitations in the VmEmulator.

Adding Nested Variable Scopes to the Jack Compiler

Other

These are discussions and not proposals for projects that can be reasonably added to the recursive descent compiler described in the book.

Adding symbol resolving, type checking, inheritance and polymorphism

Writing a Jack debugger

"Improving" evaluation of [boolean] expressions?

Some fun with SSA


Jump in and try your hand at language design and new feature implementation.

Post your proposals here and include how the grammar needs to be changed to include your change, and a rough idea of what changes need to be made in the compiler.

We can discuss the ideas and help you implement your feature.

Notes:

  1. Proposed features do not need to be compatible with any other complier mods, but do need to be strict extension to the book spec.
  2. Features that need a change in the VM language to support will restrict your audience to students who are willing to modify their VM translator, and will only be testable in the CPU emulator.
  3. Features need to keep the grammar LL(1) so that the simple recursive descent design can handle it.
bin
Reply | Threaded
Open this post in threaded view
|

Re: Jack Compiler Extensions

bin
I have a feeling now.
The more you learn, the more you feel ignorant.