2024-08-02 20:03:49 +00:00
|
|
|
<lexer>
|
|
|
|
<config>
|
|
|
|
<name>XML</name>
|
|
|
|
<alias>xml</alias>
|
|
|
|
<filename>*.xml</filename>
|
|
|
|
<filename>*.xsl</filename>
|
|
|
|
<filename>*.rss</filename>
|
|
|
|
<filename>*.xslt</filename>
|
|
|
|
<filename>*.xsd</filename>
|
|
|
|
<filename>*.wsdl</filename>
|
|
|
|
<filename>*.wsf</filename>
|
|
|
|
<filename>*.svg</filename>
|
|
|
|
<filename>*.csproj</filename>
|
|
|
|
<filename>*.vcxproj</filename>
|
|
|
|
<filename>*.fsproj</filename>
|
|
|
|
<mime_type>text/xml</mime_type>
|
|
|
|
<mime_type>application/xml</mime_type>
|
|
|
|
<mime_type>image/svg+xml</mime_type>
|
|
|
|
<mime_type>application/rss+xml</mime_type>
|
|
|
|
<mime_type>application/atom+xml</mime_type>
|
|
|
|
<dot_all>true</dot_all>
|
|
|
|
</config>
|
|
|
|
<rules>
|
|
|
|
<state name="root">
|
|
|
|
<rule pattern="[^<&]+">
|
|
|
|
<token type="Text"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="&\S*?;">
|
|
|
|
<token type="NameEntity"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="\<\!\[CDATA\[.*?\]\]\>">
|
|
|
|
<token type="CommentPreproc"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="<!--">
|
|
|
|
<token type="Comment"/>
|
|
|
|
<push state="comment"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="<\?.*?\?>">
|
|
|
|
<token type="CommentPreproc"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="<![^>]*>">
|
|
|
|
<token type="CommentPreproc"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="<\s*[\w:.-]+">
|
|
|
|
<token type="NameTag"/>
|
|
|
|
<push state="tag"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="<\s*/\s*[\w:.-]+\s*>">
|
|
|
|
<token type="NameTag"/>
|
|
|
|
</rule>
|
|
|
|
</state>
|
|
|
|
<state name="comment">
|
|
|
|
<rule pattern="[^-]+">
|
|
|
|
<token type="Comment"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="-->">
|
|
|
|
<token type="Comment"/>
|
|
|
|
<pop depth="1"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="-">
|
|
|
|
<token type="Comment"/>
|
|
|
|
</rule>
|
|
|
|
</state>
|
|
|
|
<state name="tag">
|
|
|
|
<rule pattern="\s+">
|
|
|
|
<token type="Text"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="[\w.:-]+\s*=">
|
|
|
|
<token type="NameAttribute"/>
|
|
|
|
<push state="attr"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="/?\s*>">
|
|
|
|
<token type="NameTag"/>
|
|
|
|
<pop depth="1"/>
|
|
|
|
</rule>
|
|
|
|
</state>
|
|
|
|
<state name="attr">
|
|
|
|
<rule pattern="\s+">
|
|
|
|
<token type="Text"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="".*?"">
|
|
|
|
<token type="LiteralString"/>
|
|
|
|
<pop depth="1"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="'.*?'">
|
|
|
|
<token type="LiteralString"/>
|
|
|
|
<pop depth="1"/>
|
|
|
|
</rule>
|
|
|
|
<rule pattern="[^\s>]+">
|
|
|
|
<token type="LiteralString"/>
|
|
|
|
<pop depth="1"/>
|
|
|
|
</rule>
|
|
|
|
</state>
|
|
|
|
</rules>
|
2024-08-26 23:18:28 +00:00
|
|
|
</lexer>
|