New Language in B3D

Blitz3D Forums/Blitz3D Programming/New Language in B3D

RRK1020(Posted 2005) [#1]
Is it possible to make a programming language and compiler w/ b3D


dynaman(Posted 2005) [#2]
Sure, it won't be easy of course, but it certainly is able to be done.


Gabriel(Posted 2005) [#3]
Since you said in one of your recent posts that you're a complete beginner, you might want to start with something a bit more elementary than making a programming language.

There's absolutely nothing technically stopping you writing a programming language in Blitz3d, but given it's inability to interface directly with DirectX and OpenGL without userlibs, not to mention anything else you might want to interface with, it's probably not the ideal choice.


RRK1020(Posted 2005) [#4]
I also said in another post: "complete beginner in making .dlls


Gabriel(Posted 2005) [#5]
I'm sorry, so you did. On the other hand, that other thread was started with you asking how to tell when an image has been clicked on, so I'd still venture that you might want to try some more simpler projects before this. You said you've completed pong, but perhaps some intermediate projects before this?


John J.(Posted 2005) [#6]
It's definitely possible, but as Sybixsus said, you'd be better off making it in a more generic language (like BlitzMax/C++).

If you really want to try making a compiler, and think you can do it, take a look at this: http://www.blitzbasic.com/codearcs/codearcs.php?code=51
It's a really good way to compile code, and is easy to expand once you figure out how it works :)

BlitzScript3D (by Frank Taylor) uses this method to provide a way to run "embedded" programs in a Blitz3D app.

I'm currently creating a my own scripting language (similar to BlitzScript3D, with different style syntax) with a compiler (nearly complete), and Virtual Machine (for executing the compiled code).


nawi(Posted 2005) [#7]
Coolbasic (http://www.coolbasic.com) is made that way and even I made a simple NawiBasic (actually 2 of them) language.


Mr Snidesmin(Posted 2005) [#8]
It's comparatively easier to create a pseudo-language that a pre-compiler can turn into blitz basic code. that way you can easily embed most of your blitz basic code unchanged and just modify the language to suit your additional needs. I was going to do this to make blitz basic a bit more object orientated, implementing classes and methods. This is far simpler than writing your own entire language from scratch, but even so i deemed it too tedious and too much work for someone with a full time job like me, and so I promptly gave up.

it seems there are a couple of add on IDEs out there that might do this type of thing anyway.