diff --git a/data/languages/asm/highlight.xml b/data/languages/asm/highlight.xml index cb7cee7..0126cfe 100644 --- a/data/languages/asm/highlight.xml +++ b/data/languages/asm/highlight.xml @@ -6,41 +6,41 @@ commentDoxygen - /\*\*.*\*/ + /\*\*.*?\*/ comment - /\*.*\*/ + /\*.*?\*/ preprocesseur - #[ \t]*if 0.*#(regexif|else) + #[ \t]*if 0.*?#(regexif|else) preprocesseur - #.*$ + #.*?$ commentDoxygen - //!.*$ + //!.*?$ SYNTAX_ERROR - //[ \t]*TODO[ \t]*:.*$ + //[ \t]*TODO[ \t]*:.*?$ comment - (//|@).*$ + //.*?$ keyword - \@smull|ldrsh|smlal|stmdb|mul|mla|umull|ldr|add|str|mov|subs|bgt|ldmia|stmia|ldmfd|cmp|sub|strd|stmfd|bne|bhi|ldrd|mvn\@ + \b(smull|ldrsh|smlal|stmdb|mul|mla|umull|ldr|add|str|mov|subs|bgt|ldmia|stmia|ldmfd|cmp|sub|strd|stmfd|bne|bhi|ldrd|mvn)\b type - \@r(10|11|12|[0-9]?)|sp|lp|lr|pc\@ + \b(r(10|11|12|[0-9]?)|sp|lp|lr|pc)\b diff --git a/data/languages/bash/highlight.xml b/data/languages/bash/highlight.xml index cc334a6..2e8452e 100644 --- a/data/languages/bash/highlight.xml +++ b/data/languages/bash/highlight.xml @@ -4,39 +4,37 @@ commentDoxygen - #!(\\[\\\n]|.)*$ + #!(\\[\\\n]|.)*?$ comment - #(\\[\\\n]|.)*$ + #(\\[\\\n]|.)*?$ doubleQuoteText - "(\\[\\"]|.)*" + "(\\[\\"]|.)*?" doubleQuoteText - '(\\[\\']|.)*' + '(\\[\\']|.)*?' keyword - \@for|done|do|while|in|if|elif|then|else|fi\@ + \b(for|done|do|while|in|if|elif|then|else|fi)\b keyword [\$]+[a-zA-Z_][a-zA-Z0-9_]* - boolean - ==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}| + ==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\} diff --git a/data/languages/boo/highlight.xml b/data/languages/boo/highlight.xml index 704ef55..392599d 100644 --- a/data/languages/boo/highlight.xml +++ b/data/languages/boo/highlight.xml @@ -4,23 +4,23 @@ SYNTAX_ERROR - ##.*$ + ##.*?$ comment - #.*$ + #.*?$ preprocesseur - (NOTE|TODO) : .*$ + (NOTE|TODO) : .*?$ doubleQuoteText - "(\\[\\"]|.)*$ + "(\\[\\"]|.)*?$ doubleQuoteText - \@'(\\[\\']|.)*$ + \b'(\\[\\']|.)*?$ @@ -33,7 +33,7 @@ number [0-9]*% - + TestResultOK \[( )*(OK|Ok|ok)( )*\] diff --git a/data/languages/cmake/highlight.xml b/data/languages/cmake/highlight.xml index 3713d9a..4d7ea84 100644 --- a/data/languages/cmake/highlight.xml +++ b/data/languages/cmake/highlight.xml @@ -5,47 +5,45 @@ commentDoxygen - ##.*$ + ##.*?$ SYNTAX_ERROR - #[ \t]TODO[ \t]*:(\\[\\\n]|.)*$ + #[ \t]TODO[ \t]*:(\\[\\\n]|.)*?$ comment - #(\\[\\\n]|.)*$ + #(\\[\\\n]|.)*?$ doubleQuoteText - "(\\[\\"]|.)*$ + "(\\[\\"]|.)*?$ keyword - \@foreach|message|endforeach|if|else|endif|list|file|string\@ + \b(foreach|message|endforeach|if|else|endif|list|file|string)\b systemFunction - \@set|include_directories|add_definitions|add_library|include_directories|target_link_libraries|project|include|check_include_file|enable_testing|option|cmake_minimum_required|add_definitions|check_include_file|configure_file|include_directories|add_custom_command|add_executable|add_test\@ + \b(set|include_directories|add_definitions|add_library|include_directories|target_link_libraries|project|include|check_include_file|enable_testing|option|cmake_minimum_required|add_definitions|check_include_file|configure_file|include_directories|add_custom_command|add_executable|add_test)\b inputFunction - \${.*} + \$\{.*\} number - \@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@ + \b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b macro - \@[A-Z_][A-Z_0-9]{3,500}\@ + \b([A-Z_][A-Z_0-9]{3,500})\b - diff --git a/data/languages/glsl/highlight.xml b/data/languages/glsl/highlight.xml index 5e745e6..97d4c06 100644 --- a/data/languages/glsl/highlight.xml +++ b/data/languages/glsl/highlight.xml @@ -37,35 +37,35 @@ keyword - \@return|goto|if|else|case|default|switch|break|continue|while|do|for|sizeof\@ + \b(return|goto|if|else|case|default|switch|break|continue|while|do|for|sizeof)\b type - \@void|bool|float|int|(vec|mat|ivect|bvect)[2-4]\@ + \b(void|bool|float|int|(vec|mat|ivect|bvect)[2-4])\b storageKeyword - \@varying|uniform|attribute|precision|mediump\@ + \b(varying|uniform|attribute|precision|mediump)\b number - \@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@ + \b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b boolean - \@true|false\@ + \b(true|false)\b macro - \@[A-Z_][A-Z_0-9]{3,500}\@ + \b([A-Z_][A-Z_0-9]{3,500})\b functionName - \@(\w|_)+[ \t]*\( + \b(\w|_)+[ \t]*\( boolean - ==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}| + ==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\} diff --git a/data/languages/in/highlight.xml b/data/languages/in/highlight.xml index fc16d28..4245674 100644 --- a/data/languages/in/highlight.xml +++ b/data/languages/in/highlight.xml @@ -4,37 +4,37 @@ preprocesseur - #(\\[\\\n]|.)*$ + #(\\[\\\n]|.)*?$ doubleQuoteText - "(\\[\\"]|.)*$ + "(\\[\\"]|.)*?$ doubleQuoteText - '(\\[\\']|.)*$ + '(\\[\\']|.)*?$ keyword - \@menu|endmenu|comment|if|endif|help|default|choice|endchoice|prompt|depends on|config\@ + \b(menu|endmenu|comment|if|endif|help|default|choice|endchoice|prompt|depends on|config)\b type - \@int|hex|bool|string\@ + \b(int|hex|bool|string)\b number - \@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@ + \b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b macro - \@[A-Z_][A-Z_0-9]{3,500}\@ + \b([A-Z_][A-Z_0-9]{3,500})\b boolean - ==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}| + ==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\} diff --git a/data/languages/java/highlight.xml b/data/languages/java/highlight.xml index 73c11b7..257bcb8 100644 --- a/data/languages/java/highlight.xml +++ b/data/languages/java/highlight.xml @@ -4,75 +4,73 @@ commentDoxygen - /\*\*.*\*/ + /\*\*.*?\*/ comment - /\*.*\*/ + /\*.*?\*/ commentDoxygen - //!(\\[\\\n]|.)*$ + //!(\\[\\\n]|.)*?$ SYNTAX_ERROR - //[ \t]*TODO[ \t]*:(\\[\\\n]|.)*$ + //[ \t]*TODO[ \t]*:(\\[\\\n]|.)*?$ comment - //(\\[\\\n]|.)*$ + //(\\[\\\n]|.)*?$ doubleQuoteText - "(\\[\\"]|.)*" + "(\\[\\"]|.)*?" doubleQuoteText - '(\\[\\']|.)*' + '(\\[\\']|.)*?' keyword - \@return|goto|if|else|case|default|switch|break|continue|while|do|for\@ + \b(return|goto|if|else|case|default|switch|break|continue|while|do|for)\b systemFunction - \@new|try|catch|print\@ + \b(new|try|catch|print)\b type - \@boolean|byte|char|double|float|int|long|short|String|Object|Thread|void|enum\@ + \b(boolean|byte|char|double|float|int|long|short|String|Object|Thread|void|enum)\b storageKeyword - \@import|package|extends|Override|implements|const|class|abstract|private|public|protected|final|const|static|transiant|volatile|interface@ + \b(import|package|extends|Override|implements|const|class|abstract|private|public|protected|final|const|static|transiant|volatile|interface)\b commonDefine - \@null\@ + \bnull\b number - \@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@ + \b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b boolean - \@true|false\@ + \b(true|false)\b macro - \@[A-Z_][A-Z_0-9]{3,500}\@ + \b[A-Z_][A-Z_0-9]{3,500}\b - boolean - ==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}| + ==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\} diff --git a/data/languages/json/highlight.xml b/data/languages/json/highlight.xml index a8fe3db..4646777 100644 --- a/data/languages/json/highlight.xml +++ b/data/languages/json/highlight.xml @@ -4,7 +4,7 @@ doubleQuoteText - "(\\[\\"]|.)*" + "(\\[\\"]|.)*?" @@ -22,11 +22,11 @@ number - \@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@ + \b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b boolean - \@true|false\@ + \b(true|false)\b diff --git a/data/languages/lua/highlight.xml b/data/languages/lua/highlight.xml index baff8d4..9291441 100644 --- a/data/languages/lua/highlight.xml +++ b/data/languages/lua/highlight.xml @@ -4,51 +4,49 @@ comment - \-\-\[\[.*\-\-\]\] + \-\-\[\[.*?\-\-\]\] SYNTAX_ERROR - \-\-[ \t]*TODO[ \t]*:(\\[\\\n]|.)*$ + \-\-[ \t]*TODO[ \t]*:(\\[\\\n]|.)*?$ comment - \-\-(\\[\\\n]|.)*$ + \-\-(\\[\\\n]|.)*?$ doubleQuoteText - "(\\[\\"]|.)*" + "(\\[\\"]|.)*?" doubleQuoteText - '(\\[\\']|.)*' + '(\\[\\']|.)*?' keyword - \@and|break|do|else|elseif|end|for|function|if|in|local|nil|not|or|repeat|return|then|until|while\@ + \b(and|break|do|else|elseif|end|for|function|if|in|local|nil|not|or|repeat|return|then|until|while)\b number - \@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@ + \b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b boolean - \@true|false\@ + \b(true|false)\b macro - \@[A-Z_][A-Z_0-9]{3,500}\@ + \b([A-Z_][A-Z_0-9]{3,500})\b - boolean - ==|<=|>=|~=|<{1,2}|>{1,2}|&&|\{|\}| + ==|<=|>=|~=|<{1,2}|>{1,2}|&&|\{|\} diff --git a/data/languages/makefile/highlight.xml b/data/languages/makefile/highlight.xml index caf22df..9878720 100644 --- a/data/languages/makefile/highlight.xml +++ b/data/languages/makefile/highlight.xml @@ -6,25 +6,25 @@ preprocesseur - #(\\[\\\n]|.)*$ + #(\\[\\\n]|.)*?$ doubleQuoteText - "(\\[\\"]|.)*" + "(\\[\\"]|.)*?" doubleQuoteText - '(\\[\\']|.)*' + '(\\[\\']|.)*?' type - \@if|ifeq|ifneq|else|endif|define|endef\@ + \b(if|ifeq|ifneq|else|endif|define|endef)\b keyword - \$\([a-zA-Z_][a-zA-Z0-9_]*\) + \b\([a-zA-Z_][a-zA-Z0-9_]*\) functionName diff --git a/data/languages/matlab/highlight.xml b/data/languages/matlab/highlight.xml index 511101e..b6036df 100644 --- a/data/languages/matlab/highlight.xml +++ b/data/languages/matlab/highlight.xml @@ -5,51 +5,49 @@ commentDoxygen - %%(\\[\\\n]|.)*$ + %%(\\[\\\n]|.)*?$ comment - %(\\[\\\n]|.)*$ + %(\\[\\\n]|.)*?$ doubleQuoteText - ".*($|") + ".*?($|") doubleQuoteText - '.*($|') + '.*?($|') preprocesseur - global( |\t)+(\\[\\\n]|.)*$ + global( |\t)+(\\[\\\n]|.)*?$ keyword - \@return|goto|if|else|case|default|switch|break|continue|while|do|for|otherwise|end\@ + \b(return|goto|if|else|case|default|switch|break|continue|while|do|for|otherwise|end)\b boolean - \@true|false\@ + \b(true|false)\b - boolean - ==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}| + ==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\} number - \@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@ + \b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b macro - \@[A-Z_][A-Z_0-9]{3,500}\@ + \b([A-Z_][A-Z_0-9]{3,500})\b diff --git a/data/languages/php/highlight.xml b/data/languages/php/highlight.xml index c8661ff..0514b6e 100644 --- a/data/languages/php/highlight.xml +++ b/data/languages/php/highlight.xml @@ -7,27 +7,27 @@ comment - /\*.*\*/ + /\*.*?\*/ SYNTAX_ERROR - //[ \t]*TODO[ \t]*:(\\[\\\n]|.)*$ + //[ \t]*TODO[ \t]*:(\\[\\\n]|.)*?$ comment - #(\\[\\\n]|.)*$ + #(\\[\\\n]|.)*?$ comment - //(\\[\\\n]|.)*$ + //(\\[\\\n]|.)*?$ doubleQuoteText - "(\\[\\"]|.)*" + "(\\[\\"]|.)*?" doubleQuoteText - '(\\[\\']|.)*' + '(\\[\\']|.)*?' @@ -37,33 +37,31 @@ type - \@array|bool|boolean|double|float|int|integer|numeric|object|resource|string|unset\@ + \b(array|bool|boolean|double|float|int|integer|numeric|object|resource|string|unset)\b 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\@ + \b(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)\b commonDefine - \@doubleval|floatval|gettype|intval|print_r|serialize|settype|strval|unserialize|var_dump|var_export\@ + \b(doubleval|floatval|gettype|intval|print_r|serialize|settype|strval|unserialize|var_dump|var_export)\b number - \@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@ + \b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b boolean - \@true|TRUE|false|FALSE\@ + \b(true|TRUE|false|FALSE)\b - boolean - ==|<=|>=|!=|<|>|&&|\{|\}| + ==|<=|>=|!=|<|>|&&|\{|\} diff --git a/data/languages/python/highlight.xml b/data/languages/python/highlight.xml index 11d8865..d2900d3 100644 --- a/data/languages/python/highlight.xml +++ b/data/languages/python/highlight.xml @@ -4,67 +4,65 @@ comment - """.*""" + """.*?""" comment - '''.*''' + '''.*?''' commentDoxygen - ##(\\[\\\n]|.)*$ + ##(\\[\\\n]|.)*?$ comment - #(\\[\\\n]|.)*$ + #(\\[\\\n]|.)*?$ doubleQuoteText - "(\\[\\"]|.)*" + "(\\[\\"]|.)*?" doubleQuoteText - '((\\[\\'])|.)*' + '((\\[\\'])|.)*?' keyword - \@if|else|elif|break|pass|continue|while|do|for|in|return\@ + \b(if|else|elif|break|pass|continue|while|do|for|in|return)\b systemFunction - \@print|len|range|del|__init__|self|os\.|sys\.|path\.\@ + \b(print|len|range|del|__init__|self|os\.|sys\.|path\.)\b type - \@bool|BOOL|char|double|float\@ + \b(bool|BOOL|char|double|float)\b storageKeyword - \@def|class|import|from|as|try|except\@ + \b(def|class|import|from|as|try|except)\b number - \@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@ + \b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b boolean - \@True|False\@ + \b(True|False)\b macro - \@[A-Z_][A-Z_0-9]{3,500}\@ + \b([A-Z_][A-Z_0-9]{3,500})\b - boolean - ==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}| + ==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\} diff --git a/data/languages/xml/highlight.xml b/data/languages/xml/highlight.xml index 31c99a8..eb05e3d 100644 --- a/data/languages/xml/highlight.xml +++ b/data/languages/xml/highlight.xml @@ -5,16 +5,16 @@ comment - ]]> + ]]> doubleQuoteText - "(\\[\\"]|.)*" + "(\\[\\"]|.)*?" doubleQuoteText - \@'.*('|\n) + \b'.*?('|\n) @@ -31,7 +31,7 @@ functionName - + diff --git a/test/CMakeFile.txt b/test/CMakeFile.txt new file mode 100644 index 0000000..e69de29 diff --git a/test/Makefile b/test/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/test/asm.asm b/test/asm.asm new file mode 100644 index 0000000..e69de29 diff --git a/test/bash.bash b/test/bash.bash new file mode 100644 index 0000000..e69de29 diff --git a/test/boo.boo b/test/boo.boo new file mode 100644 index 0000000..e69de29 diff --git a/test/cpp.cpp b/test/cpp.cpp new file mode 100644 index 0000000..e69de29 diff --git a/test/html.html b/test/html.html new file mode 100644 index 0000000..e69de29 diff --git a/test/in.in b/test/in.in new file mode 100644 index 0000000..e69de29 diff --git a/test/java.java b/test/java.java new file mode 100644 index 0000000..e69de29 diff --git a/test/lua.lua b/test/lua.lua new file mode 100644 index 0000000..e69de29 diff --git a/test/matlab.m b/test/matlab.m new file mode 100644 index 0000000..e69de29 diff --git a/test/php.php b/test/php.php new file mode 100644 index 0000000..3b8647f --- /dev/null +++ b/test/php.php @@ -0,0 +1,62 @@ + false, + 'level' => -1, + 'name' => "", + 'class' => NULL)); +// supression de cet élément inutil... +array_pop($module_list); + + +function ShowModuleList(){ + global $module_list; + $output = ""; + //On liste simplement les module ouvert: + $output .= '
'; + $output .= ''; + foreach($module_list as $element) { + $output .= ''; + } + $output .= '
'; + return $output; +} + +function addModule($module_name) { + // element global : + global $module_list; + if (file_exists($module_file)) { + //On inclu le module + include_once($module_file); + } else { + // nothing to do ... + } +} + +class ModuleSite{ + // description du plugin + protected $description; + // level d'utilisation du plugin + private $useLevel; + // version du plugin + public $version; + + /*! + * @brief Contructeur de base + * @param --- + * @return --- + */ + function ModuleSite($_nomDuModule) { + $this->description = "---"; + $this->useLevel = 1024; + $this->version = "00.00"; + return false; + } + + +?> \ No newline at end of file diff --git a/test/python.py b/test/python.py new file mode 100644 index 0000000..e69de29 diff --git a/test/vertexShader.frag b/test/vertexShader.frag new file mode 100644 index 0000000..dff8a0f --- /dev/null +++ b/test/vertexShader.frag @@ -0,0 +1,52 @@ + +/** + * Doxygen comment + */ +/* simple comment */ +#if 0 + remove value +#else + +#endif + +varying void +uniform bool +attribute float +precision int +mediump vec2 +mediump vec3 +mediump vec4 +mediump mat2 +mediump mat3 +mediump mat4 +mediump ivect2 +mediump ivect3 +mediump ivect4 +mediump bvect2 +mediump bvect3 +mediump bvect4 + +//! inline doxygen comment +void emptyFunction() { + +} +// inline comment + +void main() { + return + goto + if + else + case + default + switch + break + continue + while + do + for + sizeof + + MACRO_VALUE +} + diff --git a/test/xml.xml b/test/xml.xml new file mode 100644 index 0000000..a0bb143 --- /dev/null +++ b/test/xml.xml @@ -0,0 +1,12 @@ + + + + + + direct data + + + + \ No newline at end of file