Skip to content

About

This project is a compiler for my own language called cobble. It is called that since it is very cobbled together however it is in its current state turing-complete. The goal is for the language to be self-hosting. Please have fun playing around with it wight now you have to run ./build/cobble test.cb to compile your file.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

162 Commits

Folders and files

Repository files navigation

Cobble language

This programming language was created as a learning project so that I can learn hands-on about compilers, compiler optimisations, using CMake and unit tests, assembly, lexing and abstract syntax trees, immediate representations and much more. It is technically not meant to be used for anything; however, it can be, as it is Turing-complete, so one can technically do anything with it.

Syntax

Everything here is mostly correct, as the changes since the last update have been 99% additive.

Grammar of cobble

Note: For functional purity, local variables are not accessible inside functions

Try it

It is quite hard to try it for now as the website is not hosted as i am still unsure what would be a good and free way to host the backend, i might just hook it up onto my raspberry but i am still unsure however you can still try it by either downloading this repo, compiling it with cmake or using the compiled compiler cobble the argument list can be found in main but its ./cobble <input-file> <output-path> where the <input-file> is of the extension .cb. Or you can try it by going to the Web Editor repo and hosting both the front- and backends locally and then try it on the web interface, which is made with the Monaco editor and has the syntax supported. Hence, you have autocompletes, snippets, colouring, etc...

About

This project is a compiler for my own language called cobble. It is called that since it is very cobbled together however it is in its current state turing-complete. The goal is for the language to be self-hosting. Please have fun playing around with it wight now you have to run ./build/cobble test.cb to compile your file.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages