Skip to content

A stack-based language with extra features (that are most likely pointless)

License

Notifications You must be signed in to change notification settings

TobyBridle/stakz-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

icon

STAKZ

Disclaimer: This language was not intended to be used for anything other than a learning experience and a bit of fun. In it's current form, do not use it for anything other than that.

What is STAKZ?

STAKZ is a stack-based language with enforced types, created for use on the Apple M1 Processor.

How do I run a STAKZ Program?

First, you'll need to be using a variant of the Apple M1 chip. If you're not, unfortunately, you can't run the compiled binary. If you are on a variant of the M1, congrats, you can continue!

Step 1 Create a file, e.g test.stx. Write some stakz code inside of it (check out the /examples dir for some basic examples).

Step 2 Run make to create an executable of the compiler.

$ make

Step 3 Once the compiler has been made, run it:

$ ./a <path-to-file>

Step 4 The previous step will have generated the assembly for your fantastic program. Now all you need to do is build it and you'll be able to run it!

$ make build

Step 5 (The best one) Run your program!

$ ./stakz

Example

"Hello, World!" out

Further examples can be found in the /examples dir


Todos

  • Create Lexer
  • Create Parser
  • Generate Assembly from Parser
  • Optimise the Compiler
  • Add more features (highest priority being modification of stack variables and the ability to pop elements from the stack)

References used for making the Compiler

For helping decide how to implement the Parser

About

A stack-based language with extra features (that are most likely pointless)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published