[DEV] correction of the regex and add some basic test example

This commit is contained in:
Edouard DUPIN 2014-10-07 00:45:01 +02:00
parent d93844d6da
commit 78887e64ed
29 changed files with 252 additions and 140 deletions

View File

@ -6,41 +6,41 @@
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
<rule name="my comment multiline doxygen">
<color>commentDoxygen</color>
<regex>/\*\*.*\*/</regex>
<regex>/\*\*.*?\*/</regex>
</rule>
<rule name="my comment multiline">
<color>comment</color>
<regex>/\*.*\*/</regex>
<regex>/\*.*?\*/</regex>
</rule>
<rule name="my if 0">
<color>preprocesseur</color>
<regex>#[ \t]*if 0.*#(regexif|else)</regex>
<regex>#[ \t]*if 0.*?#(regexif|else)</regex>
</rule>
<rule name="my preprocesseur">
<color>preprocesseur</color>
<regex>#.*$</regex>
<regex>#.*?$</regex>
</rule>
<rule name="my comment doxygen">
<color>commentDoxygen</color>
<regex>//!.*$</regex>
<regex>//!.*?$</regex>
</rule>
<rule name="my todo comment">
<color>SYNTAX_ERROR</color>
<regex>//[ \t]*TODO[ \t]*:.*$</regex>
<regex>//[ \t]*TODO[ \t]*:.*?$</regex>
</rule>
<rule name="my comment">
<color>comment</color>
<regex>(//|@).*$</regex>
<regex>//.*?$</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="my keyword">
<color>keyword</color>
<regex>\@smull|ldrsh|smlal|stmdb|mul|mla|umull|ldr|add|str|mov|subs|bgt|ldmia|stmia|ldmfd|cmp|sub|strd|stmfd|bne|bhi|ldrd|mvn\@</regex>
<regex>\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</regex>
</rule>
<rule name="register list">
<color>type</color>
<regex>\@r(10|11|12|[0-9]?)|sp|lp|lr|pc\@</regex>
<regex>\b(r(10|11|12|[0-9]?)|sp|lp|lr|pc)\b</regex>
</rule>
</pass2>
</EdnLang>

View File

@ -4,39 +4,37 @@
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
<rule name="first line">
<color>commentDoxygen</color>
<regex>#!(\\[\\\n]|.)*$</regex>
<regex>#!(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="comment line">
<color>comment</color>
<regex>#(\\[\\\n]|.)*$</regex>
<regex>#(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>"(\\[\\"]|.)*"</regex>
<regex>"(\\[\\"]|.)*?"</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>'(\\[\\']|.)*'</regex>
<regex>'(\\[\\']|.)*?'</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="my keyword">
<color>keyword</color>
<regex>\@for|done|do|while|in|if|elif|then|else|fi\@</regex>
<regex>\b(for|done|do|while|in|if|elif|then|else|fi)\b</regex>
</rule>
<rule name="my Variable">
<color>keyword</color>
<regex>[\$]+[a-zA-Z_][a-zA-Z0-9_]*</regex>
</rule>
<!--
<rule name="Function name">
<color>functionName</color>
<regex>function (\w|_)+[ \t]*\(</regex>
</rule>
-->
<rule name="condition">
<color>boolean</color>
<regex>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}|</regex>
<regex>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}</regex>
</rule>
</pass2>
</EdnLang>

View File

@ -4,23 +4,23 @@
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
<rule name="comment ##">
<color>SYNTAX_ERROR</color>
<regex>##.*$</regex>
<regex>##.*?$</regex>
</rule>
<rule name="comment #">
<color>comment</color>
<regex>#.*$</regex>
<regex>#.*?$</regex>
</rule>
<rule name="notes ... ">
<color>preprocesseur</color>
<regex>(NOTE|TODO) : .*$</regex>
<regex>(NOTE|TODO) : .*?$</regex>
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>"(\\[\\"]|.)*$</regex>
<regex>"(\\[\\"]|.)*?$</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>\@'(\\[\\']|.)*$</regex>
<regex>\b'(\\[\\']|.)*?$</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
@ -33,7 +33,7 @@
<color>number</color>
<regex>[0-9]*%</regex>
</rule>
<rule name="Résultat OK">
<rule name="Résultat OK">
<color>TestResultOK</color>
<regex>\[( )*(OK|Ok|ok)( )*\]</regex>
</rule>

