JuCC - Jadavpur University Compiler Compiler
This is the official Jadavpur University Compiler Compiler repository.
The JuCC project is built and tested on Ubuntu 20.04.
$ git clone https://github.com/TheSYNcoder/JuCC
$ cd JuCC
$ sudo ./script/installation/packages.sh
$ cd server
$ npm i
$ cd ..
$ mkdir build
$ cd build
$ cmake -GNinja -DCMAKE_BUILD_TYPE=Release ..
$ ninja jucc
$ ./bin/jucc -g <grammar_file> -f <input_file> -o <output_json_file>
To run the unit tests provided,
$ mkdir build
$ cd build
$ cmake -GNinja -DCMAKE_BUILD_TYPE=Release ..
$ ninja
$ ./bin/jucc_test
To run the benchmarks,
Note: -DCMAKE_BUILD_TYPE=Release
is needed
$ mkdir build
$ cd build
$ cmake -GNinja -DCMAKE_BUILD_TYPE=Release ..
$ ninja
$ ./bin/jucc_benchmark
Before pushing or making a pull request ( The tests must pass, compulsory !! )
$ ninja
$ ninja check-format
$ ninja check-clang-tidy
$ ninja check-lint
$ ninja test
To add a new unit test, make a folder with the same relative path as in the src folder, and define your test. Please refer to docs for more details about writing tests using the googletest framework.
Additional Notes:
./script/installation/packages.sh
manually.Please see the docs.
Contributions from everyone are welcome!