[DEV] separate c++ & C and add filename in title

This commit is contained in:
2014-10-21 21:18:50 +02:00
parent cefe0aacdb
commit 3f4a71065d
5 changed files with 150 additions and 22 deletions

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<EdnLang version="0.1" lang="C/C++">
<ext>.*\.(c|cpp|cxx|cc|h|hpp|hxx|m|mm)</ext>
<EdnLang version="0.1" lang="C">
<ext>.*\.(c|m)</ext>
<!--might be : <ext>.*\.(c|h|m)</ext>-->
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
<rule name="doxygen multiline">
<color>commentDoxygen</color>
@@ -12,7 +13,7 @@
<regex>/\*(.|\r|\n)*?(\*/|\0)</regex>
<sub>TODO</sub>
</rule>
<rule name="comment miltiline ERROR">
<rule name="comment multiline ERROR">
<color>SYNTAX_ERROR</color>
<regex>/\*(.|\r|\n)*</regex>
</rule>
@@ -40,11 +41,11 @@
</rule>
<rule name="double quote text">
<color>doubleQuoteText</color>
<regex>"(.|\\[\\"])*?"</regex> <!-- " -->
<regex>&quot;(.|\\[\\&quot;])*?&quot;</regex> <!-- " -->
</rule>
<rule name="simple quote text">
<color>doubleQuoteText</color>
<regex>'\\?.'</regex>
<regex>&apos;\\?.&apos;</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
@@ -54,23 +55,19 @@
</rule>
<rule name="my function keyword">
<color>systemFunction</color>
<regex>\b(new|delete|try|catch|memset|fopen|fread|fwrite|fgets|fclose|printf|(f|s|diag_)printf|calloc|malloc|realloc|(cyg|sup)_([a-z]|[A-Z]|[0-9]|_)+)\b</regex>
<regex>\b(memset|fopen|fread|fwrite|fgets|fclose|printf|(f|s|diag_)printf|calloc|malloc|realloc)\b</regex>
</rule>
<rule name="my type">
<color>type</color>
<regex>\b(bool|BOOL|char(16_t|32_t)?|double|float|u?int(8|16|32|64|128)?(_t)?|long|short|signed|size_t|unsigned|void|(I|U)(8|16|32|64|128))\b</regex>
</rule>
<rule name="std type">
<color>type</color>
<regex>\bstd::[\w:]*\b</regex>
<regex>\b(bool|char(16_t|32_t)?|double|float|u?int(8|16|32|64|128)?(_t)?|long|short|signed|size_t|unsigned|void|(I|U)(8|16|32|64|128))\b</regex>
</rule>
<rule name="my storage keyword">
<color>storageKeyword</color>
<regex>\b(inline|const|class|namespace|virtual|private|public|protected|friend|const|extern|auto|register|static|unsigned|signed|volatile|char|double|float|int|long|short|void|typedef|struct|union|enum)\b</regex>
<regex>\b(inline|const|const|extern|register|static|unsigned|signed|volatile|char|double|float|int|long|short|void|typedef|struct|union|enum)\b</regex>
</rule>
<rule name="my common Define">
<color>commonDefine</color>
<regex>\b(NULL|MAX|MIN|__LINE__|__DATA__|__FILE__|__func__|__TIME__|__STDC__)\b</regex>
<regex>\b(NULL|MAX|MIN|__(LINE|DATA|FILE|func|TIME|STDC)__)\b</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
@@ -78,16 +75,12 @@
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\b(true|TRUE|false|FALSE)\b</regex>
<regex>\b(TRUE|FALSE)\b</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\b([A-Z_][A-Z_0-9]{3,500})\b</regex>
</rule>
<rule name="CPP member">
<color>memberClass</color>
<regex>\bm_\w+\b</regex>
</rule>
<rule name="function input">
<color>inputFunction</color>
<regex>\b_\w+\b</regex>
@@ -100,10 +93,6 @@
<color>boolean</color>
<regex>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>([A-Z]|_){4,500}</regex>
</rule>
<rule name="simpleQuteTextError">
<color>SYNTAX_ERROR</color>
<regex>&apos;|&quot;</regex>