On 05/09/12 13:48, Morgan L. Owens wrote:
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).


To add to your point:

If we make it produce an AST, I wonder if we could possibly expose this through PHP, perhaps with some sort of extension. Then parsers and such for PHP could simply ask PHP to do the parsing for them, and then do analysis - no more duplicating official PHP grammar.

I'm just speculating here, but this would be pretty cool if we could do it.

--
Andrew Faulds
http://ajf.me/


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

Reply via email to