QB64 Phoenix Edition
Deep Basic - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: QBJS, BAM, and Other BASICs (https://qb64phoenix.com/forum/forumdisplay.php?fid=50)
+--- Thread: Deep Basic (/showthread.php?tid=3725)



Deep Basic - aurel - 06-01-2025

...by Deep AI
mod by me in cca 300 LOC ... Big Grin
compiled in o2 (...fast compilation)
currently :

Code: (Select All)
'Deep Basic v1 in o2 /QB code by DeepAI /mod by Aurel
'Global block
Declare SUB RunProgram(lines() AS STRING)
Declare FUNCTION FindLabel(label as string ) AS INT
Declare FUNCTION EvalExpression(expr As STRING) AS FLOAT
Declare FUNCTION ParseTerm() AS FLOAT
Declare FUNCTION ParseFactor() AS FLOAT
Declare FUNCTION GetNextToken() AS STRING
Declare SUB SkipWhitespace()
' compiled ...OK!



RE: Deep Basic - aurel - 06-01-2025

Just to mention few days back i try to run this AI code in QBJS but seems not work
probably i do something wrong...so that is why i move code to o2 in which i am sure
what is what ..because i don't find solid QB online compiler ..also i try to modify code
in fact ask for FB version but AI is not that smart ..grrr.


RE: Deep Basic - aurel - 06-01-2025

This compile fine too.. Wink 

Code: (Select All)
'Deep Basic v1 in o2 /QB code by DeepAI /mod by Aurel
'Global block
Declare SUB RunProgram(lines() AS STRING)
Declare FUNCTION FindLabel(label as string ) AS INT
Declare FUNCTION EvalExpression(expr As STRING) AS FLOAT
Declare FUNCTION ParseTerm() AS FLOAT
Declare FUNCTION ParseFactor() AS FLOAT
Declare FUNCTION GetNextToken() AS STRING
Declare SUB SkipWhitespace()
'print " compiled ...OK!"

Dim Lines[1024] AS STRING
Dim Labels[1024] AS STRING
Dim LabelLine[1024] AS INT

so far ... Rolleyes 

Code: (Select All)
'Deep Basic v1 in o2 /QB code by DeepAI /mod by Aurel
'Global block
Declare SUB RunProgram(lines() AS STRING)
Declare FUNCTION FindLabel(label as string ) AS INT
Declare FUNCTION EvalExpression(expr As STRING) AS FLOAT
Declare FUNCTION ParseTerm() AS FLOAT
Declare FUNCTION ParseFactor() AS FLOAT
Declare FUNCTION GetNextToken() AS STRING
Declare SUB SkipWhitespace()
'print " compiled ...OK!"

Dim Lines[1024] AS STRING
Dim Labels[1024] AS STRING
Dim LabelLine[1024] AS INT

Dim LineCount AS INT
Dim PC AS INT ' Program Counter
Dim Stack[128] AS INT
Dim StackPtr AS INT

Dim Variables[100] AS STRING
Dim VariablesVal[100] AS FLOAT

Dim Token as STRING : Dim TokenPos AS INT
Dim CurrentToken AS STRING
Dim Expr AS STRING



RE: Deep Basic - aurel - 06-01-2025

...i must say that i am very stupid for console programs Big Grin 
but here is how look...