PBScript runtime interpreter

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
Little John
Addict
Addict
Posts: 4869
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: PBScript runtime interpreter

Post by Little John »

Running the script

Code: Select all

; Test
a = Sqr4)
with pbscript_v10.pb results in the error
Error at line 2: Expected value
Problem is, that this error message is not shown once, but over and over again (in an infinite loop, it seems).
User avatar
idle
Always Here
Always Here
Posts: 6238
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: PBScript runtime interpreter

Post by idle »

Yes it loops as there's no error handling yet just the debug output, it's so I can step through and see what the problem is while it's executing.

one thing with llm, they randomly break things

Code: Select all

Procedure PBScriptNew(code.s) 
  Protected *script.script 
  *script = AllocateStructure(script) 
  If *script 
    *script\heap = SquintNew() 
    *script\code = code 
     If *script\heap 
      ProcedureReturn *script 
    EndIf 
  EndIf   
EndProcedure  


then

Code: Select all

*script5 = PBScriptNew("a = Sqr(4) : print("  + #DQUOTE$ + "sqr = " + #DQUOTE$ + " + a)")
  PBScriptRun(*script5)
it will accept the forms
a = Sqr(4) or a.i = Sqr(4) or global a.i = Sqr(4)
miso
Enthusiast
Enthusiast
Posts: 717
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: PBScript runtime interpreter

Post by miso »

Interesting, thanks for sharing. Will take a look later. ( downloaded )

miso
Little John
Addict
Addict
Posts: 4869
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: PBScript runtime interpreter

Post by Little John »

Up to now, I was not able to find any additional problem! :D :thumbsup:
User avatar
idle
Always Here
Always Here
Posts: 6238
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: PBScript runtime interpreter

Post by idle »

Little John wrote: Tue Mar 10, 2026 7:11 pm Up to now, I was not able to find any additional problem! :D :thumbsup:
That's good I haven't really had time to test it more as im trying to do the next version to improve performance but Claude has other ideas or is the equivalent of drunk. I finally got it to see the light but I bet it's failed to turn it on. I left it idling away and walked away in frustration.
Little John
Addict
Addict
Posts: 4869
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: PBScript runtime interpreter

Post by Little John »

Oh, I'm sorry to read that. :(
User avatar
idle
Always Here
Always Here
Posts: 6238
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: PBScript runtime interpreter

Post by idle »

Little John wrote: Tue Mar 10, 2026 8:19 pm Oh, I'm sorry to read that. :(
It's struggling it's up to v0.19rev6 and still counting. I will give it a break for a day.
Post Reply