[rkward-cvs] rkward/rkward r.xml,1.4,1.5

Thomas Friedrichsmeier tfry at users.sourceforge.net
Wed Aug 2 16:38:51 UTC 2006


Update of /cvsroot/rkward/rkward/rkward
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1574

Modified Files:
	r.xml 
Log Message:
Merged syntax highlighting definition with version by Arne Henningsen and Ben Goodrich.
Major improvements (many more small things):
* Detection of named parameter assignments in function calls
* Different highlighting for assignment operators
* Support for code folding

Index: r.xml
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/r.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** r.xml	14 Apr 2006 15:52:54 -0000	1.4
--- r.xml	2 Aug 2006 16:38:49 -0000	1.5
***************
*** 1,75 ****
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE language SYSTEM "language.dtd">
!   <!-- Kate 2.0 (KDE 3.0) highlighting module for R
         based on an earlier version by E.L. Willighagen.
!        version 0.3: (c) 2004, 2006 Thomas Friedrichsmeier and the RKWard Team, GPL v2 license
! 
!        Kate   : http://www.kde.org/kate
         R      : http://www.r-project.org/
         RKWard : http://rkward.sourceforge.net/
      -->
! <language version="1.05" kateversion="2.1" name="R Script" section="Scripts" extensions="*.R" mimetype="" author="RKWard Team" license="GPL">
!   <highlighting>
!     <list name="controls">
!       <item> for </item>
!       <item> in </item>
!       <item> next </item>
!       <item> break </item>
!       <item> while </item>
!       <item> repeat </item>
!       <item> if </item>
!       <item> else </item>
!       <item> switch </item>
!       <item> function </item>
!     </list>
!     <list name="words">
!       <item> TRUE </item>
!       <item> FALSE </item>
!       <item> NULL </item>
!       <item> NA </item>
!       <item> Inf </item>
!       <item> NaN </item>
!     </list>
!     
!     <contexts>
!        <context attribute="Normal Text" lineEndContext="#stay" name="ctx0">
!          <keyword attribute="Control Structure" context="#stay" String="controls"/>
!          <keyword attribute="Reserved Words" context="#stay" String="words"/>
!          <DetectChar attribute="String" context="ctx1" char="""/>
!          <RegExpr attribute="Keyword" context="#stay" String="[a-zA-Z_]+[a-zA-Z_\.0-9]* *(?=[\s]*[(])"/>
!          <RegExpr attribute="Keyword" context="#stay" String="\.[a-zA-Z_\.]+[a-zA-Z_\.0-9]* *(?=[\s]*[(])"/>
!          <Float attribute="Float" context="#stay"/>
!          <Int attribute="Int" context="#stay"/>
!          <RegExpr attribute="Comment" context="#stay" String="#.*$"/>
!          <AnyChar attribute="Operators" context="#stay" String="+-*/^:$~!&|=><@"/>
!          <RegExpr attribute="Operators" context="#stay" String="%[a-zA-Z_]*%"/>
!        </context>
!    
!        <context attribute="String" lineEndContext="#stay" name="ctx1">
!          <DetectChar attribute="String" context="#pop" char="""/>
!          <HlCStringChar attribute="String Char" context="#stay"/>
!        </context>
!    
!     </contexts>
!     
!     <itemDatas>
!       <itemData name="Normal Text" defStyleNum="dsNormal"/>
!       <itemData name="Keyword" defStyleNum="dsKeyword" italic="1"/>
!       <itemData name="String" defStyleNum="dsString"/>
!       <itemData name="Comment" defStyleNum="dsComment"/>
!       <itemData name="Control Structure" defStyleNum="dsNormal" color="#0000ff" selColor="#00ff00"/>
!       <itemData name="Reserved Words" defStyleNum="dsOthers"/>
!       <itemData name="Operators" defStyleNum="dsNormal" color="#aa5500" selColor="#000077"/>
!       <itemData name="String Char"  defStyleNum="dsChar"/>
!       <itemData name="Float" defStyleNum="dsFloat"/>
!       <itemData name="Int" defStyleNum="dsDecVal"/>
!     </itemDatas>
!   </highlighting>
!   
!   <general>
!     <comments>
!       <comment name="singleLine" start="#" end=""/>
!     </comments>
!     <keywords casesensitive="1" />
!   </general>
  </language>
--- 1,119 ----
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE language SYSTEM "language.dtd">
!   <!-- Kate 2.5 (KDE 3.5) highlighting module for R
         based on an earlier version by E.L. Willighagen.
!        version 0.4: (c) 2006 Thomas Friedrichsmeier, Arne Henningsen, and the RKWard Team
!        license: GPL v2
!        Kate   : http://kate.kde.org/
         R      : http://www.r-project.org/
         RKWard : http://rkward.sourceforge.net/
      -->
