Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46266 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37773 invoked from network); 2 Dec 2009 18:23:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Dec 2009 18:23:36 -0000 Authentication-Results: pb1.pair.com header.from=news@ger.gmane.org; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php-php-dev@m.gmane.org; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain m.gmane.org designates 80.91.229.12 as permitted sender) X-PHP-List-Original-Sender: php-php-dev@m.gmane.org X-Host-Fingerprint: 80.91.229.12 lo.gmane.org Linux 2.6 Received: from [80.91.229.12] ([80.91.229.12:35480] helo=lo.gmane.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/7E-65100-6A0B61B4 for ; Wed, 02 Dec 2009 13:23:35 -0500 Received: from list by lo.gmane.org with local (Exim 4.50) id 1NFtrP-0005kF-G0 for internals@lists.php.net; Wed, 02 Dec 2009 19:23:31 +0100 Received: from p5b3766a0.dip.t-dialin.net ([91.55.102.160]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Dec 2009 19:23:31 +0100 Received: from sb by p5b3766a0.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 02 Dec 2009 19:23:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: internals@lists.php.net Date: Wed, 02 Dec 2009 19:23:08 +0100 Lines: 13 Message-ID: References: <002a01ca7375$c9374190$5ba5c4b0$@de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: p5b3766a0.dip.t-dialin.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1.5) Gecko/20091130 Thunderbird/3.0 In-Reply-To: <002a01ca7375$c9374190$5ba5c4b0$@de> Sender: news Subject: Re: [PHP-DEV] accessing PHPs AST From: sb@sebastian-bergmann.de (Sebastian Bergmann) Am 02.12.2009 18:35, schrieb Raphael Pigulla: > As you can see, I haven't really found a satisfactory solution yet, so any > help is appreciated. 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. What kind of AST transformations are you thinking about? -- Sebastian Bergmann Co-Founder and Principal Consultant http://sebastian-bergmann.de/ http://thePHP.cc/