/jackCompiler

A Compiler made from scratch which Implements a basic Object-Oriented Language named Jack.

Primary LanguagePythonMIT LicenseMIT

JackCompiler

Jack Compiler is a two-tier compiler made from scratch with python which implements a basic Object-Oriented Language named Jack. Jack language is a simple and a primitive programming language, which was made scratch for a 16-bit architecture called Hack PC which is a project of the course Nand2Tetris. This project is extending the implementations of Jack Language.

Getting Started

These instructions will get you a copy of the compiler on your local machine for development and testing purposes.

Prerequisites

What are the requirements inorder to develop the Jack language.

python 3.6.*

VM Emulator (which you can find in the [**tools**]( /tools/) directory.

Running the tests

While running tests on the compiler follow these steps.

Compile the code using the compiler

    $ python3 JackCompiler.py /path/to/the/Jack_file(or) directory

Once a Jack file is compiled a file with same name with extension .vm is created, which is the VM code which can be run on the VMEmulator that is supplied in tools.

Running a VM file in a VM Emulator

Windows

cd "PATH\ TO \ JackCompiler \ tools \ " VMEmulator.bat

Linux

cd /PATH/ TO /JackCompiler/ tools
./VMEmulator.sh

Screenshots

These screenshots helps you how to use the supplied tool. For detailed description refer tool.md alt text

alt text

alt text

Built With

  • python3

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details.