Hey! :D so some of you previously might know me as somebody who tried to make a Backend rest API framework, and i would say I was fairly successful in it as well >:( ... (sort of-) BUT anyways I am now making a Programming Language :3 I'M SO EXCITED FOR THIS β‘β‘ Okay so let me give you the current progress of what's happening :) I was able to get a simple Pratt Parser up and running, and I also have a simple interpreter which interprets simple statements and expressions! You are able to write simple code in my language oh btw I have called it flamingo lol (named on the local bar near my college lmao) SO SO SO YOU CAN MAKE FUNCTIONS AND VARIABLES AND STRUCTS AND YOU CAN IMPORT STUFFS FROM OTHER FILES AS WELL IT'S REALLY COOL!!! I LIKE IT SO MUCH, and there is also a simple standard library available for this (currently it only allows you to get the current linux time as a number)
I will list down the features which there is right now:
- Functions
- Variables
- Structs
- Conditionals
- Loops
- Simple Arithmetic Expressions
- Import Statements
I have tried making multiple data structures like a Linked List, Binary Tree and other stuffs as well, I am very satisfied by this progress for now but currently I'm working on a simple virtual machine to make it run faster and better :P
I'll attach some screenshots (if I'm not too lazy) OR NVM I CHANGED MY MIND YOU CAN GO TO THE GITHUB AND CHECK IT OUT YOURSELF I HAVE SOME EXAMPLES POSTED THERE I'LL ADD SOME SYNTAX THO LOL :3
var x = 5;
@to_greet() {
struct x {
b: str
}
return #x{b: "hello"};
}
I mean this is pretty self explanatory I don't think I will have to explain this but yeah :D
I will also update the README to include some screenshots and some syntax :) and post the links to the repositories here only!
Oh btw just a sidenote I know python is not a good tolling to write this on, but I started this as a college minor project π and my teachers expect me to make a project in python so I had to use that only for the interpreter :'(
BUT FOR THE VIRTUAL MACHINE I'M WORKING IN RUST!!!! And my plan is to compile this language to an IR which brings me to β¨QUARK VMβ¨ SO SO SO my plan is to compile the AST into an IR which will be in my custom Virtual Machine's Assembly (it's a work in progress right now) and then my virtual Machine can interpret that IR thus making it kind of portable ... but not really, let me tell you why. So currently My virtual Machine has an Instruction to execute native syscalls which is different for different Operating Systems :/ so if i want to implement some sort of networking shenanigans I will use native syscalls only and If I'm not wrong (I might be lol) the syscalls are different for those in different operating systems so yeah ... there are still a lot of things to figure out BUT I WILL KEEP THIS POSTED :3
This is the Repository for the Interpreter
This is the Repository for the Virtual Machine
I want the Virtual Machine to be a separate thing as well that is why I have it separate lol
ANYWAYS I WILL KEEP YOU GUYS POSTED ABOUT IT TILL THEN HERE'S A CUTE CUTE CAT :D
Top comments (0)