Share your repls and programming experiences

← Back to all posts
calculator but its actually a programming language
personmandude

This is a calculator i made that uses the same system as a programming language.

Lexer/tokenizer:
input -> tokens
parser:
tokens -> abstract syntax tree
interpreter:
abstract syntax tree -> a result

This is super unnecessary and took me way too long but yeah it works decent i guess. It can handle parentheses, negative numbers, exponents, and basic multiplication, division, addition, and subtraction.

Voters
JWZ6
personmandude