want to join us? register, it's easy | help
category icon

Adding support for if, while, and do while, to a simple compiler and virtual machine written in Php

in PHP added by eriksank, on 4/1/2012 advanced tutorials

If you think compiler construction in a scripting language, such as Php, is indeed more fun than doing it in traditional C, you will like the following article too! We keep building our little compiler and virtual machine in Php. In its previous incarnation, it was already capable of handling expressions of arbitrary complexity. In order to attain Turing-completeness, I have now added support for the IF, the WHILE, and the DO WHILE statements.

comment save report


(an email address)


(your name)