<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="Cylc flow.cylc" section="Configuration" extensions="suite*.rc;*.cylc" mimetype="" version="1.0" kateversion="2.0" author="" license="GPL">

<!-- For use with Kate. To use it, place this file in ~/.kde/share/apps/katepart/syntax/,
 or if possible, /usr/share/kde4/apps/katepart/syntax/ -->

  <highlighting>

    <contexts>
      <context name="File" attribute="Normal Text" lineEndContext="#stay">
        <!-- To regenerate this keyword list, create a minimal flow.cylc file and run something like:
        cylc config my-minimal-workflow | sed "/^[^=]*$/d; s/=.*//g; s/^ *//g; s/ *$//g" | sort -r | uniq | sed "s/\(.*\)/<RegExpr attribute='Keyword' String=' \1 '\/>/g"
        The sort is in reverse order to allow longer keywords to take precedence over sub-sets. -->
        <!--TAG_FOR_AUTO_UPDATE-->
        <RegExpr attribute='Keyword' String=' xtriggers '/>
        <RegExpr attribute='Keyword' String=' workflow timeout handlers '/>
        <RegExpr attribute='Keyword' String=' workflow timeout '/>
        <RegExpr attribute='Keyword' String=' workflow state polling '/>
        <RegExpr attribute='Keyword' String=' work sub-directory '/>
        <RegExpr attribute='Keyword' String=' warning handlers '/>
        <RegExpr attribute='Keyword' String=' verbose mode '/>
        <RegExpr attribute='Keyword' String=' to '/>
        <RegExpr attribute='Keyword' String=' title '/>
        <RegExpr attribute='Keyword' String=' time limit buffer '/>
        <RegExpr attribute='Keyword' String=' templates '/>
        <RegExpr attribute='Keyword' String=' task parameters '/>
        <RegExpr attribute='Keyword' String=' task event batch interval '/>
        <RegExpr attribute='Keyword' String=' succeeded handlers '/>
        <RegExpr attribute='Keyword' String=' submitted handlers '/>
        <RegExpr attribute='Keyword' String=' submission timeout handlers '/>
        <RegExpr attribute='Keyword' String=' submission timeout '/>
        <RegExpr attribute='Keyword' String=' submission retry handlers '/>
        <RegExpr attribute='Keyword' String=' submission retry delays '/>
        <RegExpr attribute='Keyword' String=' submission polling intervals '/>
        <RegExpr attribute='Keyword' String=' submission failed handlers '/>
        <RegExpr attribute='Keyword' String=' stop after cycle point '/>
        <RegExpr attribute='Keyword' String=' startup handlers '/>
        <RegExpr attribute='Keyword' String=' started handlers '/>
        <RegExpr attribute='Keyword' String=' stall timeout handlers '/>
        <RegExpr attribute='Keyword' String=' stall timeout '/>
        <RegExpr attribute='Keyword' String=' stall handlers '/>
        <RegExpr attribute='Keyword' String=' speedup factor '/>
        <RegExpr attribute='Keyword' String=' special tasks '/>
        <RegExpr attribute='Keyword' String=' skip '/>
        <RegExpr attribute='Keyword' String=' simulation '/>
        <RegExpr attribute='Keyword' String=' shutdown handlers '/>
        <RegExpr attribute='Keyword' String=' sequential xtriggers '/>
        <RegExpr attribute='Keyword' String=' sequential '/>
        <RegExpr attribute='Keyword' String=' script '/>
        <RegExpr attribute='Keyword' String=' scheduling '/>
        <RegExpr attribute='Keyword' String=' scheduler '/>
        <RegExpr attribute='Keyword' String=' runtime '/>
        <RegExpr attribute='Keyword' String=' runahead limit '/>
        <RegExpr attribute='Keyword' String=' run mode '/>
        <RegExpr attribute='Keyword' String=' retry handlers '/>
        <RegExpr attribute='Keyword' String=' retrieve job logs retry delays '/>
        <RegExpr attribute='Keyword' String=' retrieve job logs max size '/>
        <RegExpr attribute='Keyword' String=' retrieve job logs '/>
        <RegExpr attribute='Keyword' String=' restart timeout '/>
        <RegExpr attribute='Keyword' String=' remote '/>
        <RegExpr attribute='Keyword' String=' queues '/>
        <RegExpr attribute='Keyword' String=' pre-script '/>
        <RegExpr attribute='Keyword' String=' post-script '/>
        <RegExpr attribute='Keyword' String=' platform '/>
        <RegExpr attribute='Keyword' String=' parameter environment templates '/>
        <RegExpr attribute='Keyword' String=' owner '/>
        <RegExpr attribute='Keyword' String=' outputs '/>
        <RegExpr attribute='Keyword' String=' meta '/>
        <RegExpr attribute='Keyword' String=' message '/>
        <RegExpr attribute='Keyword' String=' members '/>
        <RegExpr attribute='Keyword' String=' max-polls '/>
        <RegExpr attribute='Keyword' String=' main loop '/>
        <RegExpr attribute='Keyword' String=' mail events '/>
        <RegExpr attribute='Keyword' String=' mail '/>
        <RegExpr attribute='Keyword' String=' limit '/>
        <RegExpr attribute='Keyword' String=' late offset '/>
        <RegExpr attribute='Keyword' String=' late handlers '/>
        <RegExpr attribute='Keyword' String=' job '/>
        <RegExpr attribute='Keyword' String=' interval '/>
        <RegExpr attribute='Keyword' String=' install '/>
        <RegExpr attribute='Keyword' String=' initial cycle point constraints '/>
        <RegExpr attribute='Keyword' String=' initial cycle point '/>
        <RegExpr attribute='Keyword' String=' init-script '/>
        <RegExpr attribute='Keyword' String=' inherit '/>
        <RegExpr attribute='Keyword' String=' include '/>
        <RegExpr attribute='Keyword' String=' inactivity timeout handlers '/>
        <RegExpr attribute='Keyword' String=' inactivity timeout '/>
        <RegExpr attribute='Keyword' String=' host '/>
        <RegExpr attribute='Keyword' String=' hold after cycle point '/>
        <RegExpr attribute='Keyword' String=' handlers '/>
        <RegExpr attribute='Keyword' String=' handler retry delays '/>
        <RegExpr attribute='Keyword' String=' handler events '/>
        <RegExpr attribute='Keyword' String=' graph '/>
        <RegExpr attribute='Keyword' String=' from '/>
        <RegExpr attribute='Keyword' String=' footer '/>
        <RegExpr attribute='Keyword' String=' flow.cylc '/>
        <RegExpr attribute='Keyword' String=' final cycle point constraints '/>
        <RegExpr attribute='Keyword' String=' final cycle point '/>
        <RegExpr attribute='Keyword' String=' failed handlers '/>
        <RegExpr attribute='Keyword' String=' fail try 1 only '/>
        <RegExpr attribute='Keyword' String=' fail cycle points '/>
        <RegExpr attribute='Keyword' String=' external-trigger '/>
        <RegExpr attribute='Keyword' String=' expired handlers '/>
        <RegExpr attribute='Keyword' String=' expected task failures '/>
        <RegExpr attribute='Keyword' String=' exit-script '/>
        <RegExpr attribute='Keyword' String=' execution timeout handlers '/>
        <RegExpr attribute='Keyword' String=' execution timeout '/>
        <RegExpr attribute='Keyword' String=' execution time limit '/>
        <RegExpr attribute='Keyword' String=' execution retry delays '/>
        <RegExpr attribute='Keyword' String=' execution polling intervals '/>
        <RegExpr attribute='Keyword' String=' exclude '/>
        <RegExpr attribute='Keyword' String=' events '/>
        <RegExpr attribute='Keyword' String=' err-script '/>
        <RegExpr attribute='Keyword' String=' environment filter '/>
        <RegExpr attribute='Keyword' String=' environment '/>
        <RegExpr attribute='Keyword' String=' env-script '/>
        <RegExpr attribute='Keyword' String=' disable task event handlers '/>
        <RegExpr attribute='Keyword' String=' directives '/>
        <RegExpr attribute='Keyword' String=' description '/>
        <RegExpr attribute='Keyword' String=' default run length '/>
        <RegExpr attribute='Keyword' String=' default '/>
        <RegExpr attribute='Keyword' String=' cycling mode '/>
        <RegExpr attribute='Keyword' String=' cycle point time zone '/>
        <RegExpr attribute='Keyword' String=' cycle point num expanded year digits '/>
        <RegExpr attribute='Keyword' String=' cycle point format '/>
        <RegExpr attribute='Keyword' String=' custom handlers '/>
        <RegExpr attribute='Keyword' String=' critical handlers '/>
        <RegExpr attribute='Keyword' String=' completion '/>
        <RegExpr attribute='Keyword' String=' clock-trigger '/>
        <RegExpr attribute='Keyword' String=' clock-expire '/>
        <RegExpr attribute='Keyword' String=' batch system '/>
        <RegExpr attribute='Keyword' String=' batch submit command template '/>
        <RegExpr attribute='Keyword' String=' alt-cylc-run-dir '/>
        <RegExpr attribute='Keyword' String=' allow implicit tasks '/>
        <RegExpr attribute='Keyword' String=' abort on workflow timeout '/>
        <RegExpr attribute='Keyword' String=' abort on stall timeout '/>
        <RegExpr attribute='Keyword' String=' abort on inactivity timeout '/>
        <RegExpr attribute='Keyword' String=' abort handlers '/>
        <RegExpr attribute='Keyword' String=' UTC mode '/>
        <RegExpr attribute='Keyword' String=' URL '/>
        <!--END_TAG_FOR_AUTO_UPDATE-->
        <!-- Non-keyword syntax -->
        <RegExpr attribute="Section" String="^ *\[.*\] *$" />
        <RegExpr attribute='Assignment' String='=&gt;'/>
        <RegExpr attribute='Assignment' String='|'/>
        <RegExpr attribute='Assignment' String='&amp;'/>
        <DetectChar attribute="Assignment" char="=" />
        <DetectChar attribute='String' char='"'/>
        <DetectChar attribute='String' char="'"/>
        <DetectChar attribute="Assignment" char="\" />
        <RegExpr attribute='Jinja2' String="\{%.*%\}"/>
        <RegExpr attribute='Jinja2' String="\{\{.*\}\}"/>
        <RegExpr attribute="Comment" String="#.*$" />
        <RegExpr attribute="Environment" String="\$\w+" />
        <RegExpr attribute="Environment" String="\$\{\w+\}" />
        <Detect2Chars attribute="Comment" context="MultiLineJinja2"
        char="{" char1="#" beginRegion="Comment2" />
      </context>
      <context attribute="Comment" lineEndContext="#stay" name="MultiLineJinja2">
        <Detect2Chars attribute="Comment" context="#pop" char="#" char1="}"
        endRegion="Comment2" />
      </context>
    </contexts>

    <itemDatas>
      <itemData name="Normal Text" defStyleNum="dsNormal" />
      <itemData name="Keyword" defStyleNum="dsKeyword" />
      <itemData name="Section" defStyleNum="dsFunction" />
      <itemData name="Comment" defStyleNum="dsComment" />
      <itemData name="Jinja2" defStyleNum="dsDataType" />
      <itemData name="Environment" defStyleNum="dsFloat" />
      <itemData name="Assignment" defStyleNum="dsOthers" />
      <itemData name="String" defStyleNum="dsString" />
    </itemDatas>
  </highlighting>

  <general>
    <comments>
      <comment name="multiLine" start="{#" end="#}"/>
      <comment name="singleLine" start="#"/>
    </comments>
  </general>

</language>
