view vendor/github.com/alecthomas/chroma/v2/lexers/embedded/mathematica.xml @ 66:787b5ee0289d draft

Use vendored modules Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja>
author yakumo.izuru
date Sun, 23 Jul 2023 13:18:53 +0000
parents
children
line wrap: on
line source

<lexer>
  <config>
    <name>Mathematica</name>
    <alias>mathematica</alias>
    <alias>mma</alias>
    <alias>nb</alias>
    <filename>*.nb</filename>
    <filename>*.cdf</filename>
    <filename>*.nbp</filename>
    <filename>*.ma</filename>
    <mime_type>application/mathematica</mime_type>
    <mime_type>application/vnd.wolfram.mathematica</mime_type>
    <mime_type>application/vnd.wolfram.mathematica.package</mime_type>
    <mime_type>application/vnd.wolfram.cdf</mime_type>
  </config>
  <rules>
    <state name="root">
      <rule pattern="(?s)\(\*.*?\*\)">
        <token type="Comment"/>
      </rule>
      <rule pattern="([a-zA-Z]+[A-Za-z0-9]*`)">
        <token type="NameNamespace"/>
      </rule>
      <rule pattern="([A-Za-z0-9]*_+[A-Za-z0-9]*)">
        <token type="NameVariable"/>
      </rule>
      <rule pattern="#\d*">
        <token type="NameVariable"/>
      </rule>
      <rule pattern="([a-zA-Z]+[a-zA-Z0-9]*)">
        <token type="Name"/>
      </rule>
      <rule pattern="-?\d+\.\d*">
        <token type="LiteralNumberFloat"/>
      </rule>
      <rule pattern="-?\d*\.\d+">
        <token type="LiteralNumberFloat"/>
      </rule>
      <rule pattern="-?\d+">
        <token type="LiteralNumberInteger"/>
      </rule>
      <rule pattern="(!===|@@@|===|/;|:=|-&gt;|:&gt;|/\.|=\.|~~|&lt;=|@@|/@|&amp;&amp;|\|\||//|&lt;&gt;|;;|&gt;=|-|@|!|\^|/|\*|\?|\+|&amp;|&lt;|&gt;|=|\|)">
        <token type="Operator"/>
      </rule>
      <rule pattern="(,|;|\(|\)|\[|\]|\{|\})">
        <token type="Punctuation"/>
      </rule>
      <rule pattern="&#34;.*?&#34;">
        <token type="LiteralString"/>
      </rule>
      <rule pattern="\s+">
        <token type="TextWhitespace"/>
      </rule>
    </state>
  </rules>
</lexer>