Git Product home page Git Product logo

jackcompiler's Introduction

JackCompiler

Build Status Language grade: C/C++

OS Build & Test Pipeline Status
Linux Build Status
MacOS Build Status
Windows Build Status

This is a C++-implementation of a compiler for the Jack programming language defined in project 9 of the nand2tetris-course. The program takes as argument either a single .jack-file or a directory containing such files, compiles the file(s) into Hack virtual-machine language code and writes the result to one or more .vm-file(s).

Building the program

Note: To build this program, a compiler that supports C++17 and std::filesystem is required (e.g. gcc version โ‰ฅ 8).

git clone https://github.com/mfl28/JackCompiler.git
cd JackCompiler
cmake -B build    # Use option "-D BUILD_TESTING=OFF" if you do not want to build the unit-tests.
cmake --build build   

Running the program

After you built the program, do the following from within the build-directory:

Linux

./JackCompiler path/to/filename.jack    # Or "./JackCompiler path/to/directory"

Windows

cd Debug    # Or "cd Release" if you built using Release-configuration.
.\JackCompiler.exe path\to\filename.jack    # Or ".\JackCompiler path\to\directory"

Running the tests

If you built the program including the unit-tests, then these can be run from within the build-directory by doing the following:

Linux

ctest -V

Windows

ctest -C Debug -V    # Or "ctest -C Release -V" if you built using Release-configuration.

References

jackcompiler's People

Contributors

mfl28 avatar

Stargazers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.