So sorry for the long time without a post but I have been so busy its not even funny, I have had to take away my time from Drizzle on launchpad now to concentrate on my own stuff. So I also am taking some vaction off from work, so I have some time off which is just brilliant at the moment, I have been playing Zelda on the wii, and I updated lots of material on the Belfast Lug Wiki. And worked on what I am about to explain.
So yeah just want put in this link for anyone who has had problems with Multiple Lexers or Parsers with Flex and Bison in one project i posted my solution to the automake mailing lists last month because i was working alot with that trying to figure it out: http://lists.gnu.org/archive/html/automake/2009-04/msg00095.html
So in my spare time I have been working on a programming language that’s cool (I think any-ways), its taking some ideas from the GNU/make and extending them to be used for easy rules programming to be used as a standalone language or embeddable into applications for any kind of application to make decisions much easier. I am working with this on launchpad:
There is my Kernel on there but i havent had any time to work on it ages, there is my crules language which is the rules language i was talking about and scc which is the simple C compiler it isnt much implemented yet though. Not much time recently.
But i’ll introduce my ideas for my programming language. Hmm i am not sure how i am going to illustrate this without showing code.. maby i’ll wait untill next time
its like make but you can override rules depandant on what variables are in scope. Thats the wordy answer
But before I show how it looks soon in the future when I get it to a decent working stage I want to put a tutorial on how you can go about making any kind of programming language right down to how you would go about making a full ELF binary etc!
Because this is something NO-ONE has really done in ages, no-one really writes full compilers or assemblers and linkers anymore, thats’ with the whole GCC project Ian Taylor from google has shown some work recently on where he is writing a completely new linker to replace gnu/LD which is called gold. This is very important not only because if that isn’t properly maintained the knowledge goes too on binary formats and how to generate them from object code made from assemblers. Which is something in my opinion very few people know how to do now adays.
GOLD := http://airs.com/ian/gold-slides.pdf
What the tutorial I am working on is how to make a programming language compiler or interpreter. So I made up a VERY simple language just to illustrate the ideas and how to implement these ideas. I do it all in C with Flex and Bison.
I am sick of people talking about writing compilers/interpreters in Java, saying its a valid language for such a thing I beg to differ for too many reasons.
Mainly because of this say you implement a Language X this is the stack of software that X depends:
X → x-interpreter → Java-runtime → C-programs → Kernel → Hardware
So why use something that limits you, I always find with java you concentrate on how java says you should implement your ideas, how about NO you should concentrate on your ideas and your shouldn’t be limited by your language, so I just like C
.
So I will try and get this tutorial up ASAP its taking a while to write up lots to write finishing off the code just need to implement support for methods and I think its complete enough for this kind of hello world tutorial on how to use Bison and Flex to help you make your interpreter, and I will show how you can go about changing how it works to be more like a compiler to generate an output.










[...] New blog post: Programming languages implementation! http://redbrain.co.uk/?p=348 [...]