o
    ‡ÎÖaPH  ã                   @   s�   d Z ddlZddlmZmZmZmZmZmZ ddl	m
Z
mZmZmZmZmZmZmZ g d¢ZG dd„ deƒZG dd	„ d	eƒZG d
d„ deƒZdS )zî
    pygments.lexers.unicon
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexers for the Icon and Unicon languages, including ucode VM.

    :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    N)Ú
RegexLexerÚincludeÚbygroupsÚwordsÚusingÚthis)ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuation)Ú	IconLexerÚ
UcodeLexerÚUniconLexerc                   @   sl  e Zd ZdZdZdgZdgZdgZej	Z
defdejfdefdejd	fd
eejeejƒdfdejfdejfdejfdejfdejfdejfedddd�ejfedddd�ejfedƒdefdefdejfdefdefdeeeeƒƒfdefdefdefgd ej fd!ej!fd"ej"fgd#ed$fd%ed&fd'ejfed(ƒgd#ed)fgd*ed&fd+ej#fd,efd-ejfed(ƒgd.œZ$d/S )0r   z<
    For Unicon source code.

    .. versionadded:: 2.4
    ÚUniconÚuniconz*.icnztext/uniconú[^\S\n]+ú#.*?\núclass|method|procedureÚ
subprogramú(record)(\s+)(\w+)Útype_defú^(#line|\$C|\$Cend|\$define|\$else|\$endif|\$error|\$ifdef|\$ifndef|\$include|\$line|\$undef)\bú(&null|&fail)\báù  &allocated|&ascii|&clock|&collections|&column|&col|&control|&cset|&current|&dateline|&date|&digits|&dump|&errno|&errornumber|&errortext|&errorvalue|&error|&errout|&eventcode|&eventvalue|&eventsource|&e|&features|&file|&host|&input|&interval|&lcase|&letters|&level|&line|&ldrag|&lpress|&lrelease|&main|&mdrag|&meta|&mpress|&mrelease|&now|&output|&phi|&pick|&pi|&pos|&progname|&random|&rdrag|&regions|&resize|&row|&rpress|&rrelease|&shift|&source|&storage|&subject|&time|&trace|&ucase|&version|&window|&x|&yú(by|of|not|to)\bz (global|local|static|abstract)\bzpackage|link|import)ÚbreakÚcaseÚcreateÚcriticalÚdefaultÚendÚallÚdoÚelseÚeveryÚfailÚifÚimportÚinitialÚ	initiallyÚ	invocableÚnextÚrepeatÚreturnÚsuspendÚthenÚthreadÚuntilÚwhileú\b©ÚprefixÚsuffix(+  ÚAbortÚabsÚacosÚActiveÚAlertÚanyÚAnyÚArbÚArbnoÚargsÚarrayÚasinÚatanÚatanhÚAttribÚBalÚbalÚBgÚBreakÚBreakxÚcalloutÚcenterÚcharÚchdirÚchmodÚchownÚchrootÚ	classnameÚClipÚCloneÚcloseÚcofailÚcollectÚColorÚ
ColorValueÚcondvarÚconstructorÚcopyÚCopyAreaÚcosÚCoupleÚcryptÚcsetÚctimeÚ	dbcolumnsÚdbdriverÚdbkeysÚdblimitsÚ	dbproductÚdbtablesÚdelayÚdeleteÚdetabÚdisplayÚDrawArcÚ
DrawCircleÚDrawCubeÚ	DrawCurveÚDrawCylinderÚDrawDiskÚ	DrawImageÚDrawLineÚ	DrawPointÚDrawPolygonÚDrawRectangleÚDrawSegmentÚ
DrawSphereÚ
DrawStringÚ	DrawTorusÚdtorÚentabÚ	EraseAreaÚ
errorclearÚEventÚ	eventmaskÚEvGetÚEvSendÚexecÚexitÚexpÚEyeÚFailÚfcntlÚfdupÚFenceÚfetchÚFgÚ
fieldnamesÚfilepairÚFillArcÚ
FillCircleÚFillPolygonÚFillRectangleÚfindÚflockÚflushÚFontÚforkÚ	FreeColorÚ	FreeSpaceÚfunctionÚgetÚgetchÚgetcheÚgetegidÚgetenvÚgeteuidÚgetgidÚgetgrÚgethostÚgetpgrpÚgetpidÚgetppidÚgetpwÚ	getrusageÚgetservÚGetSpaceÚgettimeofdayÚgetuidÚglobalnamesÚGotoRCÚGotoXYÚgtimeÚhardlinkÚiandÚicomÚIdentityMatrixÚimageÚInPortÚinsertÚInt86ÚintegerÚioctlÚiorÚishiftÚistateÚixorÚkbhitÚkeyÚkeywordÚkillÚleftÚLenÚlistÚloadÚloadfuncÚ
localnamesÚlockÚlogÚLowerÚlstatÚmanyÚmapÚmatchÚ
MatrixModeÚmaxÚmemberÚmembernamesÚmethodnamesÚmethodsÚminÚmkdirÚmoveÚ
MultMatrixÚmutexÚnameÚNewColorÚNormalsÚNotAnyÚnumericÚopenÚopenclÚoprecÚordÚOutPortÚPaletteCharsÚPaletteColorÚ
PaletteKeyÚ
paramnamesÚparentÚPatternÚPeekÚPendingÚpipeÚPixelÚ	PlayAudioÚPokeÚpopÚ	PopMatrixÚPosÚposÚprocÚpullÚpushÚ
PushMatrixÚ
PushRotateÚ	PushScaleÚPushTranslateÚputÚQueryPointerÚRaiseÚreadÚ	ReadImageÚreadlinkÚreadsÚreadyÚrealÚreceiveÚRefreshÚRemÚremoveÚrenameÚreplÚreverseÚrightÚrmdirÚRotateÚRposÚRtabÚrtodÚrunerrÚsaveÚScaleÚseekÚselectÚsendÚseqÚserialÚsetÚsetenvÚsetgidÚsetgrentÚ
sethostentÚsetpgrpÚsetpwentÚ
setserventÚsetuidÚsignalÚsinÚsortÚsortfÚSpanÚspawnÚsqlÚsqrtÚstatÚstaticnamesÚstopÚ	StopAudioÚstringÚ	structureÚSucceedÚSwiÚsymlinkÚ
sys_errstrÚsystemÚsyswriteÚTabÚtabÚtableÚtanÚTexcoordÚTextureÚ	TextWidthÚ	TranslateÚtrapÚtrimÚtruncateÚtrylockÚtypeÚumaskÚUncoupleÚunlockÚuptoÚutimeÚvariableÚVAttribÚwaitÚWAttribÚWDefaultÚWFlushÚwhereÚWinAssociateÚ	WinButtonÚWinColorDialogÚWindowContentsÚWinEditRegionÚWinFontDialogÚ
WinMenuBarÚWinOpenDialogÚWinPlayMediaÚWinSaveDialogÚWinScrollBarÚWinSelectDialogÚwriteÚ
WriteImageÚwritesÚWSectionÚWSyncÚnumberszc<@|<<@|>@|>>@|\.>|->|===|~===|\*\*|\+\+|--|\.|~==|~=|<=|>=|==|=|<<=|<<|>>=|>>|:=:|:=|->|<->|\+:=|\|ú"(?:[^\\"]|\\.)*"ú'(?:[^\\']|\\.)*'ú[*<>+=/&!?@~\\-]z\^ú(\w+)(\s*|[(,])ú[\[\]]z<>|=>|[()|:;,.'`{}%&?]ú\n+ú3\b([+-]?([2-9]|[12][0-9]|3[0-6])[rR][0-9a-zA-Z]+)\bú'[+-]?[0-9]*\.([0-9]*)([Ee][+-]?[0-9]*)?ú\b([+-]?[0-9]+[KMGTPkmgtp]?)\bú\(©ú#popÚformal_partú;rr  ú"[^"]+"|\w+Úrootrs  ú\)ú\w+ú,ú(:string|:integer|:real)\b©rv  rf  r   r   rs  N©%Ú__name__Ú
__module__Ú__qualname__Ú__doc__rà   ÚaliasesÚ	filenamesÚ	mimetypesÚreÚ	MULTILINEÚflagsr   r	   ÚSingler   ÚDeclarationr   ÚTypeÚPreProcÚConstantÚReservedr   r   ÚFunctionr   r
   r   Ú	Characterr   r   r   r   ÚHexÚFloatÚIntegerÚVariableÚtokens© r”  r”  ú8/usr/lib/python3/dist-packages/pygments/lexers/unicon.pyr      s‚    
