<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="FTL" version="6" kateversion="5.0" section="Markup" extensions="*.ftl" license="LGPLv2+" author="Radomir Svancer (svancer@gmail.com), Robert Kratky (kratky@rob.cz>), Matthias Mailänder (matthias.mailaender@vogella.com)">
  <highlighting>
    <contexts>
        <context name="comment start" attribute="NormalText" lineEndContext="#stay">
            <StringDetect attribute="Comment" context="comment end" String="&lt;!--" beginRegion="Comment"/>
            <StringDetect attribute="FTLComment" context="comment ending" String="&lt;#--" beginRegion="FTLComment"/>
            <RegExpr attribute="FTLKeyword" context="syntax start" String="&lt;\s*\/?\s*[#@][a-zA-Z0-9_]*" />
            <Detect2Chars attribute="FTLMark" context="variable end" char="$" char1="{" />
            <RegExpr attribute="Keyword" context="logic end" String="&lt;\s*\/?\s*[a-zA-Z0-9_]*" />
        </context>

        <context name="logic end" attribute="Identifier" lineEndContext="#stay">
            <DetectChar attribute="Keyword" context="#pop" char="&gt;"/>
            <RegExpr attribute="NormalText" context="logic" String="\s*=\s*"/>
            <StringDetect attribute="FTLComment" context="comment ending" String="&lt;#--" beginRegion="FTLComment"/>
            <RegExpr attribute="FTLKeyword" context="syntax start" String="&lt;\s*\/?\s*[#@][a-zA-Z0-9_]*" />
            <Detect2Chars attribute="FTLMark" context="variable end" char="$" char1="{" />
        </context>

        <context name="logic" attribute="Types" lineEndContext="#stay">
            <RegExpr attribute="Types" context="#pop" String="\s*#?[a-zA-Z0-9]*" />
            <DetectChar attribute="Types" context="logic start" char="&quot;" />
        </context>

        <context name="logic start" attribute="Types" lineEndContext="#stay">
            <DetectChar attribute="Types" context="#pop#pop" char="&quot;" />
            <StringDetect attribute="FTLComment" context="comment ending" String="&lt;#--" beginRegion="FTLComment"/>
            <RegExpr attribute="FTLKeyword" context="syntax start" String="&lt;\s*\/?\s*[#@][a-zA-Z0-9_]*" />
            <Detect2Chars attribute="FTLMark" context="variable end" char="$" char1="{" />
        </context>

        <context name="comment end" attribute="Comment" lineEndContext="#stay">
            <DetectSpaces />
            <StringDetect attribute="Comment" context="#pop" String="--&gt;" endRegion="Comment"/>
            <StringDetect attribute="FTLComment" context="comment ending" String="&lt;#--" beginRegion="FTLComment"/>
            <RegExpr attribute="FTLKeyword" context="syntax start" String="&lt;\s*\/?\s*[#@][a-zA-Z0-9_]*" />
            <Detect2Chars attribute="FTLMark" context="variable end" char="$" char1="{" />
            <IncludeRules context="##Comments" />
        </context>

        <context name="comment ending" attribute="FTLComment" lineEndContext="#stay">
            <StringDetect attribute="FTLComment" context="#pop" String="--&gt;" endRegion="FTLComment"/>
            <DetectSpaces />
            <IncludeRules context="##Comments" />
        </context>

        <context name="syntax start" attribute="FTLKeyword" lineEndContext="#stay">
            <DetectChar attribute="FTLKeyword" context="#pop" char="&gt;"/>
            <DetectChar attribute="FTLQuot" context="comment string" char="&quot;" />
            <DetectSpaces attribute="FTLIdentifier" context="syntax end"/>
        </context>

        <context name="comment string" attribute="FTLQuot" lineEndContext="#stay">
            <DetectChar attribute="FTLQuot" context="#pop#pop" char="&quot;" />
        </context>

        <context name="syntax end" attribute="FTLIdentifier" lineEndContext="#stay">
            <DetectChar attribute="FTLKeyword" context="#pop#pop" char="&gt;"/>
            <DetectChar attribute="FTLQuot" context="comment string" char="&quot;" />
        </context>

        <context name="variable end" attribute="FTLIdentifier" lineEndContext="#stay">
            <DetectChar attribute="FTLMark" context="#pop" char="}"/>
            <DetectChar attribute="FTLQuot" context="comment string" char="&quot;" />
        </context>
    </contexts>
    <itemDatas>
      <itemData name="NormalText" defStyleNum="dsNormal"/>
      <itemData name="Keyword" defStyleNum="dsKeyword"/>
      <itemData name="Identifier" defStyleNum="dsOthers"/>
      <itemData name="Types" defStyleNum="dsDataType"/>
      <itemData name="Comment" defStyleNum="dsComment"/>
      <itemData name="FTLComment" defStyleNum="dsDocumentation" bold="0" italic="1"/>
      <itemData name="FTLKeyword" defStyleNum="dsKeyword" color="#0000cc" selColor="#00ff00" bold="1" italic="0"/>
      <itemData name="FTLQuot" defStyleNum="dsOthers" color="#ff0044" selColor="#00ff00" bold="0" italic="0"/>
      <itemData name="FTLIdentifier" defStyleNum="dsOthers" color="#0022bb" selColor="#00ff00" bold="0" italic="0"/>
      <itemData name="FTLMark" defStyleNum="dsOthers" color="#0000cc" selColor="#00ff00" bold="1" italic="1"/>
    </itemDatas>
  </highlighting>
  <general>
    <comments>
      <comment name="multiLine" start="&lt;#--" end="--&gt;" region="FTLComment" />
    </comments>
    <keywords casesensitive="0" />
  </general>
</language>
<!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->
