Re: [PHP-DEV] PHP Abstract Syntax Tree

2006-04-19 Thread DvDmanDT
> Seems like AST is a great tool for code analysis, development, > debugging, re-factoring, optimizing -- but I don't see how that makes > it a winner for the run-time compilation. Remember though, that with PHP6 it's planned to include a bytecodecache with the standard distribution (right?), so

Re: [PHP-DEV] PHP Abstract Syntax Tree

2006-04-14 Thread Richard Lynch
On Fri, April 14, 2006 4:26 am, Sebastian Bergmann wrote: > Dmitry Stogov schrieb: >> So some optimizations may be done fine on AST level too. > > ASTs are useful for performing code transformations (think of > language > extensions like William's PHPAspect or automatic refactorings as > example

Re: [PHP-DEV] PHP Abstract Syntax Tree

2006-04-14 Thread William Candillon
Hi, On 4/14/06, Marcus Boerger <[EMAIL PROTECTED]> wrote: > > how is that useful? (outside university) I'm not sure but I think that AST approach is faster because you can optimize the AST and deduce more semantics informations when you generate the opcode. -- William Candillon Telecom Lille

Re: [PHP-DEV] PHP Abstract Syntax Tree

2006-04-14 Thread Marcus Boerger
Hello Sebastian, Friday, April 14, 2006, 11:26:53 AM, you wrote: > Dmitry Stogov schrieb: >> So some optimizations may be done fine on AST level too. > ASTs are useful for performing code transformations (think of language > extensions like William's PHPAspect or automatic refactorings as > e

Re: [PHP-DEV] PHP Abstract Syntax Tree

2006-04-14 Thread Sebastian Bergmann
Dmitry Stogov schrieb: > So some optimizations may be done fine on AST level too. ASTs are useful for performing code transformations (think of language extensions like William's PHPAspect or automatic refactorings as examples). -- Sebastian Bergmann http://www.sebastian-

RE: [PHP-DEV] PHP Abstract Syntax Tree

2006-04-14 Thread Dmitry Stogov
ks. Dmitry. > -Original Message- > From: William Candillon [mailto:[EMAIL PROTECTED] > Sent: Friday, April 14, 2006 12:07 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] PHP Abstract Syntax Tree > > > I already wrote an program which converts PHP source code to

Re: [PHP-DEV] PHP Abstract Syntax Tree

2006-04-14 Thread William Candillon
I already wrote an program which converts PHP source code to AST but I don't understand why the native PHP compiler doesn't use this approach. On 4/14/06, Tomas Matousek <[EMAIL PROTECTED]> wrote: > > Hi William, > if you are interested in converting PHP source code to AST, you may find > the > Ph

Re: [PHP-DEV] PHP Abstract Syntax Tree

2006-04-13 Thread Andrei Zmievski
header("Location: http://www.python.org/";); :) On Apr 13, 2006, at 1:28 PM, William Candillon wrote: Hi, Is it planned to modify the PHP compiler in order to create an abstract syntax tree rather than generating directly the opcode ? It will allow to perform tasks like Type inference, opt

[PHP-DEV] PHP Abstract Syntax Tree

2006-04-13 Thread William Candillon
Hi, Is it planned to modify the PHP compiler in order to create an abstract syntax tree rather than generating directly the opcode ? It will allow to perform tasks like Type inference, optimization etc... Best regards, William -- William Candillon Telecom Lille Student E-mail: [EMAIL PROTECTED