[DEV] set back the use of the etk::RegExp and etk::Buffer instead of std::regex and std::string ==> fast edit big files

This commit is contained in:
Edouard DUPIN 2017-03-14 21:56:56 +01:00
parent c4f59d8734
commit a42436092b
28 changed files with 238 additions and 280 deletions

View File

@ -25,29 +25,29 @@
</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>\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>
<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>
</rule>
<rule name="register list">
<color>type</color>
<regex>\b(r(10|11|12|[0-9]?)|sp|lp|lr|pc)\b</regex>
<regex>\@r(10|11|12|[0-9]?)|sp|lp|lr|pc\@</regex>
</rule>
</pass2>
</EdnLang>

View File

@ -4,11 +4,11 @@
<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>
@ -22,7 +22,7 @@
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="my keyword">
<color>keyword</color>
<regex>\b(for|done|do|while|in|if|elif|then|else|fi)\b</regex>
<regex>\@for|done|do|while|in|if|elif|then|else|fi\@</regex>
</rule>
<rule name="my Variable">
<color>keyword</color>

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>&quot;(.|\\[\\&quot;])*?$</regex>
<regex>&quot;(.|\\[\\&quot;])*$</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>\b&apos;(.|\\[\\&apos;])*?$</regex>
<regex>\@&apos;(.|\\[\\&apos;])*$</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->

View File

