3

V'ícœ(ã@s¼dZddlmZmZmZmZddlmZmZm	Z	m
Z
mZmZm
Z
mZmZdddddd	gZGd
d„deƒZGdd„deƒZGdd„deƒZGd
d„deƒZGdd„deƒZGdd	„d	eƒZdS)zÓ
    pygments.lexers.esoteric
    ~~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for esoteric languages.

    :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é)Ú
RegexLexerÚincludeÚwordsÚbygroups)	ÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚErrorÚ
WhitespaceÚBrainfuckLexerÚBefungeLexerÚRedcodeLexerÚCAmkESLexerÚ
CapDLLexerÚ
AheuiLexerc@sŠeZdZdZdZdZddgZddgZdgZd	e	j
fd
e	jfde	jfde
fgd
edfdefedƒgd
edfdedfedƒgdœZdd„ZdS)rz4
    Lexer for the esoteric BrainFuck language.
    Z	Brainfuckz'http://www.muppetlabs.com/~breadbox/bf/Z	brainfuckZbfz*.bfz*.bzapplication/x-brainfuckz[.,]+z[+-]+z[<>]+z[^.,+\-<>\[\]]+z\[Úloopz\]Úcommonz#pushz#pop)rÚrootrcCs”d}d}tdt|ƒƒ}xD|d|…D]4}|dks8|dkr@|d7}|dksP|dkr$|d7}q$W|d	|krld
S|d	|kr|d
Sd}d|kr|d7}|S)
z]It's safe to assume that a program which mostly consists of + -
        and < > is brainfuck.réNú+ú-éú<ú>gÐ?gð?z[-]gà?)ÚmaxÚlen)ÚtextZplus_minus_countZgreater_less_countZrange_to_checkÚcÚresult©r#ú</tmp/pip-build-gk9425m9/Pygments/pygments/lexers/esoteric.pyÚanalyse_text2s zBrainfuckLexer.analyse_textN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚurlÚaliasesÚ	filenamesÚ	mimetypesr	ÚTagÚBuiltinÚVariablerrr
rÚtokensr%r#r#r#r$rs"c@s„eZdZdZdZdZdgZdgZdgZdde	fd	e
fd
ejfdej
fdefd
ejfdejfdejfdefdefdefdefgiZdS)rzM
    Lexer for the esoteric Befunge language.

    .. versionadded:: 0.7
    ZBefungez$http://en.wikipedia.org/wiki/BefungeZbefungez	*.befungezapplication/x-befungerz[0-9a-f]z	[+*/%!`-]z[<>^v?\[\]rxjk]z	[:\\$.,n]z[|_mw]z[{}]z".*?"z\'.z[#;]z
