Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aapeliv/kazm
A small C-like programming language implemented in OCaml
https://github.com/aapeliv/kazm
compiler llvm ocaml
Last synced: 26 days ago
JSON representation
A small C-like programming language implemented in OCaml
- Host: GitHub
- URL: https://github.com/aapeliv/kazm
- Owner: aapeliv
- Created: 2021-09-24T20:14:15.000Z (about 3 years ago)
- Default Branch: develop
- Last Pushed: 2021-12-29T17:33:29.000Z (almost 3 years ago)
- Last Synced: 2023-05-17T01:36:03.774Z (over 1 year ago)
- Topics: compiler, llvm, ocaml
- Language: OCaml
- Homepage:
- Size: 1.13 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Kazm
Kazm is a C-like programming language implemented in OCaml for the Programming Languages and Translators class at Columbia University.
In addition to a basic subset of C, Kazm also supports lightweight classes, arrays, and a scoping mechanism that automatically destroys objects.
## Compiling a program
The easiest way to run the Kazm compiler is using Docker and the bundled helper. First clone the repository and enter the `kazm` directory, then compile the included `hello_world.kazm` file in the Kazm Docker container:
```sh
git clone [email protected]:aapeliv/plt.git
cd kazm/
docker run --rm -it -v $(pwd):/home/kazm -w=/home/kazm aapeliv/plt ./compile.py --run hello_world.kazm
```The helper can be run without the `--run` switch in which case the compiler will simply produce an executable but not run it.
## Running all tests
```sh
cd kazm/
docker run --rm -it -v $(pwd):/home/kazm -w=/home/kazm aapeliv/plt ./test.py
```