Syntax-Kamelon

 view release on metacpan or  search on metacpan

lib/Syntax/Kamelon/XML/xul.xml  view on Meta::CPAN

      <item>siblingAbove</item>
      <item>siblingBelow</item>
      <item>small</item>
      <item>sort</item>
      <item>source</item>
      <item>splice</item>
      <item>split</item>
      <item>src</item>
      <item>status</item>
      <item>statusbar</item>
      <item>strike</item>
      <item>sub</item>
      <item>submit</item>
      <item>substr</item>
      <item>substring</item>
      <item>suffixes</item>
      <item>sup</item>
      <item>taintEnabled</item>
      <item>target</item>
      <item>test</item>
      <item>text</item>
      <item>title</item>
      <item>toGMTString</item>
      <item>toLocaleString</item>
      <item>toLowerCase</item>
      <item>toolbar</item>
      <item>toSource</item>
      <item>toString</item>
      <item>top</item>
      <item>toUpperCase</item>
      <item>toUTCString</item>
      <item>type</item>
      <item>URL</item>
      <item>unshift</item>
      <item>unwatch</item>
      <item>userAgent</item>
      <item>UTC</item>
      <item>value</item>
      <item>valueOf</item>
      <item>visibility</item>
      <item>vlinkColor</item>
      <item>vspace</item>
      <item>width</item>
      <item>watch</item>
      <item>which</item>
      <item>width</item>
      <item>write</item>
      <item>writeln</item>
      <item>x</item>
      <item>y</item>
      <item>zIndex</item>
    </list>
