New Language in B3D
Blitz3D Forums/Blitz3D Programming/New Language in B3D
| ||
Is it possible to make a programming language and compiler w/ b3D |
| ||
Sure, it won't be easy of course, but it certainly is able to be done. |
| ||
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. |
| ||
I also said in another post: "complete beginner in making .dlls |
| ||
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? |
| ||
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). |
| ||
Coolbasic (http://www.coolbasic.com) is made that way and even I made a simple NawiBasic (actually 2 of them) language. |
| ||
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. |