RE: [PHP] comment followed by ?> fails to parse
| From: | Jonathan Rosenberg | Date: | Wed, 29 May 2002 16:32:18 +0000 |
| Subject: | RE: [PHP] comment followed by ?> fails to parse | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99769@lists.php.net to get a copy of this message | ||
-----Original Message-----
> From: Thalis A. Kalfigopoulos [mailto:thalis@cs.pitt.edu]
> Sent: Wednesday, May 29, 2002 10:27 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] comment followed by ?> fails to parse
> On Wed, 29 May 2002, Jason Wong wrote:
> > Yes this hightlights another shortcoming of PHP in
> > that it cannot have nested multi-line comments.
> This is not a shortcoming. This is an issue of the
> scanner of the compiler. It is not possible to
> remember the nesting level of the comments because of
> the nature of regular expressions: they lack memory.
You need to brush up on your parsing theory. If the PHP parser
can balance parentheses, it can balance comments, also.
> cheers,
> thalis
--
JR