Files
intellecton/venv/lib/python3.12/site-packages/pygments/__pycache__/lexer.cpython-312.pyc
T

329 lines
38 KiB
Plaintext
Raw Normal View History

Ë
dÀjR‰ãóX—dZddlZddlZddlZddlmZmZddlmZddl m
Z
m Z m Z m
Z
mZddlmZmZmZmZmZmZddlmZgd¢Zej2d «Zgd
¢Zed „«ZGd „d
e«ZGd„de¬«Z Gd„de «Z!Gd„de"«Z#Gd„d«Z$e$«Z%Gd„de&«Z'Gd„d«Z(d„Z)Gd„d«Z*e*«Z+d„Z,Gd„d «Z-Gd!„d"e«Z.Gd#„d$e«Z/Gd%„d&e e/¬«Z0Gd'„d(«Z1Gd)„d*e0«Z2d+„Z3Gd,„d-e/«Z4Gd.„d/e0e4¬«Z5y)0z·
pygments.lexer
~~~~~~~~~~~~~~
Base lexer classes.
:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
éN)Ú
apply_filtersÚFilter)Úget_filter_by_name)ÚErrorÚTextÚOtherÚ
WhitespaceÚ
_TokenType)Ú get_bool_optÚ get_int_optÚ get_list_optÚmake_analysatorÚFutureÚ guess_decode)Ú regex_opt)
ÚLexerÚ
RegexLexerÚExtendedRegexLexerÚDelegatingLexerÚ LexerContextÚincludeÚinheritÚbygroupsÚusingÚthisÚdefaultÚwordsÚline_rez.*?
))súutf-8)sÿþzutf-32)sþÿzutf-32be)sÿþzutf-16)sþÿzutf-16becó—y)Nç©)Úxs úQ/home/antigravity/intellecton/venv/lib/python3.12/site-packages/pygments/lexer.pyú<lambda>r%"ó�ócó—eZdZdZd„Zy)Ú LexerMetaz‚
This metaclass automagically converts ``analyse_text`` methods into
static methods which always return float values.
có\—d|vrt|d«|d<tj||||«S)NÚ analyse_text)rÚtypeÚ__new__)ÚmcsÚnameÚbasesÚds r$r-zLexerMeta.__new__+s3€Ø ˜QÑ Ü /°°.Ñ0AÓ BˆAˆnÑ Ü�|‰|˜C  u¨aÓ0Ð0r'N)Ú__name__Ú
__module__Ú __qualname__Ú__doc__r-r"r'r$r)r)%s „ñó
1r'r)có`—eZdZdZdZgZgZgZgZdZ dZ
dZ dZ d„Z
d„Zd„Zd„Zd„Zd d „Zd
„Zy) ra"
Lexer for a specific language.
See also :doc:`lexerdevelopment`, a high-level guide to writing
lexers.
Lexer classes have attributes used for choosing the most appropriate
lexer based on various criteria.
.. autoattribute:: name
:no-value:
.. autoattribute:: aliases
:no-value:
.. autoattribute:: filenames
:no-value:
.. autoattribute:: alias_filenames
.. autoattribute:: mimetypes
:no-value:
.. autoattribute:: priority
Lexers included in Pygments should have two additional attributes:
.. autoattribute:: url
:no-value:
.. autoattribute:: version_added
:no-value:
Lexers included in Pygments may have additional attributes:
.. autoattribute:: _example
:no-value:
You can pass options to the constructor. The basic options recognized
by all lexers and processed by the base `Lexer` class are:
``stripnl``
Strip leading and trailing newlines from the input (default: True).
``stripall``
Strip all leading and trailing whitespace from the input
(default: False).
``ensurenl``
Make sure that the input ends with a newline (default: True). This
is required for some lexers that consume input linewise.
.. versionadded:: 1.3
``tabsize``
If given and greater than 0, expand tabs in the input (default: 0).
``encoding``
If given, must be an encoding name. This encoding will be used to
convert the input string to Unicode, if it is not already a Unicode
string (default: ``'guess'``, which uses a simple UTF-8 / Locale /
Latin1 detection. Can also be ``'chardet'`` to use the chardet
library, if it is installed.
``inencoding``
Overrides the ``encoding`` if given.
Nrc ól—||_t|dd«|_t|dd«|_t|dd«|_t |dd«|_|jdd «|_|jd
«xs |j|_g|_ t|d d «D]}|j|«Œy
)a‘
This constructor takes arbitrary options as keyword arguments.
Every subclass must first process its own options and then call
the `Lexer` constructor, since it processes the basic
options like `stripnl`.
An example looks like this:
.. sourcecode:: python
def __init__(self, **options):
self.compress = options.get('compress', '')
Lexer.__init__(self, **options)
As these options must all be specifiable as strings (due to the
command line usage), there are various utility functions
available to help with that, see `Utilities`_.
ÚstripnlTÚstripallFÚensurenlÚtabsizerÚencodingÚguessÚ
inencodingÚfiltersr"N) Úoptionsr r8r9r:r r;Úgetr<r?r
Ú
add_filter)Úselfr@Úfilter_s r$Ú__init__zLexer.__init__‘s¡€ð&ˆŒ Ü# G¨Y¸Ó=ˆŒ Ü$ W¨j¸%Ó@ˆŒ
Ü$ W¨j¸$Ó?ˆŒ
Ü" 7¨I°qÓ9ˆŒ ØŸ ™  J°Ó8ˆŒ
ØŸ ™  LÓ1ÒB°T·]±]ˆŒ
؈Œ Ü# G¨Y¸Ó;ò %ˆGØ �O‰O˜GÕ $ñ %r'cóœ—|jr'd|jj›d|j›d�Sd|jj›d�S)Nz<pygments.lexers.z with ú>)r@Ú __class__r2©rCs r$Ú__repr__zLexer.__repr__¯sI€Ø �<Š<Ø& t§~¡~×'>Ñ'>Ð&?¸vÀdÇlÁlÐEUÐUVÐWÐ Wà& t§~¡~×'>Ñ'>Ð&?¸qÐAÐ Ar'c ór—t|t«s t|fi|¤Ž}|jj |«y)z8
Add a new stream filter to this lexer.
N)Ú
isinstancerrr?Úappend)rCrDr@s r$rBzLexer.add_filterµs/€ô˜'¤6Ô*Ü(¨Ñ<°GÑ<ˆGØ � ‰ ×јGÕ$r'có—y)aÁ
A static method which is called for lexer guessing.
It should analyse the text and return a float in the range
from ``0.0`` to ``1.0``. If it returns ``0.0``, the lexer
will not be selected as the most probable one, if it returns
``1.0``, it will be selected immediately. This is used by
`guess_lexer`.
The `LexerMeta` metaclass automatically wraps this function so
that it works like a static method (no ``self`` or ``cls``
parameter) and the return value is automatically converted to
`float`. If the return value is an object that is boolean `False`
it's the same as if the return values was ``0.0``.
Nr")Útexts r$r+zLexer.analyse_text½r&r'cóÊ—t|t«sì|jdk(rt|«\}}ní|jdk(r„ ddl}d}t D]6\}}|j|«sŒ|t|«dj|d«}n|€9|j|dd«}|j|jd«xsd d«}|}nZ|j|j«}|jd
«r.|td
«d}n|jd
«r|td
«d}|jd d «}|jd
d «}|jr|j«}n|jr|jd «}|j dkDr|j#|j «}|j$r|j'd «s|d z
}|S#t
$r}t d«|‚d}~wwxYw)zVApply preprocessing such as decoding the input, removing BOM and normalizing newlines.r=ÚchardetrNzkTo enable chardet encoding guessing, please install the chardet library from http://chardet.feedparser.org/Úreplaceir<ruz
ú
ú
)rLÚstrr<rrQÚ ImportErrorÚ
_encoding_mapÚ
startswithÚlenÚdecodeÚdetectrArRr9Ústripr8r;Ú
expandtabsr:Úendswith) rCrOÚ_rQÚeÚdecodedÚbomr<Úencs r$Ú_preprocess_lexer_inputzLexer._preprocess_lexer_inputÎsÁ€ô˜$¤Ô$Ø�}‰} Ò'Ü& tÓ,‘�‘aØ—‘ )Ò+ðTÛ"ð �Ü%2ò‘M�C˜Ø—‘ sÕ+Ø"&¤s¨3£x y /×"8Ñ"8¸À9Ó"M˜Ùðð
�?Ø!Ÿ.™.¨¨e¨t¨Ó5�CØ"Ÿk™k¨#¯'©'°*Ó*=Ò*HÀØ*3ó5�Gà‘à—{‘{ 4§=¡=Ó1�Ø—?‘? 8Ô,ؤ H£
 Ð/‘Dà�‰˜xÔ(ØœC ›M˜NÐ+�ð�|‰|˜F DÓ)ˆØ�|‰|˜D $Ó'ˆØ �=Š=Ø—:‘:“<‰DØ
