[DEV] better regex ==> need to update alge to recognise data

This commit is contained in:
2014-10-07 21:42:07 +02:00
parent 78887e64ed
commit 7952872980
17 changed files with 246 additions and 64 deletions

View File

@@ -4,19 +4,19 @@
<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 -->

View File

@@ -16,11 +16,11 @@
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>"(\\[\\"]|.)*?$</regex>
<regex>"(.|\\[\\"])*?$</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>\b'(\\[\\']|.)*?$</regex>
<regex>\b'(.|\\[\\'])*?$</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->

View File

@@ -28,7 +28,7 @@
</rule>
<rule name="my preprocesseur">
<color>preprocesseur</color>
<regex>#(\\[\\\n]|.)*</regex>
<regex>#(.|\\[\\\n])*</regex>
</rule>
<rule name="my comment doxygen">
<color>commentDoxygen</color>
@@ -44,11 +44,11 @@
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>"(\\[\\"]|.)*"</regex>
<regex>"(.|\\[\\"])*"</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>'((\\[\\'])|.){1,2}'</regex>
<regex>'\\?.'</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
@@ -70,7 +70,7 @@
</rule>
<rule name="my storage keyword">
<color>storageKeyword</color>
<regex>\b(inline|const|class|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|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>
</rule>
<rule name="my common Define">
<color>commonDefine</color>
@@ -90,11 +90,11 @@
</rule>
<rule name="CPP member">
<color>memberClass</color>
<regex>\b(m_[A-Za-z_0-9]*)\b</regex>
<regex>\bm_\w+\b</regex>
</rule>
<rule name="function input">
<color>inputFunction</color>
<regex>\b(_[A-Za-z_0-9]*)\b</regex>
<regex>\b_\w+\b</regex>
<max>false</max>
</rule>
<rule name="Function name">

View File

@@ -9,15 +9,15 @@
</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 -->

View File

@@ -15,23 +15,23 @@
</rule>
<rule name="my if 0">
<color>preprocesseur</color>
<regex>#[ \t]*if 0(\\[\\\n]|.)*#(endif|else)</regex>
<regex>#[ \t]*if 0(.|\\[\\\n])*#(endif|else)</regex>
</rule>
<rule name="my preprocesseur">
<color>preprocesseur</color>
<regex>#(\\[\\\n]|.)*$</regex>
<regex>#(.|\\[\\\n])*$</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>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->

View File

@@ -4,15 +4,15 @@
<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 -->

View File

@@ -12,23 +12,23 @@
</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 -->

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

View File

@@ -8,19 +8,19 @@
</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 -->

View File

@@ -6,15 +6,15 @@
<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 -->

View File

@@ -5,11 +5,11 @@
<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>
@@ -21,7 +21,7 @@
</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 -->

View File

@@ -11,23 +11,23 @@
</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 -->

View File

@@ -12,15 +12,15 @@
</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>

View File

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