ÿÿõûú=Ã>Â?ÿ—lýüÿû
†r   c                   @   sf  e Zd ZdZdZdgZddgZg Zej	Z
defdejfdefdejd	fd
eejeejƒdfdejfdejfdejfdejfdejfdejfedddd�ejfedddd�ejfedƒdefdefdejfdefdeeeeƒƒfdefdefdefgdej fd ej!fd!ej"fgd"ed#fd$ed%fd&ejfed'ƒgd"ed(fgd)ed%fd*ej#fd+efd,ejfed'ƒgd-œZ$d.S )/r   z4
    Lexer for Icon.

    .. versionadded:: 1.6
    ÚIconÚiconz*.iconz*.ICONr   r   r   r   r   r   r   r   r   r   z(global|local|static)\bÚlink)r   r    r!   r#   r$   r%   r&   r'   r(   r)   r*   r,   r.   r/   r0   r1   r2   r3   r5   r6   r7   r8   )ÿr<   r=   r>   r?   r@   rD   rE   rF   rG   rH   rI   rK   rL   rO   rP   rQ   rR   rS   rT   rU   rW   rX   rY   rZ   r[   r\   r]   r^   r`   ra   rb   rc   rd   re   rf   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   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È   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	  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/  r0  r1  r2  r4  r5  r7  r8  r9  r:  r;  r=  r>  r?  r@  rA  rB  rC  rD  rE  rF  rG  rH  rI  rJ  rK  rL  rM  rN  rP  rQ  rR  rS  rT  rU  rV  rW  rX  rY  rZ  r[  r\  r]  r^  r_  r`  ra  rb  rc  rd  re  rf  zS===|~===|\*\*|\+\+|--|\.|==|~==|<=|>=|=|~=|<<=|<<|>>=|>>|:=:|:=|<->|<-|\+:=|\|\||\|rg  rh  ri  rj  rk  z<>|=>|[()|:;,.'`{}%\^&?]rl  rm  rn  ro  rp  rq  rt  rr  ru  rv  rs  rw  rx  ry  rz  r{  Nr|  r”  r”  r”  r•  r   ¦   s€    
