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

php|architect:
More Work on the PHP Compiler
Sep 02, 2003 @ 12:20:44

Ever wondered what happened to that PHP compiler project that php|architect author Marco was working on? Well, he gives a tell all (and we do mean all) commentary of just what's been going on on his weblog this morning.

I had left off at the stage of having a work proof-of-concept capable of parsing and compiling a reasonably complex script into working C code that could be compiled with any ANSI-C compiler, such as GCC. [...] My problem at the time was that, although I knew that a compiler could be written (hence the proof-of-concept), I was convinced that it should be written in PHP and I was lacking the necessary tools to do so. Using is a custom-written parser is simply asking for trouble. It's simply too complex to maintain and the insertion of any new rule could easily force you to rewrite large portions of it at any time. A better approach would be the use of lexer and parser generators capable of creating the lexer and parser based on a set of rules that can be changed without worry.

For all of the trials and tribulations that have resulted in his work so far, check out the rest of his blog entry and maybe leave him a few comments to help out...

tagged:

Link:


Trending Topics: