a
    €˜ëj  ã                   @   sZ   d Z ddl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 dgZG dd„ deƒZdS )zÃ
    pygments.lexers.maple
    ~~~~~~~~~~~~~~~~~~~~~

    Lexers for Maple.

    :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    )ÚwordsÚbygroupsÚExtendedRegexLexer)ÚCommentÚNameÚStringÚ
WhitespaceÚOperatorÚPunctuationÚNumberÚKeywordÚ
MapleLexerc                   @   sê   e Zd ZdZdZdgZg d¢ZdgZdZdZ	dZ
d	Zd
d„ Zdejfdejdfdefdefdefee
ddd�efeeddd�ejfdefdefdefdeejeƒfdejfdejfdefgdejdfdejdfdejfgd œZd!d"„ Zd#S )$r   z
    Lexer for Maple.
    ZMapleZmaple)z*.mplz*.miz*.mmztext/x-maplez)https://www.maplesoft.com/products/Maple/z2.19)/ÚandZassumingÚbreakZbyZcatchÚdescriptionZdoÚdoneÚelifÚelseÚendÚerrorÚexportÚfiÚfinallyÚforÚfromÚglobalÚifÚimpliesÚinÚ	intersectÚlocalÚminusÚmodÚmoduleÚnextÚnotZodÚoptionÚoptionsÚorÚprocÚquitÚreadÚreturnÚsaveÚstopÚsubsetZthenÚtoÚtryÚunionZuseZusesÚwhileÚxor)®ÚabsÚaddÚ	addressofZanamesr   ZandmapZandseqZappendtoÚArrayÚarrayZArrayOptionsZassembleÚASSERTZassignÚassignedÚ
attributesÚcatÚceilZcoeffZcoeffsÚ	conjugateÚconvertZCopySignÚDEBUGZ	debugoptsZDefault0ZDefaultOverflowZDefaultUnderflowZdegreeZdenomÚdiffÚdisassembleÚdivider   ÚentriesZEqualEntriesÚevalZevalbZevalfZevalhfZ
evalindetsZevalnÚexpandÚexportsÚ	factorialÚfloorÚfracZfremZ	FromInertZfrontendÚgcZgenpolyZhasZhastypeZhfarrayZicontentZigcdZilcmZilog10ZImr   ZindetsÚindicesr   ZiolibZiquoZiremÚirootrN   ÚisqrtZ
kerneloptsZlcoeffZldegreeÚlengthZlexorderÚlhsZ
lowerboundZlprintÚmacroÚmapÚmaxZmaxnormÚmemberZ
membertypeÚminr!   r"   ZmodpZmodp1Zmodp2ZmodsÚmulZ	NextAfterZnopsÚnormalr%   Z	numboccurZnumelemsZnumerZNumericClassZNumericEventZNumericEventHandlerZNumericStatusÚopr(   ÚorderZ	OrderedNEZormapZorseqÚparseZ	piecewiseZpointtoÚprintr*   ZReZreadlibZRecordÚremoveÚrhsÚroundZrtableZrtable_elemsZrtable_evalZrtable_indfnsZrtable_num_elemsZrtable_optionsZrtable_redimZrtable_scanblockZrtable_set_indfnZrtable_split_unitZsavelibZScale10ZScale2Z
SDMPolynomZ
searchtextZ
SearchTextÚselectZselectremoveÚseqZseriesZsetattributeZSFloatExponentZSFloatMantissaÚsignÚsortZssystemr.   r   Úsubsr/   Z
subsindetsZsubsopZ	substringÚsystemÚtableZtaylorZtcoeffÚtimeZ	timelimitZToInertZ	traperrorÚtruncÚtypeZ	typematchZunamesZunassignr2   Z	UnorderedZ
upperboundÚuserinfoZwritetor4   ZxormapZxorseqc                 c   st   |  d¡t| d¡fV  |  d¡|_|j}| d¡|_| j|d�E d H  | d¡t| d¡fV  | ¡ |_||_d S )Né   é   )Úcontext)Ústartr
   ÚgroupÚposr   Zget_tokens_unprocessed)ÚselfÚmatchÚctxZorig_end© rt   úT/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/pygments/lexers/maple.pyÚdelayed_callbackü   s    
zMapleLexer.delayed_callbackz#.*\nz\(\*Úcommentz"(\\.|.|\s)*?"z('+)(([\s\S])*?)\1z`(\\`|.)*?`z\b)ÚprefixÚsuffixz[a-zA-Z_][a-zA-Z0-9_]*z=(:=|\*\*|@@|<=|>=|<>|->|::|\.\.|&\+|[\+\-\*\.\^\$/@&,:=<>%~])z[;^!@$\(\)\[\]{}|_\\#?]+z(\d+)(\.\.)z"(\d*\.\d+|\d+\.\d*)([eE][+-]?\d+)?z\d+z\s+z.*\(\*z#pushz.*\*\)z#popz.*\n)Úrootrw   c                 C   s   d| v rdS d S )Nz:=gš™™™™™¹?rt   )Útextrt   rt   ru   Úanalyse_text!  s    zMapleLexer.analyse_textN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesÚurlZversion_addedÚkeywordsÚbuiltinsrv   r   ÚSingleZ	Multiliner   r   r   r   ZBuiltinr	   r
   r   r   ZIntegerZFloatr   Útokensr|   rt   rt   rt   ru   r      s@   0 0
ò

ýïN)r€   Zpygments.lexerr   r   r   Zpygments.tokenr   r   r   r   r	   r
   r   r   Ú__all__r   rt   rt   rt   ru   Ú<module>   s   
(