NYCPHP Meetup

NYPHP.org

[nycphp-talk] Zend_language_parser

David Sklar sklar at sklar.com
Wed Jul 21 12:23:30 EDT 2004


Yes, it's a grammar for YACC (actually Bison).

Modifying it is only useful if you want to add/alter operators or other 
language grammar. If your changes don't get merged into PHP, then you 
have quite a maintenance burden (not to mention incompatible code). But 
poking around is essential learning how PHP works under the hood.

David

Jon Baer wrote:

> Just curious to find out .. Does anyone here "hack" on this file often?  It
> uses YACC am I correct?
> 
> - Jon
> 
> -----Original Message-----
> From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On
> Behalf Of David Sklar
> Sent: Wednesday, July 21, 2004 11:49 AM
> To: NYPHP Talk
> Subject: Re: [nycphp-talk] Access an element of a method that returns an ar
> ray
> 
> If you're interested in hacking around, I think the place to start if you
> want to change this is about line 744 of Zend/zend_language_parser.y, where
> the syntax for when a "variable" can appear in a program is described.
> "base_variable_with_function_calls" 
> can have an object operator ( -> ) after it, but not array dimension
> operators (square brackets).
> 
> David
> 
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
> 




More information about the talk mailing list