On Wednesday 29 August 2001 12:24, [EMAIL PROTECTED] wrote:
>  Is there a macro preprocessor that can be used to substitute arbitrary
>  sections of code with different code? define is documented as working
>  for rvals only and my attempts to produce something more meaty lead to
>  parse errors.

I've written one for my personal needs. Supports replacement of constants 
("{{$ foobar }}") with arbitrary text, conditionals 
("{{%if foobar == 42 }} ... {{%else }} ... {{%endif }}"), comment 
removal, removal of unneccessary whitespace, removal of assertions and 
replacement of an error handler function ("sgError ($Msg)" => "MyError 
(__FILE__, __LINE__, $Msg)")

Written for Linux, needs GNU NANA 
(http://wattle.cs.ntu.edu.au/homepages/pjm/nana-home/) and expat 

I can send you a copy of the source if you want.

Christian Reiniger
LGDC Webmaster (http://lgdc.sunsite.dk/)

"use the source, luke." (obi-wan gnuobi)

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to