Wez Furlong I am Wez Furlong, Chief Software Architect at Message Systems, PHP Core developer and OpenSource contributor. I live in Maryland, USA with Juliette, Xander and Lily. (read more)

Subscribe to my blog  

Follow wezfurlong on Twitter

parser and lexer generators for PHP

PHP
Nov 25, 2006
Updated Nov 25, 2006

From time to time, I find that I need to put a parser together. Most of the time I find that I need to do this in C for performance, but other times I just want something convenient, like PHP, and have been out of luck.

This thanksgiving I set out to remedy this and adapted lemon to optionally emit PHP code, and likewise with JLex.

You need a C compiler to build lemon and a java compiler and runtime to build and run JLexPHP, but after having translated your .y and .lex files with these tools, you're left with a pure PHP parser and lexer implementation.

The parser and lexer generators are available under a BSDish license:

lemon-php.tgz JLexPHP-151.tgz

See enclosed README files for more information.

Comments