@ -64,43 +64,43 @@
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="my keyword">
<color>keyword</color>
<regex>\b(return|goto|if|else|case|default|switch|break|continue|while|do|for|sizeof)\b</regex>
<regex>\@return|goto|if|else|case|default|switch|break|continue|while|do|for|sizeof\@</regex>
</rule>
<rule name="my function keyword">
<color>systemFunction</color>
<regex>\b(memset|fopen|fread|fwrite|fgets|fclose|printf|(f|s|diag_)printf|calloc|malloc|realloc)\b</regex>
<regex>\@memset|fopen|fread|fwrite|fgets|fclose|printf|(f|s|diag_)printf|calloc|malloc|realloc\@</regex>
</rule>
<rule name="my type">
<color>type</color>
<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>
<regex>\@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)\@</regex>
</rule>
<rule name="my storage keyword">
<color>storageKeyword</color>
<regex>\b(inline|const|const|extern|register|static|unsigned|signed|volatile|char|double|float|int|long|short|void|typedef|struct|union|enum)\b</regex>
<regex>\@inline|const|const|extern|register|static|unsigned|signed|volatile|char|double|float|int|long|short|void|typedef|struct|union|enum\@</regex>
</rule>
<rule name="my common Define">
<color>commonDefine</color>
<regex>\b(NULL|MAX|MIN|__(LINE|DATA|FILE|func|TIME|STDC|PRETTY_FUNCTION|FUNCTION)__)\b</regex>
<regex>\@NULL|MAX|MIN|__(LINE|DATA|FILE|func|TIME|STDC|PRETTY_FUNCTION|FUNCTION)__\@</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<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>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\b(TRUE|FALSE)\b</regex>
<regex>\@TRUE|FALSE\@</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\b([A-Z_][A-Z_0-9]{3,500})\b</regex>
<regex>\@([A-Z_][A-Z_0-9]{3,500})\@</regex>
</rule>
<rule name="function input">
<color>inputFunction</color>
<regex>\b_\w+\b</regex>
<regex>\@_\w+\@</regex>
</rule>
<rule name="Function name">
<color>functionName</color>
<regex>\b((\w|_)+[ \t]*\()</regex>
<regex>\@((\w|_)+[ \t]*\()</regex>
</rule>
<rule name="condition">
<color>boolean</color>
@ -122,7 +122,7 @@
</rule>
<rule name="function input">
<color>inputFunction</color>
<regex>\b_\w+\b</regex>
<regex>\@_\w+\@</regex>
</rule>
</pass>
<pass name="TODO">

View File

@ -5,29 +5,33 @@
<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>&quot;(.|\\[\\&quot;])*?&quot;</regex>
<regex>&quot;(.|\\[\\&quot;])*?&quot;$</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="files path">
<color>memberClass</color>
<regex>\@[0-9a-zA-Z\-\.]+((\.|/)\w)+\@</regex>
</rule>
<rule name="my keyword">
<color>keyword</color>
<regex>\b(foreach|message|endforeach|if|else|endif|list|file|string)\b</regex>
<regex>\@foreach|message|endforeach|if|else|endif|list|file|string\@</regex>
</rule>
<rule name="my function keyword">
<color>systemFunction</color>
<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|find_package|pkg_check_modules|set_target_properties|source_group)\b</regex>
<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|find_package|pkg_check_modules|set_target_properties|source_group\@</regex>
</rule>
<rule name="Variable">
<color>inputFunction</color>
@ -35,19 +39,15 @@
</rule>
<rule name="numeric constant">
<color>number</color>
<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>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\b([A-Z_][A-Z_0-9]{3,500})\b</regex>
<regex>\@[A-Z_][A-Z_0-9]{3,500}\@</regex>
</rule>
<rule name="Function name">
<color>functionName</color>
<regex>\b(\w|_)+[ \t]*\(</regex>
</rule>
<rule name="files path">
<color>memberClass</color>
<regex>[\w-]*(\.|/)\w*</regex>
<regex>\@(\w|_)+[ \t]*\(</regex>
</rule>
</pass2>
</EdnLang>

View File

@ -39,25 +39,25 @@
</rule>
<rule name="#preproc">
<color>preprocesseur</color>
<regex>#(.|\\[\\\n])*</regex>
<regex>#(\\[\\\n]|.)*$</regex>
</rule>
<rule name="inline doxygen">
<color>commentDoxygen</color>
<regex>//!.*</regex>
<regex>//!.*$</regex>
<sub>doxyparse</sub>
</rule>
<rule name="inline comment">
<color>comment</color>
<regex>//.*</regex>
<regex>//.*$</regex>
<sub>TODO</sub>
</rule>
<rule name="double quote text">
<color>doubleQuoteText</color>
<regex>(U|u|u8)?&quot;(.|\\[\\&quot;])*?&quot;</regex> <!-- " -->
<regex>(U|u|u8)?&quot;(\\(n|t|v|b|r|f|a|\\|\?|&quot;|0|o[0-7]{2}|x[0-9a-fA-F]{2}|u[0-9]{4}|U[0-9]{8})|.)*&quot;</regex>
</rule>
<rule name="simple quote text">
<color>doubleQuoteText</color>
<regex>&apos;\\?.&apos;</regex>
<regex>&apos;(\\(&apos;|n|t|v|b|r|f|a|\\|\?|0|o[0-7]{2}|x[0-9a-fA-F]{2}|u[0-9]{4}|U[0-9]{8})|[^\n])&apos;</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
@ -67,51 +67,51 @@
</rule>
<rule name="my keyword">
<color>keyword</color>
<regex>\b(return|goto|if|else|case|default|switch|break|continue|while|do|for|sizeof)\b</regex>
<regex>\@return|goto|if|else|case|default|switch|break|continue|while|do|for|sizeof\@</regex>
</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|(reinterpret|static|dynamic|const)_cast)\b</regex>
<regex>\@new|delete|try|catch|memset|fopen|fread|fwrite|fgets|fclose|printf|(f|s|diag_)printf|(reinterpret|static|dynamic|const)_cast\@</regex>
</rule>
<rule name="my type">
<color>type</color>
<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>
<regex>\@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)\@</regex>
</rule>
<rule name="std type">
<color>type</color>
<regex>\b(std(11)?|boost)::[\w:]*</regex>
<regex>\@std::[a-zA-Z_:][\w:]*\@</regex>
</rule>
<rule name="my storage keyword">
<color>storageKeyword</color>
<regex>\b(inline|const|class|namespace|virtual|private|public|protected|friend|const|extern|mutable|auto|register|static|unsigned|signed|volatile|char|double|float|int|long|short|void|typedef|struct|union|enum|override|final)\b</regex>
<regex>\@inline|const|class|namespace|virtual|private|public|protected|friend|const|extern|mutable|auto|register|static|unsigned|signed|volatile|char|double|float|int|long|short|void|typedef|struct|union|enum|override|final\@</regex>
</rule>
<rule name="my common Define">
<color>commonDefine</color>
<regex>\b(nullptr|__(LINE|DATA|FILE|func|TIME|STDC|PRETTY_FUNCTION|FUNCTION)__)\b</regex>
<regex>\@nullptr|__(LINE|DATA|FILE|func|TIME|STDC|PRETTY_FUNCTION|FUNCTION)__\@</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<regex>\b(((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(LL|L|l|UL|ul|u|U|F|f)?)\b</regex>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(LL|L|l|UL|ul|u|U|F|f)?\@</regex>
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\b(true|false)\b</regex>
<regex>\@true|false\@</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\b([A-Z_][A-Z_0-9]{3,500})\b</regex>
<regex>\@[A-Z_][A-Z_0-9]{3,500}\@</regex>
</rule>
<rule name="CPP member">
<color>memberClass</color>
<regex>\b((m|s|p|s|g)_|property|signal)\w+\b</regex>
<regex>\@((m|s|p|s|g)_|property|signal)\w+\@</regex>
</rule>
<rule name="function input">
<color>inputFunction</color>
<regex>\b_\w+\b</regex>
<regex>\@_\w+\@</regex>
</rule>
<rule name="Function name">
<color>functionName</color>
<regex>\b((\w|_)+[ \t]*\()</regex>
<regex>\@((\w|_)+[ \t]*\()</regex>
</rule>
<rule name="condition">
<color>boolean</color>
@ -125,11 +125,11 @@
<pass name="doxyparse">
<rule name="knownkey">
<color>doxygen-key-known</color>
<regex>(@|\\)[\t ]*(addindex|addtogroup|anchor|arg|attention|author|authors|a|brief|bug|b|callgraph|category|cite|class|code|cond|copybrief|copydetails|copydoc|copyright|date|def|defgroup|deprecated|details|diafile|dir|docbookonly|dontinclude|dot|dotfile|else|elseif|em|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endif|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|endverbatim|enduml|endxmlonly|enum|example|exception|extends|e|file|fn|headerfile|hidecallergraph|hidecallgraph|hideinitializer|htmlinclude|htmlonly|idlexcept|ifnot|if|image|implements|includelineno|include|ingroup|internal|invariant|interface|latexinclude|latexonly|line|link|license|li|mainpage|manonly|memberof|msc|mscfile|name|namespace|nosubgrouping|note|n|overload|package|page|paragraph|param|parblock|par|post|pre|private|privatesection|property|protected|protectedsection|protocol|public|publicsection|pure|p|refitem|ref|related|relates|relatedalso|relatesalso|remark|remarks|result|return|returns|retval|rtfonly|sa|secreflist|section|see|short|showinitializer|since|skip|skipline|snippet|startuml|struct|subpage|subsection|subsubsection|tableofcontents|test|throw|throws|todo|tparam|typedef|union|until|var|verbatim|verbinclude|version|vhdlflow|warning|weakgroup|xmlonly|xrefitem)</regex>
<regex>(\@|\\)[\t ]*(addindex|addtogroup|anchor|arg|attention|author|authors|a|brief|bug|b|callgraph|category|cite|class|code|cond|copybrief|copydetails|copydoc|copyright|date|def|defgroup|deprecated|details|diafile|dir|docbookonly|dontinclude|dot|dotfile|else|elseif|em|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endif|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|endverbatim|enduml|endxmlonly|enum|example|exception|extends|e|file|fn|headerfile|hidecallergraph|hidecallgraph|hideinitializer|htmlinclude|htmlonly|idlexcept|ifnot|if|image|implements|includelineno|include|ingroup|internal|invariant|interface|latexinclude|latexonly|line|link|license|li|mainpage|manonly|memberof|msc|mscfile|name|namespace|nosubgrouping|note|n|overload|package|page|paragraph|param|parblock|par|post|pre|private|privatesection|property|protected|protectedsection|protocol|public|publicsection|pure|p|refitem|ref|related|relates|relatedalso|relatesalso|remark|remarks|result|return|returns|retval|rtfonly|sa|secreflist|section|see|short|showinitializer|since|skip|skipline|snippet|startuml|struct|subpage|subsection|subsubsection|tableofcontents|test|throw|throws|todo|tparam|typedef|union|until|var|verbatim|verbinclude|version|vhdlflow|warning|weakgroup|xmlonly|xrefitem)</regex>
</rule>
<rule name="key">
<color>doxygen-key</color>
<regex>(@|\\)[\t ]*\w+</regex>
<regex>(\@|\\)[\t ]*\w+</regex>
</rule>
<rule name="in-out">
<color>doxygen-in-out</color>
@ -137,13 +137,13 @@
</rule>
<rule name="function input">
<color>inputFunction</color>
<regex>\b_\w+\b</regex>
<regex>\@_\w+\@</regex>
</rule>
</pass>
<pass name="TODO">
<rule name="function input">
<color>SYNTAX_ERROR</color>
<regex>TODO[ \t]*:.*</regex>
<regex>TODO[ \t]*:.*$</regex>
</rule>
</pass>
</EdnLang>

View File

@ -4,15 +4,15 @@
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
<rule name="Not parsed">
<color>normal</color>
<regex>( )+-\:.*</regex>
<regex>( )+\-:.*</regex>
</rule>
<rule name="Not executed">
<color>SYNTAX_ERROR</color>
<regex>( )+(#)+\:.*</regex>
<regex>( )+(#)+:.*</regex>
</rule>
<rule name="Not parsed">
<color>number</color>
<regex>( )+[0-9]+\:.*</regex>
<regex>( )+[0-9]+:.*</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->

View File

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

View File

@ -4,33 +4,33 @@
<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>&quot;(.|\\[\\&quot;])*?$</regex>
<regex>&quot;(.|\\[\\&quot;])*$</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>&apos;(.|\\[\\&apos;])*?$</regex>
<regex>&apos;(.|\\[\\&apos;])*$</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>\b(menu|endmenu|comment|if|endif|help|default|choice|endchoice|prompt|depends on|config)\b</regex>
<regex>\@menu|endmenu|comment|if|endif|help|default|choice|endchoice|prompt|depends on|config\@</regex>
</rule>
<rule name="my type">
<color>type</color>
<regex>\b(int|hex|bool|string)\b</regex>
<regex>\@int|hex|bool|string\@</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<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>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\b([A-Z_][A-Z_0-9]{3,500})\b</regex>
<regex>\@[A-Z_][A-Z_0-9]{3,500}\@</regex>
</rule>
<rule name="condition">
<color>boolean</color>

View File

@ -36,7 +36,7 @@
</rule>
<rule name="double quote text">
<color>doubleQuoteText</color>
<regex>(U|u|u8)?&quot;(.|\\[\\&quot;])*?&quot;</regex> <!-- " -->
<regex>(U|u|u8)?&quot;(.|\\[\\&quot;])*&quot;</regex> <!-- " -->
</rule>
<rule name="simple quote text">
<color>doubleQuoteText</color>
@ -46,47 +46,47 @@
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="my keyword">
<color>keyword</color>
<regex>\b(return|goto|if|else|case|default|switch|break|continue|while|do|for)\b</regex>
<regex>\@return|goto|if|else|case|default|switch|break|continue|while|do|for\@</regex>
</rule>
<rule name="my function keyword">
<color>systemFunction</color>
<regex>\b(new|try|catch|print)\b</regex>
<regex>\@new|try|catch|print\@</regex>
</rule>
<rule name="my type">
<color>type</color>
<regex>\b(boolean|byte|char|double|float|int|long|short|String|Object|Thread|void|enum)\b</regex>
<regex>\@boolean|byte|char|double|float|int|long|short|String|Object|Thread|void|enum\@</regex>
</rule>
<rule name="my storage keyword">
<color>storageKeyword</color>
<regex>\b(import|package|extends|Override|implements|const|class|abstract|private|public|protected|final|const|static|transiant|volatile|interface)\b</regex>
<regex>\@import|package|extends|Override|implements|const|class|abstract|private|public|protected|final|const|static|transiant|volatile|interface@</regex>
</rule>
<rule name="my common Define">
<color>commonDefine</color>
<regex>\bnull\b</regex>
<regex>\@null\@</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<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>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\b(true|false)\b</regex>
<regex>\@true|false\@</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\b[A-Z_][A-Z_0-9]{3,500}\b</regex>
<regex>\@[A-Z_][A-Z_0-9]{3,500}\@</regex>
</rule>
<rule name="java member">
<color>memberClass</color>
<regex>\bm_\w+\b</regex>
<regex>\@m_\w+\@</regex>
</rule>
<rule name="function input">
<color>inputFunction</color>
<regex>\b_\w+\b</regex>
<regex>\@_\w+\@</regex>
</rule>
<rule name="Function name">
<color>functionName</color>
<regex>\b((\w|_)+[ \t]*\()</regex>
<regex>\@((\w|_)+[ \t]*\()</regex>
</rule>
<rule name="condition">
<color>boolean</color>
@ -96,7 +96,7 @@
<pass name="doxyparse">
<rule name="key">
<color>doxygen-key</color>
<regex>(@|\\)[\t ]*\w+</regex>
<regex>(\@|\\)[\t ]*\w+</regex>
</rule>
<rule name="in-out">
<color>doxygen-in-out</color>
@ -104,7 +104,7 @@
</rule>
<rule name="function input">
<color>inputFunction</color>
<regex>\b_\w+\b</regex>
<regex>\@_\w+\@</regex>
</rule>
</pass>
<pass name="TODO">

View File

@ -22,15 +22,15 @@
</rule>
<rule name="names">
<color>functionName</color>
<regex>([a-zA-Z0-9]|-|_)+</regex>
<regex>[a-zA-Z0-9\-_]+</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<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>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\b(true|false)\b</regex>
<regex>\@true|false\@</regex>
</rule>
</pass2>
</EdnLang>

View File

@ -11,41 +11,41 @@
</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>&quot;(.|\\[\\&quot;])*?&quot;</regex>
<regex>&quot;(.|\\[\\&quot;])*&quot;</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>&apos;(.|\\[\\&apos;])*?&apos;</regex>
<regex>&apos;(.|\\[\\&apos;])*&apos;</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>\b(and|break|do|else|elseif|end|for|function|if|in|local|nil|not|or|repeat|return|then|until|while)\b</regex>
<regex>\@and|break|do|else|elseif|end|for|function|if|in|local|nil|not|or|repeat|return|then|until|while\@</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<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>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\b(true|false)\b</regex>
<regex>\@true|false\@</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\b([A-Z_][A-Z_0-9]{3,500})\b</regex>
<regex>\@[A-Z_][A-Z_0-9]{3,500}\@</regex>
</rule>
<rule name="Function name">
<color>functionName</color>
<regex>\b(\w|_)+[ \t]*\(</regex>
<regex>\@(\w|_)+[ \t]*\(</regex>
</rule>
<rule name="condition">
<color>boolean</color>

View File

@ -5,25 +5,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>&quot;(.|\\[\\&quot;])*?&quot;</regex>
<regex>&quot;(.|\\[\\&quot;])*&quot;</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>&apos;(.|\\[\\&apos;])*?&apos;</regex>
<regex>&apos;(.|\\[\\&apos;])*&apos;</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="confition">
<color>type</color>
<regex>\b(if|ifeq|ifneq|else|endif|define|endef)\b</regex>
<regex>\@if|ifeq|ifneq|else|endif|define|endef\@</regex>
</rule>
<rule name="my keyword">
<color>keyword</color>
<regex>\b\([a-zA-Z_][a-zA-Z0-9_]*\)</regex>
<regex>\$\([a-zA-Z_][a-zA-Z0-9_]*\)</regex>
</rule>
<rule name="function call">
<color>functionName</color>

View File

@ -4,37 +4,37 @@
<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> &quot;.*?($|&quot;)</regex>
<regex> &quot;.*($|&quot;)</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex> &apos;.*?($|&apos;)</regex>
<regex> &apos;.*($|&apos;)</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>\b(return|goto|if|else|case|default|switch|break|continue|while|do|for|otherwise|end)\b</regex>
<regex>\@return|goto|if|else|case|default|switch|break|continue|while|do|for|otherwise|end\@</regex>
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\b(true|false)\b</regex>
<regex>\@true|false\@</regex>
</rule>
<rule name="Function name">
<color>functionName</color>
<regex>\b(\w|_)+[ \t]*\(</regex>
<regex>\@(\w|_)+[ \t]*\(</regex>
</rule>
<rule name="condition">
<color>boolean</color>
@ -42,11 +42,11 @@
</rule>
<rule name="numeric constant">
<color>number</color>
<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>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\b([A-Z_][A-Z_0-9]{3,500})\b</regex>
<regex>\@[A-Z_][A-Z_0-9]{3,500}\@</regex>
</rule>
</pass2>
</EdnLang>

View File

@ -36,11 +36,11 @@
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>&quot;(.|\\[\\&quot;])*?&quot;</regex>
<regex>&quot;(.|\\[\\&quot;])*&quot;</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>&apos;(.|\\[\\&apos;])*?&apos;</regex>
<regex>&apos;(.|\\[\\&apos;])*&apos;</regex>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
@ -54,27 +54,27 @@
</rule>
<rule name="my keyword">
<color>keyword</color>
<regex>\$[a-zA-Z_][a-zA-Z0-9_]*\b</regex>
<regex>\$[a-zA-Z_][a-zA-Z0-9_]*\@</regex>
</rule>
<rule name="my type">
<color>type</color>
<regex>\b(array|bool|boolean|double|float|int|integer|numeric|object|resource|string|unset)\b</regex>
<regex>\@array|bool|boolean|double|float|int|integer|numeric|object|resource|string|unset\@</regex>
</rule>
<rule name="my storage keyword">
<color>storageKeyword</color>
<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>
<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>
</rule>
<rule name="my common Define">
<color>commonDefine</color>
<regex>\b(doubleval|floatval|gettype|intval|print_r|serialize|settype|strval|unserialize|var_dump|var_export)\b</regex>
<regex>\@doubleval|floatval|gettype|intval|print_r|serialize|settype|strval|unserialize|var_dump|var_export\@</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<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>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\b(TRUE|FALSE)\b</regex>
<regex>\@TRUE|FALSE\@</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
@ -82,7 +82,7 @@
</rule>
<rule name="Function name">
<color>functionName</color>
<regex>\b\w+[ \t]*\(</regex>
<regex>\@(\w|_)+[ \t]*\(</regex>
</rule>
<rule name="condition">
<color>boolean</color>
@ -108,7 +108,7 @@
</rule>
<rule name="function input">
<color>inputFunction</color>
<regex>\b_\w+\b</regex>
<regex>\@_\w+\@</regex>
</rule>
</pass>
<pass name="TODO">

View File

@ -34,11 +34,11 @@
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>&quot;(.|\\[\\&quot;])*?&quot;</regex>
<regex>&quot;(.|\\[\\&quot;])*&quot;</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>&apos;((\\[\\&apos;])|.)*?&apos;</regex>
<regex>&apos;((\\[\\&apos;])|.)*&apos;</regex>
</rule>
<rule name="internalParameter">
<color>normal</color>
@ -47,48 +47,48 @@
</rule>
<rule name="Function name private">
<color>functionNamePrivate</color>
<regex>\b_(\w|_)+[ \t]*\(</regex>
<regex>\@_(\w|_)+[ \t]*\(</regex>
<sub>checkCamelCaseError</sub>
</rule>
<rule name="Function name">
<color>functionName</color>
<regex>\b(\w|_)+[ \t]*\(</regex>
<regex>\@(\w|_)+[ \t]*\(</regex>
<sub>checkCamelCaseError</sub>
</rule>
<rule name="function input">
<color>inputFunction</color>
<regex>\b_(\w|_)+\b</regex>
<regex>\@_(\w|_)+\@</regex>
<sub>checkCamelCaseError</sub>
</rule>
</pass1>
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="my keyword">
<color>keyword</color>
<regex>\b(if|else|elif|break|pass|continue|while|do|for|in|return)\b</regex>
<regex>\@if|else|elif|break|pass|continue|while|do|for|in|return\@</regex>
</rule>
<rule name="my function keyword">
<color>systemFunction</color>
<regex>\b(print|len|range|del|__init__|self|os\.|sys\.|path\.)\b</regex>
<regex>\@print|len|range|del|__init__|self|os\.|sys\.|path\.\@</regex>
</rule>
<rule name="my type">
<color>type</color>
<regex>\b(bool|BOOL|char|double|float)\b</regex>
<regex>\@bool|BOOL|char|double|float\@</regex>
</rule>
<rule name="my storage keyword">
<color>storageKeyword</color>
<regex>\b(def|class|import|from|as|try|except)\b</regex>
<regex>\@def|class|import|from|as|try|except\@</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<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>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
</rule>
<rule name="my boolean">
<color>boolean</color>
<regex>\b(True|False)\b</regex>
<regex>\@True|False\@</regex>
</rule>
<rule name="BIG LETTER">
<color>macro</color>
<regex>\b([A-Z_][A-Z_0-9]{3,500})\b</regex>
<regex>\@[A-Z_][A-Z_0-9]{3,500}\@</regex>
</rule>
<rule name="condition">
<color>boolean</color>
@ -102,11 +102,11 @@
<pass name="doxyparse">
<rule name="knownkey">
<color>doxygen-key-known</color>
<regex>(@|\\)[\t ]*(addindex|addtogroup|anchor|arg|attention|author|authors|a|brief|bug|b|callgraph|category|cite|class|code|cond|copybrief|copydetails|copydoc|copyright|date|def|defgroup|deprecated|details|diafile|dir|docbookonly|dontinclude|dot|dotfile|else|elseif|em|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endif|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|endverbatim|enduml|endxmlonly|enum|example|exception|extends|e|file|fn|headerfile|hidecallergraph|hidecallgraph|hideinitializer|htmlinclude|htmlonly|idlexcept|ifnot|if|image|implements|includelineno|include|ingroup|internal|invariant|interface|latexinclude|latexonly|line|link|license|li|mainpage|manonly|memberof|msc|mscfile|name|namespace|nosubgrouping|note|n|overload|package|page|paragraph|param|parblock|par|post|pre|private|privatesection|property|protected|protectedsection|protocol|public|publicsection|pure|p|refitem|ref|related|relates|relatedalso|relatesalso|remark|remarks|result|return|returns|retval|rtfonly|sa|secreflist|section|see|short|showinitializer|since|skip|skipline|snippet|startuml|struct|subpage|subsection|subsubsection|tableofcontents|test|throw|throws|todo|tparam|typedef|union|until|var|verbatim|verbinclude|version|vhdlflow|warning|weakgroup|xmlonly|xrefitem)</regex>
<regex>(\@|\\)[\t ]*(addindex|addtogroup|anchor|arg|attention|author|authors|a|brief|bug|b|callgraph|category|cite|class|code|cond|copybrief|copydetails|copydoc|copyright|date|def|defgroup|deprecated|details|diafile|dir|docbookonly|dontinclude|dot|dotfile|else|elseif|em|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endif|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|endverbatim|enduml|endxmlonly|enum|example|exception|extends|e|file|fn|headerfile|hidecallergraph|hidecallgraph|hideinitializer|htmlinclude|htmlonly|idlexcept|ifnot|if|image|implements|includelineno|include|ingroup|internal|invariant|interface|latexinclude|latexonly|line|link|license|li|mainpage|manonly|memberof|msc|mscfile|name|namespace|nosubgrouping|note|n|overload|package|page|paragraph|param|parblock|par|post|pre|private|privatesection|property|protected|protectedsection|protocol|public|publicsection|pure|p|refitem|ref|related|relates|relatedalso|relatesalso|remark|remarks|result|return|returns|retval|rtfonly|sa|secreflist|section|see|short|showinitializer|since|skip|skipline|snippet|startuml|struct|subpage|subsection|subsubsection|tableofcontents|test|throw|throws|todo|tparam|typedef|union|until|var|verbatim|verbinclude|version|vhdlflow|warning|weakgroup|xmlonly|xrefitem)</regex>
</rule>
<rule name="key">
<color>doxygen-key</color>
<regex>(@|\\)[\t ]*\w+</regex>
<regex>(\@|\\)[\t ]*\w+</regex>
</rule>
<rule name="in-out">
<color>doxygen-in-out</color>
@ -114,7 +114,7 @@
</rule>
<rule name="function input">
<color>inputFunction</color>
<regex>\b_\w+\b</regex>
<regex>\@_\w+\@</regex>
</rule>
</pass>
<pass name="TODO">

View File

@ -18,7 +18,7 @@
</rule>
<rule name="stop balise">
<color>functionName</color>
<regex>&lt;/[ \t]*\w+?[ \t]*&gt;</regex>
<regex>&lt;/[ \t]*\w+[ \t]*&gt;</regex>
</rule>
<rule name="stop balise">
<color>SYNTAX_ERROR</color>
@ -53,7 +53,7 @@
</rule>
<rule name="open balise">
<color>functionName</color>
<regex>&lt;[ \t]*[0-9a-zA-Z_]+</regex>
<regex>&lt;[ \t]*[0-9a-zA-Z_]+\@</regex>
</rule>
<rule name="close balise">
<color>functionName</color>
@ -61,11 +61,11 @@
</rule>
<rule name="doubleQuteText">
<color>doubleQuoteText</color>
<regex>&quot;(.|\r|\n|\\\\|\\&quot;)*?&quot;</regex>
<regex>&quot;(\r|\n|\\\\|\\&quot;|.)*&quot;</regex>
</rule>
<rule name="simpleQuteText">
<color>doubleQuoteText</color>
<regex>\b&apos;(.|\r|\n)*?(&apos;|\n)</regex>
<regex>\@&apos;(\r|\n)*?(&apos;|\n|.)</regex>
</rule>
<rule name="condition">
<color>boolean</color>

View File

@ -30,25 +30,25 @@
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
<rule name="my type">
<color>type</color>
<regex>\b(import|void|bool|string|int(8|16|32|64)|uint(8|16|32|64)|float(32|64)|vector\:(bool|string|int(8|16|32|64)|uint(8|16|32|64)|float(32|64))|time|duration|file|stream)\b</regex>
<regex>\@import|void|bool|string|int(8|16|32|64)|uint(8|16|32|64)|float(32|64)|vector:(bool|string|int(8|16|32|64)|uint(8|16|32|64)|float(32|64))|time|duration|file|stream\@</regex>
</rule>
<rule name="numeric constant">
<color>number</color>
<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>
<regex>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</regex>
</rule>
<rule name="Function name">
<color>functionName</color>
<regex>\b((\w|_)+[ \t]*\()</regex>
<regex>\@((\w|_)+[ \t]*\()</regex>
</rule>
</pass2>
<pass name="docparse">
<rule name="knownkey">
<color>doxygen-key-known</color>
<regex>(srv-brief|srv-version|srv-type|srv-author|brief|param|return|note):</regex>
<regex>(srv\-brief|srv\-version|srv\-type|srv\-author|brief|param|return|note):</regex>
</rule>
<rule name="function input">
<color>inputFunction</color>
<regex>\b\w+\:\b</regex>
<regex>\@\w+:\@</regex>
</rule>
</pass>
<pass name="TODO">

View File

@ -145,20 +145,13 @@ bool appl::Buffer::loadFile(const std::string& _name) {
m_cursorPos = 0;
setHighlightType("");
m_nbLines = 0;
if (file.exist() == false) {
APPL_ERROR("File : '" << m_fileName << "' does not exist...");
return false;
if (m_data.dumpFrom(m_fileName) == true ) {
countNumberofLine();
tryFindHighlightType();
m_isModify = false;
return true;
}
if (file.fileOpenRead() == false) {
APPL_ERROR("File : '" << m_fileName << "' Fail to open in read mode");
return false;
}
m_data = file.fileReadAllString();
file.fileClose();
countNumberofLine();
tryFindHighlightType();
m_isModify = false;
return true;
return false;
}
void appl::Buffer::setFileName(const std::string& _name) {
@ -175,16 +168,12 @@ void appl::Buffer::setFileName(const std::string& _name) {
}
bool appl::Buffer::storeFile() {
etk::FSNode file(m_fileName);
if (file.fileOpenWrite() == false) {
APPL_ERROR("File : '" << m_fileName << "' Fail to open in write mode");
return false;
if (m_data.dumpIn(m_fileName) == true) {
APPL_INFO("saving file : " << m_fileName);
setModification(false);
return true;
}
file.fileWriteAll(m_data);
file.fileClose();
APPL_INFO("saving file : " << m_fileName);
setModification(false);
return true;
return false;
}
void appl::Buffer::setModification(bool _status) {
@ -642,7 +631,7 @@ bool appl::Buffer::write(const std::string& _data, const appl::Buffer::Iterator&
position = 0;
}
APPL_VERBOSE("write at pos: " << (int64_t)_pos << " ==> " << position << " data : " << _data);
m_data.insert((size_t)position, _data);
m_data.insert(position, (int8_t*)(_data.c_str()), _data.size());
if (m_cursorPos < 0) {
m_cursorPos = 0;
}
@ -659,7 +648,7 @@ bool appl::Buffer::replace(const std::string& _data, const appl::Buffer::Iterato
if (position < 0){
position = 0;
}
m_data.replace(m_data.begin() + position, m_data.begin() + (int64_t)_posEnd, _data.begin(), _data.end());
m_data.replace(position, (int64_t)_posEnd-(int64_t)_pos, (int8_t*)(_data.c_str()), _data.size());
regenerateHighLightAt(position, (int64_t)_posEnd-(int64_t)_pos, _data.size());
m_selectMode = false;
moveCursor(position+_data.size());
@ -674,7 +663,7 @@ void appl::Buffer::removeSelection() {
}
int64_t startPos = getStartSelectionPos();
int64_t endPos = getStopSelectionPos();
m_data.erase(startPos, endPos-startPos);
m_data.remove(startPos, endPos-startPos);
regenerateHighLightAt(startPos, endPos-startPos, 0);
m_selectMode = false;
moveCursor(startPos);

View File

@ -8,6 +8,7 @@
#include <etk/types.hpp>
#include <etk/os/FSNode.hpp>
#include <ewol/ewol.hpp>
#include <etk/Buffer.hpp>
#include <ewol/object/Object.hpp>
#include <ewol/widget/Widget.hpp>
#include <ewol/compositing/Text.hpp>
@ -346,9 +347,9 @@ namespace appl {
*/
void setModification(bool _status);
protected:
std::string m_data; //!< copy of the file buffer
etk::Buffer m_data; //!< copy of the file buffer
public:
std::string& getData() {
etk::Buffer& getData() {
return m_data;
};
protected:

View File

@ -123,6 +123,7 @@ appl::Highlight::~Highlight() {
bool appl::Highlight::isCompatible(const std::string& _name) {
for (auto &it : m_listExtentions) {
APPL_DEBUG(" check : " << it << "=?=" << _name);
// TODO: Remove dependency with the std::regex ...
std::regex expression;
try {
expression.assign(it, std::regex_constants::optimize | std::regex_constants::ECMAScript);
@ -135,7 +136,7 @@ bool appl::Highlight::isCompatible(const std::string& _name) {
if (resultMatch.size() <= 0) {
continue;
}
APPL_VERBOSE(" - begin=" << std::distance(_name.begin(), resultMatch[0].first) << " end=" << std::distance(_name.begin(), resultMatch[0].second));
APPL_DEBUG(" - begin=" << std::distance(_name.begin(), resultMatch[0].first) << " end=" << std::distance(_name.begin(), resultMatch[0].second));
if (resultMatch[0].first != _name.begin()) {
continue;
}
@ -198,7 +199,7 @@ void appl::Highlight::parse(int64_t _start,
int64_t _stop,
std::vector<appl::HighlightInfo> & _metaData,
int64_t _addingPos,
std::string& _buffer) {
etk::Buffer& _buffer) {
if (0 > _addingPos) {
_addingPos = 0;
}
@ -278,7 +279,7 @@ void appl::Highlight::parse(int64_t _start,
void appl::Highlight::parse2(int64_t _start,
int64_t _stop,
std::vector<appl::HighlightInfo>& _metaData,
std::string& _buffer) {
etk::Buffer& _buffer) {
HL2_DEBUG("Parse element 0 => " << m_listHighlightPass2.size() <<
" == > position search: (" << _start << "," << _stop << ")" );
int64_t elementStart = _start;
@ -286,21 +287,20 @@ void appl::Highlight::parse2(int64_t _start,
appl::HighlightInfo resultat;
while (elementStart < elementStop) {
if (elementStart == 306) {
//elog::setLevel(elog::logLevelVerbose);
}
//HL2_DEBUG("Parse element in the buffer pos=" << elementStart << "," << _buffer.size() << ")" );
HL2_DEBUG("Parse element in the buffer pos=" << elementStart << "," << _buffer.size() << ")" );
//try to fond the HL in ALL of we have
for (int64_t jjj=0; jjj<int64_t(m_listHighlightPass2.size()); jjj++){
/*
HL2_DEBUG("Parse HL id=" << jjj << " position search: (" <<
elementStart << "," << elementStop << ") in='"
<< /*_buffer[elementStart]*/ std::string(_buffer.begin()+elementStart,_buffer.begin()+elementStop) << "' " << m_listHighlightPass2[jjj].getPaternString().first << " " << m_listHighlightPass1[jjj].getPaternString().second);
<< std::string(_buffer.begin()+elementStart,_buffer.begin()+elementStop) << "' " << m_listHighlightPass2[jjj].getPaternString().first << " " << m_listHighlightPass1[jjj].getPaternString().second);
*/
// Stop the search to the end (to get the end of the pattern)
bool ret = m_listHighlightPass2[jjj].find(elementStart, elementStop, resultat, _buffer);
if (ret == true) {
// find an element:
_metaData.push_back(resultat);
HL2_DEBUG("data='" << std::string(_buffer.begin()+elementStart,_buffer.begin()+resultat.stop) << "'");
//HL2_DEBUG("data='" << std::string(_buffer.begin()+elementStart,_buffer.begin()+resultat.stop) << "'");
elementStart = resultat.stop-1;
break;
}
@ -317,8 +317,8 @@ void appl::Highlight::parse2(int64_t _start,
* @param[in] _buffer buffer where we need to search data
*/
void appl::Highlight::parseSubElement(const appl::HighlightInfo& _upper,
std::vector<appl::HighlightInfo> &_metaData,
std::string &_buffer) {
std::vector<appl::HighlightInfo>& _metaData,
etk::Buffer& _buffer) {
if (_upper.patern->getSubPatternName().size() == 0) {
return;
}

View File

@ -22,6 +22,7 @@ namespace appl {
#include <etk/os/FSNode.hpp>
#include <appl/HighlightPattern.hpp>
#include <appl/GlyphPainting.hpp>
#include <etk/Buffer.hpp>
#include <exml/exml.hpp>
namespace appl {
@ -53,19 +54,20 @@ namespace appl {
int64_t _stop,
std::vector<appl::HighlightInfo>& _metaData,
int64_t _addingPos,
std::string& _buffer);
etk::Buffer& _buffer);
void parse2(int64_t _start,
int64_t _stop,
std::vector<appl::HighlightInfo>& _metaData,
std::string& _buffer);
etk::Buffer& _buffer);
void parseSubElement(const appl::HighlightInfo& _upper,
std::vector<appl::HighlightInfo>& _metaData,
std::string &_buffer);
etk::Buffer& _buffer);
private:
std::string m_styleName; //!< curent style name (like "c++" or "c" or "script Bash")
std::vector<std::string> m_listExtentions; //!< List of possible extention for this high-light, like : ".c", ".cpp", ".h"
std::vector<HighlightPattern> m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 == > when we load and wride data on the buffer)
std::vector<HighlightPattern> m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 == > When we display the buffer( only the display area (100 lines)) )
// TODO : This is bad ==> the patern ar unordered ...
std::map<std::string, std::vector<HighlightPattern>> m_listHighlightNamed; //!< list of all sub partern to parse...
public: // herited function :
virtual bool updateContext() {

View File

@ -84,8 +84,7 @@ std::string appl::highlightManager::getTypeFile(const std::string& _fileName) {
}
APPL_DEBUG(" check : " << it->getTypeName());
if (it->isCompatible(_fileName) == true) {
APPL_DEBUG("Find type for extention : " << _fileName
<< " type : " << it->getTypeName());
APPL_DEBUG("Find type for extention : " << _fileName << " type : " << it->getTypeName());
return it->getTypeName();
}
}

View File

@ -43,16 +43,16 @@ void appl::HighlightPattern::setPatern(const std::string& _regExp, const std::st
m_hasParsingError = false;
if (_regExp != "") {
try {
m_regExp[0].assign(_regExp, std::regex_constants::optimize | std::regex_constants::ECMAScript);
} catch (std::regex_error e) {
m_regExp[0].compile(_regExp);
} catch (std::runtime_error e) {
m_hasParsingError = true;
APPL_ERROR("can not parse regex : '" << e.what() << "' for : " << _regExp);
}
}
if (_regExpStop != "") {
try {
m_regExp[1].assign(_regExpStop, std::regex_constants::optimize | std::regex_constants::ECMAScript);
} catch (std::regex_error e) {
m_regExp[1].compile(_regExpStop);
} catch (std::runtime_error e) {
m_hasParsingError = true;
APPL_ERROR("can not parse regex : '" << e.what() << "' for : " << _regExpStop);
}
@ -138,72 +138,10 @@ void appl::HighlightPattern::parseRules(const exml::Element& _child, int32_t _le
}
}
static std::pair<int64_t,int64_t> findRegex(int32_t _start,
int32_t _stop,
std::regex& _regex,
const std::string& _buffer) {
std::smatch resultMatch;
std::regex_constants::match_flag_type flags = std::regex_constants::match_continuous; // check only the match at the first character.
//APPL_DEBUG("find data at : start=" << _start << " stop=" << _stop << " regex='" << m_regexValue << "'");
if ((int64_t)_stop <= (int64_t)_buffer.size()) {
char val = _buffer[_stop];
if ( val != '\n'
&& val != '\r') {
//after last char ==> not end of line ($ would not work))
flags |= std::regex_constants::match_not_eol;
}
/*
if (!( ('a' <= val && val <= 'z')
|| ('A' <= val && val <= 'Z')
|| ('0' <= val && val <= '9')
|| val == '_')) {
flags |= std::regex_constants::match_not_eow;
}
*/
}
if (_start>0) {
flags |= std::regex_constants::match_prev_avail;
}
if ( _stop < 0
|| size_t(_stop) > _buffer.size()) {
APPL_ERROR(" error in indexing for regex ... _stop=" << _stop << " >= _buffer.size()=" << _buffer.size());
return std::pair<int64_t,int64_t>(-1,0);
}
if ( _start < 0
|| size_t(_start) > _buffer.size()) {
APPL_ERROR(" error in indexing for regex ... _start=" << _start << " >= _buffer.size()=" << _buffer.size());
return std::pair<int64_t,int64_t>(-1,0);
}
if (_start > _stop) {
APPL_ERROR(" error in indexing for regex ... _start=" << _start << " > _stop=" << _stop);
return std::pair<int64_t,int64_t>(-1,0);
}
std::regex_search(_buffer.begin() + _start, _buffer.begin() + _stop, resultMatch, _regex, flags);
if (resultMatch.size() > 0) {
int64_t start = std::distance(_buffer.begin(), resultMatch[0].first);
int64_t stop = std::distance(_buffer.begin(), resultMatch[0].second);
//APPL_DEBUG("find data at : start=" << _resultat.start << " stop=" << _resultat.stop << " data='" <<std::string(_buffer, _resultat.start, _resultat.stop-_resultat.start) << "'" );
/*
if (true){
//TK_DEBUG("in line : '" << etk::to_string(_buffer) << "'");
APPL_DEBUG(" Find " << resultMatch.size() << " elements");
for (size_t iii=0; iii<resultMatch.size(); ++iii) {
int32_t posStart = std::distance(_buffer.begin(), resultMatch[iii].first);
int32_t posStop = std::distance(_buffer.begin(), resultMatch[iii].second);
APPL_DEBUG(" [" << iii << "] " << posStart << " to " << posStop);
}
}
*/
return std::pair<int64_t,int64_t>(start,stop);
}
return std::pair<int64_t,int64_t>(-1,0);
}
bool appl::HighlightPattern::find(int32_t _start,
int32_t _stop,
appl::HighlightInfo& _resultat,
const std::string& _buffer) {
const etk::Buffer& _buffer) {
//APPL_DEBUG(" try to find the element");
_resultat.start = -1;
_resultat.stop = -1;
@ -216,12 +154,12 @@ bool appl::HighlightPattern::find(int32_t _start,
if (m_regexValue[0].size() == 0) {
return false;
}
std::pair<int64_t,int64_t> ret0 = findRegex(_start, _stop, m_regExp[0], _buffer);
if (ret0.first >= 0) {
_resultat.start = ret0.first;
_resultat.stop = ret0.second;
// when we have only one element:
if (m_regExp[0].processOneElement(_buffer, _start, _stop) == true) {
_resultat.start = m_regExp[0].start();
_resultat.stop = m_regExp[0].stop();
//APPL_DEBUG("find data at : start=" << _resultat.start << " stop=" << _resultat.stop << " data='" <<std::string(_buffer, _resultat.start, _resultat.stop-_resultat.start) << "'" );
// second step : Complex searching ...
//APPL_DEBUG("find data at : start=" << _resultat.start << " stop=" << _resultat.stop );
if (m_hasEndRegEx == true) {
// when no regex specify ==> get all the buffer ...
if (m_regexValue[1].size() == 0) {
@ -230,9 +168,8 @@ bool appl::HighlightPattern::find(int32_t _start,
}
_start = _resultat.stop;
while (_start < _stop) {
std::pair<int64_t,int64_t> ret1 = findRegex(_start, _stop, m_regExp[1], _buffer);
if (ret1.first >= 0) {
_resultat.stop = ret1.second;
if (m_regExp[1].processOneElement(_buffer, _start, _stop) == true) {
_resultat.stop = m_regExp[1].stop();
return true;
}
_start++;

View File

@ -11,6 +11,8 @@ class HighlightPattern;
#include <appl/GlyphPainting.hpp>
#include <vector>
#include <regex>
#include <etk/RegExp.hpp>
#include <etk/Buffer.hpp>
#include <exml/exml.hpp>
namespace appl {
@ -44,7 +46,7 @@ namespace appl {
bool m_hasParsingError;
std::string m_regexValue[2];
bool m_hasEndRegEx;
std::regex m_regExp[2]; //!< Start of Regular expression
etk::RegExp<etk::Buffer> m_regExp[2]; //!< Start of Regular expression
public:
void setPatern(const std::string& _regExp, const std::string& _regExpStop="", bool _hasEndRegEx=false);
std::pair<std::string,std::string> getPaternString();
@ -81,7 +83,7 @@ namespace appl {
bool find(int32_t _start,
int32_t _stop,
appl::HighlightInfo& _resultat,
const std::string& _buffer);
const etk::Buffer& _buffer);
void parseRules(const exml::Element& _child, int32_t _level);
};

View File

@ -102,7 +102,7 @@ class MainApplication : public ewol::context::Application {
std::string tmpppp = _context.getCmd().get(iii);
if (tmpppp == "-t") {
ctagDetected = true;
} else if (true == ctagDetected) {
} else if (ctagDetected == true) {
etk::FSNode file(tmpppp);
std::string name = file.getName();
APPL_INFO("Load ctag file : \"" << name << "\"" );
@ -117,8 +117,18 @@ class MainApplication : public ewol::context::Application {
std::string name = file.getName();
APPL_INFO("need load file : \"" << name << "\"" );
m_bufferManager->open(name);
} else if (file.getNodeType() == etk::typeNode_folder) {
std::vector<std::string> listOfFiles = file.folderGetSub(false, true, ".*");
for (auto &it: listOfFiles) {
etk::FSNode file2(it);
if (file2.getNodeType() == etk::typeNode_file) {
std::string name = file2.getName();
APPL_INFO("need load file : \"" << name << "\"" );
m_bufferManager->open(name);
}
}
}
}
}
}
APPL_INFO("==> START ... " PROJECT_NAME " (END)");

View File

@ -8,17 +8,35 @@
#include <ewol/object/Object.hpp>
#include <ewol/Dimension.hpp>
// some are wrong :
'dfgd\'fg'
'e' sdfsdf '\e'
// default value that work:
aa 'z' aa '\n' aa '\t' aa '\v' aa '\b' aa '\r' aa '\f' aa '\a' aa '\\' aa '\?' aa '\'' aa '\0'
// conplex numbers:
aa '\u4855' aa '\U78965412' aa '\x0F' aa '\o45'
aa "z" aa "\n" aa "\t" aa "\v" aa "\b" aa "\r" aa "\f" aa "\a" aa "\\" aa "\?" aa "\"" aa "\0"
// conplex numbers:
aa "\u4855" aa "\U78965412" aa "\x0F" aa "\o45"
"dqf\"gsdfg" // \\ \n "
// TODO : sqdkfjsdldkqfj
std::string
std::thread::sleep
/*
* TODO: Todo in a multipleLine interface
*
*/
example_param
=_param
// simple oneLine comment
_
_s
_3RTDRsdfqsd

View File

@ -19,12 +19,12 @@ mediump vec4
mediump mat2
mediump mat3
mediump mat4
mediump ivect2
mediump ivect3
mediump ivect4
mediump bvect2
mediump bvect3
mediump bvect4
mediump ivec2
mediump ivec3
mediump ivec4
mediump bvec2
mediump bvec3
mediump bvec4
//! inline doxygen comment
void emptyFunction() {