SOURCES: kdelibs-kate-syntax.patch (NEW) - update kate syntax files

arekm arekm at pld-linux.org
Mon Oct 22 19:08:05 CEST 2007


Author: arekm                        Date: Mon Oct 22 17:08:05 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- update kate syntax files

---- Files affected:
SOURCES:
   kdelibs-kate-syntax.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/kdelibs-kate-syntax.patch
diff -u /dev/null SOURCES/kdelibs-kate-syntax.patch:1.1
--- /dev/null	Mon Oct 22 19:08:05 2007
+++ SOURCES/kdelibs-kate-syntax.patch	Mon Oct 22 19:08:00 2007
@@ -0,0 +1,10388 @@
+diff -ur kdelibs-3.5.8/kate/data.org/actionscript.xml kdelibs-3.5.8/kate/data/actionscript.xml
+--- kdelibs-3.5.8/kate/data.org/actionscript.xml	2007-01-15 12:33:49.000000000 +0100
++++ kdelibs-3.5.8/kate/data/actionscript.xml	2006-10-30 18:00:03.000000000 +0100
+@@ -1,6 +1,6 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE language SYSTEM "language.dtd">
+-<language name="ActionScript 2.0" version="1.00" kateversion="2.4" section="Sources" extensions="*.as" mimetype="text/x-actionscript" license="LGPL" author="Aaron Miller (armantic101 at gmail.com)"> 
++<language name="ActionScript 2.0" version="1.0" kateversion="2.4" section="Sources" extensions="*.as" mimetype="text/x-actionscript" license="LGPL" author="Aaron Miller (armantic101 at gmail.com)"> 
+   <highlighting>
+     
+     <list name="properties">
+@@ -331,4 +331,4 @@
+     </comments>
+     <keywords casesensitive="1"/>
+   </general>
+-</language>
++</language>
+\ Brak znaku nowej linii na końcu pliku
+diff -ur kdelibs-3.5.8/kate/data.org/ada.xml kdelibs-3.5.8/kate/data/ada.xml
+--- kdelibs-3.5.8/kate/data.org/ada.xml	2006-07-22 10:16:36.000000000 +0200
++++ kdelibs-3.5.8/kate/data/ada.xml	2006-08-09 20:12:42.000000000 +0200
+@@ -1,6 +1,6 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE language SYSTEM "language.dtd">
+-<language name="Ada" version="1.06" kateversion="2.4" section="Sources" extensions="*.adb;*.ads;*.ada;*.a" mimetype="text/x-adasrc">
++<language name="Ada" version="1.07" kateversion="2.4" section="Sources" extensions="*.adb;*.ads;*.ada;*.a" mimetype="text/x-adasrc">
+   <highlighting>
+     <list name="keywords">
+       <item> abort </item>
+@@ -141,16 +141,18 @@
+     </list>
+     <contexts>
+       <context attribute="Normal Text" lineEndContext="#stay" name="Default">
+-        <RegExpr attribute="Keyword" context="#stay" String="if " insensitive="TRUE" beginRegion="Region1" firstNonSpace="true"/>
+-        <StringDetect attribute="Keyword" context="#stay" String="end if" insensitive="TRUE" endRegion="Region1"/>
+-        <RegExpr attribute="Keyword" context="#stay" String="\sloop\s+" insensitive="TRUE" beginRegion="Region3"/>
+-        <RegExpr attribute="Keyword" context="#stay" String="\sloop$" insensitive="TRUE" beginRegion="Region3"/>
+-        <StringDetect attribute="Keyword" context="#stay" String="end loop;" insensitive="TRUE" endRegion="Region3"/>
+-        <RegExpr attribute="Keyword" context="#stay" String="\sselect\s+" insensitive="TRUE" beginRegion="Region4"/>
+-        <RegExpr attribute="Keyword" context="#stay" String="\sselect$" insensitive="TRUE" beginRegion="Region4"/>
+-        <StringDetect attribute="Keyword" context="#stay" String="end select;" insensitive="TRUE" endRegion="Region4"/>
+-        <RegExpr attribute="Keyword" context="#stay" String="\b(begin|case|record)\b" insensitive="true" beginRegion="Region5"/>
+-        <RegExpr attribute="Keyword" context="#stay" String="\bend(?=((\{[^}]*(\}|$)|\(\*.*(\*\)|$))*)([.;\s]|$)|//|$)" insensitive="true" endRegion="Region5"/>
++        <RegExpr attribute="Keyword" context="#stay" String="\brecord\b"       insensitive="true" beginRegion="RecordRegion"/>
++        <RegExpr attribute="Keyword" context="#stay" String="\bend\s+record\b" insensitive="true"   endRegion="RecordRegion"/>
++        <RegExpr attribute="Keyword" context="#stay" String="\bcase\b"         insensitive="true" beginRegion="CaseRegion"/>
++        <RegExpr attribute="Keyword" context="#stay" String="\bend\s+case\b"   insensitive="true"   endRegion="CaseRegion"/>
++        <RegExpr attribute="Keyword" context="#stay" String="\bif\b"           insensitive="true" beginRegion="IfRegion"/>
++        <RegExpr attribute="Keyword" context="#stay" String="\bend\s+if\b"     insensitive="true"   endRegion="IfRegion"/>
++        <RegExpr attribute="Keyword" context="#stay" String="\bloop\b"         insensitive="true" beginRegion="LoopRegion"/>
++        <RegExpr attribute="Keyword" context="#stay" String="\bend\s+loop\b"   insensitive="true"   endRegion="LoopRegion"/>
++        <RegExpr attribute="Keyword" context="#stay" String="\bselect\b"       insensitive="true" beginRegion="SelectRegion"/>
++        <RegExpr attribute="Keyword" context="#stay" String="\bend\s+select\b" insensitive="true"   endRegion="SelectRegion"/>
++        <RegExpr attribute="Keyword" context="#stay" String="\bbegin\b"        insensitive="true" beginRegion="BeginRegion"/>
++        <RegExpr attribute="Keyword" context="#stay" String="\bend\b"          insensitive="true"   endRegion="BeginRegion"/>
+         <StringDetect attribute="Region Marker" context="Region Marker" String="--  BEGIN" beginRegion="RegionMarker" firstNonSpace="true" />
+         <StringDetect attribute="Region Marker" context="Region Marker" String="--  END" endRegion="RegionMarker" firstNonSpace="true" />
+         <keyword attribute="Keyword" context="#stay" String="keywords"/>
+diff -ur kdelibs-3.5.8/kate/data.org/alert.xml kdelibs-3.5.8/kate/data/alert.xml
+--- kdelibs-3.5.8/kate/data.org/alert.xml	2005-10-10 17:05:27.000000000 +0200
++++ kdelibs-3.5.8/kate/data/alert.xml	2007-04-23 18:00:04.000000000 +0200
+@@ -19,14 +19,14 @@
+  *                                                                    *
+  * You should have received a copy of the GNU Library General Public  *
+  * License along with this library; if not, write to the              *
+- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,       *
++ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,   *
+  * Boston, MA  02110-1301, USA.                                       *
+  **********************************************************************
+ 
+  This file is included in every file that highlights the "alerts" keywords.
+  That's why extensions and mimetype are empty.
+ -->
+-<language version="1.06" kateversion="2.3" name="Alerts" section="Other" extensions="" mimetype="" author="Dominik Haumann (dhdev at gmx.de)" license="LGPL" hidden="true">
++<language version="1.07" kateversion="2.3" name="Alerts" section="Other" extensions="" mimetype="" author="Dominik Haumann (dhdev at gmx.de)" license="LGPL" hidden="true">
+   <highlighting>
+     <list name="alerts">
+       <item> FIXME </item>
+@@ -35,6 +35,8 @@
+       <item> NOTICE </item>
+       <item> TASK </item>
+       <item> TODO </item>
++      <item> DEPRECATED </item>
++      <item> WARNING </item>
+       <item> ### </item>
+     </list>
+     <contexts>
+diff -ur kdelibs-3.5.8/kate/data.org/asm-avr.xml kdelibs-3.5.8/kate/data/asm-avr.xml
+--- kdelibs-3.5.8/kate/data.org/asm-avr.xml	2005-10-10 17:05:27.000000000 +0200
++++ kdelibs-3.5.8/kate/data/asm-avr.xml	2007-05-20 13:27:57.000000000 +0200
+@@ -33,7 +33,7 @@
+ 
+ -->
+ 
+-<language name="AVR Assembler" version="1.03" kateversion="2.4" section="Assembler" extensions="*.asm;*.ASM;*.asm-avr" mimetype="text/x-asm;text/x-asm-avr" author="Roland Nagy" license="GPL">
++<language name="AVR Assembler" version="1.04" kateversion="2.4" section="Assembler" extensions="*.asm;*.ASM;*.asm-avr" mimetype="text/x-asm;text/x-asm-avr" author="Roland Nagy" license="GPL">
+   <highlighting>
+     <list name="keywords">
+       <item> adc</item>
+@@ -46,6 +46,8 @@
+       <item> bld</item>
+       <item> brbc</item>
+       <item> brbs</item>
++      <item> brcc</item>
++      <item> brcs</item>
+       <item> break</item>
+       <item> breq</item>
+       <item> brge</item>
+@@ -96,6 +98,7 @@
+       <item> inc</item>
+       <item> jmp</item>
+       <item> ld</item>
++      <item> ldd</item>
+       <item> ldi</item>
+       <item> lds</item>
+       <item> lpm</item>
+@@ -140,6 +143,7 @@
+       <item> sleep</item>
+       <item> spm</item>
+       <item> st</item>
++      <item> std</item>
+       <item> sts</item>
+       <item> sub</item>
+       <item> subi</item>
+diff -ur kdelibs-3.5.8/kate/data.org/bash.xml kdelibs-3.5.8/kate/data/bash.xml
+--- kdelibs-3.5.8/kate/data.org/bash.xml	2007-01-15 12:33:49.000000000 +0100
++++ kdelibs-3.5.8/kate/data/bash.xml	2007-10-13 00:00:20.000000000 +0200
+@@ -1,15 +1,18 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE language SYSTEM "language.dtd"
+ [
+-	<!ENTITY funcname "[A-Za-z_:][A-Za-z0-9_:#&#37;@-]*">
+-	<!ENTITY varname  "[A-Za-z_][A-Za-z0-9_]*">
+-	<!ENTITY word     "[^|&amp;;()&lt;&gt;\s]+">	<!-- see man bash -->
+-	<!ENTITY eos      "(?=($|\s))">			<!-- eol or space following -->
+-	<!ENTITY noword   "(?![\w$+-])">		<!-- no word, $, + or - following -->
++        <!ENTITY funcname "[A-Za-z_:][A-Za-z0-9_:#&#37;@-]*">
++        <!ENTITY varname  "[A-Za-z_][A-Za-z0-9_]*">
++        <!ENTITY word     "[^|&amp;;()&lt;&gt;\s]+">    <!-- see man bash -->
++        <!ENTITY eos      "(?=($|\s))">                 <!-- eol or space following -->
++        <!ENTITY noword   "(?![\w$+-])">                <!-- no word, $, + or - following -->
++        <!ENTITY pathpart "([\w_ at .&#37;*?+-]|\\ )">     <!-- valid character in a file name -->
+ ]>
+-<language name="Bash" version="2.06" kateversion="2.4" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert at kde.nl)" license="LGPL">
++<language name="Bash" version="2.10" kateversion="2.4" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;.bashrc;.bash_profile;.bash_login;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert at kde.nl)" license="LGPL">
+ 
+-<!-- (c) 2004 by Wilbert Berendsen, wilbert at kde.nl
++<!-- (c) 2004 by Wilbert Berendsen (wilbert at kde.nl)
++    Changes by Matthew Woehlke (mw_triad at users.sourceforge.net)
++    Changes by Sebastian Pipping (webmaster at hartwork.org)
+     Released under the LGPL, part of kdelibs/kate -->
+ 
+   <highlighting>
+@@ -21,7 +24,6 @@
+       <item> select </item>
+       <item> until </item>
+       <item> while </item>
+-      <item> . </item>
+       <item> elif </item>
+       <item> then </item>
+       <item> set </item>
+@@ -29,7 +31,6 @@
+ 
+     <list name="builtins">
+       <item> : </item>
+-      <item> . </item>
+       <item> source </item>
+       <item> alias </item>
+       <item> bg </item>
+@@ -37,6 +38,7 @@
+       <item> break </item>
+       <item> builtin </item>
+       <item> cd </item>
++      <item> caller </item>
+       <item> command </item>
+       <item> compgen </item>
+       <item> complete </item>
+@@ -68,6 +70,7 @@
+       <item> shopt </item>
+       <item> suspend </item>
+       <item> test </item>
++      <item> time </item>
+       <item> times </item>
+       <item> trap </item>
+       <item> type </item>
+@@ -76,7 +79,7 @@
+       <item> unalias </item>
+       <item> wait </item>
+     </list>
+-    
++
+     <list name="builtins_var">
+       <item> export </item>
+       <item> unset </item>
+@@ -86,7 +89,7 @@
+       <item> read </item>
+       <item> readonly </item>
+     </list>
+-    
++
+     <list name="unixcommands">
+       <!-- /bin -->
+       <item> arch </item>
+@@ -132,6 +135,7 @@
+       <item> getkeycodes </item>
+       <item> gocr </item>
+       <item> grep </item>
++      <item> groff </item>
+       <item> groups </item>
+       <item> gunzip </item>
+       <item> gzexe </item>
+@@ -165,6 +169,7 @@
+       <item> nano </item>
+       <item> netstat </item>
+       <item> nisdomainname </item>
++      <item> nroff </item>
+       <item> openvt </item>
+       <item> pgawk </item>
+       <item> pidof </item>
+@@ -198,6 +203,7 @@
+       <item> tar </item>
+       <item> tempfile </item>
+       <item> touch </item>
++      <item> troff </item>
+       <item> true </item>
+       <item> umount </item>
+       <item> uname </item>
+@@ -414,7 +420,7 @@
+       <item> yes </item>
+       <item> zip </item>
+       <item> zsoelim </item>
+-      
++
+       <!-- others -->
+       <item> dcop </item>
+       <item> kdialog </item>
+@@ -424,317 +430,366 @@
+       <item> xset </item>
+     </list>
+ 
+-            
++
+     <contexts>
+       <context attribute="Normal Text" lineEndContext="#stay" name="Start">
+-      	<IncludeRules context="FindAll" />
++        <IncludeRules context="FindAll" />
+       </context>
+ 
+ <!-- ====== The following rulessets are meant to be included ======== -->
+       <!-- FindAll tries to interpret everything -->
+       <context attribute="Normal Text" lineEndContext="#stay" name="FindAll">
+-      	<IncludeRules context="FindComments" />
+-      	<IncludeRules context="FindCommands" />
+-	<IncludeRules context="FindStrings" />
+-	<IncludeRules context="FindSubstitutions" />      
+-	<IncludeRules context="FindOthers" />
++        <IncludeRules context="FindComments" />
++        <IncludeRules context="FindCommands" />
++        <IncludeRules context="FindStrings" />
++        <IncludeRules context="FindSubstitutions" />
++        <IncludeRules context="FindOthers" />
+       </context>
+-      
++
+       <!-- FindMost tries to interpret anything except commands -->
+       <context attribute="Normal Text" lineEndContext="#stay" name="FindMost">
+-      	<IncludeRules context="FindComments" />
+-	<IncludeRules context="FindStrings" />
+-	<IncludeRules context="FindSubstitutions" />      
+-	<IncludeRules context="FindOthers" />
++        <IncludeRules context="FindComments" />
++        <IncludeRules context="FindStrings" />
++        <IncludeRules context="FindSubstitutions" />
++        <IncludeRules context="FindOthers" />
+       </context>
+ 
+ 
+       <!-- FindComments consumes shell comments till EOL -->
+       <context attribute="Normal Text" lineEndContext="#pop" name="FindComments">
+-      	<DetectChar attribute="Comment" context="Comment" char="#" firstNonSpace="true"/>
+-	<RegExpr attribute="Normal Text" context="Comment" String="[\s;](?=#)" />
++        <DetectChar attribute="Comment" context="Comment" char="#" firstNonSpace="true"/>
++        <RegExpr attribute="Normal Text" context="Comment" String="[\s;](?=#)" />
+       </context>
+       <context attribute="Comment" lineEndContext="#pop" name="Comment">
+-	<IncludeRules context="##Alerts" />
++        <IncludeRules context="##Alerts" />
+       </context>
+-      
++
+       <!-- FindCommentsParen consumes shell comments till EOL or a closing parenthese -->
+       <context attribute="Normal Text" lineEndContext="#pop" name="FindCommentsParen">
+-      	<DetectChar attribute="Comment" context="CommentParen" char="#" firstNonSpace="true"/>
+-	<RegExpr attribute="Normal Text" context="CommentParen" String="[\s;](?=#)" />
++        <DetectChar attribute="Comment" context="CommentParen" char="#" firstNonSpace="true"/>
++        <RegExpr attribute="Normal Text" context="CommentParen" String="[\s;](?=#)" />
+       </context>
+       <context attribute="Comment" lineEndContext="#pop" name="CommentParen">
+-      	<RegExpr attribute="Comment" context="#pop" String="[^)](?=\))" />
+-	<IncludeRules context="##Alerts" />
++        <RegExpr attribute="Comment" context="#pop" String="[^)](?=\))" />
++        <IncludeRules context="##Alerts" />
+       </context>
+-      
++
+       <!-- FindCommentsBackq consumes shell comments till EOL or a backquote -->
+       <context attribute="Normal Text" lineEndContext="#pop" name="FindCommentsBackq">
+-      	<DetectChar attribute="Comment" context="CommentBackq" char="#" firstNonSpace="true"/>
+-	<RegExpr attribute="Normal Text" context="CommentBackq" String="[\s;](?=#)" />
++        <DetectChar attribute="Comment" context="CommentBackq" char="#" firstNonSpace="true"/>
++        <RegExpr attribute="Normal Text" context="CommentBackq" String="[\s;](?=#)" />
+       </context>
+       <context attribute="Comment" lineEndContext="#pop" name="CommentBackq">
+-      	<RegExpr attribute="Comment" context="#pop" String="[^`](?=`)" />
+-	<IncludeRules context="##Alerts" />
++        <RegExpr attribute="Comment" context="#pop" String="[^`](?=`)" />
++        <IncludeRules context="##Alerts" />
+       </context>
+-      
+-      
++
++
+       <!-- FindCommands matches many items that can be expected outside strings, substitutions etc. -->
+       <context attribute="Normal Text" lineEndContext="#stay" name="FindCommands">
+-      	<!-- start expression in double parentheses -->
+-      	<Detect2Chars attribute="Keyword" context="ExprDblParen" char="(" char1="(" beginRegion="expression" />
+-	<!-- start expression in double brackets -->
+-	<RegExpr attribute="Keyword" context="ExprDblBracket" String="\[\[&eos;" beginRegion="expression" column="0"/>
+-	<RegExpr attribute="Keyword" context="ExprDblBracket" String="\s\[\[&eos;" beginRegion="expression" />
+-	<!-- start expression in single brackets -->
+-	<RegExpr attribute="Builtin" context="ExprBracket" String="\[&eos;" beginRegion="expression" column="0"/>
+-	<RegExpr attribute="Builtin" context="ExprBracket" String="\s\[&eos;" beginRegion="expression" />
+-	<!-- start a group command with { -->
+-	<RegExpr attribute="Keyword" context="Group" String="\{&eos;" beginRegion="group" />
+-      	<!-- start a subshell -->
+-	<DetectChar attribute="Keyword" context="SubShell" char="(" beginRegion="subshell" />
+-	<!-- match do and if blocks -->
+-	<RegExpr attribute="Keyword" context="#stay" String="\bdo&noword;" beginRegion="do" />
+-      	<RegExpr attribute="Keyword" context="#stay" String="\bdone&noword;" endRegion="do" />
+-      	<RegExpr attribute="Keyword" context="#stay" String="\bif&noword;" beginRegion="if" />
+-      	<RegExpr attribute="Keyword" context="#stay" String="\bfi&noword;" endRegion="if" />
+-      	<!-- handle case as a special case -->
+-	<RegExpr attribute="Keyword" context="Case" String="\bcase&noword;" beginRegion="case" />
+-	<!-- handle command line options -->
+-	<RegExpr attribute="Option" context="#stay" String="-[A-Za-z0-9]+" />
+-	<RegExpr attribute="Option" context="#stay" String="--[a-z][A-Za-z0-9_-]*" />
+-	<!-- handle variable assignments -->
+-	<RegExpr attribute="Variable" context="Assign" String="\b&varname;\+?=" />
+-	<RegExpr attribute="Variable" context="AssignSubscr" String="\b&varname;(?=\[[^]]+\]=)" />
+-	<!-- handle functions with function keyword before keywords -->
+-	<StringDetect attribute="Function" context="#stay" String=":()" />
+-	<RegExpr attribute="Keyword" context="FunctionDef" String="\bfunction\b" />
+-	<!-- handle keywords -->
+-	<keyword attribute="Keyword" context="#stay" String="keywords" />
+-	<keyword attribute="Builtin" context="#stay" String="builtins" />
++        <!-- start expression in double parentheses -->
++        <Detect2Chars attribute="Keyword" context="ExprDblParen" char="(" char1="(" beginRegion="expression" />
++        <!-- start expression in double brackets -->
++        <RegExpr attribute="Keyword" context="ExprDblBracket" String="\[\[&eos;" beginRegion="expression" column="0"/>
++        <RegExpr attribute="Keyword" context="ExprDblBracket" String="\s\[\[&eos;" beginRegion="expression" />
++        <!-- start expression in single brackets -->
++        <RegExpr attribute="Builtin" context="ExprBracket" String="\[&eos;" beginRegion="expression" column="0"/>
++        <RegExpr attribute="Builtin" context="ExprBracket" String="\s\[&eos;" beginRegion="expression" />
++        <!-- start a group command with { -->
++        <RegExpr attribute="Keyword" context="Group" String="\{&eos;" beginRegion="group" />
++        <!-- start a subshell -->
++        <DetectChar attribute="Keyword" context="SubShell" char="(" beginRegion="subshell" />
++        <!-- match do and if blocks -->
++        <RegExpr attribute="Keyword" context="#stay" String="\bdo&noword;" beginRegion="do" />
++        <RegExpr attribute="Keyword" context="#stay" String="\bdone&noword;" endRegion="do" />
++        <RegExpr attribute="Keyword" context="#stay" String="\bif&noword;" beginRegion="if" />
++        <RegExpr attribute="Keyword" context="#stay" String="\bfi&noword;" endRegion="if" />
++        <!-- handle case as a special case -->
++        <RegExpr attribute="Keyword" context="Case" String="\bcase&noword;" beginRegion="case" />
++        <!-- handle command line options -->
++        <RegExpr attribute="Option" context="#stay" String="-[A-Za-z0-9][A-Za-z0-9_]*" />
++        <RegExpr attribute="Option" context="#stay" String="--[a-z][A-Za-z0-9_-]*" />
++        <!-- handle variable assignments -->
++        <RegExpr attribute="Variable" context="Assign" String="\b&varname;\+?=" />
++        <RegExpr attribute="Variable" context="AssignSubscr" String="\b&varname;(?=\[.+\]\+?=)" />
++        <!-- handle functions with function keyword before keywords -->
++        <StringDetect attribute="Function" context="#stay" String=":()" />
++        <RegExpr attribute="Keyword" context="FunctionDef" String="\bfunction\b" />
++        <!-- handle keywords -->
++        <keyword attribute="Keyword" context="#stay" String="keywords" />
++        <RegExpr attribute="Builtin" context="#stay" String="\.(?=\s)" />
++        <keyword attribute="Builtin" context="#stay" String="builtins" />
+         <keyword attribute="Command" context="#stay" String="unixcommands" />
+-	<!-- handle commands that have variable names as argument -->
+-	<keyword attribute="Builtin" context="VarName" String="builtins_var" />
++        <!-- handle commands that have variable names as argument -->
++        <keyword attribute="Builtin" context="VarName" String="builtins_var" />
+         <!-- handle here-string -->
+-	<StringDetect attribute="Redirection" context="#stay" String="&lt;&lt;&lt;" />
+-	<!-- handle here document -->
+-	<StringDetect attribute="Redirection" context="HereDoc" String="&lt;&lt;" lookAhead="true" />
++        <RegExpr attribute="Redirection" context="#stay" String="\d*&lt;&lt;&lt;" />
++        <!-- handle here document -->
++        <StringDetect attribute="Redirection" context="HereDoc" String="&lt;&lt;" lookAhead="true" />
+         <!-- handle process subst -->
+         <RegExpr attribute="Redirection" context="ProcessSubst" String="[&lt;&gt;]\(" />
+         <!-- handle redirection -->
+         <RegExpr attribute="Redirection" context="#stay" String="([0-9]*(&gt;{1,2}|&lt;)(&amp;[0-9]+-?)?|&amp;&gt;|&gt;&amp;|[0-9]*&lt;&gt;)" />
+-	<!-- handle &, &&, | and || -->
+-	<RegExpr attribute="Control" context="#stay" String="([|&amp;])\1?" />
+-	<!-- mark function definitions without function keyword -->
++        <!-- handle &, &&, | and || -->
++        <RegExpr attribute="Control" context="#stay" String="([|&amp;])\1?" />
++        <!-- mark function definitions without function keyword -->
+         <RegExpr attribute="Function" context="#stay" String="&funcname;\s*\(\)" />
+       </context>
+ 
+       <!-- FindOthers contains various rules to mark different shell input -->
+       <context attribute="Normal Text" lineEndContext="#stay" name="FindOthers">
+-	<RegExpr attribute="Escape" context="#stay" String="\\[][;&quot;\\'$`{}()|&amp;&lt;&gt;* ]" />
+-	<RegExpr attribute="Keyword" context="#stay" String="\\$" />
+-	<RegExpr attribute="Escape" context="#stay" String="\{(?!(\s|$))\S*\}" />
+-        <RegExpr attribute="Path" context="#stay" String="\.?/[\w_ at .+-]+(?=([\s/):]|$))" />
+-	<!-- TODO: shell globs -->
++        <RegExpr attribute="Escape" context="#stay" String="\\[][;\\$`{}()|&amp;&lt;&gt;* ]" />
++        <RegExpr attribute="Keyword" context="#stay" String="\\$" />
++        <RegExpr attribute="Escape" context="#stay" String="\{(?!(\s|$))\S*\}" />
++        <RegExpr attribute="Path" context="#stay" String="&pathpart;*(?=/)" />
++        <RegExpr attribute="Path" context="#stay" String="~\w*" />
++        <RegExpr attribute="Path" context="#stay" String="/&pathpart;*(?=([\s/):;$`'&quot;]|$))" />
++        <!-- TODO: shell globs beside * and ? (in Path's) -->
+       </context>
+-      
++
+       <!-- FindStrings looks for single and double quoted strings, also with $-prefix -->
+       <context attribute="Normal Text" lineEndContext="#stay" name="FindStrings">
+-	<DetectChar attribute="String SingleQ" context="StringSQ" char="'" />
+-	<DetectChar attribute="String DoubleQ" context="StringDQ" char="&quot;" />
+-	<Detect2Chars attribute="String SingleQ" context="StringEsc" char="$" char1="'" />
+-	<Detect2Chars attribute="String Transl." context="StringDQ" char="$" char1="&quot;" />
++        <Detect2Chars attribute="Escape" context="#stay" char="\\" char1="'" />
++        <Detect2Chars attribute="Escape" context="#stay" char="\\" char1="&quot;" />
++        <DetectChar attribute="String SingleQ" context="StringSQ" char="'" />
++        <DetectChar attribute="String DoubleQ" context="StringDQ" char="&quot;" />
++        <Detect2Chars attribute="String SingleQ" context="StringEsc" char="$" char1="'" />
++        <Detect2Chars attribute="String Transl." context="StringDQ" char="$" char1="&quot;" />
+       </context>
+-            
++
+       <!-- FindSubstitutions goes after anything starting with $ and ` and their escapes -->
+       <context attribute="Normal Text" lineEndContext="#stay" name="FindSubstitutions">
+-	<RegExpr attribute="Variable" context="#stay" String="\$[*@#?$!_0-9-]" />
+-	<RegExpr attribute="Variable" context="Subscript" String="\$&varname;\[" />
+-	<RegExpr attribute="Variable" context="#stay" String="\$&varname;" />
+-	<RegExpr attribute="Variable" context="#stay" String="\$\{[*@#?$!_0-9-]\}" />
+-	<RegExpr attribute="Variable" context="#stay" String="\$\{#&varname;\}" />
+-	<RegExpr attribute="Variable" context="#stay" String="\$\{!&varname;\*?\}" />
+-	<RegExpr attribute="Variable" context="VarBrace" String="\$\{&varname;" />
+-	<RegExpr attribute="Variable" context="VarBrace" String="\$\{[*@#?$!_0-9-](?=[:#%/])" />
+-	<StringDetect attribute="Variable" context="ExprDblParenSubst" String="$((" beginRegion="expression" />
+-	<StringDetect attribute="Redirection" context="SubstFile" String="$(&lt;" />
++        <RegExpr attribute="Variable" context="Subscript" String="\$&varname;\[" />
++        <RegExpr attribute="Variable" context="#stay" String="\$&varname;" />
++        <RegExpr attribute="Variable" context="#stay" String="\$[*@#?$!_0-9-]" />
++        <RegExpr attribute="Variable" context="#stay" String="\$\{[*@#?$!_0-9-]\}" />
++        <RegExpr attribute="Variable" context="#stay" String="\$\{#&varname;(\[[*@]\])?\}" />
++        <RegExpr attribute="Variable" context="#stay" String="\$\{!&varname;(\[[*@]\]|[*@])?\}" />
++        <RegExpr attribute="Variable" context="VarBrace" String="\$\{&varname;" />
++        <RegExpr attribute="Variable" context="VarBrace" String="\$\{[*@#?$!_0-9-](?=[:#%/=?+-])" />
++        <StringDetect attribute="Variable" context="ExprDblParenSubst" String="$((" beginRegion="expression" />
++        <StringDetect attribute="Redirection" context="SubstFile" String="$(&lt;" />
+         <StringDetect attribute="Variable" context="SubstCommand" String="$(" />
+-	<DetectChar attribute="Backquote" context="SubstBackq" char="`" />
+-	<RegExpr attribute="Escape" context="#stay" String="\\[`$\\]" />
++        <DetectChar attribute="Backquote" context="SubstBackq" char="`" />
++        <RegExpr attribute="Escape" context="#stay" String="\\[`$\\]" />
++      </context>
++
++      <!-- FindTests finds operators valid in tests -->
++      <context attribute="Normal Text" lineEndContext="#stay" name="FindTests">
++        <RegExpr attribute="Expression" context="#stay" String="-[abcdefghkprstuwxOGLSNozn](?=\s)"/>
++        <RegExpr attribute="Expression" context="#stay" String="-([no]t|ef)(?=\s)"/>
++        <RegExpr attribute="Expression" context="#stay" String="([!=]=?|[&gt;&lt;])(?=\s)"/>
++        <RegExpr attribute="Expression" context="#stay" String="-(eq|ne|[gl][te])(?=\s)"/>
+       </context>
+ 
+-      
+-      
+ 
+-      
+ <!-- ====== These are the contexts that can be branched to ======= -->
+ 
+       <!-- ExprDblParen consumes an expression started in command mode till )) -->
+       <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblParen">
+-      	<Detect2Chars attribute="Keyword" context="#pop" char=")" char1=")" endRegion="expression" />
+-	<DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
+-	<IncludeRules context="FindMost" />
++        <Detect2Chars attribute="Keyword" context="#pop" char=")" char1=")" endRegion="expression" />
++        <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
++        <IncludeRules context="FindMost" />
+       </context>
+-      
++
+       <!-- ExprDblParenSubst like ExprDblParen but matches )) as Variable -->
+       <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblParenSubst">
+-      	<Detect2Chars attribute="Variable" context="#pop" char=")" char1=")" endRegion="expression" />
+-	<DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
+-	<IncludeRules context="FindMost" />
++        <Detect2Chars attribute="Variable" context="#pop" char=")" char1=")" endRegion="expression" />
++        <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
++        <IncludeRules context="FindMost" />
+       </context>
+ 
+       <!-- ExprSubParen consumes an expression till ) -->
+       <context attribute="Normal Text" lineEndContext="#stay" name="ExprSubParen">
+-      	<DetectChar attribute="Normal Text" context="#pop" char=")" />
+-	<DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
+-	<IncludeRules context="FindMost" />
++        <DetectChar attribute="Normal Text" context="#pop" char=")" />
++        <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
++        <IncludeRules context="FindMost" />
+       </context>
+ 
+       <!-- ExprBracket consumes an expression till ] -->
+       <context attribute="Normal Text" lineEndContext="#stay" name="ExprBracket">
+-      	<RegExpr attribute="Builtin" context="#pop" String="\s\](?=($|[\s;|&amp;]))" endRegion="expression" />
+-      	<RegExpr attribute="Builtin" context="#pop" String="\](?=($|[\s;|&amp;]))" endRegion="expression" column="0"/>
+-	<DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
+-	<IncludeRules context="FindMost" />
++        <RegExpr attribute="Builtin" context="#pop" String="\s\](?=($|[\s;|&amp;]))" endRegion="expression" />
++        <RegExpr attribute="Builtin" context="#pop" String="\](?=($|[\s;|&amp;]))" endRegion="expression" column="0"/>
++        <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
++        <IncludeRules context="FindTests" />
++        <IncludeRules context="FindMost" />
+       </context>
+ 
+       <!-- ExprDblBracket consumes an expression till ]] -->
+       <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracket">
+-      	<RegExpr attribute="Keyword" context="#pop" String="\s\]\](?=($|[\s;|&amp;]))" endRegion="expression" />
+-      	<RegExpr attribute="Keyword" context="#pop" String="\]\](?=($|[\s;|&amp;]))" endRegion="expression" column="0"/>
+-	<DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
+-	<IncludeRules context="FindMost" />
++        <RegExpr attribute="Keyword" context="#pop" String="\s\]\](?=($|[\s;|&amp;]))" endRegion="expression" />
++        <RegExpr attribute="Keyword" context="#pop" String="\]\](?=($|[\s;|&amp;]))" endRegion="expression" column="0"/>
++        <DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
++        <IncludeRules context="FindTests" />
++        <IncludeRules context="FindMost" />
+       </context>
+ 
+       <!-- Group consumes shell input till } -->
+       <context attribute="Normal Text" lineEndContext="#stay" name="Group">
+-	<DetectChar attribute="Keyword" context="#pop" char="}" endRegion="group" />
+-      	<IncludeRules context="FindAll" />
+-      </context>      
++        <DetectChar attribute="Keyword" context="#pop" char="}" endRegion="group" />
++        <IncludeRules context="FindAll" />
++      </context>
+ 
+       <!-- SubShell consumes shell input till ) -->
+       <context attribute="Normal Text" lineEndContext="#stay" name="SubShell">
+-	<DetectChar attribute="Keyword" context="#pop" char=")" endRegion="subshell" />
+-      	<IncludeRules context="FindAll" />
+-      </context>      
++        <DetectChar attribute="Keyword" context="#pop" char=")" endRegion="subshell" />
++        <IncludeRules context="FindAll" />
++      </context>
+ 
+       <!-- Assign consumes an expression till EOL or whitespace -->
+       <context attribute="Normal Text" lineEndContext="#pop" name="Assign" fallthrough="true" fallthroughContext="#pop">
+-      	<DetectChar attribute="Variable" context="AssignArray" char="(" />
+-	<IncludeRules context="FindStrings" />
+-	<IncludeRules context="FindSubstitutions" />      
+-	<IncludeRules context="FindOthers" />
+-	<RegExpr attribute="Normal Text" context="#stay" String="[\w:,+_./-]+" />
++        <DetectChar attribute="Variable" context="AssignArray" char="(" />
++        <IncludeRules context="FindStrings" />
++        <IncludeRules context="FindSubstitutions" />
++        <IncludeRules context="FindOthers" />
++        <RegExpr attribute="Normal Text" context="#stay" String="[\w:,+_./-]" />
+       </context>
+ 
+       <!-- AssignArray consumes everything till ), marking assignments -->
+       <context attribute="Normal Text" lineEndContext="#pop" name="AssignArray">
+-      	<DetectChar attribute="Variable" context="#pop" char=")" />
+-	<DetectChar attribute="Variable" context="Subscript" char="[" />
+-	<DetectChar attribute="Variable" context="Assign" char="=" />
+-	<IncludeRules context="FindMost" />
++        <DetectChar attribute="Variable" context="#pop" char=")" />
++        <DetectChar attribute="Variable" context="Subscript" char="[" />
++        <DetectChar attribute="Variable" context="Assign" char="=" />
++        <IncludeRules context="FindMost" />
+       </context>
+-      
++
+       <!-- AssignSubscr first expects a [ then parses subscript and continues with '=value' -->
+       <context attribute="Normal Text" lineEndContext="#pop" name="AssignSubscr" fallthrough="true" fallthroughContext="#pop">
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list