rfc:lemon

This is an old revision of the document!


Request for Comments: Replace Bison based parser with Lemon

  • Version: 0.1
  • Date: 2008-03-25
  • Author: Etienne Kneuss
  • Status: In the works

Abstract

The current parser is bison based. The plan (initially proposed as a GSoC idea) is to replace it with Lemon, which is thread-safe and reentrant.

Note: It was removed from the GSoC ideas pages for logistical reasons. Doing that task for GSoC doesn't fit our current needs and doesn't go well with other plans. We're sorry for students that were looking forward to doing that specific task.

This task can be divided into two main parts:

  • rewrite zend_language_parser.y into a syntax Lemon understands.
  • generate the template for an engine/re2c integration.

Writing the syntax file is pretty straight-forward, though some additional rules need to be implemented in order to reproduce those bison “mid-rule actions”, which isn't supported by Lemon. It might be a good idea to rethink some of the rules' names along the way.

Still interested ?

I (Etienne) am proposing to do that work, but of course I'd be happy if I could get some contributions from people that were initially interested, even if the money reason is no longer here.

This job is probably going to get done in a separate repository (SVN/GIT) and not directly in PHP's CVS for obvious purposes.

Updates

2008-03-25 : Initial draft.

rfc/lemon.1209829291.txt.gz · Last modified: 2017/09/22 13:28 (external edit)