a stack based programming language
i was watching a youtube video (i forgot the name sorry :(..), i got inspired by it to create this. additionally, since i had a school project coming up where i had to create a programming language, i thought itd be a great idea to get the feels of it by starting with this simpler project.
quit command
input command
macros
multiple stack support
variable support
run build.sh (*nix only)
PUSH <val>
pushes to the stack
ADD
SUB
MUL
DIV
does an operation on the top two elements of the stack
PRINT
prints the top element of the stack
POP
removes the top element of the list
DUMP
clears the stack and prints everything
DUP
duplicates the top element and adds it to the stack
SWAP
swaps the top two elements of the stack
DEPTH
returns the depth of the stack
STACK
returns the entire stack, like DUMP but it doesnt purge the stack
DROP
purges the stack, like DUMP but it doesnt return the stack
ROT
rotates the top three elements of the stack: [1, 2, 3] ROT => [2, 3, 1]
LABEL labelname
JUMP labelname
JUMP
makes the code skip everything between it and LABEL
can be used to make infinite loops
IF
PUSH true
ELSE
PUSH false
ENDIF
if statement executes the code between it and else if the top element in the stack is true if statements need an endif
GT
LT
EQ
these operators pop the top two elemnts and add the result to the stack