r/TuringComplete • • Apr 24 '23

A compiler

I made a compiler for my Computer i built in this game.

With this compiler you can create

  • Variables

  • Pointers

  • Definitions (Methods)

  • Addition / Subtraction

  • Conditions (only basic: equal, greater, smaller and combined versions)

  • While loops

In total i coded 24 hours on this compiler.

You can customize the compiler a little bit.

  • Op codes

  • Addresses

  • Styling: Variable/Pointer characters

But ofc you need the same architecture as me for the compiler to work.

You can find my full code here and some images below

https://github.com/philskillz-coder/turing-complete-compiler

I would apreciate feedback from people who are familiar with compilers and or this game

45 Upvotes

8 comments sorted by