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

From: Date: Wed, 05 Sep 2012 12:48:48 +0000
Subject: Re: Moving to an AST-based parsing/compilation process
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-62835@lists.php.net to get a copy of this message
On 2012-09-05 07:57, Nikita Popov wrote:
Hey folks! Some people asked me what the advantages of using an AST-based parsing/compilation process are, so I put together a few quick notes in an RFC: https://wiki.php.net/rfc/ast_based_parsing_compilation_process It would be nice to get a few comments from other core devs on this. Nikita I'm not a core dev, but I would like to add to the notes above that "third parties", such as myself, who want to do things with PHP source other than run it through a PHP interpreter would also appreciate such a separation of concerns.
To date, I've been basing work, which exposes syntactic structure, on phc's maketea grammar (Phalanger's is more up to date, but also more complicated what with its provenance and the Linq and generics and all), but it's reverse-engineered and certainly wrong (oh, that reminds me...); the existing grammar is unsuitable because no-one wants to see _that_. Something authoritative that _by definition_ tracks the current version would be more reassuring as regards accuracy and compatibility (and be more likely to result in something that deserves to be let out into the world with confidence).

« previous php.internals (#62835) next »