--- php.c 2009-07-07 16:00:58.000000000 +0200 +++ php-patched.c 2009-07-07 15:58:44.000000000 +0200 @@ -11,6 +11,8 @@ * variables. * * Parsing PHP defines by Pavel Hlousek , Apr 2003. +* Multiline comment fixes by David Mudrak , Jul 2009 +* based on a patches by Sander Marechal , Nov 2008. */ /* @@ -64,16 +66,16 @@ static void installPHPRegex (const langType language) { - addTagRegex(language, "(^|[ \t])class[ \t]+([" ALPHA "_][" ALNUM "_]*)", - "\\2", "c,class,classes", NULL); - addTagRegex(language, "(^|[ \t])interface[ \t]+([" ALPHA "_][" ALNUM "_]*)", + addTagRegex(language, "(^[ \t]*)(abstract[ \t]+)?class[ \t]+([" ALPHA "_][" ALNUM "_]*)", + "\\3", "c,class,classes", NULL); + addTagRegex(language, "(^[ \t]*)interface[ \t]+([" ALPHA "_][" ALNUM "_]*)", "\\2", "i,interface,interfaces", NULL); - addTagRegex(language, "(^|[ \t])define[ \t]*\\([ \t]*['\"]?([" ALPHA "_][" ALNUM "_]*)", + addTagRegex(language, "(^[ \t]*)define[ \t]*\\([ \t]*['\"]?([" ALPHA "_][" ALNUM "_]*)", "\\2", "d,define,constant definitions", NULL); - addTagRegex(language, "(^|[ \t])function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)", - "\\2", "f,function,functions", NULL); - addTagRegex(language, "(^|[ \t])\\$([" ALPHA "_][" ALNUM "_]*)[ \t]*=", - "\\2", "v,variable,variables", NULL); + addTagRegex(language, "(^[ \t]*)(public[ \t]+|protected[ \t]+|private[ \t]+)?(static[ \t]+)?function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)", + "\\4", "f,function,functions", NULL); + addTagRegex(language, "(^[ \t]*)(var[ \t]+|public[ \t]+|protected[ \t]+|private[ \t]+)?(static[ \t]+)?\\$([" ALPHA "_][" ALNUM "_]*)[ \t]*=", + "\\4", "v,variable,variables", NULL); /* function regex is covered by PHP regex */ addTagRegex (language, "(^|[ \t])([A-Za-z0-9_]+)[ \t]*[=:][ \t]*function[ \t]*\\(",