mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-13 23:12:24 +00:00
184 lines
5.9 KiB
XML
184 lines
5.9 KiB
XML
<lexer>
|
|
<config>
|
|
<name>Common Lisp</name>
|
|
<alias>common-lisp</alias>
|
|
<alias>cl</alias>
|
|
<alias>lisp</alias>
|
|
<filename>*.cl</filename>
|
|
<filename>*.lisp</filename>
|
|
<mime_type>text/x-common-lisp</mime_type>
|
|
<case_insensitive>true</case_insensitive>
|
|
</config>
|
|
<rules>
|
|
<state name="body">
|
|
<rule pattern="\s+">
|
|
<token type="Text"/>
|
|
</rule>
|
|
<rule pattern=";.*$">
|
|
<token type="CommentSingle"/>
|
|
</rule>
|
|
<rule pattern="#\|">
|
|
<token type="CommentMultiline"/>
|
|
<push state="multiline-comment"/>
|
|
</rule>
|
|
<rule pattern="#\d*Y.*$">
|
|
<token type="CommentSpecial"/>
|
|
</rule>
|
|
<rule pattern=""(\\.|\\\n|[^"\\])*"">
|
|
<token type="LiteralString"/>
|
|
</rule>
|
|
<rule pattern=":(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule pattern="::(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule pattern=":#(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule pattern="'(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule pattern="'">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="`">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="[-+]?\d+\.?(?=[ "()\'\n,;`])">
|
|
<token type="LiteralNumberInteger"/>
|
|
</rule>
|
|
<rule pattern="[-+]?\d+/\d+(?=[ "()\'\n,;`])">
|
|
<token type="LiteralNumber"/>
|
|
</rule>
|
|
<rule pattern="[-+]?(\d*\.\d+([defls][-+]?\d+)?|\d+(\.\d*)?[defls][-+]?\d+)(?=[ "()\'\n,;`])">
|
|
<token type="LiteralNumberFloat"/>
|
|
</rule>
|
|
<rule pattern="#\\.(?=[ "()\'\n,;`])">
|
|
<token type="LiteralStringChar"/>
|
|
</rule>
|
|
<rule pattern="#\\(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)">
|
|
<token type="LiteralStringChar"/>
|
|
</rule>
|
|
<rule pattern="#\(">
|
|
<token type="Operator"/>
|
|
<push state="body"/>
|
|
</rule>
|
|
<rule pattern="#\d*\*[01]*">
|
|
<token type="LiteralOther"/>
|
|
</rule>
|
|
<rule pattern="#:(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule pattern="#[.,]">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="#\'">
|
|
<token type="NameFunction"/>
|
|
</rule>
|
|
<rule pattern="#b[+-]?[01]+(/[01]+)?">
|
|
<token type="LiteralNumberBin"/>
|
|
</rule>
|
|
<rule pattern="#o[+-]?[0-7]+(/[0-7]+)?">
|
|
<token type="LiteralNumberOct"/>
|
|
</rule>
|
|
<rule pattern="#x[+-]?[0-9a-f]+(/[0-9a-f]+)?">
|
|
<token type="LiteralNumberHex"/>
|
|
</rule>
|
|
<rule pattern="#\d+r[+-]?[0-9a-z]+(/[0-9a-z]+)?">
|
|
<token type="LiteralNumber"/>
|
|
</rule>
|
|
<rule pattern="(#c)(\()">
|
|
<bygroups>
|
|
<token type="LiteralNumber"/>
|
|
<token type="Punctuation"/>
|
|
</bygroups>
|
|
<push state="body"/>
|
|
</rule>
|
|
<rule pattern="(#\d+a)(\()">
|
|
<bygroups>
|
|
<token type="LiteralOther"/>
|
|
<token type="Punctuation"/>
|
|
</bygroups>
|
|
<push state="body"/>
|
|
</rule>
|
|
<rule pattern="(#s)(\()">
|
|
<bygroups>
|
|
<token type="LiteralOther"/>
|
|
<token type="Punctuation"/>
|
|
</bygroups>
|
|
<push state="body"/>
|
|
</rule>
|
|
<rule pattern="#p?"(\\.|[^"])*"">
|
|
<token type="LiteralOther"/>
|
|
</rule>
|
|
<rule pattern="#\d+=">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="#\d+#">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="#+nil(?=[ "()\'\n,;`])\s*\(">
|
|
<token type="CommentPreproc"/>
|
|
<push state="commented-form"/>
|
|
</rule>
|
|
<rule pattern="#[+-]">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="(,@|,|\.)">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="(t|nil)(?=[ "()\'\n,;`])">
|
|
<token type="NameConstant"/>
|
|
</rule>
|
|
<rule pattern="\*(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)\*">
|
|
<token type="NameVariableGlobal"/>
|
|
</rule>
|
|
<rule pattern="(\|[^|]+\||(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~])(?:\\.|[\w!$%&*+-/<=>?@\[\]^{}~]|[#.:])*)">
|
|
<token type="NameVariable"/>
|
|
</rule>
|
|
<rule pattern="\(">
|
|
<token type="Punctuation"/>
|
|
<push state="body"/>
|
|
</rule>
|
|
<rule pattern="\)">
|
|
<token type="Punctuation"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="root">
|
|
<rule>
|
|
<push state="body"/>
|
|
</rule>
|
|
</state>
|
|
<state name="multiline-comment">
|
|
<rule pattern="#\|">
|
|
<token type="CommentMultiline"/>
|
|
<push/>
|
|
</rule>
|
|
<rule pattern="\|#">
|
|
<token type="CommentMultiline"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule pattern="[^|#]+">
|
|
<token type="CommentMultiline"/>
|
|
</rule>
|
|
<rule pattern="[|#]">
|
|
<token type="CommentMultiline"/>
|
|
</rule>
|
|
</state>
|
|
<state name="commented-form">
|
|
<rule pattern="\(">
|
|
<token type="CommentPreproc"/>
|
|
<push/>
|
|
</rule>
|
|
<rule pattern="\)">
|
|
<token type="CommentPreproc"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule pattern="[^()]+">
|
|
<token type="CommentPreproc"/>
|
|
</rule>
|
|
</state>
|
|
</rules>
|
|
</lexer> |