NYCPHP Meetup

NYPHP.org

[nycphp-talk] Parsing <php: possible? (on-topic)

George Schlossnagle george at omniti.com
Thu Jul 22 08:53:20 EDT 2004


On Jul 21, 2004, at 11:40 PM, Jon Baer wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> uggg - please change the subject line LOL ...
>
> im still awaiting the golden egg answer of how to accomplish the <php:
> parsing .. i cant even get <php> to work correctly.

This is actually handled in the lexer, btw.  Look for 
T_OPEN_TAG/T_CLOSE_TAG in zend_language_scanner.l.  The actual changes 
you need to make there should be moderately obvious.  As Dave noted, 
besides hacking around for your own enjoyment and education, adding 
alternative open tags to PHP (which would probably never be accepted 
into the language) just puts a huge maintenance and portability problem 
on you.

George




More information about the talk mailing list