RE: [PECL-DEV] [RFC] New extension proposal: meta

From: Date: Mon, 05 Sep 2011 13:52:24 +0000
Subject: RE: [PECL-DEV] [RFC] New extension proposal: meta
References: 1 2  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-8516@lists.php.net to get a copy of this message
On Mon Sep 5 08:47 AM, Derick Rethans wrote: > On Sat, 3 Sep 2011, Flavius Aspra wrote: > > > Meta will enable userland scripts to get the AST of a PHP source > code, > > to manipulate it, and if desired, to serialize it back to valid PHP > code. > > I don't mind the idea, but IMO the name should be a little bit more > descriptive. > +1, something like 'phpast' would be more descriptive or 'flast' (flavius ast) Btw great work! You might be interested in the following grammar (bsd license): http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.pdt/incubation/antlr_p arser_gsoc2009/grammar/compiler/php53/CompilerAst.g?view=markup&revision=1.1 &root=Tools_Project The syntax is for antlr but could come in handy with lemon I'll add that there's a c runtime for antlr: http://www.antlr.org/api/C/index.html You might benefit from using the existing c data structures from antlr

« previous php.pecl.dev (#8516) next »