! <language version="2.0" kateversion="2.5" name="R Script" section="Scripts"
!    extensions="*.R;*.r;*.S;*.s;*.q" mimetype="" license="GPL">
!    <highlighting>
! 
!       <list name="controls">
!          <item> for </item>
!          <item> in </item>
!          <item> next </item>
!          <item> break </item>
!          <item> while </item>
!          <item> repeat </item>
!          <item> if </item>
!          <item> else </item>
!          <item> switch </item>
!          <item> function </item>
!       </list>
!       <list name="words">
!          <item> TRUE </item>
!          <item> FALSE </item>
!          <item> NULL </item>
!          <item> NA </item>
!          <item> Inf </item>
!          <item> NaN </item>
!       </list>
! 
!       <contexts>
!          <context attribute="Normal Text" lineEndContext="#stay" name="ctx0">
!             <DetectChar attribute="String" context="string" char="""/>
!             <keyword attribute="Control Structure" context="#stay" String="controls"/>
!             <keyword attribute="Reserved Words" context="#stay" String="words"/>
!             <Float attribute="Float" context="#stay"/>
!             <Int attribute="Int" context="#stay"/>
!             <RegExpr attribute="Keyword" context="#stay" String="[a-zA-Z_]+[a-zA-Z_\.0-9]* *(?=[\s]*[(])"/>
!             <RegExpr attribute="Keyword" context="#stay" String="\.[a-zA-Z_\.]+[a-zA-Z_\.0-9]* *(?=[\s]*[(])"/>
!             <RegExpr attribute="Keyword" context="parenthesis" String="\("/>
!             <StringDetect attribute="Headline" context="Headline" String="##"/>
!             <DetectChar attribute="Comment" context="Comment" char="#"/>
!             <RegExpr attribute="Assign" context="#stay" String="[<]{1,2}\-"/>
!             <RegExpr attribute="Assign" context="#stay" String="\-[>]{1,2}"/>
!             <RegExpr attribute="Assign" context="#stay" String="[^=!><]=[^=!><]"/>
!             <AnyChar attribute="Operator" context="#stay" String="+-*/^:$~!&|=><@"/>
!             <RegExpr attribute="Operator" context="#stay" String="%[^%]*%"/>
!             <!--  for code folding (from Ben Goodrich) -->
!             <DetectChar attribute="Symbol" context="ctx0" char="{" beginRegion="Brace1" name="FoldingStart" />
!             <DetectChar attribute="Symbol" context="#pop" char="}" endRegion="Brace1" name="FoldingEnd" />
!          </context>
! 
!          <context attribute="In Parenthesis" lineEndContext="#stay" name="parenthesis">
!             <LineContinue attribute="Boolean" context="#stay"/>
!             <DetectChar attribute="Keyword" context="#pop" char=")"/>
! 
!             <!-- The following are copied from the ctx0 context -->
!             <DetectChar attribute="String" context="string" char="""/>
!             <keyword attribute="Control Structure" context="#stay" String="controls"/>
!             <keyword attribute="Reserved Words" context="#stay" String="words"/>
!             <Float attribute="Float" context="#stay"/>
!             <Int attribute="Int" context="#stay"/>
!             <RegExpr attribute="Keyword" context="#stay" String="[a-zA-Z_]+[a-zA-Z_\.0-9]* *(?=[\s]*[(])"/>
!             <RegExpr attribute="Keyword" context="#stay" String="\.[a-zA-Z_\.]+[a-zA-Z_\.0-9]* *(?=[\s]*[(])"/>
!             <RegExpr attribute="Keyword" context="parenthesis" String="\("/>
!             <StringDetect attribute="Headline" context="Headline" String="##"/>
!             <DetectChar attribute="Comment" context="Comment" char="#"/>
!             <RegExpr attribute="Assign" context="#stay" String="[<]{1,2}\-"/>
!             <RegExpr attribute="Assign" context="#stay" String="\-[>]{1,2}"/>
!             <!-- no traditional assignment with "=" inside parentheses! See "Identifier below" -->
!             <AnyChar attribute="Operator" context="#stay" String="+-*/^:$~!&|=><@"/>
! 	    <RegExpr attribute="Operator" context="#stay" String="%[^%]*%"/>
!             <!--  for code folding (from Ben Goodrich) -->
!             <DetectChar attribute="Symbol" context="ctx0" char="{" beginRegion="Brace1" name="FoldingStart" />
!             <!-- no need to define brace end here, as we've already jumped to ctx0 at the brace start -->
! 
!             <RegExpr attribute="Identifier" context="#stay" String="[a-zA-Z_\.]+ *="/>
!          </context>
! 
!          <context attribute="String" lineEndContext="#stay" name="string">
!             <DetectChar attribute="String" context="#pop" char="""/>
!             <HlCStringChar attribute="String Char" context="#stay"/>
!          </context>
! 
!          <context attribute="Headline" lineEndContext="#pop" name="Headline"/>
!          <context attribute="Comment" lineEndContext="#pop" name="Comment"/>
! 
!       </contexts>
! 
!       <itemDatas>
!          <itemData name="Normal Text" defStyleNum="dsNormal"/>
!          <itemData name="Keyword" defStyleNum="dsKeyword"/>
!          <itemData name="Identifier" defStyleNum="dsNormal" color="#aa0000" selColor="#dd0000" bold="0" italic="0"/>
!          <itemData name="Types" defStyleNum="dsDataType"/>
!          <itemData name="String" defStyleNum="dsString"/>
!          <itemData name="Headline" defStyleNum="dsNormal" color="#dd0000" selColor="#ff0000" bold="1" italic="0"/>
!          <itemData name="Comment" defStyleNum="dsComment"/>
!          <itemData name="Assign" defStyleNum="dsNormal" color="#00aa88" selColor="#aa00aa" bold="1" italic="0"/>
!          <itemData name="Control Structure" defStyleNum="dsNormal" color="#0000ff" selColor="#00ff00"/>
!          <itemData name="Reserved Words" defStyleNum="dsOthers"/>
!          <itemData name="Operator" defStyleNum="dsNormal"  color="#aa5500" selColor="#000077" bold="0" italic="0"/>
!          <itemData name="String Char"  defStyleNum="dsChar"/>
!          <itemData name="Float" defStyleNum="dsFloat"/>
!          <itemData name="Int" defStyleNum="dsDecVal"/>
!       </itemDatas>
!    </highlighting>
! 
!    <general>
!       <comments>
!          <comment name="singleLine" start="#" end=""/>
!       </comments>
!       <keywords casesensitive="1" />
!    </general>
  </language>





More information about the rkward-tracker mailing list