diff --git a/Sources/Highlight/HighlightManager.cpp b/Sources/Highlight/HighlightManager.cpp index 795b03c..af1d979 100644 --- a/Sources/Highlight/HighlightManager.cpp +++ b/Sources/Highlight/HighlightManager.cpp @@ -99,6 +99,11 @@ void HighlightManager::loadLanguages(void) myHightline = new Highlight(xmlFilename); listHighlight.push_back(myHightline); + xmlFilename = homedir; + xmlFilename += "data/lang_php.xml"; + myHightline = new Highlight(xmlFilename); + listHighlight.push_back(myHightline); + myHightline->Display(); } diff --git a/data/lang_php.xml b/data/lang_php.xml new file mode 100644 index 0000000..7f2a8f9 --- /dev/null +++ b/data/lang_php.xml @@ -0,0 +1,76 @@ + + + .php + .php3 + .php4 + .phtml + + + comment + /\* + \*/ + + + SYNTAX_ERROR + //[ \t]*TODO[ \t]*: + \n + \ + + + comment + # + \n + + + comment + // + \n + \ + + + doubleQuoteText + " + " + \ + + + doubleQuoteText + ' + ' + + + + + keyword + [\$]+[a-zA-Z_][a-zA-Z0-9_]* + + + type + \@array|bool|boolean|double|float|int|integer|numeric|object|resource|string|unset\@ + + + storageKeyword + \@abstract|and|as|break|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|interface|isset|list|namespace|new|or|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor\@ + + + commonDefine + \@doubleval|floatval|gettype|intval|print_r|serialize|settype|strval|unserialize|var_dump|var_export\@ + + + number + \@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@ + + + boolean + \@true|TRUE|false|FALSE\@ + + + functionName + \@(\w|_)+[ \t]*\( + + + boolean + ==|<=|>=|!=|<|>|&&|\{|\}| + + +