I was shy to post my work here, but I am more confident that it might be worth looking at now.
Several times throughout my years, I tried to write an expression evaluator and never had any success. About 8 months ago, I really pushed hard to get something done and came up with something using RPN. I made a calculator and BASIC interpreter.
These programs were initially written in QuickBasic. I am still updating them.
Tiny Craft Basic Interpreter written in QuickBasic:
https://www.lucidapogee.com/forum/viewtopic.php?t=4RPN Calc written in QuickBasic:
https://www.lucidapogee.com/forum/viewtopic.php?t=28Tiny Craft Basic is meant to be a simple line mode basic with the more minimal set of features. RPN Calc tries to be a scientific command line calculator.
Since then, I have also been developing Craft Basic for Windows or just Craft Basic. It's a direct interpreter like its line mode sibling. Written in Emergence Basic.
Craft Basic really just tries to be a minimal tiny BASIC with some bonus features including graphics and forms.
Craft Basic for Windows:
https://www.lucidapogee.com/index.php?page=craftbasicWhat's cool about this language is that everything you need is packed into one exe. All the other files are just for support. The language still works if all the other files are lost. Also, the syntax while limited is very easy to pick up.
One of the biggest limits is the lack of string support (I will be adding it in a future version release).
Some neat language features include the ability to use expressions with all FOR loop parameters including the step. DO/LOOP/LOOPWHILE/LOOPUNTIL is supported. BREAK works with FOR and DO loops. You may nest IF and ELSE. (although there's no ELSEIF or SELECT CASE)
I test my language with Rosetta Code tasks. There's already over 60 tasks complete.
https://rosettacode.org/wiki/Category:Craft_BasicHere's a preview of some Craft Basic code:
'https://rosettacode.org/wiki/Ultra_useful_primes
for n = 1 to 10
let k = -1
do
let k = k + 2
wait
loop prime(2 ^ (2 ^ n) - k) = 0
print "n = ", n, " k = ", k
next n
'https://rosettacode.org/wiki/Attractive_numbers
for x = 1 to 120
let n = x
let c = 0
do
if int(n mod 2) = 0 then
let n = int(n / 2)
let c = c + 1
endif
wait
loop int(n mod 2) = 0
for i = 3 to sqrt(n) step 2
do
if int(n mod i) = 0 then
let n = int(n / i)
let c = c + 1
endif
wait
loop int(n mod i) = 0
next i
if n > 2 then
let c = c + 1
endif
if prime(c) then
print x, " ",
endif
next x
'https://rosettacode.org/wiki/Draw_a_sphere
let j = 2
for i = 221 to 0 step j * -1
for k = -3.14 to 3.14 step .01
dot 221 + i * sin(k), 222 + 221 * cos(k)
dot 221 + 221 * sin(k), 222 + (i - 1) * cos(k)
wait
next k
let j = j + 1
next i