It is simple compiler that compiles a dialect of BASIC to C, while being written in Go Lang
It supports:
- Numerical variables
- Basic arithmetic
- If statements
- While loops
- Print text and numbers
- Input numbers
- Labels and goto
- Comments
go build -o compiler
./compiler <filename>.urdu
DEKHAO "Hello Dunya"
NAM a = 0
JAB a < 1 KARO
DEKHAO "Enter number of scores: "
BTAO a
JABBND
NAM b = 0
NAM s = 0
DEKHAO "Enter one value at a time: "
JAB b < a KARO
BTAO c
NAM s = s + c
NAM b = b + 1
JABBND
DEKHAO "Average: "
DEKHAO s / a
Read the tutorial: Let's make a Teeny Tiny compiler, part 1 as well as part 2 and part 3