[ 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 <[EMAIL PROTECTED]>
To: PHP Documentation List <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: php-lang

On Sat, 11 May 2002 [EMAIL PROTECTED] 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


-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to