Re: php-lang (fwd)
| From: | James E. Flemer | Date: | Mon, 08 Jul 2002 16:58:02 +0000 |
| Subject: | Re: php-lang (fwd) | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969347149@lists.php.net to get a copy of this message | ||
[ Please CC me on replies, I am only on php-dev ... or
should the be on dev, not doc? ]
php-lang is dead then I take it? Or was this just
overlooked?
-James
---------- Forwarded message ----------
Date: Sat, 11 May 2002 11:49:51 -0400 (EDT)
From: James E. Flemer <jflemer@acm.jhu.edu>
To: PHP Documentation List <phpdoc@lists.php.net>
Cc: derick@php.net, sas@php.net, jflemer@php.net
Subject: Re: php-lang
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