The Zap programming language is a general-purpose systems programming language.
The vast majority of the compiler code is authored by LLMs. I've simply been guiding them and asking them to analyze their own, as well as my, decision making. The project is really an experiment to see if I can leverage LLMs to create a compiler for a useful programming language.
- Haskell GHC for building the compiler.
- C compiler (e.g., GCC or Clang) for executing generated code.
- Clone the repository:
git clone <repository_url> cd zap-compiler
- Build the project:
stack build
- Run the tests:
stack test
To compile a Zap source file:
stack run zap-compiler -- input.zap output.c
The output will be a C file named output.c
.
Use a C compiler to compile and run the generated file:
gcc output.c -o program
./program
To execute the test suite:
stack test
Warning
The codebase is still rapidly changing so please keep that in mind when considering whether or not to contribute to the Zap programmigng language and compiler project.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes and open a pull request.
This project is licensed under the MIT License. See the LICENSE
file for details.