Re: Doc Comments cause parser errors
| From: | Andrei Zmievski | Date: | Wed, 02 Apr 2003 14:02:21 +0000 |
| Subject: | Re: Doc Comments cause parser errors | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-602@lists.php.net to get a copy of this message | ||
On Wed, 02 Apr 2003, Alan Knowles wrote:
>
> http://cvs.php.net/diff.php/ZendEngine2/zend_compile.c?r1=1.403&r2=1.404&ty=h&num=10
>
> removed the T_DOC_COMMENT from being ignored by zendlex -
>
> looks like at the moment, optional_doc_comment is splattered all over
> the parser.
>
> the other way to do this (is what phpcodedoc does) is just to
> remembering the last comment block (pointer to startpos, and length
> within the compiled string.) - leave the parser ignoring T_DOC_COMMENT tags.
>
> - reset the startpos to -1 it at the end of each statement. (comments
> in the wrong place are just ignored)
>
> then copying it when you declare classes/vars etc. directly from
> startpos/length.. (and reset the startpos).
>
> putting in the parser is just a bit too messy.. IMO :)
All right. I'll try something like the above approach.
-Andrei http://www.gravitonic.com/
* Ethernet n.: something used to catch the etherbunny. *