mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-10 05:22:23 +00:00
745 lines
21 KiB
XML
745 lines
21 KiB
XML
<lexer>
|
|
<config>
|
|
<name>Elixir</name>
|
|
<alias>elixir</alias>
|
|
<alias>ex</alias>
|
|
<alias>exs</alias>
|
|
<filename>*.ex</filename>
|
|
<filename>*.eex</filename>
|
|
<filename>*.exs</filename>
|
|
<mime_type>text/x-elixir</mime_type>
|
|
</config>
|
|
<rules>
|
|
<state name="cb-intp">
|
|
<rule pattern="[^#\}\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="escapes"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\}[a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="triquot-end">
|
|
<rule pattern="[a-zA-Z]+">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="apos-no-intp">
|
|
<rule pattern="[^'\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="'[a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="slas-no-intp">
|
|
<rule pattern="[^/\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="/[a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="pipe-no-intp">
|
|
<rule pattern="[^\|\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\|[a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="apos-intp">
|
|
<rule pattern="[^#'\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="escapes"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="'[a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="cb-no-intp">
|
|
<rule pattern="[^\}\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\}[a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="heredoc_double">
|
|
<rule pattern="^\s*"""">
|
|
<token type="LiteralStringHeredoc"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="heredoc_interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="triapos-end">
|
|
<rule pattern="[a-zA-Z]+">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="interpol_string">
|
|
<rule pattern="\}">
|
|
<token type="LiteralStringInterpol"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="root"/>
|
|
</rule>
|
|
</state>
|
|
<state name="triquot-intp">
|
|
<rule pattern="^\s*"""">
|
|
<token type="LiteralStringHeredoc"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="heredoc_interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="interpol">
|
|
<rule pattern="#\{">
|
|
<token type="LiteralStringInterpol"/>
|
|
<push state="interpol_string"/>
|
|
</rule>
|
|
</state>
|
|
<state name="pa-no-intp">
|
|
<rule pattern="[^\)\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\)[a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="map_key">
|
|
<rule>
|
|
<include state="root"/>
|
|
</rule>
|
|
<rule pattern=":">
|
|
<token type="Punctuation"/>
|
|
<push state="map_val"/>
|
|
</rule>
|
|
<rule pattern="=>">
|
|
<token type="Punctuation"/>
|
|
<push state="map_val"/>
|
|
</rule>
|
|
<rule pattern="\}">
|
|
<token type="Punctuation"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="pa-intp">
|
|
<rule pattern="[^#\)\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="escapes"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\)[a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="tuple">
|
|
<rule>
|
|
<include state="root"/>
|
|
</rule>
|
|
<rule pattern="\}">
|
|
<token type="Punctuation"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="root">
|
|
<rule pattern="\s+">
|
|
<token type="Text"/>
|
|
</rule>
|
|
<rule pattern="#.*$">
|
|
<token type="CommentSingle"/>
|
|
</rule>
|
|
<rule pattern="(\?)(\\x\{)([\da-fA-F]+)(\})">
|
|
<bygroups>
|
|
<token type="LiteralStringChar"/>
|
|
<token type="LiteralStringEscape"/>
|
|
<token type="LiteralNumberHex"/>
|
|
<token type="LiteralStringEscape"/>
|
|
</bygroups>
|
|
</rule>
|
|
<rule pattern="(\?)(\\x[\da-fA-F]{1,2})">
|
|
<bygroups>
|
|
<token type="LiteralStringChar"/>
|
|
<token type="LiteralStringEscape"/>
|
|
</bygroups>
|
|
</rule>
|
|
<rule pattern="(\?)(\\[abdefnrstv])">
|
|
<bygroups>
|
|
<token type="LiteralStringChar"/>
|
|
<token type="LiteralStringEscape"/>
|
|
</bygroups>
|
|
</rule>
|
|
<rule pattern="\?\\?.">
|
|
<token type="LiteralStringChar"/>
|
|
</rule>
|
|
<rule pattern=":::">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule pattern="::">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern=":(?:\.\.\.|<<>>|%\{\}|%|\{\})">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule pattern=":(?:(?:\.\.\.|[a-z_]\w*[!?]?)|[A-Z]\w*(?:\.[A-Z]\w*)*|(?:\<\<\<|\>\>\>|\|\|\||\&\&\&|\^\^\^|\~\~\~|\=\=\=|\!\=\=|\~\>\>|\<\~\>|\|\~\>|\<\|\>|\=\=|\!\=|\<\=|\>\=|\&\&|\|\||\<\>|\+\+|\-\-|\|\>|\=\~|\-\>|\<\-|\||\.|\=|\~\>|\<\~|\<|\>|\+|\-|\*|\/|\!|\^|\&))">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule pattern=":"">
|
|
<token type="LiteralStringSymbol"/>
|
|
<push state="string_double_atom"/>
|
|
</rule>
|
|
<rule pattern=":'">
|
|
<token type="LiteralStringSymbol"/>
|
|
<push state="string_single_atom"/>
|
|
</rule>
|
|
<rule pattern="((?:\.\.\.|<<>>|%\{\}|%|\{\})|(?:(?:\.\.\.|[a-z_]\w*[!?]?)|[A-Z]\w*(?:\.[A-Z]\w*)*|(?:\<\<\<|\>\>\>|\|\|\||\&\&\&|\^\^\^|\~\~\~|\=\=\=|\!\=\=|\~\>\>|\<\~\>|\|\~\>|\<\|\>|\=\=|\!\=|\<\=|\>\=|\&\&|\|\||\<\>|\+\+|\-\-|\|\>|\=\~|\-\>|\<\-|\||\.|\=|\~\>|\<\~|\<|\>|\+|\-|\*|\/|\!|\^|\&)))(:)(?=\s|\n)">
|
|
<bygroups>
|
|
<token type="LiteralStringSymbol"/>
|
|
<token type="Punctuation"/>
|
|
</bygroups>
|
|
</rule>
|
|
<rule pattern="(fn|do|end|after|else|rescue|catch)\b">
|
|
<token type="Keyword"/>
|
|
</rule>
|
|
<rule pattern="(not|and|or|when|in)\b">
|
|
<token type="OperatorWord"/>
|
|
</rule>
|
|
<rule pattern="(case|cond|for|if|unless|try|receive|raise|quote|unquote|unquote_splicing|throw|super|while)\b">
|
|
<token type="Keyword"/>
|
|
</rule>
|
|
<rule pattern="(def|defp|defmodule|defprotocol|defmacro|defmacrop|defdelegate|defexception|defstruct|defimpl|defcallback)\b">
|
|
<token type="KeywordDeclaration"/>
|
|
</rule>
|
|
<rule pattern="(import|require|use|alias)\b">
|
|
<token type="KeywordNamespace"/>
|
|
</rule>
|
|
<rule pattern="(nil|true|false)\b">
|
|
<token type="NameConstant"/>
|
|
</rule>
|
|
<rule pattern="(_|__MODULE__|__DIR__|__ENV__|__CALLER__)\b">
|
|
<token type="NamePseudo"/>
|
|
</rule>
|
|
<rule pattern="@(?:\.\.\.|[a-z_]\w*[!?]?)">
|
|
<token type="NameAttribute"/>
|
|
</rule>
|
|
<rule pattern="(?:\.\.\.|[a-z_]\w*[!?]?)">
|
|
<token type="Name"/>
|
|
</rule>
|
|
<rule pattern="(%?)([A-Z]\w*(?:\.[A-Z]\w*)*)">
|
|
<bygroups>
|
|
<token type="Punctuation"/>
|
|
<token type="NameClass"/>
|
|
</bygroups>
|
|
</rule>
|
|
<rule pattern="\<\<\<|\>\>\>|\|\|\||\&\&\&|\^\^\^|\~\~\~|\=\=\=|\!\=\=|\~\>\>|\<\~\>|\|\~\>|\<\|\>">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="\=\=|\!\=|\<\=|\>\=|\&\&|\|\||\<\>|\+\+|\-\-|\|\>|\=\~|\-\>|\<\-|\||\.|\=|\~\>|\<\~">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="\\\\|\<\<|\>\>|\=\>|\(|\)|\:|\;|\,|\[|\]">
|
|
<token type="Punctuation"/>
|
|
</rule>
|
|
<rule pattern="&\d">
|
|
<token type="NameEntity"/>
|
|
</rule>
|
|
<rule pattern="\<|\>|\+|\-|\*|\/|\!|\^|\&">
|
|
<token type="Operator"/>
|
|
</rule>
|
|
<rule pattern="0b[01](_?[01])*">
|
|
<token type="LiteralNumberBin"/>
|
|
</rule>
|
|
<rule pattern="0o[0-7](_?[0-7])*">
|
|
<token type="LiteralNumberOct"/>
|
|
</rule>
|
|
<rule pattern="0x[\da-fA-F](_?[\dA-Fa-f])*">
|
|
<token type="LiteralNumberHex"/>
|
|
</rule>
|
|
<rule pattern="\d(_?\d)*\.\d(_?\d)*([eE][-+]?\d(_?\d)*)?">
|
|
<token type="LiteralNumberFloat"/>
|
|
</rule>
|
|
<rule pattern="\d(_?\d)*">
|
|
<token type="LiteralNumberInteger"/>
|
|
</rule>
|
|
<rule pattern=""""\s*">
|
|
<token type="LiteralStringHeredoc"/>
|
|
<push state="heredoc_double"/>
|
|
</rule>
|
|
<rule pattern="'''\s*$">
|
|
<token type="LiteralStringHeredoc"/>
|
|
<push state="heredoc_single"/>
|
|
</rule>
|
|
<rule pattern=""">
|
|
<token type="LiteralStringDouble"/>
|
|
<push state="string_double"/>
|
|
</rule>
|
|
<rule pattern="'">
|
|
<token type="LiteralStringSingle"/>
|
|
<push state="string_single"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="sigils"/>
|
|
</rule>
|
|
<rule pattern="%\{">
|
|
<token type="Punctuation"/>
|
|
<push state="map_key"/>
|
|
</rule>
|
|
<rule pattern="\{">
|
|
<token type="Punctuation"/>
|
|
<push state="tuple"/>
|
|
</rule>
|
|
</state>
|
|
<state name="sigils">
|
|
<rule pattern="(~[a-z])(""")">
|
|
<bygroups>
|
|
<token type="LiteralStringOther"/>
|
|
<token type="LiteralStringHeredoc"/>
|
|
</bygroups>
|
|
<push state="triquot-end" state="triquot-intp"/>
|
|
</rule>
|
|
<rule pattern="(~[A-Z])(""")">
|
|
<bygroups>
|
|
<token type="LiteralStringOther"/>
|
|
<token type="LiteralStringHeredoc"/>
|
|
</bygroups>
|
|
<push state="triquot-end" state="triquot-no-intp"/>
|
|
</rule>
|
|
<rule pattern="(~[a-z])(''')">
|
|
<bygroups>
|
|
<token type="LiteralStringOther"/>
|
|
<token type="LiteralStringHeredoc"/>
|
|
</bygroups>
|
|
<push state="triapos-end" state="triapos-intp"/>
|
|
</rule>
|
|
<rule pattern="(~[A-Z])(''')">
|
|
<bygroups>
|
|
<token type="LiteralStringOther"/>
|
|
<token type="LiteralStringHeredoc"/>
|
|
</bygroups>
|
|
<push state="triapos-end" state="triapos-no-intp"/>
|
|
</rule>
|
|
<rule pattern="~[a-z]\{">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="cb-intp"/>
|
|
</rule>
|
|
<rule pattern="~[A-Z]\{">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="cb-no-intp"/>
|
|
</rule>
|
|
<rule pattern="~[a-z]\[">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="sb-intp"/>
|
|
</rule>
|
|
<rule pattern="~[A-Z]\[">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="sb-no-intp"/>
|
|
</rule>
|
|
<rule pattern="~[a-z]\(">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="pa-intp"/>
|
|
</rule>
|
|
<rule pattern="~[A-Z]\(">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="pa-no-intp"/>
|
|
</rule>
|
|
<rule pattern="~[a-z]<">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="ab-intp"/>
|
|
</rule>
|
|
<rule pattern="~[A-Z]<">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="ab-no-intp"/>
|
|
</rule>
|
|
<rule pattern="~[a-z]/">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="slas-intp"/>
|
|
</rule>
|
|
<rule pattern="~[A-Z]/">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="slas-no-intp"/>
|
|
</rule>
|
|
<rule pattern="~[a-z]\|">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="pipe-intp"/>
|
|
</rule>
|
|
<rule pattern="~[A-Z]\|">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="pipe-no-intp"/>
|
|
</rule>
|
|
<rule pattern="~[a-z]"">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="quot-intp"/>
|
|
</rule>
|
|
<rule pattern="~[A-Z]"">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="quot-no-intp"/>
|
|
</rule>
|
|
<rule pattern="~[a-z]'">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="apos-intp"/>
|
|
</rule>
|
|
<rule pattern="~[A-Z]'">
|
|
<token type="LiteralStringOther"/>
|
|
<push state="apos-no-intp"/>
|
|
</rule>
|
|
</state>
|
|
<state name="triapos-intp">
|
|
<rule pattern="^\s*'''">
|
|
<token type="LiteralStringHeredoc"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="heredoc_interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="string_single_atom">
|
|
<rule pattern="[^#'\\]+">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="escapes"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule pattern="(')">
|
|
<bygroups>
|
|
<token type="LiteralStringSymbol"/>
|
|
</bygroups>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="quot-intp">
|
|
<rule pattern="[^#"\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="escapes"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern=""[a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="sb-no-intp">
|
|
<rule pattern="[^\]\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\][a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="slas-intp">
|
|
<rule pattern="[^#/\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="escapes"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="/[a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="sb-intp">
|
|
<rule pattern="[^#\]\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="escapes"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\][a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="heredoc_no_interpol">
|
|
<rule pattern="[^\\\n]+">
|
|
<token type="LiteralStringHeredoc"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringHeredoc"/>
|
|
</rule>
|
|
<rule pattern="\n+">
|
|
<token type="LiteralStringHeredoc"/>
|
|
</rule>
|
|
</state>
|
|
<state name="pipe-intp">
|
|
<rule pattern="[^#\|\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="escapes"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\|[a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="map_val">
|
|
<rule>
|
|
<include state="root"/>
|
|
</rule>
|
|
<rule pattern=",">
|
|
<token type="Punctuation"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule pattern="(?=\})">
|
|
<token type="Punctuation"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="heredoc_single">
|
|
<rule pattern="^\s*'''">
|
|
<token type="LiteralStringHeredoc"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="heredoc_interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="heredoc_interpol">
|
|
<rule pattern="[^#\\\n]+">
|
|
<token type="LiteralStringHeredoc"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="escapes"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringHeredoc"/>
|
|
</rule>
|
|
<rule pattern="\n+">
|
|
<token type="LiteralStringHeredoc"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="string_single">
|
|
<rule pattern="[^#'\\]+">
|
|
<token type="LiteralStringSingle"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="escapes"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringSingle"/>
|
|
</rule>
|
|
<rule pattern="(')">
|
|
<bygroups>
|
|
<token type="LiteralStringSingle"/>
|
|
</bygroups>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="string_double_atom">
|
|
<rule pattern="[^#"\\]+">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="escapes"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringSymbol"/>
|
|
</rule>
|
|
<rule pattern="(")">
|
|
<bygroups>
|
|
<token type="LiteralStringSymbol"/>
|
|
</bygroups>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="ab-no-intp">
|
|
<rule pattern="[^>\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern=">[a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="ab-intp">
|
|
<rule pattern="[^#>\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="escapes"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern=">[a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="quot-no-intp">
|
|
<rule pattern="[^"\\]+">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringOther"/>
|
|
</rule>
|
|
<rule pattern=""[a-zA-Z]*">
|
|
<token type="LiteralStringOther"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
</state>
|
|
<state name="triapos-no-intp">
|
|
<rule pattern="^\s*'''">
|
|
<token type="LiteralStringHeredoc"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="heredoc_no_interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="string_double">
|
|
<rule pattern="[^#"\\]+">
|
|
<token type="LiteralStringDouble"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="escapes"/>
|
|
</rule>
|
|
<rule pattern="\\.">
|
|
<token type="LiteralStringDouble"/>
|
|
</rule>
|
|
<rule pattern="(")">
|
|
<bygroups>
|
|
<token type="LiteralStringDouble"/>
|
|
</bygroups>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="interpol"/>
|
|
</rule>
|
|
</state>
|
|
<state name="escapes">
|
|
<rule pattern="(\\x\{)([\da-fA-F]+)(\})">
|
|
<bygroups>
|
|
<token type="LiteralStringEscape"/>
|
|
<token type="LiteralNumberHex"/>
|
|
<token type="LiteralStringEscape"/>
|
|
</bygroups>
|
|
</rule>
|
|
<rule pattern="(\\x[\da-fA-F]{1,2})">
|
|
<token type="LiteralStringEscape"/>
|
|
</rule>
|
|
<rule pattern="(\\[abdefnrstv])">
|
|
<token type="LiteralStringEscape"/>
|
|
</rule>
|
|
</state>
|
|
<state name="triquot-no-intp">
|
|
<rule pattern="^\s*"""">
|
|
<token type="LiteralStringHeredoc"/>
|
|
<pop depth="1"/>
|
|
</rule>
|
|
<rule>
|
|
<include state="heredoc_no_interpol"/>
|
|
</rule>
|
|
</state>
|
|
</rules>
|
|
</lexer>
|