View File

@ -5,47 +5,45 @@
<pass1>
<rule name="my comment doxygen">
<color>commentDoxygen</color>
<regex>##.*$</regex>
<regex>##.*?$</regex>
</rule>
<rule name="my todo comment">
<color>SYNTAX_ERROR</color>
<regex>#[ \t]TODO[ \t]*:(\\[\\\n]|.)*$</regex>
<regex>#[ \t]TODO[ \t]*:(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="my comment">
<color>comment</color>
<regex>#(\\[\\\n]|.)*$</regex>
<regex>#(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>"(\\[\\"]|.)*$</regex>
<regex>"(\\[\\"]|.)*?$</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="my keyword">
<color>keyword</color>
<regex>\@foreach|message|endforeach|if|else|endif|list|file|string\@</regex>
<regex>\b(foreach|message|endforeach|if|else|endif|list|file|string)\b</regex>
</rule>
<rule name="my function keyword">
<color>systemFunction</color>
<regex>\@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\@</regex>
<regex>\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</regex>
</rule>
<rule name="Variable">
<color>inputFunction</color>
<regex>\${.*}</regex>
<regex>\$\{.*\}</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
<regex>\b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\@[A-Z_][A-Z_0-9]{3,500}\@</regex>
<regex>\b([A-Z_][A-Z_0-9]{3,500})\b</regex>
</rule>
<!--
<rule name="Function name">
<color>functionName</color>
<regex>\@(\w|_)+[ \t]*\(</regex>
<regex>\b(\w|_)+[ \t]*\(</regex>
</rule>
-->
</pass2>
</EdnLang>

View File

@ -37,35 +37,35 @@
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="my keyword">
<color>keyword</color>
<regex>\@return|goto|if|else|case|default|switch|break|continue|while|do|for|sizeof\@</regex>
<regex>\b(return|goto|if|else|case|default|switch|break|continue|while|do|for|sizeof)\b</regex>
</rule>
<rule name="my type">
<color>type</color>
<regex>\@void|bool|float|int|(vec|mat|ivect|bvect)[2-4]\@</regex>
<regex>\b(void|bool|float|int|(vec|mat|ivect|bvect)[2-4])\b</regex>
</rule>
<rule name="my storage keyword">
<color>storageKeyword</color>
<regex>\@varying|uniform|attribute|precision|mediump\@</regex>
<regex>\b(varying|uniform|attribute|precision|mediump)\b</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
<regex>\b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b</regex>
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\@true|false\@</regex>
<regex>\b(true|false)\b</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\@[A-Z_][A-Z_0-9]{3,500}\@</regex>
<regex>\b([A-Z_][A-Z_0-9]{3,500})\b</regex>
</rule>
<rule name="Function name">
<color>functionName</color>
<regex>\@(\w|_)+[ \t]*\(</regex>
<regex>\b(\w|_)+[ \t]*\(</regex>
</rule>
<rule name="condition">
<color>boolean</color>
<regex>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}|</regex>
<regex>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}</regex>
</rule>
</pass2>
</EdnLang>

View File

@ -4,37 +4,37 @@
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
<rule name="my preprocesseur">
<color>preprocesseur</color>
<regex>#(\\[\\\n]|.)*$</regex>
<regex>#(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>"(\\[\\"]|.)*$</regex>
<regex>"(\\[\\"]|.)*?$</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>'(\\[\\']|.)*$</regex>
<regex>'(\\[\\']|.)*?$</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="my keyword">
<color>keyword</color>
<regex>\@menu|endmenu|comment|if|endif|help|default|choice|endchoice|prompt|depends on|config\@</regex>
<regex>\b(menu|endmenu|comment|if|endif|help|default|choice|endchoice|prompt|depends on|config)\b</regex>
</rule>
<rule name="my type">
<color>type</color>
<regex>\@int|hex|bool|string\@</regex>
<regex>\b(int|hex|bool|string)\b</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
<regex>\b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\@[A-Z_][A-Z_0-9]{3,500}\@</regex>
<regex>\b([A-Z_][A-Z_0-9]{3,500})\b</regex>
</rule>
<rule name="condition">
<color>boolean</color>
<regex>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}|</regex>
<regex>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}</regex>
</rule>
</pass2>
</EdnLang>