[pg&~=@iotsy]z[()A-Z]z\s+N)r&r'r(r)r*r+r,r-r.rrr	r1r0rr/r
ÚDoubleÚSinglerrr2r#r#r#r$rLs&c*@sâeZdZdZdZdZddgZddgZdd	ee	e
je	ƒfd
e	fde
fde
fd
efde
fed^d1d2efed_d1d2ejfdQejfed`d1d2ejfdUee
je	e
jƒfdVee
je	e
jƒfdWejfdXefdYejfdZefd[ejfd\efgiZd]S)arzj
    Basic lexer for the input language for the CAmkES component platform.

    .. versionadded:: 2.1
    ZCAmkESzhttps://sel4.systems/CAmkES/ZcamkesZidl4z*.camkesz*.idl4rz^(\s*)(#.*)(\n)z\s+z/\*(.|\n)*?\*/z//.*$z
[\[(){},.;\]]z[~!%^&*+=|?:<>/-]ÚassemblyÚ	attributeÚ	componentÚcompositionÚ
configurationÚ
connectionÚ	connectorÚconsumesÚcontrolÚdataportÚDataportÚ	DataportsÚemitsÚeventÚEventÚEventsÚexportÚfromÚgroupÚhardwareÚhasÚ	interfaceÚ	InterfaceÚmaybeÚ	procedureÚ	ProcedureÚ
ProceduresÚprovidesÚtemplateÚthreadÚthreadsÚtoÚusesÚwithz\b)ÚsuffixÚboolÚbooleanÚBufÚcharÚ	characterÚdoubleÚfloatÚinÚinoutÚintÚint16_6Úint32_tÚint64_tÚint8_tÚintegerÚmutexÚoutÚrealÚrefinÚ	semaphoreÚsignedÚstringÚstructÚuint16_tÚuint32_tÚuint64_tÚuint8_tÚ	uintptr_tÚunsignedÚvoidz%[a-zA-Z_]\w*_(priority|domain|buffer)Údma_poolÚfrom_accessÚ	to_accessz#(import)(\s+)((?:<[^>]*>|"[^"]*");)z$(include)(\s+)((?:<[^>]*>|"[^"]*");)z0[xX][\da-fA-F]+z-?[\d]+z-?[\d]+\.[\d]+z"[^"]*"z[Tt]rue|[Ff]alsez[a-zA-Z_]\w*N)"r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrV)rXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqrrrsrtru)rvrwrx)r&r'r(r)r*r+r,r-rrrÚPreprocrrrrÚTypeÚReservedrÚHexZFloatr
r	r0r2r#r#r#r$rjsR


c)@s¸eZdZdZdZdZdgZdgZddee	e
je	ƒfde	fd	e
fd
e
fdefdefe
dNddefe
dOddejfe
dPddejfdDejfdEefe
dQddefe
dRddefdLefgiZdMS)Sraæ
    Basic lexer for CapDL.

    The source of the primary tool that reads such specifications is available
    at https://github.com/seL4/capdl/tree/master/capDL-tool. Note that this
    lexer only supports a subset of the grammar. For example, identifiers can
    shadow type names, but these instances are currently incorrectly
    highlighted as types. Supporting this would need a stateful lexer that is
    considered unnecessarily complex for now.

    .. versionadded:: 2.2
    ZCapDLzMhttps://ssrg.nicta.com.au/publications/nictaabstracts/Kuz_KLW_10.abstract.pmlZcapdlz*.cdlrz^(\s*)(#.*)(\n)z\s+z/\*(.|\n)*?\*/z
(//|--).*$z[<>\[(){},:;=\]]z\.\.ÚarchÚarm11ÚcapsÚchild_ofÚia32ÚirqÚmapsÚobjectsz\b)rWÚaepÚ	asid_poolÚcnodeÚepÚframeÚ	io_deviceÚio_portsÚio_ptÚnotificationÚpdÚptÚtcbÚutÚvcpuÚasidÚaddrÚbadgeÚcachedÚdomÚdomainIDÚelfÚfault_epÚGÚguardÚ
guard_sizeÚinitÚipÚprioÚspÚRÚRGÚRXÚRWÚRWGÚRWXÚWÚWGÚWXÚlevelÚmaskedÚmaster_replyÚpaddrÚportsÚreplyÚuncachedz0[xX][\da-fA-F]+z\d+(\.\d+)?(k|M)?ÚbitsÚcspaceÚvspaceÚ
reply_slotÚcaller_slotÚipc_buffer_slotz[a-zA-Z_][-@\.\w]*N)r}r~rr€rr‚rƒr„)r…r†r‡rˆr‰rŠr‹rŒrrŽrrr‘r’)r“r”r•r–r—r˜r™ršr›rœrržrŸr r¡r¢r£r¤r¥r¦r§r¨r©rªr«r¬r­r®r¯r°r±)r²)r³r´rµr¶r·)r&r'r(r)r*r+r,r-rrrryrrrrzr{rr|r	r2r#r#r#r$r®s<c@s‚eZdZdZdZdgZdgZd(Zd)Zdde	fde
jfd d!jeƒe
jfd d!jeƒe
jfd"e
fd#efd$efd%efd&ejfg	iZd'S)*rz‚
    A simple Redcode lexer based on ICWS'94.
    Contributed by Adam Blinkinsop <blinks@acm.org>.

    .. versionadded:: 0.8
    ZRedcodeZredcodez*.cwÚDATÚMOVÚADDÚSUBÚMULÚDIVÚMODÚJMPÚJMZÚJMNÚDJNÚCMPÚSLTÚSPLÚORGÚEQUÚENDÚAÚBÚABÚBAÚFÚXÚIrz\s+z;.*$z\b(%s)\bú|z[A-Za-z_]\w+z[-+*/%]z[#$@<>]z[.,]z[-+]?\d+N)r¸r¹rºr»r¼r½r¾r¿rÀrÁrÂrÃrÄrÅrÆrÇrÈ)rÉrÊrËrÌrÍrÎrÏ)r&r'r(r)r*r,r-ZopcodesÚ	modifiersrrr4Újoinr	ZFunctionZ	DecoratorrrrZIntegerr2r#r#r#r$rês$c@s8eZdZdZdZdZdgZdgZddefde	fgiZ
d	S)
rz?
    Aheui is esoteric language based on Korean alphabets.
    ZAheuizhttp://aheui.github.io/Zaheuiz*.aheuiruá[나-낳냐-냫너-넣녀-녛노-놓뇨-눟뉴-닇다-닿댜-댷더-덯뎌-뎧도-돟됴-둫듀-딓따-땋땨-떃떠-떻뗘-뗳또-똫뚀-뚷뜌-띟라-랗랴-럏러-렇려-렿로-롷료-뤃류-릫마-맣먀-먛머-멓며-몋모-뫃묘-뭏뮤-믷바-밯뱌-뱧버-벟벼-볗보-봏뵤-붛뷰-빃빠-빻뺘-뺳뻐-뻫뼈-뼣뽀-뽛뾰-뿧쀼-삏사-샇샤-샿서-섷셔-셯소-솧쇼-숳슈-싛싸-쌓쌰-썋써-쎃쎠-쎻쏘-쏳쑈-쑿쓔-씧자-잫쟈-쟣저-젛져-졓조-좋죠-줗쥬-즿차-챃챠-챻처-첳쳐-쳫초-촣쵸-춯츄-칗카-캏캬-컇커-컿켜-켷코-콯쿄-쿻큐-킣타-탛탸-턓터-텋텨-톃토-톻툐-퉇튜-틯파-팧퍄-퍟퍼-펗펴-폏포-퐇표-풓퓨-픻하-핳햐-햫허-헣혀-혛호-홓효-훟휴-힇]Ú.N)r&r'r(r)r*r+r,r-rrr2r#r#r#r$rsN)r)Zpygments.lexerrrrrZpygments.tokenrrrr	r
rrr
rÚ__all__rrrrrrr#r#r#r$Ú<module>	s,9D<$