Re: Moving to an AST-based parsing/compilation process

From: Date: Thu, 06 Sep 2012 18:42:19 +0000
Subject: Re: Moving to an AST-based parsing/compilation process
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Thu, Sep 6, 2012 at 11:10 AM, Stas Malyshev <[email protected]> wrote:
> And if it's impossible to match behavior of the existing parser - do I
> get it right that the proposed idea is to actually break real code that
> people run now in PHP  because it was too hard to parse for people that
> write add-on tools to PHP? Somehow it does not sound like a good idea.
> If we have doubt that we can match the existing PHP behavior then the
> idea of changing parser becomes even less appealing, because for 99% of
> PHP users it would be pure downside without upsides. The users don't
> care if the parser is complex, they care if their code runs.

The whole thing obviously only makes sense if we can retain full
syntax compatibility. If we have to break syntax, then this is a no-go
anyway. But I'm fairly certain that we indeed can keep full
compatibility. I implemented an AST-emitting PHP parser in PHP and am
fairly sure that it is compatible with any PHP 5.4 source code. I
don't see issues from this side.

Nikita


Thread (33 messages)

« previous php.internals (#62874) next »