News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sankuru Blog:
A simple bytecode compiler with virtual machine, written in Php, for the EL language
December 30, 2011 @ 11:06:36

On the Sankuru blog there's a recent post looking at the construction of a simple bytecode compiler with a virtual machine as written in PHP (for Expression Language).

In my previous blog posts, I demonstrated how we can use the builtin PCRE library, to create a lexer in Php. I also showed how to use Bison-generated LALR1 parser tables in Php. In this blog post, I will re-use these lexing and parsing facilities to compile EL programs from within Php.

He uses his lexer/parser (available for download) in an example program that outputs some values and does some simple mathematical operations. There's sections detailing the Bison grammar used, execution stacks, callbacks and the bytecode it produces.

0 comments voice your opinion now!
bytecode compiler virtual machine expression language


blog comments powered by Disqus

Similar Posts

Liip Blog: Of HHVM, Hack and the future of PHP

Hartmut Holzgraefe's Blog: PHPReboot Braindump

PHP Magazine: What Is Your Top Consideration for Choosing a CMS? (Poll)

Full Stack Radio: 10: Type Safety Roundtable with Ryan Tablada and Matt Machuga

Edin Kadribasic's Blog: PECL4WIN Build Box Dead


Community Events

Don't see your event here?
Let us know!


opinion interview language community yii2 laravel symfony podcast project example part2 composer introduction series framework list configure api application php7

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework