Friday, February 15, 2008




After years on working on RE2C to make it stable and ready to replace flex-based scanners, work on replacing PHP's flex-based scanner with a RE2C-based one has begun. Actually the work was started by Nuno Lopes and Scott MacVicar on 14th of February 2008, after I happily informed them that I considered RE2C ready for this task. I joined the work a day later, contributed a few ideas and helped with minor RE2C improvements. Today on the 15th of February we can already run make test and get over 98% PASS.

This encouraged me to spend a bit more time on RE2C and release 0.13.2, which you can download here (sorry but it is on sourceforge).

Thanks to Scott, we also have a subversion and Trac setup here, where you can follow our development. If you want to experiment yourself, or even help in our efforts, then you can checkout from svn://

Blogged with Flock

Labels: ,

Very cool! :) I still remember when we sat in the Sauna in Moerfelden and you first told me about RE2C. ;) Did you already run some benchmarks with the new parser?
Cool stuff! :) I still remember when you first told me about this idea, in Moerfelden in the Sauna. ;) Did you already run some benchmarks with the new parser?
That stuff still looks like flex?
Or does re2c support the same syntax now? :)
RE2C now supports a superset of flex syntax. So for instance you can have expressions that apply to all conditions. Next addition is the ability to have rules that contain setup code which gets prefixed to every rule code. This allows for instance to generate length information. You can also have initialize code which triggers on a special condition (always zero) that is not part of your used states.
I wonder if this will also be a path towards fixing some of the inconsistencies in PHP's syntax, like for example curly braces being required for try..catch, and there's plenty more of these
Post a Comment

Links to this post:

Create a Link

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]