View File

@ -4,75 +4,73 @@
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
<rule name="my comment multiline doxygen">
<color>commentDoxygen</color>
<regex>/\*\*.*\*/</regex>
<regex>/\*\*.*?\*/</regex>
</rule>
<rule name="my comment multiline">
<color>comment</color>
<regex>/\*.*\*/</regex>
<regex>/\*.*?\*/</regex>
</rule>
<rule name="my comment doxygen">
<color>commentDoxygen</color>
<regex>//!(\\[\\\n]|.)*$</regex>
<regex>//!(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="my todo comment">
<color>SYNTAX_ERROR</color>
<regex>//[ \t]*TODO[ \t]*:(\\[\\\n]|.)*$</regex>
<regex>//[ \t]*TODO[ \t]*:(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="my comment">
<color>comment</color>
<regex>//(\\[\\\n]|.)*$</regex>
<regex>//(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>"(\\[\\"]|.)*"</regex>
<regex>"(\\[\\"]|.)*?"</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>'(\\[\\']|.)*'</regex>
<regex>'(\\[\\']|.)*?'</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="my keyword">
<color>keyword</color>
<regex>\@return|goto|if|else|case|default|switch|break|continue|while|do|for\@</regex>
<regex>\b(return|goto|if|else|case|default|switch|break|continue|while|do|for)\b</regex>
</rule>
<rule name="my function keyword">
<color>systemFunction</color>
<regex>\@new|try|catch|print\@</regex>
<regex>\b(new|try|catch|print)\b</regex>
</rule>
<rule name="my type">
<color>type</color>
<regex>\@boolean|byte|char|double|float|int|long|short|String|Object|Thread|void|enum\@</regex>
<regex>\b(boolean|byte|char|double|float|int|long|short|String|Object|Thread|void|enum)\b</regex>
</rule>
<rule name="my storage keyword">
<color>storageKeyword</color>
<regex>\@import|package|extends|Override|implements|const|class|abstract|private|public|protected|final|const|static|transiant|volatile|interface@</regex>
<regex>\b(import|package|extends|Override|implements|const|class|abstract|private|public|protected|final|const|static|transiant|volatile|interface)\b</regex>
</rule>
<rule name="my common Define">
<color>commonDefine</color>
<regex>\@null\@</regex>
<regex>\bnull\b</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
<regex>\b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b</regex>
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\@true|false\@</regex>
<regex>\b(true|false)\b</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\@[A-Z_][A-Z_0-9]{3,500}\@</regex>
<regex>\b[A-Z_][A-Z_0-9]{3,500}\b</regex>
</rule>
<!--
<rule name="Function name">
<color>functionName</color>
<regex>\@(\w|_)+[ \t]*\(</regex>
<regex>\b(\w|_)+[ \t]*\(</regex>
</rule>
-->
<rule name="condition">
<color>boolean</color>
<regex>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}|</regex>
<regex>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}</regex>
</rule>
</pass2>
</EdnLang>

View File

@ -4,7 +4,7 @@
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>"(\\[\\"]|.)*"</regex>
<regex>"(\\[\\"]|.)*?"</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
@ -22,11 +22,11 @@
</rule>
<rule name="numeric constant">
<color>number</color>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
<regex>\b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b</regex>
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\@true|false\@</regex>
<regex>\b(true|false)\b</regex>
</rule>
</pass2>
</EdnLang>

