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
gcc
orclang
for compilation. - Latest
cmake
for building the project. clang-format
for formatting the code.Doxygen
andgraphviz
for 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 -j12
There are tow modes:
i
: interpreterc
: compiler
./cppmpiler i # run with interpreter mode
./cppmpiler c # run with compiler mode
You could look at docs for documentation.