<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="Faust" version="1" kateversion="2.4" section="Sources" extensions="*.dsp;*.lib" mimetype="text/x-faust" priority="9">
  <highlighting>
    <list name="primitives">
	  <item> mem </item>
      <item> prefix </item>
      <item> int </item>
      <item> float </item>
      <item> rdtable </item>
      <item> rwtable </item>
      <item> select2 </item>
      <item> select3 </item>
      <item> ffunction </item>
      <item> fconstant</item>
      <item> fvariable</item>
      <item> route <item>
      <item> waveform <item>
      <item> soundfile <item>
      <item> button </item>
      <item> checkbox </item>
      <item> vslider </item>
      <item> hslider </item>
      <item> nentry </item>
      <item> vgroup </item>
      <item> hgroup </item>
      <item> tgroup </item>
      <item> vbargraph </item>
      <item> hbargraph </item>
      <item> attach </item>
      <item> acos </item>
      <item> asin </item>
      <item> atan </item>
      <item> atan2 </item>
      <item> cos </item>
      <item> sin </item>
      <item> tan </item>
      <item> exp </item>
      <item> log </item>
      <item> log10 </item>
      <item> pow </item>
      <item> sqrt </item>
      <item> abs </item>
      <item> min </item>
      <item> max </item>
      <item> fmod </item>
      <item> remainder </item>
      <item> floor </item>
      <item> ceil </item>
      <item> rint </item>
    </list>
	
    <list name="operators">
	  <item> process </item>
	  
	  <item> with </item>
	  <item> case </item>
      <item> seq </item>
	  <item> par </item>
	  <item> sum </item>
	  <item> prod </item>
	  <item> import </item>
	  
      <item> component </item>
      <item> library </item>
      <item> environment </item>
      
	  <item> declare </item>
    </list>
	
    <contexts>
      <context attribute="Normal Text" lineEndContext="#stay" name="Normal">
        <DetectSpaces />
        <Detect2Chars attribute="BlockDiagram" context="#stay" char="&lt;" char1=":"  />
		<Detect2Chars attribute="BlockDiagram" context="#stay" char=":" char1="&gt;"  />
		<Detect2Chars attribute="BlockDiagram" context="#stay" char="+" char1="&gt;"  />
		<DetectChar attribute="BlockDiagram" context="#stay" char=":" />
		<DetectChar attribute="BlockDiagram" context="#stay" char="," />
		<DetectChar attribute="BlockDiagram" context="#stay" char="~" />
		<DetectChar attribute="BlockDiagram" context="#stay" char=";" />
		<keyword attribute="BlockDiagram" context="#stay" String="operators" />
		<keyword attribute="Primitive" context="#stay" String="primitives" />
        <HlCChar attribute="Char" context="#stay"/>
        <DetectChar attribute="String" context="String" char="&quot;"/>
        <DetectIdentifier />
        <Float attribute="Float" context="#stay">
          <AnyChar String="fF" attribute="Float" context="#stay"/>
        </Float>
        <HlCOct attribute="Octal" context="#stay"/>
        <HlCHex attribute="Hex" context="#stay"/>
        <Int attribute="Decimal" context="#stay">
          <StringDetect attribute="Decimal" context="#stay" String="ULL" insensitive="TRUE"/>
          <StringDetect attribute="Decimal" context="#stay" String="LUL" insensitive="TRUE"/>
          <StringDetect attribute="Decimal" context="#stay" String="LLU" insensitive="TRUE"/>
          <StringDetect attribute="Decimal" context="#stay" String="UL" insensitive="TRUE"/>
          <StringDetect attribute="Decimal" context="#stay" String="LU" insensitive="TRUE"/>
          <StringDetect attribute="Decimal" context="#stay" String="LL" insensitive="TRUE"/>
          <StringDetect attribute="Decimal" context="#stay" String="U" insensitive="TRUE"/>
          <StringDetect attribute="Decimal" context="#stay" String="L" insensitive="TRUE"/>
        </Int>
        <IncludeRules context="##Doxygen" />
        <Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
        <Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
        <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" />
        <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" />
        <AnyChar attribute="Symbol" context="#stay" String=":!%&amp;()+,-/.*&lt;=&gt;?[]{|}~^&#59;"/>
      </context>
      <context attribute="String" lineEndContext="#pop" name="String">
        <LineContinue attribute="String" context="#stay"/>
        <HlCStringChar attribute="String Char" context="#stay"/>
        <DetectChar attribute="String" context="#pop" char="&quot;"/>
      </context>
      <context attribute="Region Marker" lineEndContext="#pop" name="Region Marker">
      </context>
      <context attribute="Comment" lineEndContext="#pop" name="Commentar 1">
        <DetectSpaces />
        <IncludeRules context="##Alerts" />
        <DetectIdentifier />
      </context>
      <context attribute="Comment" lineEndContext="#stay" name="Commentar 2">
        <DetectSpaces />
        <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>
        <IncludeRules context="##Alerts" />
        <DetectIdentifier />
      </context>
      <context attribute="Preprocessor" lineEndContext="#pop" name="Preprocessor">
        <LineContinue attribute="Preprocessor" context="#stay"/>
        <RegExpr attribute="Preprocessor" context="Define" String="define.*((?=\\))"/>
        <RegExpr attribute="Preprocessor" context="#stay" String="define.*"/>
        <RangeDetect attribute="Prep. Lib" context="#stay" char="&quot;" char1="&quot;"/>
        <RangeDetect attribute="Prep. Lib" context="#stay" char="&lt;" char1="&gt;"/>
        <IncludeRules context="##Doxygen" />
        <Detect2Chars attribute="Comment" context="Commentar 1" char="/" char1="/"/>
        <Detect2Chars attribute="Comment" context="Commentar/Preprocessor" char="/" char1="*"/>
      </context>
      <context attribute="Preprocessor" lineEndContext="#pop" name="Define">
        <LineContinue attribute="Preprocessor" context="#stay"/>
      </context>
      <context attribute="Comment" lineEndContext="#stay" name="Commentar/Preprocessor">
        <DetectSpaces />
        <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" />
        <DetectIdentifier />
      </context>
      <context attribute="Comment" lineEndContext="#stay" name="Outscoped" >
        <DetectSpaces />
        <Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
        <IncludeRules context="##Alerts" />
        <DetectIdentifier />
        <RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="Outscoped" firstNonSpace="true" />
        <RegExpr attribute="Preprocessor" context="#pop" String="#\s*(endif|else|elif)" endRegion="Outscoped" firstNonSpace="true" />
      </context>
      <context attribute="Comment" lineEndContext="#stay" name="Outscoped intern">
        <DetectSpaces />
        <Detect2Chars attribute="Comment" context="Commentar 2" char="/" char1="*" beginRegion="Comment"/>
        <RegExpr attribute="Comment" context="Outscoped intern" String="#\s*if" beginRegion="Outscoped" firstNonSpace="true"/>
        <RegExpr attribute="Comment" context="#pop" String="#\s*endif" endRegion="Outscoped" firstNonSpace="true"/>
      </context>
    </contexts>
    <itemDatas>
      <itemData name="Normal Text"  defStyleNum="dsNormal"/>
	  <itemData name="BlockDiagram"   defStyleNum="dsKeyword"/>
	  <itemData name="Primitive"      defStyleNum="dsKeyword" color="#A07832"/>
	  <itemData name="Data Type"    defStyleNum="dsDataType"/>
      <itemData name="Decimal"      defStyleNum="dsDecVal"/>
      <itemData name="Octal"        defStyleNum="dsBaseN"/>
      <itemData name="Hex"          defStyleNum="dsBaseN"/>
      <itemData name="Float"        defStyleNum="dsFloat"/>
      <itemData name="Char"         defStyleNum="dsChar"/>
      <itemData name="String"       defStyleNum="dsString"/>
      <itemData name="String Char"  defStyleNum="dsChar"/>
      <itemData name="Comment"      defStyleNum="dsComment"/>
      <itemData name="Symbol"       defStyleNum="dsNormal"/>
      <itemData name="Preprocessor" defStyleNum="dsOthers"/>
      <itemData name="Prep. Lib"    defStyleNum="dsOthers"/>
      <itemData name="Region Marker" defStyleNum="dsRegionMarker" />
    </itemDatas>
  </highlighting>
  <general>
    <comments>
      <comment name="singleLine" start="//" />
      <comment name="multiLine" start="/*" end="*/" region="Comment"/>
    </comments>
    <keywords casesensitive="1" />
  </general>
</language>