View File

@ -4,51 +4,49 @@
<pass1>
<rule name="Comment multiline">
<color>comment</color>
<regex>\-\-\[\[.*\-\-\]\]</regex>
<regex>\-\-\[\[.*?\-\-\]\]</regex>
</rule>
<rule name="my todo comment">
<color>SYNTAX_ERROR</color>
<regex>\-\-[ \t]*TODO[ \t]*:(\\[\\\n]|.)*$</regex>
<regex>\-\-[ \t]*TODO[ \t]*:(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="my comment">
<color>comment</color>
<regex>\-\-(\\[\\\n]|.)*$</regex>
<regex>\-\-(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>"(\\[\\"]|.)*"</regex>
<regex>"(\\[\\"]|.)*?"</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>'(\\[\\']|.)*'</regex>
<regex>'(\\[\\']|.)*?'</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="my keyword">
<color>keyword</color>
<regex>\@and|break|do|else|elseif|end|for|function|if|in|local|nil|not|or|repeat|return|then|until|while\@</regex>
<regex>\b(and|break|do|else|elseif|end|for|function|if|in|local|nil|not|or|repeat|return|then|until|while)\b</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
<regex>\b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b</regex>
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\@true|false\@</regex>
<regex>\b(true|false)\b</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\@[A-Z_][A-Z_0-9]{3,500}\@</regex>
<regex>\b([A-Z_][A-Z_0-9]{3,500})\b</regex>
</rule>
<!--
<rule name="Function name">
<color>functionName</color>
<regex>\@(\w|_)+[ \t]*\(</regex>
<regex>\b(\w|_)+[ \t]*\(</regex>
</rule>
-->
<rule name="condition">
<color>boolean</color>
<regex>==|&lt;=|&gt;=|~=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}|</regex>
<regex>==|&lt;=|&gt;=|~=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}</regex>
</rule>
</pass2>
</EdnLang>

View File

@ -6,25 +6,25 @@
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
<rule name="my preprocesseur">
<color>preprocesseur</color>
<regex>#(\\[\\\n]|.)*$</regex>
<regex>#(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>"(\\[\\"]|.)*"</regex>
<regex>"(\\[\\"]|.)*?"</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>'(\\[\\']|.)*'</regex>
<regex>'(\\[\\']|.)*?'</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="confition">
<color>type</color>
<regex>\@if|ifeq|ifneq|else|endif|define|endef\@</regex>
<regex>\b(if|ifeq|ifneq|else|endif|define|endef)\b</regex>
</rule>
<rule name="my keyword">
<color>keyword</color>
<regex>\$\([a-zA-Z_][a-zA-Z0-9_]*\)</regex>
<regex>\b\([a-zA-Z_][a-zA-Z0-9_]*\)</regex>
</rule>
<rule name="function call">
<color>functionName</color>

View File