ÿÿõûú:Æ;Å<ÿ›hýüÿû
Šr   c                   @   s²   e Zd ZdZdZdgZg d¢Zg Zej	Z
ddefedddd�ejfed	ddd�efed
ddd�ejfedddd�ejfdejfdejfdejfdefdefdefgiZdd„ ZdS )r   z@
    Lexer for Icon ucode files.

    .. versionadded:: 2.4
    Úucode)z*.uz*.u1z*.u2rv  z(#.*\n))ÚconÚdeclendr$   ÚglobalÚimplr.   Úlabr˜  ÚlocalÚrecordÚuidÚunionsÚversionr7   r8   )ÚcolmÚfilenÚlineÚsynt)YÚasgnÚbangÚbscanÚcatÚccaseÚchfailÚcoactrZ   ÚcomplÚcoretr!   re   ÚdiffÚdivÚdupÚefailÚeinitr$   ÚeqvÚeretÚerrorÚescanÚesuspÚfieldÚgotoÚinitÚintÚinterÚinvokeÚkeywdÚlconcatÚlexeqÚlexgeÚlexgtÚlexleÚlexltÚlexneÚlimitÚllistÚlsuspÚmarkÚmark0ÚminusÚmodÚmultÚnegÚneqvÚnonnullÚnoopÚnullÚnumberÚnumeqÚnumgeÚnumgtÚnumleÚnumltÚnumneÚpfailÚplusÚpnullrö   ÚpowerÚpretrú   ÚpsuspÚpush1Úpushn1ÚrandomÚrasgnÚrcvÚrcvbkr	  ÚrefreshÚrswapÚsdupÚsectÚsizeÚsndÚsndbkÚstrÚsubscÚswapÚtabmatÚtallyÚtobyÚtraceÚunmarkÚvalueÚvar)r@   r    ÚendcaseÚendeveryÚendifÚ	endifelseÚ	endrepeatÚ
endsuspendÚenduntilÚendwhiler(   r*   Úifelser0   r2   r5   r6   z\d+(\s*|\.$|$)z[+-]?\d*\.\d+(E[-+]?\d+)?z[+-]?\d+\.\d*(E[-+]?\d+)?z"(<>|=>|[()|:;,.'`]|[{}]|[%^]|[&?])z\s+\bz[\w-]+c                 C   sh   d}d| v r
|d7 }d| v r|d7 }d| v r|d7 }d| v r&d| v r&|d7 }d	| v r2d
| v r2|d7 }|S )z}endsuspend and endrepeat are unique to this language, and
        \self, /self doesn't seem to get used anywhere else either.r   rÿ  gš™™™™™¹?rþ  z:=g{®Gáz„?Ú	procedurer$   z\selfz/selfg      à?r”  )ÚtextÚresultr”  r”  r•  Úanalyse_text„  s   zUcodeLexer.analyse_textN)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   2  sL    ø	÷
þýãâõô¿ÿFr   )r€  r„  Úpygments.lexerr   r   r   r   r   r   Úpygments.tokenr   r	   r
   r   r   r   r   r   Ú__all__r   r   r   r”  r”  r”  r•  Ú<module>   s    
 (  