�\Š\Ø—:‘:˜dÓ#ˆDØ �<‰<˜!Ò Ø—?‘? 4§<¡<Ó0ˆDØ �=Š= §¡¨tÔ!4Ø �D‰LˆDàˆ øôI#òTÜ%ð'LóMàRSðTûðTús¿GÇ G"Ç GÇG"cóx‡‡—‰j‰«Šˆˆfd„}|«}|st|‰j‰«}|S)ae
This method is the basic interface of a lexer. It is called by
the `highlight()` function. It must process the text and return an
iterable of ``(tokentype, value)`` pairs from `text`.
Normally, you don't need to override this method. The default
implementation processes the options recognized by all lexers
(`stripnl`, `stripall` and so on), and then yields all tokens
from `get_tokens_unprocessed()`, with the ``index`` dropped.
If `unfiltered` is set to `True`, the filtering mechanism is
bypassed even if filters are defined.
c3óN•K—‰j‰«D] \}}}||f–—Œy­w©N)Úget_tokens_unprocessed)r_ÚtÚvrCrOs €€r$Ústreamerz"Lexer.get_tokens.<locals>.streamer
s0øèø€Ø×6Ñ6°tÓ<ò
‘��1�aؘ�d“
ñ
ùsƒ"%)rdrr?)rCrOÚ
unfilteredrkÚstreams`` r$Ú
get_tokenszLexer.get_tokensýs=ù€ð×+Ñ+¨DÓ1ˆõ ñ“ˆÙÜ" 6¨4¯<©<¸Ó>ˆF؈
r'có—t‚)aS
This method should process the text and return an iterable of
``(index, tokentype, value)`` tuples where ``index`` is the starting
position of the token within the input text.
It must be overridden by subclasses. It is recommended to
implement it as a generator to maximize effectiveness.
)ÚNotImplementedError)rCrOs r$rhzLexer.get_tokens_unprocesseds
€ô"Ð!r')F)r2r3r4r5r/ÚaliasesÚ filenamesÚalias_filenamesÚ mimetypesÚpriorityÚurlÚ
version_addedÚ_examplerErJrBr+rdrnrhr"r'r$rr1sl„ñ8ðv €Dð€Gð
€Ið€Oð€Ið€Hð €Cð€Mð€Hò%ò<Bò %ò ò"-ó^ó0 "r'r)Ú metaclasscó —eZdZdZefd„Zd„Zy)ra 
This lexer takes two lexer as arguments. A root lexer and
a language lexer. First everything is scanned using the language
lexer, afterwards all ``Other`` tokens are lexed using the root
lexer.
The lexers from the ``template`` lexer package use this base lexer.
c ór—|di|¤Ž|_|di|¤Ž|_||_tj|fi|¤Žy©Nr")Ú
root_lexerÚlanguage_lexerÚneedlerrE)rCÚ _root_lexerÚ_language_lexerÚ_needler@s r$rEzDelegatingLexer.__init__+s9€Ù%Ñ0¨Ñ0ˆŒÙ-Ñ8°Ñ8ˆÔ؈Œ Ü
�‰�tÑ'˜wÓ'r'cól—d}g}g}|jj|«D]N\}}}||jur&|r|jt |«|f«g}||z
}Œ;|j|||f«ŒP|r|jt |«|f«t ||j j|««S)NÚ)r~rhrrMrYÚ
do_insertionsr})rCrOÚbufferedÚ
insertionsÚ
lng_bufferÚirirjs r$rhz&DelegatingLexer.get_tokens_unprocessed1s¾€ØˆØˆ
؈
Ø×*Ñ*×AÑAÀ$ÓGò -‰GˆAˆq�!Ø�D—K‘KÑÙØ×%Ñ%¤s¨8£}°jÐ&AÔBØ!#�JؘA‘
‘à×!Ñ! 1 a¨ )Õ,ð -ñ Ø × Ñ œs 8›}¨jÐ9Ô :ܘZØ!Ÿ_™_×CÑCÀHÓMóOð Or'N)r2r3r4r5rrErhr"r'r$rr!s„ñð>Có(ó Or'rcó—eZdZdZy)rzI
Indicates that a state should include rules from another state.
N©r2r3r4r5r"r'r$rrHs „ñð r'rcó—eZdZdZd„Zy)Ú_inheritzC
Indicates the a state should inherit from its superclass.
có—y)Nrr"rIs r$rJz_inherit.__repr__Ss€Ør'N)r2r3r4r5rJr"r'r$r�r�Os „ñór'r�có—eZdZdZd„Zd„Zy)Úcombinedz:
Indicates a state combined from multiple states.
có.—tj||«Srg)Útupler-)ÚclsÚargss r$r-zcombined.__new__^s€Ü�}‰}˜S $Ó'Ð'r'có—yrgr")rCr”s r$rEzcombined.__init__as€à r'N)r2r3r4r5r-rEr"r'r$r�r�Ys„ñò(ó
r'r�có:—eZdZdZd„Zd d„Zd d„Zd d„Zd„Zd„Z y)
Ú _PseudoMatchz:
A pseudo match object constructed from a string.
có —||_||_yrg)Ú_textÚ_start)rCÚstartrOs r$rEz_PseudoMatch.__init__ks€ØˆŒ
؈� r'Ncó—|jSrg)rš©rCÚargs r$r›z_PseudoMatch.startos €Ø�{‰{Ðr'cóF—|jt|j«zSrg)ršrYr™r�s r$Úendz_PseudoMatch.endrs€Ø�{‰{œS §¡›_Ñ,Ð,r'có4—|r td«‚|jS)Nz
No such group)Ú
IndexErrorr™r�s r$Úgroupz_PseudoMatch.groupus€Ù ܘ_Ó-Ð -Ø�z‰zÐr'có—|jfSrg)r™rIs r$Úgroupsz_PseudoMatch.groupszs€Ø—
‘
ˆ}Ðr'có—iSrgr"rIs r$Ú groupdictz_PseudoMatch.groupdict}s€Øˆ r'rg)
r2r3r4r5rEr›r r£r¥r§r"r'r$r—r—fs%„ñòóó-óò
ór'r—có‡—dˆfd„ }|S)zL
Callback that yields multiple actions for each group in the match.
c
3ó¶•K—t‰«D]®\}}|€Œ t|«tur1|j|dz«}|sŒ1|j |dz«||f–—ŒK|j|dz«}|€Œb|r|j |dz«|_||t
|j |dz«|«|«D] }|sŒ|–—Œ Œ°|r|j«|_yy­w)Né)Ú enumerater,r
r£r›Úposr—r )ÚlexerÚmatchÚctxr‰ÚactionÚdataÚitemr”s €r$Úcallbackzbygroups.<locals>.callback…sßøèø€Ü" 4›ò '‰IˆAˆv؈~ØÜ�f“¤Ñ+Ø—{‘{ 1 q¡5Ó)�ÚØŸ+™+ a¨!¡eÓ,¨f°dÐ:Ó:à—{‘{ 1 q¡5Ó)�ØÑ#ÙØ"'§+¡+¨a°!©eÓ"4˜œÙ & uÜ'3°E·K±KÀÀAÁÓ4FÈÓ'MÈsó!Tò'˜âØ"&›Jñ'ð 'ñ Ø—i‘i“kˆC�Gð ùsƒ<CÁ0CÁ1ACÂ8!Crgr")r”r³s` r$rr�sø€õ"ð& €Or'có—eZdZdZy)Ú_ThiszX
Special singleton used for indicating the caller class.
Used by ``using``.
Nr‹r"r'r$rµrµ›s„òr'rµc 󲇇‡—iŠd‰vr4‰jd«}t|ttf«r|‰d<nd|f‰d<‰tur dˆˆfd„ }|Sdˆˆˆfd„ }|S)aÂ
Callback that processes the match with a different lexer.
The keyword arguments are forwarded to the lexer, except `state` which
is handled separately.
`state` specifies the state that the new lexer will start in, and can
be an enumerable such as ('root', 'inline', 'string') or a simple
string which is assumed to be on top of the root state.
Note: For that to work, `_other` must not be an `ExtendedRegexLexer`.
ÚstateÚstackÚrootc3ó@•K—‰
r9t|j«}|j‰
«|jdi|¤Ž}n|}|j «}|j
|j
«fi‰ ¤ŽD]\}}}||z||f–—Œ|r|j«|_yy­wr|) Údictr@ÚupdaterHr›rhr£r r¬) r­r®r¯r1ÚlxÚsr‰rirjÚ gt_kwargsÚkwargss €€r$r³zusing.<locals>.callbackºs›øèø€ñ䘟™Ó'�Ø—‘˜Ô Ø$�U—_‘_Ñ) qÑ)‘à�Ø— ‘ “
ˆAØ4˜2×4Ñ4°U·[±[³]ÑPÀiÑPò
"‘��1�aؘ!‘e˜Q �kÓ!ð
"áØŸ)™)›+�•ðùsƒBBc3ó"•K—t|j«}|j‰ «‰ di|¤Ž}|j«}|j|j «fi‰
¤ŽD]\}}}||z||f–—Œ|r|j
«|_yy­wr|)r»r@r¼r›rhr£r r¬) r­r®r¯r1r½r¾r‰rirjÚ_otherr¿rÀs €€€r$r³zusing.<locals>.callbackÊs‰øèø€ä�U—]‘]Ó#ˆAØ
�H‰H�VÔ Ù‘˜!‘ˆBà— ‘ “
ˆAØ4˜2×4Ñ4°U·[±[³]ÑPÀiÑPò
"‘��1�aؘ!‘e˜Q �kÓ!ð
"áØŸ)™)›+�•ðùsƒB Brg)ÚpoprLÚlistr’r)rÂrÀr¾r³r¿s`` @r$rr¤seú€ð€IØ�&ÑØ �J‰J�wÓ ˆÜ �aœ$¤˜Ô 'Ø!"ˆI�gÒ à"(¨! ˆI�gÑ à
”�~ö &ð6 €O÷
&ð €Or'có—eZdZdZd„Zy)rzÑ
Indicates a state or state action (e.g. #pop) to apply.
For example default('#pop') is equivalent to ('', Token, '#pop')
Note that state tuples may be used as well.
.. versionadded:: 2.0
có—||_yrg)r·)rCr·s r$rEzdefault.__init__às €Øˆ�
r'N)r2r3r4r5rEr"r'r$rrØs „ñór'rcó—eZdZdZdd„Zd„Zy)rz•
Indicates a list of literal words that is transformed into an optimized
regex that matches any of the words.
.. versionadded:: 2.0
có.—||_||_||_yrg)rÚprefixÚsuffix)rCrrÉrÊs r$rEzwords.__init__ës€ØˆŒ
؈Œ ؈� r'cóZ—t|j|j|j¬«S)N©rÉrÊ)rrrÉrÊrIs r$rAz words.getðs€Ü˜Ÿ™¨D¯K©KÀÇ Á ÔLÐLr'N)r„r„)r2r3r4r5rErAr"r'r$rräs„ñó ó
Mr'rcó<—eZdZdZd„Zd„Zd„Zd„Zd
d„Zd„Z d „Z
y) ÚRegexLexerMetazw
Metaclass for RegexLexer, creates the self._tokens attribute from
self.tokens on the first instantiation.
có‚—t|t«r|j«}tj||«j
S)zBPreprocess the regular expression component of a token definition.)rLrrAÚreÚcompiler®)r“ÚregexÚrflagsr·s r$Ú_process_regexzRegexLexerMeta._process_regexús.€ä �eœVÔ $Ø—I‘I“KˆEÜ�z‰z˜% Ó(×.Ñ.Ð.r'cóR—t|«tust|«s
Jd|›�«‚|S)z5Preprocess the token component of a token definition.z0token type must be simple type or callable, not )r,r
Úcallable)r“Útokens r$Ú_process_tokenzRegexLexerMeta._process_tokens2€ä�E‹{œjÑ(¬H°U¬Oð IØ>¸u¸iÐ Hó IÐ;àˆ r'cóä—t|t«r5|dk(ry||vr|fS|dk(r|S|dddk(rt|dd« SJd|›�«‚t|t«rfd|jz}|xjd z
c_g}|D]3}||k7s
Jd
|›�«‚|j |j
|||««Œ5|||<|fSt|t«r|D]}||vrŒ|d vrŒ
Jd|z«‚|SJd |›�«‚)
z=Preprocess the state transition action of a token definition.ú#popéÿÿÿÿú#pushNéz#pop:zunknown new state z_tmp_%drªzcircular state ref )rÚrÜzunknown new state def )rLrUÚintr�Ú_tmpnameÚextendÚ_process_stater’)r“Ú new_stateÚ unprocessedÚ processedÚ tmp_stateÚitokensÚistates r$Ú_process_new_statez!RegexLexerMeta._process_new_statesQ€ä �i¤Ô %à˜FÒ"ØØ˜kÑ)Ø!�|Ð#ؘgÒ%Ø Ð Ø˜2˜A� 'Ò)ܘI a b˜MÓ*Ð*Ð*à@Ð 2°9°-Ð@Ó@�uÜ
˜ ¤8Ô
,à! C§L¡LÑ0ˆIØ �LŠL˜AÑ �L؈GØ#ò
F�Ø Ò*ÐLÐ.AÀ&ÀÐ,LÓLÐ*Ø—‘˜s×1Ñ1°+Ø2;¸Vó EõFð
Fð$+ˆI�iÑ Ø�<Ð Ü
˜ ¤5Ô
)à#ò
2�Ø +Ò-ØÐ"3Ò3ð2à(¨6Ñ1ó2ð4ð
2ðÐ à @Ð2°9°-Ð@Ó @�5r'c ó~—t|t«s
Jd|›�«‚|ddk7s
Jd|›�«‚||vr||Sgx}||<|j}||D�]?}t|t«r;||k7s
Jd|›�«‚|j |j ||t|«««ŒOt|t «rŒ`t|t«rO|j|j||«}|jtjd«jd|f«Œ¿t|«tus
Jd|›�«‚ |j!|d||«}|j'|d
«}
t)|«dk(rd}n|j|d||«}|j||
|f«�ŒB|S#t"$r } t%d |d›d
|›d |›d | ›�«| ‚d} ~ wwxYw)z%Preprocess a single state definition.zwrong state name rú#zinvalid state name zcircular state reference r„Nzwrong rule def zuncompilable regex z
in state z of z: rªé)rLrUÚflagsrràrár�rrèr·rMrÐrÑr®r,r’rÔÚ ExceptionÚ
ValueErrorrØrY) r“rãrär·ÚtokensrÓÚtdefrâÚrexÚerrr×s r$rázRegexLexerMeta._process_state)sü€ä˜%¤Ô%ÐDÐ):¸5¸)Ð'DÓDÐ%Ø�Q‰x˜3ŠÐ?Ð"5°e°YÐ ?Ó?ˆØ �IÑ Ø˜UÑ#Ð #Ø$&Ð&ˆ�˜5Ñ!Ø—‘ˆØ Ñ&ó 3ˆDܘ$¤Ô(à˜u’}ÐKÐ(AÀ%ÀÐ&KÓK�}Ø—
‘
˜c×0Ñ0°¸iÜ14°T³ó<ô=àܘ$¤Ô)ðܘ$¤Ô(Ø×2Ñ2°4·:±:¸{ÈIÓV� Ø—
‘
œrŸz™z¨"›~×3Ñ3°T¸9ÐEÔFØä˜“:¤Ñ&Ð B¨/¸$¸Ð(BÓ BÐ&ð
rØ×(Ñ(¨¨a©°&¸%Ó@�ð×&Ñ& t¨A¡wÓ/ˆEä�4‹y˜AŠ~Ø ‘ à×2Ñ2°4¸±7Ø3>À óK� ð
�M‰M˜3  yÐ1Ö 2ðA 3ðBˆ
øôò
rÜ Ð#6°t¸A±w°kÀÈEÈ9ÐTXÐY\ÐX_Ð_aÐbeÐafÐ!gÓhÐnqÐqûð
rúsÄ)FÆ F<ÆF7Æ7F<Ncó”—ix}|j|<|xs|j|}t|«D]}|j|||«Œ|S)z-Preprocess a dictionary of token definitions.)Ú _all_tokensrïrÄrá)r“r/Ú tokendefsrär·s r$Úprocess_tokendefzRegexLexerMeta.process_tokendefTsS€à,.Ð.ˆ �C—O‘O DÑ)ØÒ1 §¡¨DÑ!1ˆ ܘ)“_ò <ˆEØ × Ñ ˜y¨)°UÕ ;ð <àÐr'có²—i}i}|jD]¥}|jjdi«}|j«D]t\}}|j|«}|€!|||< |j t
«}|||<Œ:|j|d«}|€ŒO||||dz |j t
«} || z||<ŒvŒ§|S#t $rYŒ†wxYw#t $rYŒ•wxYw)a
Merge tokens from superclasses in MRO order, returning a single tokendef
dictionary.
Any state that is not defined by a subclass will be inherited
automatically. States that *are* defined by subclasses will, by
default, override that state in the superclass. If a subclass wishes to
inherit definitions from a superclass, it can use the special value
"inherit", which will cause the superclass' state definition to be
included at that point in the state.
rïNrª)Ú__mro__Ú__dict__rAÚitemsÚindexrrîrÃ)
r“rïÚ inheritableÚcÚtoksr·rúÚcuritemsÚ inherit_ndxÚ new_inh_ndxs
r$Ú
get_tokendefszRegexLexerMeta.get_tokendefs\s€ðˆØˆ Ø—‘ò CˆAØ—:‘:—>‘> (¨BÓ/ˆDà $§
¡
£ ò
C‘ ��uØ!Ÿ:™: eÓ,�ØÐ#ð
%*�F˜5‘Mð!Ø&+§k¡k´'Ó&:˜ ð*5�K Ñ&Øà)Ÿo™o¨e°TÓ:� ØÐ&Øð7<�˜ [°¡]Ð3ðCð#(§+¡+¬gÓ"6�Kð*5°{Ñ)B�K Ò&ñ9
Cð CðBˆ
øô)&ò!Ù ð!ûô"òÙðús$ÁB;ÂC
Â; CÃCÃ
CÃCcóè—d|jvrLi|_d|_t|d«r
|jrn%|j d|j
««|_tj|g|¢­i|¤ŽS)z:Instantiate cls after preprocessing its token definitions.Ú_tokensrÚtoken_variantsr„)
rùrôrßÚhasattrrrörrr,Ú__call__)r“r”Úkwdss r$rzRegexLexerMeta.__call__�sh€à ˜CŸL™LÑ (Ø ˆCŒO؈CŒLÜ�sÐ,Ô-°#×2DÒ2Dàà!×2Ñ2°2°s×7HÑ7HÓ7JÓK�” ä�}‰}˜SÐ0 4Ò0¨4Ñ0Ð0r'rg) r2r3r4r5rÔrØrèrárörrr"r'r$rÎrÎôs.„ñò
/ò ò !AòF)óVò/ób 1r'rÎcó4—eZdZdZej
ZiZdd„Zy)rz±
Base for simple stateful regular expression-based lexers.
Simplifies the lexing process so that you need only
provide a list of states and regular expressions.
c#ó:K—d}|j}t|«}||d} |D�]&\}}} |||«}
|