@ -5,51 +5,49 @@
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
<rule name="my comment doxygen">
<color>commentDoxygen</color>
<regex>%%(\\[\\\n]|.)*$</regex>
<regex>%%(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="my comment">
<color>comment</color>
<regex>%(\\[\\\n]|.)*$</regex>
<regex>%(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex> ".*($|")</regex>
<regex> ".*?($|")</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex> '.*($|')</regex>
<regex> '.*?($|')</regex>
</rule>
<rule name="global inclusion">
<color>preprocesseur</color>
<regex>global( |\t)+(\\[\\\n]|.)*$</regex>
<regex>global( |\t)+(\\[\\\n]|.)*?$</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="my keyword">
<color>keyword</color>
<regex>\@return|goto|if|else|case|default|switch|break|continue|while|do|for|otherwise|end\@</regex>
<regex>\b(return|goto|if|else|case|default|switch|break|continue|while|do|for|otherwise|end)\b</regex>
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\@true|false\@</regex>
<regex>\b(true|false)\b</regex>
</rule>
<!--
<rule name="Function name">
<color>functionName</color>
<regex>\@(\w|_)+[ \t]*\(</regex>
<regex>\b((\w|_)+[ \t]*\(</regex>
</rule>
-->
<rule name="condition">
<color>boolean</color>
<regex>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}|</regex>
<regex>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
<regex>\b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\@[A-Z_][A-Z_0-9]{3,500}\@</regex>
<regex>\b([A-Z_][A-Z_0-9]{3,500})\b</regex>
</rule>
</pass2>
</EdnLang>

View File

@ -7,27 +7,27 @@
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
<rule name="my comment multiline">
<color>comment</color>
<regex>/\*.*\*/</regex>
<regex>/\*.*?\*/</regex>
</rule>
<rule name="my todo comment">
<color>SYNTAX_ERROR</color>
<regex>//[ \t]*TODO[ \t]*:(\\[\\\n]|.)*$</regex>
<regex>//[ \t]*TODO[ \t]*:(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="my comment inline">
<color>comment</color>
<regex>#(\\[\\\n]|.)*$</regex>
<regex>#(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="my comment">
<color>comment</color>
<regex>//(\\[\\\n]|.)*$</regex>
<regex>//(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>"(\\[\\"]|.)*"</regex>
<regex>"(\\[\\"]|.)*?"</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>'(\\[\\']|.)*'</regex>
<regex>'(\\[\\']|.)*?'</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
@ -37,33 +37,31 @@
</rule>
<rule name="my type">
<color>type</color>
<regex>\@array|bool|boolean|double|float|int|integer|numeric|object|resource|string|unset\@</regex>
<regex>\b(array|bool|boolean|double|float|int|integer|numeric|object|resource|string|unset)\b</regex>
</rule>
<rule name="my storage keyword">
<color>storageKeyword</color>
<regex>\@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\@</regex>
<regex>\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</regex>
</rule>
<rule name="my common Define">
<color>commonDefine</color>
<regex>\@doubleval|floatval|gettype|intval|print_r|serialize|settype|strval|unserialize|var_dump|var_export\@</regex>
<regex>\b(doubleval|floatval|gettype|intval|print_r|serialize|settype|strval|unserialize|var_dump|var_export)\b</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
<regex>\b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b</regex>
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\@true|TRUE|false|FALSE\@</regex>
<regex>\b(true|TRUE|false|FALSE)\b</regex>
</rule>
<!--
<rule name="Function name">
<color>functionName</color>
<regex>\@(\w|_)+[ \t]*\(</regex>
<regex>\b((\w|_)+[ \t]*\(</regex>
</rule>
-->
<rule name="condition">
<color>boolean</color>
<regex>==|&lt;=|&gt;=|!=|&lt;|&gt;|&amp;&amp;|\{|\}|</regex>
<regex>==|&lt;=|&gt;=|!=|&lt;|&gt;|&amp;&amp;|\{|\}</regex>
</rule>
</pass2>
</EdnLang>

View File

@ -4,67 +4,65 @@
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
<rule name="my comment multiline">
<color>comment</color>
<regex>""".*"""</regex>
<regex>""".*?"""</regex>
</rule>
<rule name="my comment multiline">
<color>comment</color>
<regex>'''.*'''</regex>
<regex>'''.*?'''</regex>
</rule>
<rule name="my comment doxygen">
<color>commentDoxygen</color>
<regex>##(\\[\\\n]|.)*$</regex>
<regex>##(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="my comment">
<color>comment</color>
<regex>#(\\[\\\n]|.)*$</regex>
<regex>#(\\[\\\n]|.)*?$</regex>
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>"(\\[\\"]|.)*"</regex>
<regex>"(\\[\\"]|.)*?"</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>'((\\[\\'])|.)*'</regex>
<regex>'((\\[\\'])|.)*?'</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="my keyword">
<color>keyword</color>
<regex>\@if|else|elif|break|pass|continue|while|do|for|in|return\@</regex>
<regex>\b(if|else|elif|break|pass|continue|while|do|for|in|return)\b</regex>
</rule>
<rule name="my function keyword">
<color>systemFunction</color>
<regex>\@print|len|range|del|__init__|self|os\.|sys\.|path\.\@</regex>
<regex>\b(print|len|range|del|__init__|self|os\.|sys\.|path\.)\b</regex>
</rule>
<rule name="my type">
<color>type</color>
<regex>\@bool|BOOL|char|double|float\@</regex>
<regex>\b(bool|BOOL|char|double|float)\b</regex>
</rule>
<rule name="my storage keyword">
<color>storageKeyword</color>
<regex>\@def|class|import|from|as|try|except\@</regex>
<regex>\b(def|class|import|from|as|try|except)\b</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
<regex>\b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?)\b</regex>
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\@True|False\@</regex>
<regex>\b(True|False)\b</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\@[A-Z_][A-Z_0-9]{3,500}\@</regex>
<regex>\b([A-Z_][A-Z_0-9]{3,500})\b</regex>
</rule>
<!--
<rule name="Function name">
<color>functionName</color>
<regex>\@(\w|_)+[ \t]*\(</regex>
<regex>\b(\w|_)+[ \t]*\(</regex>
</rule>
-->
<rule name="condition">
<color>boolean</color>
<regex>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}|</regex>
<regex>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}</regex>
</rule>
<!-- With all elementes : -->
<rule name="BIG LETTER">

