Re: cvs: php4 /scripts conv_z_macros

From: Date: Wed, 26 Sep 2001 13:15:47 +0000
Subject: Re: cvs: php4 /scripts conv_z_macros
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-7568@lists.php.net to get a copy of this message
On Wed, 26 Sep 2001, Sascha Schumann wrote: > On Wed, 26 Sep 2001, Jeroen van Wolffelaar wrote: > > > jeroen Wed Sep 26 04:32:55 2001 EDT > > > > Modified files: > > /php4/scripts conv_z_macros > > Log: > > Now fixes virtually everything. > > > > Sorry, but I assumed that the original script was correct. Unfortunately, that > > wasn't the case. > > Actually, it is impossible to write a simple script which > converts all cases reliably. There are certain ambiguities > in the C constructs which are not resolvable by a simple sed > substitution. And thus, the original script focused on what > can be done without damaging the source-code. > > One could change indent or some other tool which fully > understands the semantics of the C language to automatically > convert most of the source-code though. You're right (should I say: of course?), but the script did substitute things wrongly, in stead of skipping constructs it doesn't understand. Not that it is you to blame, but I -wrongfully- assumed it was the case. It's still not perfect, as you say it's virtually impossible without using a real parser, but there are only very few wrong cases now. Again, if someone notices a certain extension doesn't work anymore, revert to PRE_Z_MACRO_SUBST and drop me a line. Don't start fixing things manually, because it's a terrible job to do. --Jeroen Jeroen van Wolffelaar Jeroen@A-Eskwadraat.nl http://www.A-Eskwadraat.nl/~jeroen

« previous php.cvs (#7568) next »