Skip to content

About

Repository for custom compiler project

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

ABOUT THE PROJECT

This repo contains the source code for a custom compiler project codenamed Zyx.

This is a simple (for now at least) compiler for a custom imperative formal language that draw inspirations syntax-wise from mix of modern C++ and Python. The primary purpose was for the language to be Turing-complete with minimal set of primitives. Supported features can be viewed in Backus-Naur form in ./backus-naur-form.txt.

The core of the compiler is written in C++20, while the backend uses LLVM 19.x, so with provision of those dependencies the project should compile fairly easily - see Makefile for details.

USAGE

Once the project builds execute the binary ./build/zyx with no arguments. This will provide message explaining usage syntax. Exemplary usage has been showcased on the videos below.

EXAMPLES

Compilation and Running of FizzBuzz(like)

demo-fizzbuzz
Click for full video

Fibonacci Sequence with Detailed Compilation Log

demo-fibonacci
Click for full video

Running Compiler Test Suite

demo-error
Click for full video

Examples of Compiler Catching Errors

demo-error
Click for full video

LICENSING

GNU AGPL 3
For details please check out the license file ./LICENSE.

About

Repository for custom compiler project

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages