> pecl/parse_tree (if it (still) works) provides access to the parse
> tree of PHP code in the form of XML. The XML can be manipulated and
> then transformed back into PHP code.
PECL::Parse_Tree is still in alpha state and has not been updated since January 2007, so I don't have too much confidence in it being 5.3 compliant. For now I've opted to approach this from the Java side using DLTK and PDT which is very powerful and fast. Plus, it is my hope that - PDT being a widely used PHP IDE and all - the parser will always be fairly up to date.

> What kind of AST transformations are you thinking about?
At this point it's only a little side project. Eventually, I hope to build some sort of PHP precompiler for our CI server that can help us with QA and such (e.g., checking pre- and postconditions). It is in a way very similar to AspectPHP, but may very well go beyond what is possible with AOP (at the cost of being not as flexible, obviously). But again, this project is still in a very early stage; I'm just writing the very first prototype to see how far DLTK can take me.

regards
Raphael

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to