This is my implementation of Writing An Interpreter In Go and Writing A Compiler In Go in cpp.
For setting up the development environment. You must develop in the UNIX-like environment with the following requirements:
- Latest
gccorclangfor compilation. - Latest
cmakefor building the project. clang-formatfor formatting the code.Doxygenandgraphvizfor building the docs.
It is easy to build for this project:
git clone https://github.com/shejialuo/cppmpiler
cd cppmpiler && mkdir build && cd build
cmake ..
make -j12There are tow modes:
i: interpreterc: compiler
./cppmpiler i # run with interpreter mode
./cppmpiler c # run with compiler modeYou could look at docs for documentation.