Writing a Basic Interpreter
Writing a Basic Interpreter
Does anybody have any pointers for writing a Basic interpreter. A) I've always wanted to write one B) I have a specific project in mind. Not sure at this stage whether to do it in Purebasic, as I am much more experience in VB.NET, Delphi and Python, but would love the speed performance I would get writing it in PB. At this point would just like some pointers to some texts that would prove useful, or some other tips. Thanks
Colin
Re: Writing a Basic Interpreter
Well, Trond wrote a very comprehensive tutorial about it so this site is exactly what you need: pbtut.blogspot.com
Here is the related thread:
http://www.purebasic.fr/english/viewtop ... 27&t=38931
Here is the related thread:
http://www.purebasic.fr/english/viewtop ... 27&t=38931
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: Writing a Basic Interpreter
I think that's a little lower level than I wanted to go. Is much of this still relevant, even though I want to create an interpreter, rather than a compiler? Want this to be a pure language solution, i.e. no C, or ASM external calls. I don't think speed is going to be much of an issue here, especially in comparison to the speed of the interpreter on the original 4mhz machine.
Colin
Re: Writing a Basic Interpreter
Oh, sorry I misread it.
But informations about the "understanding of the source code" can still be interesting for you.
But informations about the "understanding of the source code" can still be interesting for you.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: Writing a Basic Interpreter
I would have a look at Tiny Basic as an example of how to implement it. You will be able to find many ports of the code in virtually whatever language you like.
I have been tempted to implement my own version for built in scripting purposes, but I am no where near needing that (yet).
I have been tempted to implement my own version for built in scripting purposes, but I am no where near needing that (yet).
Re: Writing a Basic Interpreter
DracScript is here on the forums too 
On a side note, Trond seemed to have abandoned the scripting project and nobody took it up
We need a scripting project from beginning to end, kinda like Trond's but finished. That would be cool.
On a side note, Trond seemed to have abandoned the scripting project and nobody took it up
- utopiomania
- Addict

- Posts: 1655
- Joined: Tue May 10, 2005 10:00 pm
- Location: Norway
Re: Writing a Basic Interpreter
There's an obfuscated source for a Basic Interpreter in a recent anticracking thread here. The hackers here will
help you de-obfuscate it in no time.
help you de-obfuscate it in no time.
Last edited by utopiomania on Sat Jun 12, 2010 12:01 am, edited 1 time in total.
- codewalker
- Enthusiast

- Posts: 331
- Joined: Mon Mar 27, 2006 2:08 pm
- Location: Spain
Re: Writing a Basic Interpreter
Did the question about writing the next os in purebasic already pass by . . . 
There is a difference between knowing the code and writing the code.
May the code be strong in your projects.
May the code be strong in your projects.