<contexts>
  <context name="Start" attribute="Normal Text" lineEndContext="#stay">
    <IncludeRules context="FindXML" />
  </context>

  <context name="FindXML" attribute="Normal Text" lineEndContext="#stay">
    <DetectSpaces />
    <StringDetect attribute="Comment" context="Comment" String="&lt;!--" beginRegion="comment" />
    <StringDetect attribute="CDATA" context="CDATA" String="&lt;![CDATA[" beginRegion="cdata" />
    <RegExpr attribute="Doctype" context="Doctype" String="&lt;!DOCTYPE\s+" beginRegion="doctype" />
    <RegExpr attribute="Processing Instruction" context="PI" String="&lt;\?[\w:_-]*" beginRegion="pi" />
    <RegExpr attribute="Element" context="Element" String="&lt;&name;" beginRegion="element" />
    <IncludeRules context="FindEntityRefs" />
    <DetectIdentifier />
  </context>

  <context name="FindEntityRefs" attribute="Normal Text" lineEndContext="#stay">
    <RegExpr attribute="EntityRef" context="#stay" String="&entref;" />
    <AnyChar attribute="Error" context="#stay" String="&amp;&lt;" />
  </context>

  <context name="FindPEntityRefs" attribute="Normal Text" lineEndContext="#stay">
    <RegExpr attribute="EntityRef" context="#stay" String="&entref;" />
    <RegExpr attribute="PEntityRef" context="#stay" String="%&name;;" />
    <AnyChar attribute="Error" context="#stay" String="&amp;%" />
  </context>


  <context name="Comment" attribute="Comment" lineEndContext="#stay">
    <DetectSpaces />
    <StringDetect attribute="Comment" context="#pop" String="--&gt;" endRegion="comment" />
    <RegExpr attribute="Error" context="#stay" String="-(-(?!-&gt;))+" />
    <IncludeRules context="##Alerts" />
    <DetectIdentifier />
  </context>

  <context name="PI" attribute="Normal Text" lineEndContext="#stay">
    <Detect2Chars attribute="Processing Instruction" context="#pop" char="?" char1="&gt;" endRegion="pi" />
  </context>

  <context name="Doctype" attribute="Normal Text" lineEndContext="#stay">
    <DetectChar attribute="Doctype" context="#pop" char="&gt;" endRegion="doctype" />
    <DetectChar attribute="Doctype" context="Doctype Internal Subset" char="[" beginRegion="int_subset" />
  </context>

  <context name="Doctype Internal Subset" attribute="Normal Text" lineEndContext="#stay">
    <DetectChar attribute="Doctype" context="#pop" char="]" endRegion="int_subset" />
    <RegExpr attribute="Doctype" context="Doctype Markupdecl" String="&lt;!(ELEMENT|ENTITY|ATTLIST|NOTATION)\b" />
    <StringDetect attribute="Comment" context="Comment" String="&lt;!--" beginRegion="comment" />
    <RegExpr attribute="Processing Instruction" context="PI" String="&lt;\?[\w:_-]*" beginRegion="pi" />
    <IncludeRules context="FindPEntityRefs" />
  </context>

  <context name="Doctype Markupdecl" attribute="Normal Text" lineEndContext="#stay">
    <DetectChar attribute="Doctype" context="#pop" char="&gt;" />
    <DetectChar attribute="Value" context="Doctype Markupdecl DQ" char="&quot;" />
    <DetectChar attribute="Value" context="Doctype Markupdecl SQ" char="&apos;" />
  </context>

  <context name="Doctype Markupdecl DQ" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop" char="&quot;" />
    <IncludeRules context="FindPEntityRefs" />
  </context>

  <context name="Doctype Markupdecl SQ" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop" char="&apos;" />
    <IncludeRules context="FindPEntityRefs" />
  </context>

  <context name="Element" attribute="Normal Text" lineEndContext="#stay">
    <Detect2Chars attribute="Element" context="#pop" char="/" char1="&gt;" endRegion="element" />
    <DetectChar attribute="Element" context="El Content" char="&gt;" />
    <RegExpr attribute="Attribute" context="Attribute" String="^&name;" />
    <RegExpr attribute="Attribute" context="Attribute" String="\s+&name;" />
    <RegExpr attribute="Error" context="#stay" String="\S" />
  </context>

  <context name="El Content" attribute="Normal Text" lineEndContext="#stay">
    <RegExpr attribute="Element" context="El End" String="&lt;/&name;" />
    <IncludeRules context="FindXML" />
  </context>

  <context name="El End" attribute="Normal Text" lineEndContext="#stay">
    <DetectChar attribute="Element" context="#pop#pop#pop" char="&gt;" endRegion="element" />
    <RegExpr attribute="Error" context="#stay" String="\S" />
  </context>

  <context name="Attribute" attribute="Normal Text" lineEndContext="#stay">
    <DetectChar attribute="Attribute" context="Value" char="=" />
    <RegExpr attribute="Error" context="#stay" String="\S" />
  </context>

  <context name="Value" attribute="Normal Text" lineEndContext="#stay">
    <DetectChar attribute="Value" context="Value DQ" char="&quot;" />
    <DetectChar attribute="Value" context="Value SQ" char="&apos;" />
    <RegExpr attribute="Error" context="#stay" String="\S" />
  </context>

  <context name="Value DQ" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop#pop#pop" char="&quot;" />
    <IncludeRules context="FindEntityRefs" />
  </context>

  <context name="Value SQ" attribute="Value" lineEndContext="#stay">
    <DetectChar attribute="Value" context="#pop#pop#pop" char="&apos;" />
    <IncludeRules context="FindEntityRefs" />
  </context>

  <context name="CDATA" attribute="Normal Text" lineEndContext="#stay">
     <StringDetect attribute="CDATA" context="#pop" String="]]&gt;" endRegion="cdata" />
     <StringDetect attribute="EntityRef" context="#stay" String="]]&amp;gt;" />
     <DetectSpaces/>
     <StringDetect attribute="Region Marker" context="region_marker" String="//BEGIN" beginRegion="Region1"/>
     <StringDetect attribute="Region Marker" context="region_marker" String="//END" endRegion="Region1"/>
     <keyword attribute="Keyword" context="#stay" String="keywords" />
     <keyword attribute="Function" context="#stay" String="functions" />
     <keyword attribute="Objects" context="#stay" String="objects" />
     <keyword attribute="Math" context="#stay" String="math" />
     <keyword attribute="Events" context="#stay" String="events" />
     <keyword attribute="Data Type" context="#stay" String="methods" />
     <DetectIdentifier/>
     <Float attribute="Float" context="#stay" />
     <Int attribute="Decimal" context="#stay" />
     <DetectChar attribute="String" context="String" char="&quot;"/>
     <DetectChar attribute="String" context="String 1" char="'"/>
     <Detect2Chars attribute="Comment" context="JSComment" char="/" char1="/"/>
     <Detect2Chars attribute="Comment" context="Multi/inline Comment" char="/" char1="*" beginRegion="Comment"/>
     <RegExpr attribute="Normal Text" context="(Internal regex catch)" String="[=?:]" />
     <RegExpr attribute="Normal Text" context="(Internal regex catch)" String="\(" />
     <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">
     <DetectIdentifier/>
     <HlCStringChar attribute="String Char" context="#stay"/>
     <DetectChar attribute="String" context="#pop" char="&quot;"/>
  </context>
  <context attribute="String Char" lineEndContext="#pop" name="String 1">
     <DetectIdentifier/>
     <DetectChar attribute="String" context="String" char="&quot;"/>
     <DetectChar attribute="String Char" context="#pop" char="'"/>
  </context>

  <context attribute="Comment" lineEndContext="#pop" name="JSComment">
     <DetectSpaces />
     <IncludeRules context="##Alerts" />
     <DetectIdentifier />
  </context>
  <context attribute="Comment" lineEndContext="#stay" name="Multi/inline Comment">
     <IncludeRules context="##Alerts" />
     <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>
  </context>
  
  <context attribute="Regular Expression" lineEndContext="#stay" name="Regular Expression">
     <RegExpr attribute="Regular Expression" context="#pop#pop#pop" String="/[ig]{0,2}" />
     <RegExpr attribute="Pattern Internal Operator" context="#stay" String="\{[\d, ]+\}" />
     <RegExpr attribute="Pattern Internal Operator" context="#stay" String="\\[bB]" />
     <RegExpr attribute="Pattern Character Class" context="#stay" String="\\[nrtvfDdSsWw]" />
     <DetectChar attribute="Pattern Character Class" context="(charclass caret first check)" char="[" />
     <RegExpr attribute="Pattern Internal Operator" context="#stay" String="\\." />
     <RegExpr attribute="Pattern Internal Operator" context="#stay" String="\$(?=/)" />
     <AnyChar attribute="Pattern Internal Operator" context="#stay" String="?+*()|" />
  </context>
  <context attribute="Normal Text" lineEndContext="#stay" name="(Internal regex catch)" fallthrough="true" fallthroughContext="#pop">
     <RegExpr attribute="Normal Text" context="#stay" String="\s*" />
     <RegExpr attribute="Regular Expression" context="#pop" String="//(?=;)" />
     <Detect2Chars attribute="Comment" context="JSComment" char="/" char1="/" />
     <Detect2Chars attribute="Comment" context="Multi/inline Comment" char="/" char1="*" />



( run in 0.328 second using v1.01-cache-2.11-cpan-d7f47b0818f )