View File

@ -5,16 +5,16 @@
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
<rule name="Comment">
<color>comment</color>
<regex><![CDATA[<!\-\-.*\-\->]]></regex>
<regex><![CDATA[<!\-\-.*?\-\->]]></regex>
<!--<regex>&lt;!\-\-.*\-\-&gt;</regex>-->
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>"(\\[\\"]|.)*"</regex>
<regex>"(\\[\\"]|.)*?"</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>\@'.*('|\n)</regex>
<regex>\b'.*?('|\n)</regex>
</rule>
</pass1>
<pass2>
@ -31,7 +31,7 @@
<rule name="normale Balise">
<color>functionName</color>
<!--<regex>&lt;/[0-9a-zA-Z_]+|&lt;[0-9a-zA-Z_]+|/&gt;|&gt;</regex>-->
<regex><![CDATA[(</[0-9a-zA-Z_]+|<[0-9a-zA-Z_]+)\@]]></regex>
<regex><![CDATA[(</[0-9a-zA-Z_]+|<[0-9a-zA-Z_]+)\b]]></regex>
</rule>
</pass2>
</EdnLang>

0
test/CMakeFile.txt Normal file
View File

0
test/Makefile Normal file
View File

0
test/asm.asm Normal file
View File

0
test/bash.bash Normal file
View File

0
test/boo.boo Normal file
View File

0
test/cpp.cpp Normal file
View File

0
test/html.html Normal file
View File

0
test/in.in Normal file
View File

0
test/java.java Normal file
View File

0
test/lua.lua Normal file
View File

0
test/matlab.m Normal file
View File

62
test/php.php Normal file
View File

@ -0,0 +1,62 @@
<?php
include_once(SITE_MODULE."plop.php");
//define('DEFAULT_PLUGIN_PATH','plugin_wiki/');
define('ABSPATH',dirname(__FILE__).'/');
//Tableau contenant la liste des module
$module_list = array(array( 'state' => 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 .= '<div class="matrice"><table cellspacing="1">';
$output .= '<tr>';
foreach($module_list as $element) {
$output .= '</tr>';
}
$output .= '</table></div>';
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;
}
?>

0
test/python.py Normal file
View File

52
test/vertexShader.frag Normal file
View File

@ -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
}

12
test/xml.xml Normal file
View File

@ -0,0 +1,12 @@
<?declaration attr="plop"/>
<node>
<node2 attribute="data string">
<emptyNode/>
<!-- comment -->
direct data
<!-- multiline comment
<inCommentNode/>
-->
<![CDATA[ raw data ]]>
</node2>
<node>