Scarlet is a custom compiler developed in C++, designed with the primary goal of enhancing our understanding of compiler construction. The overarching objective is to implement an exceptionally fast machine learning framework built atop this compiler.
To build Scarlet, invoke cmake
with the DCMAKE_CXX_COMPILER
flag within the build directory.
cmake -DCMAKE_CXX_COMPILER=<compiler> ..
To test Scarlet, execute the following command within the build directory:
make test-scarlet
Scarlet currently supports the following architectures:
Operating System | Compiler | Supported Architectures |
---|---|---|
Ubuntu | GCC | x86_64 |
Ubuntu | Clang | x86_64 |
macOS | Clang | ARM64 |
- Implement a compiler driver with a custom lexer, parser, assembly generation pass, and code emission pass. (Note: We rely on GCC implementations for linking and preprocessing at this stage.)
- Integrate Boost Program Options to replace manual handling of
argc
andargv
functions. - (Lexer.cc) Find an alternative to erasing the
file_contents
text repeatedly. - (Lexer.cc) Refactor to read characters directly from the file stream.
- (Parser.cc) Refactor
unop set_op
(Line:125) to use enums. - Generate a
.txt
file for the Scarlet output. {Not needed as it will incur a lot of overhead and serves no purpose} - Create a static library for the lexer, parser, and code generation components.
- Add support for Unary Operations (Neg, Not)
- Add support for Binary Operations (Add, Sub, Mul, Div, Rem)
- Add support for Bitwise Binary Operations (And, Or, Xor, LeftShift, RightShift)
We ask all contributors to adhere to the following guidelines:
- Please follow the Conventional Commits specification: Conventional Commits.
- Make your changes on a separate branch.
- Ensure that your Pull Requests (PRs) are atomic, addressing one change or feature at a time.