cvs: pear /PHPDoc/parser PhpdocParserRegExp.php
| From: | Hayk Chamyan | Date: | Tue, 18 Dec 2001 13:56:11 +0000 |
| Subject: | cvs: pear /PHPDoc/parser PhpdocParserRegExp.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1605@lists.php.net to get a copy of this message | ||
hayk Tue Dec 18 08:56:11 2001 EDT
Modified files:
/pear/PHPDoc/parser PhpdocParserRegExp.php
Log:
Added a regular expression for PHP comments and changed the "module_doc" regular
expression.
Index: pear/PHPDoc/parser/PhpdocParserRegExp.php
diff -u pear/PHPDoc/parser/PhpdocParserRegExp.php:1.4 pear/PHPDoc/parser/PhpdocParserRegExp.php:1.5
--- pear/PHPDoc/parser/PhpdocParserRegExp.php:1.4 Thu Dec 13 05:32:16 2001
+++ pear/PHPDoc/parser/PhpdocParserRegExp.php Tue Dec 18 08:56:11 2001
@@ -7,7 +7,7 @@
* possible I decided to define all regular expressions in one class.
* From a programming point of view there's no need to do so.
*
-* @version $Id: PhpdocParserRegExp.php,v 1.4 2001/12/13 10:32:16 hayk Exp $
+* @version $Id: PhpdocParserRegExp.php,v 1.5 2001/12/18 13:56:11 hayk Exp $
*/
class PhpdocParserRegExp extends PhpdocObject {
@@ -144,6 +144,7 @@
"php_open_asp" => "<%",
"php_open_short_print" => "<\?=",
"php_open_asp_print" => "<%=",
+ "php_comments" =>
"(//.*?\s+|\#.*?\s+|/\*.*?\*/\s+)",
# do not change the single quotes to double ones
"label" =>
'[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\xzf-\xff]*',
@@ -420,9 +421,14 @@
$this->PHP_COMPLEX["php_open_script"]
);
- $this->C_COMPLEX["module_doc"] = sprintf("@^%s%s%s/\*\*@is",
+ //
+ // A module can start with comments not relating to the module documentation.
+ //
+ $this->C_COMPLEX["module_doc"] = sprintf("@^%s%s%s%s*?%s/\*\*@is",
$this->PHP_BASE["space_optional"],
$this->PHP_COMPLEX["php_open_all"],
+ $this->PHP_BASE["space_optional"],
+ $this->PHP_BASE["php_comments"],
$this->PHP_BASE["space_optional"]
);