Update version tag: 1.2.3
This commit is contained in:
commit
6e3df7ef74
@ -26,12 +26,14 @@ install:
|
||||
- if [ "$CXX" == "g++" ]; then sudo rm /usr/bin/gcc /usr/bin/g++; fi
|
||||
- if [ "$CXX" == "g++" ]; then sudo ln -s /usr/bin/gcc-4.8 /usr/bin/gcc; fi
|
||||
- if [ "$CXX" == "g++" ]; then sudo ln -s /usr/bin/g++-4.8 /usr/bin/g++; fi
|
||||
|
||||
- if [ "$CXX" == "clang++" ]; then wget http://llvm.org/releases/3.4.1/clang+llvm-3.4.1-x86_64-unknown-ubuntu12.04.tar.xz; fi
|
||||
- if [ "$CXX" == "clang++" ]; then tar xJf clang+llvm-3.4.1-x86_64-unknown-ubuntu12.04.tar.xz; fi
|
||||
- if [ "$CXX" == "clang++" ]; then export PATH=$PWD/clang+llvm-3.4.1-x86_64-unknown-ubuntu12.04/bin:$PATH; fi
|
||||
|
||||
# build sequence with Lutin :
|
||||
script:
|
||||
- if [ "$CXX" == "clang++" ]; then ./ewol/build/lutin.py -cclang -mdebug -p edn; fi
|
||||
- if [ "$CXX" == "g++" ]; then ./ewol/build/lutin.py -cgcc -mdebug -p edn; fi
|
||||
- if [ "$CXX" == "clang++" ]; then ./ewol/build/lutin.py -C -cclang -mdebug -p edn; fi
|
||||
- if [ "$CXX" == "g++" ]; then ./ewol/build/lutin.py -C -cgcc -mdebug -p edn; fi
|
||||
|
||||
#send e-mail on compilation result:
|
||||
notifications:
|
||||
|
@ -1,46 +1,44 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="Assembleur">
|
||||
<ext>*.s</ext>
|
||||
<ext>*.S</ext>
|
||||
<ext>*.asm</ext>
|
||||
<ext>.*\.(s|S|asm)</ext>
|
||||
<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>
|
||||
|
@ -1,42 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="Bash script">
|
||||
<ext>*.sh</ext>
|
||||
<ext>.*\.sh</ext>
|
||||
<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>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}|</regex>
|
||||
<regex>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}</regex>
|
||||
</rule>
|
||||
</pass2>
|
||||
</EdnLang>
|
||||
|
@ -1,30 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="Boulou log">
|
||||
<ext>*.boo</ext>
|
||||
<ext>.*\.boo</ext>
|
||||
<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 -->
|
||||
|
||||
<rule name="pourcentage OK">
|
||||
<color>TestResultOK</color>
|
||||
<regex>100%</regex>
|
||||
@ -33,7 +32,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>
|
||||
|
@ -1,122 +1,132 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="C/C++">
|
||||
<ext>*.c</ext>
|
||||
<ext>*.cpp</ext>
|
||||
<ext>*.cxx</ext>
|
||||
<ext>*.cc</ext>
|
||||
<ext>*.h</ext>
|
||||
<ext>*.hpp</ext>
|
||||
<ext>*.hxx</ext>
|
||||
<ext>*.m</ext>
|
||||
<ext>*.mm</ext>
|
||||
<ext>.*\.(c|cpp|cxx|cc|h|hpp|hxx|m|mm)</ext>
|
||||
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
|
||||
<rule name="my comment multiline doxygen">
|
||||
<rule name="doxygen multiline">
|
||||
<color>commentDoxygen</color>
|
||||
<regex>/\*\*.*(\*/|\e)</regex>
|
||||
<regex>/\*(\*|!)(.|\r|\n)*?\*/</regex>
|
||||
<sub>doxyparse</sub>
|
||||
</rule>
|
||||
<rule name="code Review">
|
||||
<color>SYNTAX_ERROR</color>
|
||||
<regex>/\*[ \t]*TODO :.*(\*/|\e)</regex>
|
||||
</rule>
|
||||
<rule name="my comment multiline">
|
||||
<rule name="comment multiline">
|
||||
<color>comment</color>
|
||||
<regex>/\*.*(\*/|\e)</regex>
|
||||
<regex>/\*(.|\r|\n)*?(\*/|\0)</regex>
|
||||
<sub>TODO</sub>
|
||||
</rule>
|
||||
<rule name="my if 0">
|
||||
<rule name="comment miltiline ERROR">
|
||||
<color>SYNTAX_ERROR</color>
|
||||
<regex>/\*(.|\r|\n)*</regex>
|
||||
</rule>
|
||||
<rule name="#if 0">
|
||||
<color>preprocesseur</color>
|
||||
<regex>#[ \t]*if 0.*#(endif|else)</regex>
|
||||
<regex>#[ \t]*if 0(.|\r|\n)*?#(endif|else)</regex>
|
||||
</rule>
|
||||
<rule name="my preprocesseur">
|
||||
<rule name="#if 0 ERROR">
|
||||
<color>SYNTAX_ERROR</color>
|
||||
<regex>#[ \t]*if 0(.|\r|\n)*</regex>
|
||||
</rule>
|
||||
<rule name="#preproc">
|
||||
<color>preprocesseur</color>
|
||||
<regex>#(\\[\\\n]|.)*$</regex>
|
||||
<regex>#(.|\\[\\\n])*</regex>
|
||||
</rule>
|
||||
<rule name="my comment doxygen">
|
||||
<rule name="inline doxygen">
|
||||
<color>commentDoxygen</color>
|
||||
<regex>//!.*$</regex>
|
||||
<regex>//!.*</regex>
|
||||
<sub>doxyparse</sub>
|
||||
</rule>
|
||||
<rule name="my todo comment">
|
||||
<color>SYNTAX_ERROR</color>
|
||||
<regex>//[ \t]*TODO[ \t]*:.*$</regex>
|
||||
</rule>
|
||||
<rule name="my comment">
|
||||
<rule name="inline comment">
|
||||
<color>comment</color>
|
||||
<regex>//.*$</regex>
|
||||
<regex>//.*</regex>
|
||||
<sub>TODO</sub>
|
||||
</rule>
|
||||
<rule name="doubleQuteText">
|
||||
<rule name="double quote text">
|
||||
<color>doubleQuoteText</color>
|
||||
<regex>"(\\[\\"]|.)*"</regex><!-- " -->
|
||||
<regex>"(.|\\[\\"])*?"</regex> <!-- " -->
|
||||
</rule>
|
||||
<rule name="simpleQuteText">
|
||||
<rule name="simple quote text">
|
||||
<color>doubleQuoteText</color>
|
||||
<regex>'((\\[\\'])|.){1,2}'</regex>
|
||||
</rule>
|
||||
<rule name="simpleQuteTextError">
|
||||
<color>SYNTAX_ERROR</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|sizeof\@</regex>
|
||||
<regex>\b(return|goto|if|else|case|default|switch|break|continue|while|do|for|sizeof)\b</regex>
|
||||
</rule>
|
||||
<rule name="my function keyword">
|
||||
<color>systemFunction</color>
|
||||
<regex>\@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]|_)+\@</regex>
|
||||
<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>
|
||||
</rule>
|
||||
<rule name="my type">
|
||||
<color>type</color>
|
||||
<regex>\@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)\@</regex>
|
||||
<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>\@std::(vector|(u16|u32|w)?string|codecvt_utf(16|8_utf16|8)+|complex|iterator(_traits)?|tuple(_element|_size)?|pair)\@</regex>
|
||||
<regex>\bstd::[\w:]*\b</regex>
|
||||
</rule>
|
||||
<rule name="my storage keyword">
|
||||
<color>storageKeyword</color>
|
||||
<regex>\@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\@</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>
|
||||
<regex>\@NULL|MAX|MIN|__LINE__|__DATA__|__FILE__|__func__|__TIME__|__STDC__\@</regex>
|
||||
<regex>\b(NULL|MAX|MIN|__LINE__|__DATA__|__FILE__|__func__|__TIME__|__STDC__)\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="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="CPP member">
|
||||
<color>memberClass</color>
|
||||
<regex>\@m_[A-Za-z_0-9]*\@</regex>
|
||||
<regex>\bm_\w+\b</regex>
|
||||
</rule>
|
||||
<rule name="function input">
|
||||
<color>inputFunction</color>
|
||||
<regex>\@_[A-Za-z_0-9]*\@</regex>
|
||||
<max>false</max>
|
||||
<regex>\b_\w+\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>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}|</regex>
|
||||
<regex>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}</regex>
|
||||
</rule>
|
||||
<!-- With all elementes :
|
||||
<rule name="BIG LETTER">
|
||||
<color>macro</color>
|
||||
<regex>([A-Z]|_){4,500}</regex>
|
||||
<elemSubColor id="1">doxElem</elemSubColor>
|
||||
</rule>
|
||||
-->
|
||||
<rule name="simpleQuteTextError">
|
||||
<color>SYNTAX_ERROR</color>
|
||||
<regex>'|"</regex>
|
||||
</rule>
|
||||
</pass2>
|
||||
<pass name="doxyparse">
|
||||
<rule name="key">
|
||||
<color>doxygen-key</color>
|
||||
<regex>(@|\\)[\t ]*\w+</regex>
|
||||
</rule>
|
||||
<rule name="in-out">
|
||||
<color>doxygen-in-out</color>
|
||||
<regex>\[(in|in,out|out)\]</regex>
|
||||
</rule>
|
||||
<rule name="function input">
|
||||
<color>inputFunction</color>
|
||||
<regex>\b_\w+\b</regex>
|
||||
</rule>
|
||||
</pass>
|
||||
<pass name="TODO">
|
||||
<rule name="function input">
|
||||
<color>SYNTAX_ERROR</color>
|
||||
<regex>TODO[ \t]*:.*</regex>
|
||||
</rule>
|
||||
</pass>
|
||||
</EdnLang>
|
||||
|
@ -1,51 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="C/C++">
|
||||
<EdnLang version="0.1" lang="cmake">
|
||||
<ext>CMakeLists.txt</ext>
|
||||
<ext>CMakeCache.txt</ext>
|
||||
<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|find_package|pkg_check_modules|set_target_properties|source_group)\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>
|
||||
<rule name="files path">
|
||||
<color>memberClass</color>
|
||||
<regex>[\w-]*(\.|/)\w*</regex>
|
||||
</rule>
|
||||
-->
|
||||
</pass2>
|
||||
</EdnLang>
|
||||
|
@ -1,9 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="Glsl">
|
||||
<ext>*.glsl</ext>
|
||||
<ext>*.vert</ext>
|
||||
<ext>*.frag</ext>
|
||||
<ext>*.prog</ext>
|
||||
<ext>.*\.(glsl|vert|frag|prog)</ext>
|
||||
<pass1>
|
||||
<rule name="my comment multiline doxygen">
|
||||
<color>commentDoxygen</color>
|
||||
@ -15,57 +12,57 @@
|
||||
</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 -->
|
||||
<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>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}|</regex>
|
||||
<regex>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}</regex>
|
||||
</rule>
|
||||
</pass2>
|
||||
</EdnLang>
|
||||
|
@ -1,40 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="Kernel conf file">
|
||||
<ext>*.in</ext>
|
||||
<ext>.*\.in</ext>
|
||||
<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>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}|</regex>
|
||||
<regex>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}</regex>
|
||||
</rule>
|
||||
</pass2>
|
||||
</EdnLang>
|
||||
|
@ -1,78 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="Java">
|
||||
<ext>*.java</ext>
|
||||
<ext>.*\.java</ext>
|
||||
<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>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}|</regex>
|
||||
<regex>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}</regex>
|
||||
</rule>
|
||||
</pass2>
|
||||
</EdnLang>
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="Json">
|
||||
<ext>*.json</ext>
|
||||
<ext>.*\.json</ext>
|
||||
<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 -->
|
||||
@ -18,15 +18,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>\@((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>
|
||||
|
@ -1,54 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="Lua">
|
||||
<ext>*.lua</ext>
|
||||
<ext>.*\.lua</ext>
|
||||
<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>==|<=|>=|~=|<{1,2}|>{1,2}|&&|\{|\}|</regex>
|
||||
<regex>==|<=|>=|~=|<{1,2}|>{1,2}|&&|\{|\}</regex>
|
||||
</rule>
|
||||
</pass2>
|
||||
</EdnLang>
|
||||
|
@ -1,30 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="Makefiles">
|
||||
<ext>Makefile</ext>
|
||||
<ext>*.mk</ext>
|
||||
<ext>*.global</ext>
|
||||
<ext>.*\.(mk|global)</ext>
|
||||
<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>
|
||||
@ -32,7 +31,7 @@
|
||||
</rule>
|
||||
<rule name="condition">
|
||||
<color>boolean</color>
|
||||
<regex>:=|?=|!=|=</regex>
|
||||
<regex>:=|\?=|!=|=</regex>
|
||||
</rule>
|
||||
</pass2>
|
||||
</EdnLang>
|
||||
|
@ -1,55 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="Matlab">
|
||||
<ext>*.m</ext>
|
||||
<ext>*.M</ext>
|
||||
<ext>.*\.(m|M)</ext>
|
||||
<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>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}|</regex>
|
||||
<regex>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}</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>
|
||||
|
@ -1,33 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="Php: pretty home page">
|
||||
<ext>*.php</ext>
|
||||
<ext>*.php3</ext>
|
||||
<ext>*.php4</ext>
|
||||
<ext>*.phtml</ext>
|
||||
<ext>.*\.(php|php3|php4|phtml)</ext>
|
||||
<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 +34,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>==|<=|>=|!=|<|>|&&|\{|\}|</regex>
|
||||
<regex>==|<=|>=|!=|<|>|&&|\{|\}</regex>
|
||||
</rule>
|
||||
</pass2>
|
||||
</EdnLang>
|
||||
|
@ -1,76 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="Python">
|
||||
<ext>*.py</ext>
|
||||
<ext>.*\.py</ext>
|
||||
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
|
||||
<rule name="my comment multiline">
|
||||
<color>comment</color>
|
||||
<regex>""".*"""</regex>
|
||||
<regex>"""(.|\r|\n)*?"""</regex>
|
||||
</rule>
|
||||
<rule name="my comment multiline">
|
||||
<color>comment</color>
|
||||
<regex>'''.*'''</regex>
|
||||
<regex>'''(.|\r|\n)*?'''</regex>
|
||||
</rule>
|
||||
<rule name="comment multiline Error">
|
||||
<color>SYNTAX_ERROR</color>
|
||||
<regex>("""|''')(.|\n|\r)*</regex>
|
||||
</rule>
|
||||
<rule name="my comment doxygen">
|
||||
<color>commentDoxygen</color>
|
||||
<regex>##(\\[\\\n]|.)*$</regex>
|
||||
<regex>##.*</regex>
|
||||
</rule>
|
||||
<rule name="my comment">
|
||||
<color>comment</color>
|
||||
<regex>#(\\[\\\n]|.)*$</regex>
|
||||
<regex>#.*</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>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}|</regex>
|
||||
<regex>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}</regex>
|
||||
</rule>
|
||||
<!-- With all elementes : -->
|
||||
<rule name="BIG LETTER">
|
||||
<color>macro</color>
|
||||
<regex>([A-Z]|_){4,500}</regex>
|
||||
<elemSubColor id="1">doxElem</elemSubColor>
|
||||
<rule name="simpleQuteTextError">
|
||||
<color>SYNTAX_ERROR</color>
|
||||
<regex>'|"</regex>
|
||||
</rule>
|
||||
</pass2>
|
||||
</EdnLang>
|
||||
|
@ -1,38 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.2" lang="XML">
|
||||
<ext>*.xml</ext>
|
||||
<ext>*.svg</ext>
|
||||
<ext>.*\.(xml|svg)</ext>
|
||||
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
|
||||
<rule name="Comment">
|
||||
<color>comment</color>
|
||||
<regex><![CDATA[<!\-\-.*\-\->]]></regex>
|
||||
<!--<regex><!\-\-.*\-\-></regex>-->
|
||||
<!--<regex><![CDATA[<!\-\-(.|\r|\n)*?\-\->]]></regex>-->
|
||||
-<regex><!\-\-(.|\r|\n)*?\-\-></regex>
|
||||
</rule>
|
||||
<rule name="doubleQuteText">
|
||||
<color>doubleQuoteText</color>
|
||||
<regex>"(\\[\\"]|.)*"</regex>
|
||||
<rule name="CDATA">
|
||||
<color>macro</color>
|
||||
<!--<regex><![CDATA[<!\[CDATA\[(.|\r|\n)*?\]\]>]]></regex>-->
|
||||
<regex><!\[CDATA\[(.|\r|\n)*?\]\]></regex>
|
||||
</rule>
|
||||
<rule name="simpleQuteText">
|
||||
<color>doubleQuoteText</color>
|
||||
<regex>\@'.*('|\n)</regex>
|
||||
<rule name="stop balise">
|
||||
<color>functionName</color>
|
||||
<!--<regex><![CDATA[</[ \t]*\w+?[ \t]*>]]></regex>-->
|
||||
<regex></[ \t]*\w+?[ \t]*></regex>
|
||||
</rule>
|
||||
<rule name="stop balise">
|
||||
<color>SYNTAX_ERROR</color>
|
||||
<!--<regex><![CDATA[</(.|\n|\r)*?>]]></regex>-->
|
||||
<regex></(.|\n|\r)*?></regex>
|
||||
</rule>
|
||||
<rule name="start balise">
|
||||
<color>normal</color>
|
||||
<!--<regex><![CDATA[<(.|\n|\r)*?>]]></regex>-->
|
||||
<regex><(.|\n|\r)*?></regex>
|
||||
<sub>parseInsideBalise</sub>
|
||||
</rule>
|
||||
</pass1>
|
||||
<pass2>
|
||||
<rule name="special Balise">
|
||||
<rule name="start balise">
|
||||
<color>commonDefine</color>
|
||||
<!--<regex><![CDATA[&(gt|lt|amp|apos|quot);]]></regex>-->
|
||||
<regex>&(gt|lt|amp|apos|quot);</regex>
|
||||
</rule>
|
||||
<rule name="start balise">
|
||||
<color>error</color>
|
||||
<regex><\?\w*|\?></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></[0-9a-zA-Z_]+|<[0-9a-zA-Z_]+|/>|></regex>-->
|
||||
<regex><![CDATA[(</[0-9a-zA-Z_]+|<[0-9a-zA-Z_]+)\@]]></regex>
|
||||
<regex>>|<|&|'|"</regex>
|
||||
</rule>
|
||||
</pass2>
|
||||
<pass name="parseInsideBalise">
|
||||
<rule name="special Balise">
|
||||
<color>error</color>
|
||||
<!--<regex><![CDATA[<\?\w*|\?>]]></regex>-->
|
||||
<regex><\?\w*|\?></regex>
|
||||
</rule>
|
||||
<rule name="open balise">
|
||||
<color>functionName</color>
|
||||
<!--<regex><![CDATA[<[ \t]*[0-9a-zA-Z_]+]]></regex>-->
|
||||
<regex><[ \t]*[0-9a-zA-Z_]+</regex>
|
||||
</rule>
|
||||
<rule name="close balise">
|
||||
<color>functionName</color>
|
||||
<!--<regex><![CDATA[/?>]]></regex>-->
|
||||
<regex>/?></regex>
|
||||
</rule>
|
||||
<rule name="doubleQuteText">
|
||||
<color>doubleQuoteText</color>
|
||||
<regex>"(.|\r|\n|\\\\|\\")*?"</regex>
|
||||
</rule>
|
||||
<rule name="simpleQuteText">
|
||||
<color>doubleQuoteText</color>
|
||||
<regex>\b'(.|\r|\n)*?('|\n)</regex>
|
||||
</rule>
|
||||
<rule name="condition">
|
||||
<color>boolean</color>
|
||||
<regex>=</regex>
|
||||
</rule>
|
||||
<rule name="condition">
|
||||
<color>keyword</color>
|
||||
<regex>\w+</regex>
|
||||
</rule>
|
||||
</pass>
|
||||
</EdnLang>
|
||||
|
||||
|
@ -27,5 +27,8 @@
|
||||
{ name:"functionName", foreground:"#24d1e0", bold:true},
|
||||
{ name:"TestResultOK", foreground:"#000000", background:"#00FF00", bold:true},
|
||||
{ name:"TestResultERROR", FG:"#000000", background:"#FF0000", bold:true}
|
||||
|
||||
{ name:"doxygen-key", foreground:"#dc3700", bold:true, italic:false},
|
||||
{ name:"doxygen-in-out", foreground:"#dc7000", bold:true, italic:false},
|
||||
]
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
{ name:"SelectedText", foreground:"#292929", background:"#009ce7"},
|
||||
{ name:"error", foreground:"#FF0000"},
|
||||
{ name:"doubleQuoteText", foreground:"#008e00"},
|
||||
|
||||
{ name:"type", foreground:"#376d0a", bold:true},
|
||||
{ name:"memberClass", foreground:"#7c5406", bold:true},
|
||||
{ name:"inputFunction", foreground:"#B80000", bold:true, italic:true},
|
||||
@ -26,6 +27,9 @@
|
||||
{ name:"functionName", foreground:"#09857e", bold:true},
|
||||
{ name:"TestResultOK", foreground:"#000000", background:"#009c00", bold:true},
|
||||
{ name:"TestResultERROR", foreground:"#000000", background:"#c20000", bold:true}
|
||||
|
||||
{ name:"doxygen-key", foreground:"#dc3700", bold:true, italic:false},
|
||||
{ name:"doxygen-in-out", foreground:"#dc7000", bold:true, italic:false},
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ appl::Buffer::Iterator& appl::Buffer::Iterator::operator++ () {
|
||||
return *this;
|
||||
}
|
||||
if (m_data != nullptr) {
|
||||
if (m_current < m_data->m_data.size() ) {
|
||||
if (m_current < (int64_t)m_data->m_data.size() ) {
|
||||
int8_t nbChar = utf8::theoricLen(m_data->m_data[m_current]);
|
||||
if (nbChar != 0) {
|
||||
m_current+=nbChar;
|
||||
@ -32,7 +32,7 @@ appl::Buffer::Iterator& appl::Buffer::Iterator::operator++ () {
|
||||
m_current++;
|
||||
}
|
||||
}
|
||||
if (m_current >= m_data->m_data.size()) {
|
||||
if (m_current >= (int64_t)m_data->m_data.size()) {
|
||||
m_current = m_data->m_data.size();
|
||||
}
|
||||
}
|
||||
@ -69,7 +69,7 @@ char32_t appl::Buffer::Iterator::operator* () {
|
||||
return m_value;
|
||||
}
|
||||
if ( m_current < 0
|
||||
|| m_current >= m_data->m_data.size()) {
|
||||
|| m_current >= (int64_t)m_data->m_data.size()) {
|
||||
APPL_ERROR("request an element out of bounding !!! 0 <= " << m_current << " < " << m_data->m_data.size());
|
||||
return m_value;
|
||||
}
|
||||
@ -77,7 +77,7 @@ char32_t appl::Buffer::Iterator::operator* () {
|
||||
memset(tmpVal, 0, sizeof(tmpVal));
|
||||
tmpVal[0] = m_data->m_data[m_current];
|
||||
int8_t nbChar = utf8::theoricLen(tmpVal[0]);
|
||||
for (int32_t iii=1; iii<nbChar && m_current+iii<m_data->m_data.size(); ++iii) {
|
||||
for (int32_t iii=1; iii<nbChar && m_current+iii<(int64_t)m_data->m_data.size(); ++iii) {
|
||||
tmpVal[iii] = m_data->m_data[m_current+iii];
|
||||
}
|
||||
// transform ...
|
||||
@ -152,13 +152,20 @@ bool appl::Buffer::loadFile(const std::string& _name) {
|
||||
m_cursorPos = 0;
|
||||
setHighlightType("");
|
||||
m_nbLines = 0;
|
||||
if (m_data.dumpFrom(m_fileName) == true ) {
|
||||
countNumberofLine();
|
||||
tryFindHighlightType();
|
||||
m_isModify = false;
|
||||
return true;
|
||||
if (file.exist() == false) {
|
||||
APPL_ERROR("File : '" << m_fileName << "' does not exist...");
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
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;
|
||||
}
|
||||
|
||||
void appl::Buffer::setFileName(const std::string& _name) {
|
||||
@ -175,12 +182,16 @@ void appl::Buffer::setFileName(const std::string& _name) {
|
||||
}
|
||||
|
||||
bool appl::Buffer::storeFile() {
|
||||
if (m_data.dumpIn(m_fileName) == true) {
|
||||
APPL_INFO("saving file : " << m_fileName);
|
||||
setModification(false);
|
||||
return true;
|
||||
etk::FSNode file(m_fileName);
|
||||
if (file.fileOpenWrite() == false) {
|
||||
APPL_ERROR("File : '" << m_fileName << "' Fail to open in write mode");
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
file.fileWriteAll(m_data);
|
||||
file.fileClose();
|
||||
APPL_INFO("saving file : " << m_fileName);
|
||||
setModification(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
void appl::Buffer::setModification(bool _status) {
|
||||
@ -638,7 +649,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(position, (int8_t*)(_data.c_str()), _data.size());
|
||||
m_data.insert((size_t)position, _data);
|
||||
if (m_cursorPos < 0) {
|
||||
m_cursorPos = 0;
|
||||
}
|
||||
@ -655,7 +666,7 @@ bool appl::Buffer::replace(const std::string& _data, const appl::Buffer::Iterato
|
||||
if (position < 0){
|
||||
position = 0;
|
||||
}
|
||||
m_data.replace(position, (int64_t)_posEnd-(int64_t)_pos, (int8_t*)(_data.c_str()), _data.size());
|
||||
m_data.replace(m_data.begin() + position, m_data.begin() + (int64_t)_posEnd, _data.begin(), _data.end());
|
||||
regenerateHighLightAt(position, (int64_t)_posEnd-(int64_t)_pos, _data.size());
|
||||
m_selectMode = false;
|
||||
moveCursor(position+_data.size());
|
||||
@ -670,7 +681,7 @@ void appl::Buffer::removeSelection() {
|
||||
}
|
||||
int64_t startPos = getStartSelectionPos();
|
||||
int64_t endPos = getStopSelectionPos();
|
||||
m_data.remove(startPos, endPos-startPos);
|
||||
m_data.erase(startPos, endPos-startPos);
|
||||
regenerateHighLightAt(startPos, endPos-startPos, 0);
|
||||
m_selectMode = false;
|
||||
moveCursor(startPos);
|
||||
@ -680,7 +691,7 @@ void appl::Buffer::removeSelection() {
|
||||
|
||||
void appl::Buffer::tryFindHighlightType() {
|
||||
etk::FSNode file(m_fileName);
|
||||
std::string type = appl::highlightManager::getTypeExtention(file.fileGetExtention());
|
||||
std::string type = appl::highlightManager::getTypeFile(file.getNameFile());
|
||||
if (type.size() == 0) {
|
||||
return;
|
||||
}
|
||||
@ -712,7 +723,7 @@ void appl::Buffer::regenerateHighLightAt(int64_t _pos, int64_t _nbDeleted, int64
|
||||
return;
|
||||
}
|
||||
// normal case
|
||||
//APPL_INFO("(pos="<<pos<<", nbDeleted="<<nbDeleted<<", nbAdded=" << nbAdded << "\");");
|
||||
APPL_VERBOSE("(_pos="<<_pos<<", _nbDeleted="<<_nbDeleted<<", _nbAdded=" << _nbAdded << "\");");
|
||||
int64_t posEnd = _pos + _nbDeleted;
|
||||
// search position of the old element to reparse IT...
|
||||
int64_t startId;
|
||||
@ -725,32 +736,45 @@ void appl::Buffer::regenerateHighLightAt(int64_t _pos, int64_t _nbDeleted, int64
|
||||
}
|
||||
// find element previous
|
||||
findMainHighLightPosition(_pos, posEnd, startId, stopId, true);
|
||||
|
||||
|
||||
APPL_VERBOSE(" list old parse:");
|
||||
for (auto &elem : m_HLDataPass1) {
|
||||
APPL_VERBOSE(" " << elem.start << "=>" << elem.stop);
|
||||
}
|
||||
// Remove previous element to prevent many errors like parsing of // for example
|
||||
startId--;
|
||||
APPL_VERBOSE("Find startId=" << startId << " stopId=" << stopId << " list size=" << m_HLDataPass1.size());
|
||||
|
||||
// remove deprecated element
|
||||
if ( startId == -1
|
||||
&& stopId == -1) {
|
||||
if ( startId <= -1
|
||||
&& stopId <= -1) {
|
||||
m_HLDataPass1.clear();
|
||||
} else if (startId == -1) {
|
||||
APPL_VERBOSE("1 * clear");
|
||||
} else if (startId <= -1) {
|
||||
if (stopId == 0){
|
||||
m_HLDataPass1.erase(m_HLDataPass1.begin());
|
||||
//APPL_DEBUG("1 * Erase 0");
|
||||
APPL_VERBOSE("1 * Erase 0");
|
||||
} else {
|
||||
m_HLDataPass1.erase(m_HLDataPass1.begin(), m_HLDataPass1.begin()+stopId);
|
||||
//APPL_DEBUG("2 * Erase 0->" << stopId);
|
||||
APPL_VERBOSE("2 * Erase 0->" << stopId);
|
||||
}
|
||||
} else if (stopId == -1) {
|
||||
//APPL_DEBUG("3 * Erase " << startId+1 << "-> end");
|
||||
} else if (stopId <= -1) {
|
||||
APPL_VERBOSE("3 * Erase " << startId+1 << "-> end");
|
||||
m_HLDataPass1.erase(m_HLDataPass1.begin()+startId+1, m_HLDataPass1.end());
|
||||
stopId = -1;
|
||||
} else {
|
||||
int32_t currentSize = m_HLDataPass1.size();
|
||||
//APPL_DEBUG("4 * Erase " << startId+1 << "->" << stopId << " in " << currentSize << " elements" );
|
||||
m_HLDataPass1.erase(m_HLDataPass1.begin()+startId+1, m_HLDataPass1.begin()+stopId);
|
||||
APPL_VERBOSE("4 * Erase " << startId+1 << "->" << stopId << " in " << currentSize << " elements" );
|
||||
m_HLDataPass1.erase(m_HLDataPass1.begin()+startId+1, m_HLDataPass1.begin()+stopId+1);
|
||||
if (stopId == currentSize-1) {
|
||||
stopId = -1;
|
||||
}
|
||||
}
|
||||
//APPL_DEBUG("new size=" << (int32_t)m_HLDataPass1.size()-1);
|
||||
APPL_VERBOSE(" list afterRemove:");
|
||||
for (auto &elem : m_HLDataPass1) {
|
||||
APPL_VERBOSE(" " << elem.start << "=>" << elem.stop);
|
||||
}
|
||||
|
||||
// update position after the range position :
|
||||
int64_t elemStart;
|
||||
if (startId == -1) {
|
||||
@ -764,18 +788,18 @@ void appl::Buffer::regenerateHighLightAt(int64_t _pos, int64_t _nbDeleted, int64
|
||||
it->stop += _nbAdded - _nbDeleted;
|
||||
}
|
||||
//Regenerate Element inside range
|
||||
if ( startId == -1
|
||||
&& stopId == -1) {
|
||||
//APPL_DEBUG("******* Regenerate ALL");
|
||||
if ( startId <= -1
|
||||
&& stopId <= -1) {
|
||||
APPL_VERBOSE("******* Regenerate ALL");
|
||||
generateHighLightAt(0, m_data.size());
|
||||
} else if(-1 == startId) {
|
||||
//APPL_DEBUG("******* Regenerate START");
|
||||
} else if(startId <= -1) {
|
||||
APPL_VERBOSE("******* Regenerate START");
|
||||
generateHighLightAt(0, m_HLDataPass1[0].start, 0);
|
||||
} else if(-1 == stopId) {
|
||||
//APPL_DEBUG("******* Regenerate STOP");
|
||||
} else if(stopId <= -1) {
|
||||
APPL_VERBOSE("******* Regenerate STOP");
|
||||
generateHighLightAt(m_HLDataPass1[m_HLDataPass1.size() -1].stop, m_data.size(), m_HLDataPass1.size());
|
||||
} else {
|
||||
//APPL_DEBUG("******* Regenerate RANGE");
|
||||
APPL_VERBOSE("******* Regenerate RANGE");
|
||||
generateHighLightAt(m_HLDataPass1[startId].stop, m_HLDataPass1[startId+1].start, startId+1);
|
||||
}
|
||||
}
|
||||
@ -914,22 +938,24 @@ void appl::Buffer::hightlightGenerateLines(appl::DisplayHLData& _MData, const ap
|
||||
" start=" << HLStartPos <<
|
||||
" stop=" << m_HLDataPass1[kkk].start );
|
||||
m_highlight->parse2(HLStartPos,
|
||||
m_HLDataPass1[kkk].start,
|
||||
_MData.HLData,
|
||||
m_data);
|
||||
m_HLDataPass1[kkk].start,
|
||||
_MData.HLData,
|
||||
m_data);
|
||||
} // else : nothing to do ...
|
||||
} else {
|
||||
APPL_VERBOSE(" == > (empty section 2 ) kkk=" << kkk <<
|
||||
" start=" << m_HLDataPass1[kkk-1].stop <<
|
||||
" stop=" << m_HLDataPass1[kkk].start );
|
||||
m_highlight->parse2(m_HLDataPass1[kkk-1].stop,
|
||||
m_HLDataPass1[kkk].start,
|
||||
_MData.HLData,
|
||||
m_data);
|
||||
m_HLDataPass1[kkk].start,
|
||||
_MData.HLData,
|
||||
m_data);
|
||||
}
|
||||
// under section :
|
||||
//APPL_DEBUG(" == > (under section ) k="<<k<<" start="<<m_HLDataPass1[k].beginStart<<" stop="<<m_HLDataPass1[k].endStop << " subSectionOfID=" << 99999999);
|
||||
// TODO : ...
|
||||
APPL_VERBOSE(" == > (under section ) kkk="<<kkk<<" start="<<m_HLDataPass1[kkk].start<<" stop="<<m_HLDataPass1[kkk].stop << " subSectionOfID=" << 99999999);
|
||||
m_highlight->parseSubElement(m_HLDataPass1[kkk],
|
||||
_MData.HLData,
|
||||
m_data);
|
||||
}
|
||||
if (endSearch == (int32_t)m_HLDataPass1.size() ){
|
||||
//if( k < (int32_t)m_HLDataPass1.size()) {
|
||||
@ -938,16 +964,16 @@ void appl::Buffer::hightlightGenerateLines(appl::DisplayHLData& _MData, const ap
|
||||
" start=" << m_HLDataPass1[kkk-1].stop <<
|
||||
" stop=" << HLStop );
|
||||
m_highlight->parse2(m_HLDataPass1[kkk-1].stop,
|
||||
HLStop,
|
||||
_MData.HLData,
|
||||
m_data);
|
||||
HLStop,
|
||||
_MData.HLData,
|
||||
m_data);
|
||||
} else {
|
||||
APPL_VERBOSE(" == > (empty section 4 ) kkk=" << kkk <<
|
||||
" start=0 stop=" << HLStop );
|
||||
m_highlight->parse2(0,
|
||||
HLStop,
|
||||
_MData.HLData,
|
||||
m_data);
|
||||
HLStop,
|
||||
_MData.HLData,
|
||||
m_data);
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
@ -82,7 +82,7 @@ namespace appl {
|
||||
if (m_data == nullptr) {
|
||||
return false;
|
||||
}
|
||||
if (m_current >= m_data->m_data.size()) {
|
||||
if (m_current >= (int64_t)m_data->m_data.size()) {
|
||||
return false;
|
||||
}
|
||||
if (m_current < 0) {
|
||||
@ -101,8 +101,8 @@ namespace appl {
|
||||
if (m_current < 0) {
|
||||
return 0;
|
||||
}
|
||||
if (m_current > m_data->m_data.size()) {
|
||||
return m_data->m_data.size();
|
||||
if (m_current > (int64_t)m_data->m_data.size()) {
|
||||
return (int64_t)m_data->m_data.size();
|
||||
}
|
||||
return m_current;
|
||||
};
|
||||
@ -224,7 +224,7 @@ namespace appl {
|
||||
if (m_current < 0) {
|
||||
return 0;
|
||||
}
|
||||
if (m_current >= m_data->m_data.size()) {
|
||||
if (m_current >= (int64_t)m_data->m_data.size()) {
|
||||
return m_data->m_data.size()-1;
|
||||
}
|
||||
return m_current;
|
||||
@ -348,9 +348,9 @@ namespace appl {
|
||||
*/
|
||||
void setModification(bool _status);
|
||||
protected:
|
||||
etk::Buffer m_data; //!< copy of the file buffer
|
||||
std::string m_data; //!< copy of the file buffer
|
||||
public:
|
||||
etk::Buffer& getData() {
|
||||
std::string& getData() {
|
||||
return m_data;
|
||||
};
|
||||
protected:
|
||||
|
@ -390,31 +390,13 @@ void MainWindows::displayProperty() {
|
||||
} else {
|
||||
#ifdef SDGSDFGSDFGSDFGSDFGSTERGDHFGHFDS
|
||||
std::string menuDescription = "<title>Properties</title>\n";
|
||||
menuDescription += "<group>\n";
|
||||
menuDescription += " <title>Editor</title>\n";
|
||||
menuDescription += " <menu>\n";
|
||||
menuDescription += " <title>Editor Interface</title>\n";
|
||||
menuDescription += " <short-title>Editor</short-title>\n";
|
||||
menuDescription += " <widget>appl-text-viewer</widget>\n";
|
||||
menuDescription += " </menu>\n";
|
||||
menuDescription += "<group title='Editor'>\n";
|
||||
menuDescription += " <menu title='Editor Interface' short-title='Editor' widget='appl-text-viewer'>\n";
|
||||
menuDescription += "</group>\n";
|
||||
menuDescription += "<group>\n";
|
||||
menuDescription += " <title>Gui</title>\n";
|
||||
menuDescription += " <menu>\n";
|
||||
menuDescription += " <title>Font selection</title>\n";
|
||||
menuDescription += " <short-title>Font</short-title>\n";
|
||||
menuDescription += " <widget></widget>\n";
|
||||
menuDescription += " </menu>\n";
|
||||
menuDescription += " <menu>\n";
|
||||
menuDescription += " <title>Color selection</title>\n";
|
||||
menuDescription += " <short-title>Color</short-title>\n";
|
||||
menuDescription += " <widget></widget>\n";
|
||||
menuDescription += " </menu>\n";
|
||||
menuDescription += " <menu>\n";
|
||||
menuDescription += " <title>Theme selection</title>\n";
|
||||
menuDescription += " <short-title>Theme</short-title>\n";
|
||||
menuDescription += " <widget></widget>\n";
|
||||
menuDescription += " </menu>\n";
|
||||
menuDescription += "<group title='Gui'>\n";
|
||||
menuDescription += " <menu title='Font selection' short-title='Font' widget=''>\n";
|
||||
menuDescription += " <menu title='Color selection' short-title='Color' widget=''>\n";
|
||||
menuDescription += " <menu title='Theme selection' short-title='Theme' widget=''>\n";
|
||||
menuDescription += "</group>\n";
|
||||
|
||||
tmpWidget->setMenu(menuDescription);
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <appl/global.h>
|
||||
#include <appl/Highlight.h>
|
||||
#include <exml/exml.h>
|
||||
#include <ewol/ewol.h>
|
||||
#include <ewol/resource/Manager.h>
|
||||
|
||||
|
||||
@ -24,18 +25,6 @@
|
||||
//#define HL2_DEBUG APPL_INFO
|
||||
#define HL2_DEBUG APPL_VERBOSE
|
||||
|
||||
void appl::Highlight::parseRules(exml::Element* _child,
|
||||
std::vector<std::unique_ptr<HighlightPattern>>& _mListPatern,
|
||||
int32_t _level,
|
||||
bool forceMaximize) {
|
||||
// Create the patern ...
|
||||
HighlightPattern *myPattern = new HighlightPattern(m_paintingProperties);
|
||||
// parse under Element
|
||||
myPattern->parseRules(_child, _level, forceMaximize);
|
||||
// add element in the list
|
||||
_mListPatern.push_back(std::unique_ptr<HighlightPattern>(myPattern));
|
||||
}
|
||||
|
||||
appl::Highlight::Highlight() {
|
||||
addObjectType("appl::Highlight");
|
||||
}
|
||||
@ -83,7 +72,8 @@ void appl::Highlight::init(const std::string& _xmlFilename, const std::string& _
|
||||
APPL_ERROR("(l "<< passChild->getPos() << ") node not suported : \""<< passChild->getValue() << "\" must be [rule]" );
|
||||
continue;
|
||||
}
|
||||
parseRules(passChild, m_listHighlightPass1, level1++);
|
||||
// Create the patern in list
|
||||
m_listHighlightPass1.push_back(HighlightPattern(m_paintingProperties, passChild, level1++));
|
||||
}
|
||||
} else if (child->getValue() == "pass2") {
|
||||
// get sub Nodes ...
|
||||
@ -96,7 +86,30 @@ void appl::Highlight::init(const std::string& _xmlFilename, const std::string& _
|
||||
APPL_ERROR("(l "<< passChild->getPos() << ") node not suported : \""<< passChild->getValue() << "\" must be [rule]" );
|
||||
continue;
|
||||
}
|
||||
parseRules(passChild, m_listHighlightPass2, level2++, true);
|
||||
// Create the patern in list
|
||||
m_listHighlightPass2.push_back(HighlightPattern(m_paintingProperties, passChild, level2++));
|
||||
}
|
||||
} else if (child->getValue() == "pass") {
|
||||
std::string attributeName = child->getAttribute("name");
|
||||
if (attributeName == "") {
|
||||
APPL_ERROR("Can not parse an element pass with no attribute name ... ligne=" << child->getPos());
|
||||
continue;
|
||||
}
|
||||
m_listHighlightNamed.insert(std::pair<std::string, std::vector<HighlightPattern>>(attributeName, std::vector<HighlightPattern>()));
|
||||
auto it = m_listHighlightNamed.find(attributeName);
|
||||
int32_t level3=0;
|
||||
// get sub Nodes ...
|
||||
for(size_t jjj=0; jjj< child->size(); jjj++) {
|
||||
exml::Element* passChild = child->getElement(jjj);
|
||||
if (passChild == nullptr) {
|
||||
continue;
|
||||
}
|
||||
if (passChild->getValue() != "rule") {
|
||||
APPL_ERROR("(l "<< passChild->getPos() << ") node not suported : \""<< passChild->getValue() << "\" must be [rule]" );
|
||||
continue;
|
||||
}
|
||||
// add element in the list
|
||||
it->second.push_back(HighlightPattern(m_paintingProperties, passChild, level3++));
|
||||
}
|
||||
} else {
|
||||
APPL_ERROR("(l "<< child->getPos() << ") node not suported : \""<< child->getValue() << "\" must be [ext,pass1,pass2]" );
|
||||
@ -113,13 +126,28 @@ appl::Highlight::~Highlight() {
|
||||
m_listExtentions.clear();
|
||||
}
|
||||
|
||||
bool appl::Highlight::hasExtention(const std::string& _ext) {
|
||||
bool appl::Highlight::isCompatible(const std::string& _name) {
|
||||
for (auto &it : m_listExtentions) {
|
||||
APPL_VERBOSE(" check : " << it << "=?=" << _ext);
|
||||
if ( it == "*." + _ext
|
||||
|| it == _ext) {
|
||||
return true;
|
||||
APPL_VERBOSE(" check : " << it << "=?=" << _name);
|
||||
std::regex expression;
|
||||
try {
|
||||
expression.assign(it, std::regex_constants::optimize | std::regex_constants::ECMAScript);
|
||||
} catch (std::regex_error e) {
|
||||
APPL_ERROR("can not parse regex : '" << e.what() << "' for : " << it);
|
||||
continue;
|
||||
}
|
||||
std::smatch resultMatch;
|
||||
std::regex_search(_name.begin(), _name.end(), resultMatch, expression, std::regex_constants::match_continuous);
|
||||
if (resultMatch.size() <= 0) {
|
||||
continue;
|
||||
}
|
||||
if (resultMatch[0].first != _name.begin()) {
|
||||
continue;
|
||||
}
|
||||
if (resultMatch[0].second != _name.end()) {
|
||||
continue;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -151,13 +179,20 @@ void appl::Highlight::display() {
|
||||
}
|
||||
// display all elements
|
||||
for (auto &it : m_listHighlightPass1) {
|
||||
APPL_INFO(" Pass 1 : " << it->getName() );
|
||||
//m_listHighlightPass1[iii]->display();
|
||||
APPL_INFO(" Pass 1 : " << it.getName() );
|
||||
//it.display();
|
||||
}
|
||||
// display all elements
|
||||
for (auto &it : m_listHighlightPass2) {
|
||||
APPL_INFO(" pass 2 : " << it->getName() );
|
||||
//m_listHighlightPass2[iii]->display();
|
||||
APPL_INFO(" pass 2 : " << it.getName() );
|
||||
//it.display();
|
||||
}
|
||||
for (auto &it : m_listHighlightNamed) {
|
||||
APPL_INFO(" pass * : " << it.first << " : ");
|
||||
for (auto &it2 : it.second) {
|
||||
APPL_INFO(" " << it2.getName() );
|
||||
//it.display();
|
||||
}
|
||||
//it.display();
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,7 +203,7 @@ void appl::Highlight::parse(int64_t _start,
|
||||
int64_t _stop,
|
||||
std::vector<appl::HighlightInfo> & _metaData,
|
||||
int64_t _addingPos,
|
||||
etk::Buffer & _buffer) {
|
||||
std::string& _buffer) {
|
||||
if (0 > _addingPos) {
|
||||
_addingPos = 0;
|
||||
}
|
||||
@ -176,16 +211,26 @@ void appl::Highlight::parse(int64_t _start,
|
||||
int64_t elementStart = _start;
|
||||
int64_t elementStop = _stop;
|
||||
appl::HighlightInfo resultat;
|
||||
int64_t startTime = ewol::getTime();
|
||||
while (elementStart <= elementStop) {
|
||||
HL_DEBUG("Parse element in the buffer pos=" << elementStart);
|
||||
//HL_DEBUG("Parse element in the buffer pos=" << elementStart);
|
||||
int64_t currentTime = ewol::getTime();
|
||||
//try to fond the HL in ALL of we have
|
||||
for (int64_t jjj=0; jjj<(int64_t)m_listHighlightPass1.size(); jjj++){
|
||||
enum resultFind ret = HLP_FIND_OK;
|
||||
HL_DEBUG("Parse HL id=" << jjj << " position search: (" << elementStart << "," << _stop << ") input start='" << _buffer[elementStart] << "' " << m_listHighlightPass1[jjj]->getPaternString());
|
||||
/*
|
||||
if (_buffer[elementStart] == '\n') {
|
||||
HL_DEBUG("Parse HL id=" << jjj << " position search: (" << elementStart << "," << _stop << ") input start='\\n' " << m_listHighlightPass1[jjj].getPaternString());
|
||||
} else {
|
||||
HL_DEBUG("Parse HL id=" << jjj << " position search: (" << elementStart << "," << _stop << ") input start='" << _buffer[elementStart] << "' " << m_listHighlightPass1[jjj].getPaternString());
|
||||
}
|
||||
*/
|
||||
// Stop the search to the end (to get the end of the pattern)
|
||||
ret = m_listHighlightPass1[jjj]->find(elementStart, _buffer.size(), resultat, _buffer);
|
||||
ret = m_listHighlightPass1[jjj].find(elementStart, _buffer.size(), resultat, _buffer);
|
||||
if (HLP_FIND_ERROR != ret) {
|
||||
HL_DEBUG("Find Pattern in the Buffer : (" << resultat.start << "," << resultat.stop << ")" );
|
||||
int64_t currentTimeEnd = ewol::getTime();
|
||||
int64_t deltaTime = currentTimeEnd - currentTime;
|
||||
HL_DEBUG("Find Pattern in the Buffer : time=" << (float)deltaTime/1000.0f << " ms (" << resultat.start << "," << resultat.stop << ") startPos=" << elementStart << " for=" << m_listHighlightPass1[jjj].getPaternString());
|
||||
// remove element in the current List where the current Element have a end inside the next...
|
||||
int64_t kkk=_addingPos;
|
||||
while(kkk < (int64_t)_metaData.size() ) {
|
||||
@ -195,7 +240,7 @@ void appl::Highlight::parse(int64_t _start,
|
||||
_metaData.erase(_metaData.begin()+kkk, _metaData.begin()+kkk+1);
|
||||
// Increase the end of search
|
||||
if (kkk < (int64_t)_metaData.size()) {
|
||||
// just befor the end of the next element
|
||||
// just before the end of the next element
|
||||
elementStop = _metaData[kkk].start-1;
|
||||
} else {
|
||||
// end of the buffer
|
||||
@ -220,17 +265,25 @@ void appl::Highlight::parse(int64_t _start,
|
||||
// Go to the next element (and search again ...).
|
||||
elementStart++;
|
||||
}
|
||||
int64_t stopTime = ewol::getTime();
|
||||
int64_t deltaTimeGlobal = stopTime - startTime;
|
||||
APPL_DEBUG("parse in time=" << (float)deltaTimeGlobal/1000.0f << " ms ");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief second pass of the hightlight
|
||||
*
|
||||
* @param[in] _start Start searching data
|
||||
* @param[in] _stop End searching data
|
||||
* @param[out] _metaData Output list of all find patern
|
||||
* @param[in] _buffer buffer where we need to search data
|
||||
*/
|
||||
void appl::Highlight::parse2(int64_t _start,
|
||||
int64_t _stop,
|
||||
std::vector<appl::HighlightInfo> &_metaData,
|
||||
etk::Buffer &_buffer) {
|
||||
std::string&_buffer) {
|
||||
HL2_DEBUG("Parse element 0 => " << m_listHighlightPass2.size() <<
|
||||
" == > position search: (" << _start << "," << _stop << ")" );
|
||||
int64_t elementStart = _start;
|
||||
@ -244,18 +297,15 @@ void appl::Highlight::parse2(int64_t _start,
|
||||
//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++){
|
||||
enum resultFind ret = HLP_FIND_OK;
|
||||
enum resultFind ret;
|
||||
HL2_DEBUG("Parse HL id=" << jjj << " position search: (" <<
|
||||
elementStart << "," << elementStop << ") in='"
|
||||
<< _buffer[elementStart] << "' " << m_listHighlightPass2[jjj]->getPaternString());
|
||||
elementStart << "," << elementStop << ") in='"
|
||||
<< _buffer[elementStart] << "' " << m_listHighlightPass2[jjj].getPaternString());
|
||||
// Stop the search to the end (to get the end of the pattern)
|
||||
ret = m_listHighlightPass2[jjj]->find(elementStart, elementStop, resultat, _buffer);
|
||||
ret = m_listHighlightPass2[jjj].find(elementStart, elementStop, resultat, _buffer);
|
||||
if (ret != HLP_FIND_ERROR) {
|
||||
HL2_DEBUG("Find Pattern in the Buffer : (" << resultat.start << "," << resultat.stop << ")" );
|
||||
// add curent element in the list ...
|
||||
_metaData.push_back(resultat);
|
||||
elementStart = resultat.stop-1;
|
||||
// Exit current cycle
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -263,3 +313,46 @@ void appl::Highlight::parse2(int64_t _start,
|
||||
elementStart++;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief second pass of the hightlight pattern (have found something before)
|
||||
* @param[in] _upper upper pattern to find the data
|
||||
* @param[out] _metaData Output list of all find patern
|
||||
* @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) {
|
||||
if (_upper.patern->getSubPatternName().size() == 0) {
|
||||
return;
|
||||
}
|
||||
HL2_DEBUG("Parse element 0 => " << m_listHighlightNamed.size() <<
|
||||
" == > position search: (" << _upper.start << "," << _upper.stop << ")" );
|
||||
int64_t elementStart = _upper.start;
|
||||
int64_t elementStop = _upper.stop;
|
||||
appl::HighlightInfo resultat;
|
||||
// Find element in the list:
|
||||
auto itHL = m_listHighlightNamed.find(_upper.patern->getSubPatternName());
|
||||
if (itHL == m_listHighlightNamed.end()) {
|
||||
APPL_ERROR("Patern does not exist : " << _upper.patern->getSubPatternName() << " note : Removing it ...");
|
||||
_upper.patern->setSubPatternName("");
|
||||
return;
|
||||
}
|
||||
|
||||
while (elementStart < elementStop) {
|
||||
//try to fond the HL in ALL of we have
|
||||
for (auto &it : itHL->second){
|
||||
enum resultFind ret;
|
||||
HL2_DEBUG("Parse HL position search: (" << elementStart << "," << elementStop << ") in='" << _buffer[elementStart] << "' " << it.getPaternString());
|
||||
// Stop the search to the end (to get the end of the pattern)
|
||||
ret = it.find(elementStart, elementStop, resultat, _buffer);
|
||||
if (ret != HLP_FIND_ERROR) {
|
||||
_metaData.push_back(resultat);
|
||||
elementStart = resultat.stop-1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Go to the next element (and search again ...).
|
||||
elementStart++;
|
||||
}
|
||||
}
|
@ -19,7 +19,7 @@ namespace appl {
|
||||
int32_t start;
|
||||
int32_t stop;
|
||||
bool notEnded;
|
||||
appl::HighlightPattern* patern; // pointer on class :
|
||||
appl::HighlightPattern* patern;
|
||||
};
|
||||
};
|
||||
|
||||
@ -44,31 +44,35 @@ namespace appl {
|
||||
private:
|
||||
std::string m_typeName; //!< descriptive string type like "C/C++"
|
||||
public:
|
||||
/**
|
||||
* @brief Get the Type of the Hightlight like c++/Bash/...
|
||||
* @return descriptive string
|
||||
*/
|
||||
const std::string& getTypeName() {
|
||||
return m_typeName;
|
||||
}
|
||||
public:
|
||||
bool hasExtention(const std::string& _ext);
|
||||
bool isCompatible(const std::string& _name);
|
||||
bool fileNameCompatible(const std::string& _fileName);
|
||||
void display();
|
||||
void parse(int64_t _start,
|
||||
int64_t _stop,
|
||||
std::vector<appl::HighlightInfo> &_metaData,
|
||||
std::vector<appl::HighlightInfo>& _metaData,
|
||||
int64_t _addingPos,
|
||||
etk::Buffer &_buffer);
|
||||
std::string& _buffer);
|
||||
void parse2(int64_t _start,
|
||||
int64_t _stop,
|
||||
std::vector<appl::HighlightInfo> &_metaData,
|
||||
etk::Buffer &_buffer);
|
||||
std::vector<appl::HighlightInfo>& _metaData,
|
||||
std::string& _buffer);
|
||||
void parseSubElement(const appl::HighlightInfo& _upper,
|
||||
std::vector<appl::HighlightInfo>& _metaData,
|
||||
std::string &_buffer);
|
||||
private:
|
||||
void parseRules(exml::Element* _child,
|
||||
std::vector<std::unique_ptr<HighlightPattern>> &_mListPatern,
|
||||
int32_t _level,
|
||||
bool forceMaximize=false);
|
||||
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<std::unique_ptr<HighlightPattern>> m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 == > when we load and wride data on the buffer)
|
||||
std::vector<std::unique_ptr<HighlightPattern>> m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 == > When we display the buffer( only the display area (100 lines)) )
|
||||
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)) )
|
||||
std::map<std::string, std::vector<HighlightPattern>> m_listHighlightNamed; //!< list of all sub partern to parse...
|
||||
public: // herited function :
|
||||
virtual void updateContext() {
|
||||
// no upfate to do ...
|
||||
|
@ -70,19 +70,19 @@ void appl::highlightManager::unInit() {
|
||||
hlList.clear();
|
||||
}
|
||||
|
||||
std::string appl::highlightManager::getTypeExtention(const std::string& _extention) {
|
||||
if (_extention.size() == 0) {
|
||||
std::string appl::highlightManager::getTypeFile(const std::string& _fileName) {
|
||||
if (_fileName.size() == 0) {
|
||||
return "";
|
||||
}
|
||||
APPL_DEBUG("Try to find type for extention : '" << _extention << "' in " << s_list().size() << " types");
|
||||
APPL_DEBUG("Try to find type for extention : '" << _fileName << "' in " << s_list().size() << " types");
|
||||
std::vector<std::shared_ptr<Highlight>>& hlList = s_list();
|
||||
for (auto &it : hlList) {
|
||||
if (it == nullptr) {
|
||||
continue;
|
||||
}
|
||||
APPL_DEBUG(" check : " << it->getTypeName());
|
||||
if (it->hasExtention(_extention) == true) {
|
||||
APPL_DEBUG("Find type for extention : " << _extention
|
||||
if (it->isCompatible(_fileName) == true) {
|
||||
APPL_DEBUG("Find type for extention : " << _fileName
|
||||
<< " type : " << it->getTypeName());
|
||||
return it->getTypeName();
|
||||
}
|
||||
|
@ -27,10 +27,10 @@ namespace appl {
|
||||
void unInit();
|
||||
/**
|
||||
* @brief Un-Init the Highlight manager
|
||||
* @param[in] extention of the file
|
||||
* @param[in] _fileName name of the file
|
||||
* @return type of highlight
|
||||
*/
|
||||
std::string getTypeExtention(const std::string& _extention);
|
||||
std::string getTypeFile(const std::string& _fileName);
|
||||
/**
|
||||
* @brief Get filename with type.
|
||||
* @param[in] _type Type name of the highlight.
|
||||
|
@ -13,31 +13,49 @@
|
||||
#undef __class__
|
||||
#define __class__ "HighlightPattern"
|
||||
|
||||
appl::HighlightPattern::HighlightPattern(const std::shared_ptr<appl::GlyphPainting>& _glyphPainting) :
|
||||
appl::HighlightPattern::HighlightPattern(const std::shared_ptr<appl::GlyphPainting>& _glyphPainting, exml::Element* _child, int32_t _level) :
|
||||
m_glyphPainting(_glyphPainting),
|
||||
m_paternName(""),
|
||||
m_regExp(nullptr),
|
||||
m_hasParsingError(true),
|
||||
m_regexValue(""),
|
||||
m_regExp(),
|
||||
m_colorName(""),
|
||||
m_level(0) {
|
||||
m_regExp = std::unique_ptr<etk::RegExp<etk::Buffer>>(new etk::RegExp<etk::Buffer>());
|
||||
parseRules(_child, _level);
|
||||
}
|
||||
|
||||
appl::HighlightPattern::HighlightPattern() :
|
||||
m_glyphPainting(),
|
||||
m_paternName(""),
|
||||
m_hasParsingError(true),
|
||||
m_regexValue(""),
|
||||
m_regExp(),
|
||||
m_colorName(""),
|
||||
m_level(0) {
|
||||
|
||||
}
|
||||
|
||||
appl::HighlightPattern::~HighlightPattern() {
|
||||
|
||||
}
|
||||
|
||||
void appl::HighlightPattern::setPatern(std::string& _regExp, bool forceMaximize) {
|
||||
if (m_regExp == nullptr) {
|
||||
return;
|
||||
void appl::HighlightPattern::setPatern(const std::string& _regExp) {
|
||||
m_regexValue = _regExp;
|
||||
APPL_DEBUG("parse regex='" << _regExp << "'");
|
||||
try {
|
||||
m_regExp.assign(_regExp, std::regex_constants::optimize | std::regex_constants::ECMAScript);
|
||||
//m_regExp.assign(_regExp, std::regex_constants::optimize | std::regex_constants::extended);
|
||||
m_hasParsingError = false;
|
||||
} catch (std::regex_error e) {
|
||||
m_hasParsingError = true;
|
||||
APPL_ERROR("can not parse regex : '" << e.what() << "' for : " << _regExp);
|
||||
}
|
||||
m_regExp->compile(_regExp);
|
||||
m_regExp->setMaximize(forceMaximize);
|
||||
}
|
||||
std::string appl::HighlightPattern::getPaternString() {
|
||||
return m_regExp->getRegExDecorated();
|
||||
return m_regexValue;
|
||||
}
|
||||
|
||||
void appl::HighlightPattern::setColorGlyph(std::string& _colorName) {
|
||||
void appl::HighlightPattern::setColorGlyph(const std::string& _colorName) {
|
||||
m_colorName = _colorName;
|
||||
m_colorId = m_glyphPainting->request(m_colorName);
|
||||
APPL_VERBOSE("Resuest color name '" << m_colorName << "' => id=" << m_colorId);
|
||||
@ -46,20 +64,21 @@ void appl::HighlightPattern::setColorGlyph(std::string& _colorName) {
|
||||
void appl::HighlightPattern::display() {
|
||||
APPL_INFO("patern : '" << m_paternName << "' level=" << m_level );
|
||||
APPL_INFO(" == > colorName '" << m_colorName << "'");
|
||||
APPL_INFO(" == > regExp '" << m_regExp->getRegExp() << "'");
|
||||
//APPL_INFO(" == > regExp '" << m_regExp.getRegExp() << "'");
|
||||
APPL_INFO(" == > regex '" << m_regexValue << "'");
|
||||
}
|
||||
|
||||
void appl::HighlightPattern::parseRules(exml::Element* _child, int32_t _level, bool forceMaximize) {
|
||||
void appl::HighlightPattern::parseRules(exml::Element* _child, int32_t _level) {
|
||||
//--------------------------------------------------------------------------------------------
|
||||
/*
|
||||
<rule name="my preprocesseur">
|
||||
<color>preprocesseur</color>
|
||||
<regex>#</regex>
|
||||
<max>false</max>
|
||||
<sub>namexxx</sub>
|
||||
</rule>
|
||||
*/
|
||||
//--------------------------------------------------------------------------------------------
|
||||
// process attribute
|
||||
// process attribute
|
||||
std::string highLightName = _child->getAttribute("name");
|
||||
std::string myEdnDataTmp = "???";
|
||||
if (highLightName.size()!=0) {
|
||||
@ -73,42 +92,79 @@ void appl::HighlightPattern::parseRules(exml::Element* _child, int32_t _level, b
|
||||
std::string myData = xChild->getText();
|
||||
if (myData.size() != 0) {
|
||||
//APPL_INFO(PFX"(l %d) node fined : %s=\"%s\"", xChild->Row(), xChild->Value() , myData);
|
||||
std::string myEdnData = myData;
|
||||
setColorGlyph(myEdnData);
|
||||
setColorGlyph(myData);
|
||||
}
|
||||
}
|
||||
xChild = _child->getNamed("max");
|
||||
if (nullptr != xChild) {
|
||||
forceMaximize = etk::string_to_bool(xChild->getText());
|
||||
}
|
||||
xChild = _child->getNamed("regex");
|
||||
if (nullptr != xChild) {
|
||||
std::string myData = xChild->getText();
|
||||
if (myData.size() != 0) {
|
||||
//APPL_INFO(PFX"(l %d) node fined : %s=\"%s\"", xChild->Row(), xChild->Value() , myData);
|
||||
std::string myEdnData = myData;
|
||||
setPatern(myEdnData, forceMaximize);
|
||||
setPatern(myData);
|
||||
}
|
||||
}
|
||||
xChild = _child->getNamed("sub");
|
||||
if (nullptr != xChild) {
|
||||
std::string myData = xChild->getText();
|
||||
if (myData.size() != 0) {
|
||||
//APPL_INFO(PFX"(l %d) node fined : %s=\"%s\"", xChild->Row(), xChild->Value() , myData);
|
||||
setSubPatternName(myData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
enum resultFind appl::HighlightPattern::find(int32_t _start,
|
||||
int32_t _stop,
|
||||
appl::HighlightInfo& _resultat,
|
||||
etk::Buffer& _buffer) {
|
||||
int32_t _stop,
|
||||
appl::HighlightInfo& _resultat,
|
||||
const std::string& _buffer) {
|
||||
//APPL_DEBUG(" try to find the element");
|
||||
_resultat.start = -1;
|
||||
_resultat.stop = -1;
|
||||
_resultat.notEnded = false;
|
||||
_resultat.patern = this;
|
||||
if (m_hasParsingError == true) {
|
||||
return HLP_FIND_ERROR;
|
||||
}
|
||||
|
||||
// when we have only one element:
|
||||
if (true == m_regExp->processOneElement(_buffer, _start, _stop)) {
|
||||
_resultat.start = m_regExp->start();
|
||||
_resultat.stop = m_regExp->stop();
|
||||
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;
|
||||
}
|
||||
std::regex_search(_buffer.begin() + _start, _buffer.begin() + _stop, resultMatch, m_regExp, flags);
|
||||
if (resultMatch.size() > 0) {
|
||||
_resultat.start = std::distance(_buffer.begin(), resultMatch[0].first);
|
||||
_resultat.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) << "'");
|
||||
TK_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);
|
||||
TK_DEBUG(" [" << iii << "] " << posStart << " to " << posStop);
|
||||
}
|
||||
}
|
||||
*/
|
||||
return HLP_FIND_OK;
|
||||
}
|
||||
//APPL_DEBUG("NOT find hightlightpatern ...");
|
||||
return HLP_FIND_ERROR;
|
||||
}
|
||||
|
@ -14,9 +14,9 @@
|
||||
class HighlightPattern;
|
||||
|
||||
|
||||
#include <etk/RegExp.h>
|
||||
#include <appl/GlyphPainting.h>
|
||||
#include <vector>
|
||||
#include <regex>
|
||||
#include <exml/exml.h>
|
||||
#include <etk/Buffer.h>
|
||||
|
||||
@ -32,27 +32,39 @@ namespace appl {
|
||||
std::shared_ptr<appl::GlyphPainting> m_glyphPainting;
|
||||
public:
|
||||
// Constructeur
|
||||
HighlightPattern(const std::shared_ptr<appl::GlyphPainting>& _glyphPainting);
|
||||
HighlightPattern();
|
||||
HighlightPattern(const std::shared_ptr<appl::GlyphPainting>& _glyphPainting, exml::Element* _child, int32_t _level);
|
||||
virtual ~HighlightPattern();
|
||||
private:
|
||||
std::string m_paternName; //!< Current style name (like "c++" or "c" or "script Bash")
|
||||
public:
|
||||
void setName(std::string& _name) {
|
||||
void setName(const std::string& _name) {
|
||||
m_paternName = _name;
|
||||
};
|
||||
std::string getName() {
|
||||
const std::string& getName() {
|
||||
return m_paternName;
|
||||
};
|
||||
private:
|
||||
std::unique_ptr<etk::RegExp<etk::Buffer>> m_regExp; //!< Start of Regular expression
|
||||
std::string m_paternSubName; //!< Sub patern name if needed
|
||||
public:
|
||||
void setPatern(std::string& _regExp, bool forceMaximize=false);
|
||||
void setSubPatternName(const std::string& _name) {
|
||||
m_paternSubName = _name;
|
||||
};
|
||||
const std::string& getSubPatternName() {
|
||||
return m_paternSubName;
|
||||
};
|
||||
private:
|
||||
bool m_hasParsingError;
|
||||
std::string m_regexValue;
|
||||
std::regex m_regExp; //!< Start of Regular expression
|
||||
public:
|
||||
void setPatern(const std::string& _regExp);
|
||||
std::string getPaternString();
|
||||
private:
|
||||
std::string m_colorName; //!< Current color name
|
||||
int32_t m_colorId; //!< Id of the the glyph painting
|
||||
public:
|
||||
void setColorGlyph(std::string& _colorName);
|
||||
void setColorGlyph(const std::string& _colorName);
|
||||
const appl::GlyphDecoration& getColorGlyph() {
|
||||
return (*m_glyphPainting)[m_colorId];
|
||||
};
|
||||
@ -82,9 +94,9 @@ namespace appl {
|
||||
enum resultFind find(int32_t _start,
|
||||
int32_t _stop,
|
||||
appl::HighlightInfo& _resultat,
|
||||
etk::Buffer& _buffer);
|
||||
const std::string& _buffer);
|
||||
|
||||
void parseRules(exml::Element* _child, int32_t _level, bool forceMaximize=false);
|
||||
void parseRules(exml::Element* _child, int32_t _level);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1 +1 @@
|
||||
1.2.2
|
||||
1.2.3
|
@ -1 +1 @@
|
||||
6
|
||||
7
|
52
test/CMakeLists.txt
Normal file
52
test/CMakeLists.txt
Normal file
@ -0,0 +1,52 @@
|
||||
|
||||
set(GAMEPLAY_SRC
|
||||
src/AbsoluteLayout.cpp
|
||||
src/AbsoluteLayout.h
|
||||
src/BoundingBox.h
|
||||
src/Transform.h
|
||||
src/Vector2.cpp
|
||||
src/Vector2.h
|
||||
src/lua/lua_ThemeUVs.h
|
||||
src/lua/lua_Touch.cpp
|
||||
src/lua/lua_Touch.h
|
||||
src/lua/lua_TouchTouchEvent.cpp
|
||||
src/lua/lua_TouchTouchEvent
|
||||
)
|
||||
include_directories(
|
||||
src
|
||||
../external-deps/lua/include
|
||||
../external-deps/bullet/include
|
||||
../external-deps/png/include
|
||||
../external-deps/zlib/include
|
||||
../external-deps/oggvorbis/include
|
||||
../external-deps/openal/include
|
||||
../external-deps/glew/include
|
||||
)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GTK2 REQUIRED gtk+-2.0)
|
||||
include_directories(${GTK2_INCLUDE_DIRS})
|
||||
add_definitions(${GTK2_CFLAGS_OTHER})
|
||||
add_definitions(-D__linux__)
|
||||
endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
|
||||
add_definitions(-lstdc++)
|
||||
|
||||
add_library(gameplay STATIC
|
||||
${GAMEPLAY_SRC}
|
||||
${GAMEPLAY_LUA}
|
||||
)
|
||||
|
||||
set_target_properties(gameplay PROPERTIES
|
||||
OUTPUT_NAME "gameplay"
|
||||
CLEAN_DIRECT_OUTPUT 1
|
||||
VERSION ${GAMEPLAY_VERSION}
|
||||
)
|
||||
|
||||
source_group(lua FILES ${GAMEPLAY_LUA})
|
||||
source_group(res FILES ${GAMEPLAY_RES} ${GAMEPLAY_RES} ${GAMEPLAY_RES_SHADERS} ${GAMEPLAY_RES_UI})
|
||||
source_group(src FILES ${GAMEPLAY_SRC})
|
||||
|
||||
|
||||
|
0
test/Makefile
Normal file
0
test/Makefile
Normal file
0
test/asm.asm
Normal file
0
test/asm.asm
Normal file
0
test/bash.bash
Normal file
0
test/bash.bash
Normal file
0
test/boo.boo
Normal file
0
test/boo.boo
Normal file
164
test/cpp.cpp
Normal file
164
test/cpp.cpp
Normal file
@ -0,0 +1,164 @@
|
||||
/**
|
||||
* @author Edouard DUPIN
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license BSD v3 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_WIDGET_H__
|
||||
#define __EWOL_WIDGET_H__
|
||||
|
||||
#include <ewol/object/Object.h>
|
||||
#include <ewol/Dimension.h>
|
||||
'dfgd\'fg'
|
||||
'e' sdfsdf '\e'
|
||||
|
||||
"dqf\"gsdfg" // \\ \n "
|
||||
// TODO : sqdkfjsdldkqfj
|
||||
|
||||
|
||||
example_param
|
||||
|
||||
=_param
|
||||
|
||||
_
|
||||
_s
|
||||
_3RTDRsdfqsd
|
||||
|
||||
m_
|
||||
|
||||
m_d6
|
||||
|
||||
|
||||
namespace ewol {
|
||||
class Widget;
|
||||
namespace widget {
|
||||
class Manager;
|
||||
class Windows;
|
||||
};
|
||||
};
|
||||
#include <etk/types.h>
|
||||
#include <vector>
|
||||
#include <etk/math/Vector2D.h>
|
||||
#include <ewol/debug.h>
|
||||
#include <ewol/context/clipBoard.h>
|
||||
#include <ewol/key/key.h>
|
||||
#include <ewol/context/cursor.h>
|
||||
#include <ewol/event/Input.h>
|
||||
#include <ewol/event/Entry.h>
|
||||
#include <ewol/event/Time.h>
|
||||
|
||||
#define ULTIMATE_MAX_SIZE (99999999)
|
||||
|
||||
namespace ewol {
|
||||
#if 0
|
||||
/**
|
||||
* @not-in-doc
|
||||
*/
|
||||
#endif
|
||||
class DrawProperty{
|
||||
/*
|
||||
/--> m_windowsSize
|
||||
*--------------------------------------------------*
|
||||
| g |
|
||||
| |
|
||||
| m_size |
|
||||
| / |
|
||||
| o-------------------o |
|
||||
| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
| | | |
|
||||
| o-------------------o |
|
||||
| / |
|
||||
| m_origin |
|
||||
| |
|
||||
*--------------------------------------------------*
|
||||
/
|
||||
(0,0)
|
||||
*/
|
||||
public :
|
||||
ivec2 m_windowsSize; //!< Windows compleate size
|
||||
ivec2 m_origin; //!< Windows clipping upper widget (can not be <0)
|
||||
ivec2 m_size; //!< Windows clipping upper widget (can not be <0 and >m_windowsSize)
|
||||
void limit(const vec2& _origin, const vec2& _size);
|
||||
};
|
||||
std::ostream& operator <<(std::ostream& _os, const ewol::DrawProperty& _obj);
|
||||
/**
|
||||
* @brief Gravity of the widget property
|
||||
* @not-in-doc
|
||||
*/
|
||||
enum gravity {
|
||||
gravityCenter=0x00, //!< gravity is in certer
|
||||
gravityTopLeft=0x05,
|
||||
gravityTop=0x01,
|
||||
gravityTopRight=0x03,
|
||||
gravityRight=0x02,
|
||||
gravityButtomRight=0x06,
|
||||
gravityButtom=0x04,
|
||||
gravityButtomLeft=0x0C,
|
||||
gravityLeft=0x08,
|
||||
};
|
||||
std::ostream& operator <<(std::ostream& _os, const enum ewol::gravity _obj);
|
||||
std::string gravityToString(const enum ewol::gravity _obj);
|
||||
enum ewol::gravity stringToGravity(const std::string& _obj);
|
||||
/**
|
||||
* @not-in-doc
|
||||
*/
|
||||
class EventShortCut {
|
||||
public:
|
||||
bool broadcastEvent; //!< if it is true, then the message is sent to all the system
|
||||
const char* generateEventId; //!< Local generated event
|
||||
std::string eventData; //!< data link with the event
|
||||
ewol::key::Special specialKey; //!< special board key
|
||||
char32_t unicodeValue; //!< 0 if not used
|
||||
enum ewol::key::keyboard keyboardMoveValue; //!< ewol::EVENT_KB_MOVE_TYPE_NONE if not used
|
||||
EventShortCut(void) {
|
||||
broadcastEvent = false;
|
||||
generateEventId = NULL;
|
||||
eventData = "";
|
||||
unicodeValue = 0;
|
||||
keyboardMoveValue = ewol::key::keyboardUnknow;
|
||||
};
|
||||
~EventShortCut(void) { };
|
||||
};
|
||||
/**
|
||||
* @brief Widget class is the main widget interface, it hase some generic properties:
|
||||
* :** known his parent
|
||||
* :** Can be display at a special position with a special scale
|
||||
* :** Can get focus
|
||||
* :** Receive Event (keyboard / mouse / ...)
|
||||
*
|
||||
*/
|
||||
class Widget : public ewol::Object {
|
||||
public:
|
||||
// Config list of properties
|
||||
static const char* const configFill;
|
||||
static const char* const configExpand;
|
||||
static const char* const configHide;
|
||||
static const char* const configFocus;
|
||||
static const char* const configMinSize;
|
||||
static const char* const configMaxSize;
|
||||
static const char* const configGravity;
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor of the widget classes
|
||||
* @return (no execption generated (not managed in embended platform))
|
||||
*/
|
||||
Widget(void);
|
||||
/**
|
||||
* @brief Destructor of the widget classes
|
||||
*/
|
||||
virtual ~Widget(void) {
|
||||
vec2 plop = vec2(15.2, 56.6f);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#endif
|
0
test/html.html
Normal file
0
test/html.html
Normal file
0
test/in.in
Normal file
0
test/in.in
Normal file
0
test/java.java
Normal file
0
test/java.java
Normal file
0
test/lua.lua
Normal file
0
test/lua.lua
Normal file
0
test/matlab.m
Normal file
0
test/matlab.m
Normal file
62
test/php.php
Normal file
62
test/php.php
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
?>
|
44
test/python.py
Normal file
44
test/python.py
Normal file
@ -0,0 +1,44 @@
|
||||
#!/usr/bin/python
|
||||
import lutinModule as module
|
||||
import lutinTools as tools
|
||||
|
||||
def get_desc():
|
||||
return "gameplay : video game engine (based on bullet lib)"
|
||||
|
||||
"""
|
||||
multline comment
|
||||
"""
|
||||
'''
|
||||
multline comment
|
||||
'''
|
||||
|
||||
def create(target):
|
||||
myModule = module.Module(__file__, 'gameplay', 'LIBRARY')
|
||||
|
||||
# add the file to compile:
|
||||
myModule.add_src_file([
|
||||
'ege/debug.cpp',
|
||||
'ege/AudioElement.cpp',
|
||||
'ege/AudioEngine.cpp',
|
||||
'ege/Camera.cpp'
|
||||
])
|
||||
|
||||
# myModule.copy_folder('data/ParticuleMesh.*','')
|
||||
|
||||
# name of the dependency
|
||||
myModule.add_module_depend(['etk', 'ewol', 'bullet'])
|
||||
|
||||
myModule.compile_flags_CC([
|
||||
'-Wno-write-strings',
|
||||
'-Wall'])
|
||||
|
||||
myModule.add_export_path(tools.get_current_path(__file__))
|
||||
|
||||
|
||||
# add the currrent module at the
|
||||
return myModule
|
||||
|
||||
|
||||
|
||||
"""
|
||||
multline comment error ...
|
52
test/vertexShader.frag
Normal file
52
test/vertexShader.frag
Normal 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
12
test/xml.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?declaration attr="plop"?>
|
||||
<node>
|
||||
<node2 attribute="da\"ta string">
|
||||
<emptyNode/>
|
||||
<!-- comment -->
|
||||
direct data
|
||||
<!-- multiline comment
|
||||
<inCommentNode/>
|
||||
-->
|
||||
<![CDATA[ raw data ]]>
|
||||
</node2>
|
||||
<node>
|
Loading…
x
Reference in New Issue
Block a user