diff --git a/ChangeLog b/ChangeLog index 0884da39..26513759 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,7 +4,10 @@ tagmanager/parsers.h, tagmanager/makefile.win32, tagmanager/abc.c, tagmanager/Makefile.am, data/filetypes.abc, data/filetype_extensions.conf, wscript: - + Add new filetype: Abc (patch by Eric Forgeot, thanks). + * tagmanager/php.c: + Merge recent changes from the CTags project to further improve + PHP symbol parsing. 2009-09-17 Enrico Tröger diff --git a/tagmanager/php.c b/tagmanager/php.c index 9a34144d..7a3a7bb0 100644 --- a/tagmanager/php.c +++ b/tagmanager/php.c @@ -70,17 +70,19 @@ static kindOption PhpKinds [] = { 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 "_]*)", - "\\2", "i,interface,interfaces", NULL); - addTagRegex(language, "(^|[ \t])define[ \t]*\\([ \t]*['\"]?([" ALPHA "_][" ALNUM "_]*)", - "\\2", "d,macro,constant definitions", NULL); + addTagRegex(language, "^[ \t]*((final|abstract)[ \t]+)*class[ \t]+([" ALPHA "_][" ALNUM "_]*)", + "\\3", "c,class,classes", NULL); + addTagRegex(language, "^[ \t]*((final|abstract)[ \t]+)*class[ \t]+([" ALPHA "_][" ALNUM "_]*)", + "\\3", "c,class,classes", NULL); + addTagRegex(language, "^[ \t]*interface[ \t]+([" ALPHA "_][" ALNUM "_]*)", + "\\1", "i,interface,interfaces", NULL); + addTagRegex(language, "^[ \t]*define[ \t]*\\([ \t]*['\"]?([" ALPHA "_][" ALNUM "_]*)", + "\\1", "d,define,constant definitions", NULL); addTagRegex(language, "^[ \t]*((public|protected|private|static)[ \t]+)*function[ \t]+&?[ \t]*([" ALPHA "_][" ALNUM "_]*)", "\\3", "f,function,functions", NULL); - addTagRegex(language, "(^|[ \t])(\\$|::\\$|\\$this->)([" ALPHA "_][" ALNUM "_]*)[ \t]*=", - "\\3", "v,variable,variables", NULL); - addTagRegex(language, "(^|[ \t])(var|public|protected|private|static)[ \t]+\\$([" ALPHA "_][" ALNUM "_]*)[ \t]*[=;]", + addTagRegex(language, "^[ \t]*(\\$|::\\$|\\$this->)([" ALPHA "_][" ALNUM "_]*)[ \t]*=", + "\\2", "v,variable,variables", NULL); + addTagRegex(language, "^[ \t]*((var|public|protected|private|static)[ \t]+)+\\$([" ALPHA "_][" ALNUM "_]*)[ \t]*[=;]", "\\3", "v,variable,variables", NULL); /* function regex is covered by PHP regex */