Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1266 invoked from network); 13 Mar 2003 21:02:09 -0000 Received: from unknown (HELO mailout04.sul.t-online.com) (194.25.134.18) by pb1.pair.com with SMTP; 13 Mar 2003 21:02:09 -0000 Received: from fwd08.sul.t-online.de by mailout04.sul.t-online.com with smtp id 18tZq0-0004jz-01; Thu, 13 Mar 2003 22:02:04 +0100 Received: from baumbart.post.rwth-aachen.de (520072483730-0001@[80.142.170.129]) by fwd08.sul.t-online.com with esmtp id 18tZpo-1KktYuC; Thu, 13 Mar 2003 22:01:52 +0100 Reply-to:marcus.boerger@post.rwth-aachen.de Message-ID: <5.1.0.14.2.20030313215807.024804b0@pop.t-online.de> X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 13 Mar 2003 22:01:50 +0100 To: Andrei Zmievski Cc: PHP Internals In-Reply-To: <20030313205122.GA21734@hyperion.gravitonic.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Sender: 520072483730-0001@t-dialin.net Subject: Re: [PHP-DEV] Doc comment patch From: marcus.boerger@t-online.de ((Marcus =?iso-8859-1?Q?B=F6rger?=)) References: <20030313205122.GA21734@hyperion.gravitonic.com> At 21:51 13.03.2003, Andrei Zmievski wrote: >Pursuant to the introspection portion of TODO-PHP5, here is a small >patch that: > >- Keeps track of starting/ending line numbers for user functions. >- Removes extraneous T_ML_COMMENT token. >- Stores the last seen doc comment (JavaDoc style) in the compiler > globals for future access by the introspection features and introduces > the new T_DOC_COMMENT token. The doc comment is defined as a multiline > comment starting with "/** \n" and ending with "*/". So, in the > following example: > >/** > * @name foo > * @param blah string > */ >function foo($blah) >{ >} > >The CG(doc_comment) will contain: > * @name foo > * @param blah string > >What is left to do here is adding the T_DOC_COMMENT to parser rules and >storing it in the appropriate structures (zend_op_array for functions, >zend_class_entry for classes, etc). > >If no one objects, I will commit it shortly. Great! Some questions: 1) Will you allow compatibility with doxygen by this: +"/** "{NEWLINE} { + CG(comment_start_line) = CG(zend_lineno); + BEGIN(ST_DOC_COMMENT); + yymore(); +} + changed to: +("/** "|"/*! "){NEWLINE} { + CG(comment_start_line) = CG(zend_lineno); + BEGIN(ST_DOC_COMMENT); + yymore(); +} + 2) Why is it '/' '*' '*' and SPACE? 3) How about single line comments started by '//!'? 4) What about removing everything upto '*' if it is the first character after a new line starts? regards marcus