<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
  <!-- Kate 2.0 (KDE 3.0) highlighting module for R
       version 0.2: (c) 2002 E.L. Willighagen, GPL v2 license

       info: http://www-sigma.sci.kun.nl/Persoonlijk/egonw/r-kate/
       Kate: http://www.kde.org/kate
       R   : http://www.r-project.org/
    -->
<language version="1.03" kateversion="2.1" name="R Script" section="Scripts"
          extensions="*.R" mimetype=""
          author="E.L. Willighagen" license="GPL">
  <highlighting>
    <list name="keywords">
      <item> for </item>
      <item> in </item>
    </list>
    <contexts>
       <context attribute="Normal Text" lineEndContext="#stay" name="ctx0">
         <keyword attribute="Keyword" context="#stay" String="keywords"/>
         <DetectChar attribute="String" context="ctx2" char="&quot;"/>
         <RegExpr attribute="Keyword" context="ctx1" String="[a-zA-Z_]+\("/>
         <DetectChar attribute="Comment" context="ctx3" char="#"/>
       </context>

       <context attribute="Normal Text" lineEndContext="#stay" name="ctx1">
         <DetectChar attribute="Keyword" context="ctx4" char="("/>
         <LineContinue attribute="Normal Text" context="#stay"/>
         <DetectChar attribute="Keyword" context="#pop" char=")"/>
         <DetectChar attribute="String" context="ctx2" char="&quot;"/>
         <RegExpr attribute="Identifier" context="#stay" String="[a-zA-Z_]+="/>
         <RegExpr attribute="Keyword" context="#stay" String="[a-zA-Z_]+\("/>
       </context>

       <context attribute="String" lineEndContext="#stay" name="ctx2">
         <DetectChar attribute="String" context="#pop" char="&quot;"/>
       </context>

       <context attribute="Comment" lineEndContext="ctx0" name="ctx3"/>
       
       <context attribute="Bracket" lineEndContext="#stay" name="ctx4">
         <DetectChar attribute="Keyword" context="#pop" char=")"/>
       </context>

    </contexts>
    <itemDatas>
      <itemData name="Normal Text" defStyleNum="dsNormal"/>
      <itemData name="Keyword" defStyleNum="dsKeyword"/>
      <itemData name="Identifier" defStyleNum="dsOthers"/>
      <itemData name="Types" defStyleNum="dsDataType"/>
      <itemData name="String" defStyleNum="dsString"/>
      <itemData name="Comment" defStyleNum="dsComment"/>
    </itemDatas>
  </highlighting>
  <general>
    <comments>
      <comment name="singleLine" start="#" end=""/>
    </comments>
    <keywords casesensitive="0" />
  </general>
</language>
