Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eld/jackcompiler
Jack compiler from nand2tetris project 10/11
https://github.com/eld/jackcompiler
Last synced: 9 days ago
JSON representation
Jack compiler from nand2tetris project 10/11
- Host: GitHub
- URL: https://github.com/eld/jackcompiler
- Owner: ELD
- Created: 2015-03-18T16:39:11.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-02T17:40:20.000Z (over 9 years ago)
- Last Synced: 2024-11-16T14:11:43.365Z (2 months ago)
- Language: C++
- Homepage:
- Size: 309 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JackCompiler from Nand2tetris
### Readme:
###### You may look at the code, but you should not use it. Don’t deprive yourself of the opportunity to write the assembler yourslf as part of the nand2tetris course.
**Build Instructions and Usage**: Simply typing `make -j[N]` where `-j[N]` is the number of threads you want to build with (the more threads, the faster it compiles; the Makefile supports incremental builds) builds the core project. Once the project has been built, the executable will be placed in the `target/` directory with a name of `jackcompiler`. In order to run the compiler simply type `./target/jackcompiler [filename|path]`. The compiler will accept any path anywhere in the filesystem and will place the translated `.vm` file in the root directory of this project. For example, if you invoked the compiler as such: `./target/jackcompiler ../11/ComplexArrays/` the resulting `.vm` file(s) would be created as `../11/ComplexArrays/`.**Dependencies**: The project depends on the Boost.Filesystem library, the Boost.Tokenizer library, and miscellaneous Boost libraries. It's best to install the entire suite of Boost libraries. This requires the installation of the Boost libraries. In order to link correctly with the Boost libraries, the Makefile assumes you have a $BOOST_LIBS environment variable pointing to the root directory of the Boost library installation. For example, on my machine it’s set to `/usr/local/Cellar/boost/1.57.0`.
**Build Notes**: The project was developed on a 15” Retina Macbook Pro running Mac OS X Yosemite and compiled with Clang 3.6. The project was also built and tested on a virtual machine running Ubuntu 14.04 with GCC 4.9 and Boost installed. I found an oddity with the GCC 4.9 STL implementation that the std::stringstream class didn't have a move constructor implemented. This disallowed the use of a std::stringstream object as an rvalue which required me to create temporary objects before assigning them to strings. I also ran into an issue where std::async would segfault on Linux.