<?xml version="1.0" encoding="utf-8" ?>
<Language Name="CSP Model" Startblock="CSP Code">
  <FileTypes>
    <FileType Extension=".csp" Name="CSP Model Files"/>
  </FileTypes>
  <Block Name="CSP Code" Style="CSP Code" EscapeChar="" IsMultiline="true">
    <Scope Start="{" End="}" Style="CSP Scope" Text="{...}" CauseIndent="true"/>
    <Scope Start="(" End=")" Style="CSP Scope" Text="(...)" CauseIndent="true"/>
    <Scope Start="#region" End="#endregion" Style="CSP Region" Text="" DefaultExpanded="false" />

    <!-- Keywords that can exist inside this block feasible -->
    <Keywords>
      <PatternGroup Name="Keywords" Style="CSP Keyword" CaseSensitive="true">
        <Patterns>
          wl sl wf sf assert define deadlockfree reaches equals refines alphabet if else case default while true false channel var init call tau enum
        </Patterns>    
      </PatternGroup>
      <PatternGroup Name="Keywords" Style="CSP Process" CaseSensitive="true">
        <Patterns>
          Skip Stop
        </Patterns>
      </PatternGroup>      
      <!--PatternGroup Name="Numbers" Style="CSP Number">
        <Pattern Text="(0x[0-9,a-f,A-F]+)" IsComplex="true" />
        <Pattern Text="([0-9]+)" IsComplex="true" />
      </PatternGroup-->

      <!-- Datatypes for CSP   Object
      <PatternGroup Name="DataTypes" Style="CSP Datatype" CaseSensitive="true">
        <Patterns>
          void short null long int float double char byte boolean
        </Patterns>
      </PatternGroup>
      -->      
    </Keywords>
    <!-- Operators that can exist inside this block -->
    <Operators>
      <PatternGroup name="Operators" Style="CSP Operator">
        <Pattern Text="+" />
        <Pattern Text="-" />
        <Pattern Text="*" />
        <Pattern Text="/" />
        <Pattern Text="\" />
        <Pattern Text=">>" />       
        <Pattern Text="&lt;&lt;" />
        <Pattern Text="#" />
        <Pattern Text="[]" />
        <Pattern Text="|>" />
        <Pattern Text="->" />
        <Pattern Text="|||" />
        <Pattern Text="||" />
        <Pattern Text="!" />
        <Pattern Text="?" />
        <Pattern Text="/\" />
        <Pattern Text="\/" />
        <Pattern Text="&lt;>" />
        <Pattern Text="=" />
        <Pattern Text="&amp;&amp;" />
        <Pattern Text="&lt;F>" />
        <Pattern Text="&lt;FD>" />
      </PatternGroup>
      <PatternGroup name="VerifyOperators" Style="CSP Verify">
        <Pattern Text="|=" />
      </PatternGroup>

    </Operators>
    <!-- Blocks that can exist inside this block -->
    <ChildBlocks>
      <Child Name="CSP Multiline Comment" />
      <Child Name="CSP Singleline Comment" />
      <Child Name="CSP String" />
      <Child Name="CSP Char" />
      <Child Name="CSP Literal String" />
      <Child Name="CSP Literal Char" />
      <Child Name="CSP Code" />
    </ChildBlocks>
  </Block>
  <Block Name="CSP Multiline Comment" Style="CSP Comment" EscapeChar="" IsMultiline="true">
    <Scope Start="/*" End="*/" Style="CSP Comment" Text="/*...*/"/>
    <Operators>
      <PatternGroup name="URL" Style="CSP URL">
        <Pattern Text="http://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?" IsComplex="true" />
      </PatternGroup>
    </Operators>
  </Block>
  <Block Name="CSP Singleline Comment" Style="CSP Comment" EscapeChar="" IsMultiline="false">
    <Scope Start="//" End="" Style="CSP Comment" />
  </Block>
  <Block Name="CSP String" Style="CSP String" EscapeChar="\" IsMultiline="false">
    <Scope Start="&quot;" End="&quot;" Style="CSP String" />
    <Operators>
      <PatternGroup name="URL" Style="CSP URL">
        <Pattern Text="http://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?" IsComplex="true" />
      </PatternGroup>
    </Operators>
  </Block>

  <Block Name="CSP Char" Style="CSP String" EscapeChar="" IsMultiline="false">
    <Scope Start="'" End="'" Style="CSP String" />
  </Block>

  <Block Name="CSP Literal String" Style="CSP String" EscapeChar="" IsMultiline="true" >
    <Scope Start="@&quot;" End="&quot;" Style="CSP String" Text="@'...'" />
  </Block>

  <Block Name="CSP Literal Char" Style="CSP String" EscapeChar="" IsMultiline="false">
    <Scope Start="@'" End="'" Style="CSP String" />
  </Block>
  <Style Name="CSP Code" ForeColor="" BackColor="" Bold="false" Italic="false" Underline="false" />
  <Style Name="CSP Scope" ForeColor="" BackColor="" Bold="false" Italic="false" Underline="false" />
  <Style Name="CSP Region" ForeColor="blue" BackColor="" Bold="true" Italic="false" Underline="false" />
  <Style Name="CSP Comment" ForeColor="Green" BackColor="" Bold="false" Italic="false" Underline="false" />
  <Style Name="CSP String" ForeColor="Teal" BackColor="" Bold="true" Italic="false" Underline="false" />
  <Style Name="CSP Operator" ForeColor="Red" BackColor="" Bold="false" Italic="false" Underline="false" />
  <Style Name="CSP Keyword" ForeColor="Blue" BackColor="" Bold="false" Italic="false" Underline="false" />
  <Style Name="CSP Process" ForeColor="Navy" BackColor="" Bold="false" Italic="false" Underline="false" />
  <Style Name="CSP Verify" ForeColor="DarkBlue" BackColor="" Bold="false" Italic="false" Underline="false" />

</Language>