Re: php-lang

From: Date: Sat, 11 May 2002 15:49:51 +0000
Subject: Re: php-lang
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969345471@lists.php.net to get a copy of this message
On Sat, 11 May 2002 derick@php.net wrote: > On Sat, 11 May 2002, Yasuo Ohgaki wrote: > > [...] > > > IMHO, we need someone who documents language design.... > > Actually, we need someone to finish this: > > http://cvs.php.net/cvs.php/php-lang > > regards, > Derick [ Please CC me on replies, I am only on php-dev ... or should the be on dev, not doc? ] I just took a look at this. I hadn't realized it existed, and am glad it does. For me, reading the lang spec is typically faster and easier than reading docs. I noticed something about the spec that is different from the language though. The following is valid code: if ($bool): endif; True, its pointless code, but it parses and the lang spec should reflect that. However (rev 1.8) of the spec says: statement-list: statement statement-list statement and as far as I can tell, none of the production rules for <statement> can be empty. The closet one is expression statement which can be just ";", but as you can see there is no ";" in the <statement-list> for the <if-statement> production above. The <statement-list> production should be changed to: statement-list: /* empty */ statement-list statement (or similar). Perhaps we could just generate a simple syntax verifier from the rules using (f)lex, then we would quickly be able to check cases like this. -James

« previous php.doc (#969345471) next »