cheat/vendor/github.com/alecthomas/chroma/v2/lexers/embedded/abnf.xml
Christopher Allen Lane 1790aec85d chore(deps): bump chroma to v2 #735
Bump `alecthomas/chroma` to `v2`:
https://github.com/cheat/cheat/issues/735
2023-12-13 12:54:32 -05:00

66 lines
No EOL
1.8 KiB
XML

<lexer>
<config>
<name>ABNF</name>
<alias>abnf</alias>
<filename>*.abnf</filename>
<mime_type>text/x-abnf</mime_type>
</config>
<rules>
<state name="root">
<rule pattern=";.*$">
<token type="CommentSingle"/>
</rule>
<rule pattern="(%[si])?&#34;[^&#34;]*&#34;">
<token type="Literal"/>
</rule>
<rule pattern="%b[01]+\-[01]+\b">
<token type="Literal"/>
</rule>
<rule pattern="%b[01]+(\.[01]+)*\b">
<token type="Literal"/>
</rule>
<rule pattern="%d[0-9]+\-[0-9]+\b">
<token type="Literal"/>
</rule>
<rule pattern="%d[0-9]+(\.[0-9]+)*\b">
<token type="Literal"/>
</rule>
<rule pattern="%x[0-9a-fA-F]+\-[0-9a-fA-F]+\b">
<token type="Literal"/>
</rule>
<rule pattern="%x[0-9a-fA-F]+(\.[0-9a-fA-F]+)*\b">
<token type="Literal"/>
</rule>
<rule pattern="\b[0-9]+\*[0-9]+">
<token type="Operator"/>
</rule>
<rule pattern="\b[0-9]+\*">
<token type="Operator"/>
</rule>
<rule pattern="\b[0-9]+">
<token type="Operator"/>
</rule>
<rule pattern="\*">
<token type="Operator"/>
</rule>
<rule pattern="(HEXDIG|DQUOTE|DIGIT|VCHAR|OCTET|ALPHA|CHAR|CRLF|HTAB|LWSP|BIT|CTL|WSP|LF|SP|CR)\b">
<token type="Keyword"/>
</rule>
<rule pattern="[a-zA-Z][a-zA-Z0-9-]+\b">
<token type="NameClass"/>
</rule>
<rule pattern="(=/|=|/)">
<token type="Operator"/>
</rule>
<rule pattern="[\[\]()]">
<token type="Punctuation"/>
</rule>
<rule pattern="\s+">
<token type="Text"/>
</rule>
<rule pattern=".">
<token type="Text"/>
</rule>
</state>
</rules>
</lexer>