Skip to content

Jack compiler for the Nand2Tetris project – implements lexical analysis, parsing, and code generation, translating Jack programs into VM code.

Notifications You must be signed in to change notification settings

Kugman/Jack-Compiler-By-Haxe

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jack Compiler

A compiler for the Jack programming language, implemented in Haxe.
Jack is a simple, high-level, object-based language introduced in the nand2tetris course, widely taught in computer science programs.

This project translates Jack source code into VM code (intermediate representation for the Hack computer platform).

Features

  • Full implementation of the Jack compiler
  • Written entirely in Haxe
  • Produces VM code compatible with the nand2tetris VM
  • Supports classes, methods, control flow, and expressions as defined in the Jack language

Project Structure

  • Parser.hx – Parses Jack source code into tokens and syntax trees
  • SymbolTable.hx – Manages identifiers and scope
  • VMWriter.hx – Outputs VM commands
  • CompilationEngine.hx – Coordinates parsing and code generation

Installation

Clone the repository:

git clone https://github.com/Kugman/Jack-Compiler-By-Haxe.git
cd jack-compiler-haxe

if you're already here, please consider giving this repo a star ⭐

About

Jack compiler for the Nand2Tetris project – implements lexical analysis, parsing, and code generation, translating Jack programs into VM code.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haxe 99.9%
  • C 0.1%