Jump to content

A simple, educational, pluggable compiler and virtual machine written in Php

- - - - -

  • Please log in to reply
1 reply to this topic

#1
eriksank

eriksank

    Newbie

  • Members
  • Pip
  • 1 posts
All good software is built from plugins. The linux kernel is. The apache web server is. Any good CMS is. And compilers should be too!

I am trying to demonstrate exactly this: that compilers can be pluggable too. I have kept building this little compiler and virtual machine prototype in Php. It is entirely built from plugins.

Why Php?

Certainly for educational purposes too. No programmer seems to claim that Php is too complex for him to understand. So, instead of fighting with Haskell, or bit-crunching C, I thought we would remove the focus from the implementation language itself and look at what kind of code goes into a compiler and virtual machine. Of course, nobody stops you from re-doing the exercise in Haskell, so you should like.

You can take 5 minutes to create your own small plugins, to extend and improve the compiler and virtual machine. In the following link, I have built a compiler plugin for the traditional SWITCH statement: A compiler plugin for the traditional SWITCH statement.

I hope you like it ;-)

#2
plb

plb

    Newbie

  • Members
  • PipPip
  • 18 posts
Nice job. I like it. I think it will be better if you make video tutorial too.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users