o
    ;h                     @   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-2025 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.
    Maplemaple)z*.mplz*.miz*.mmztext/x-maplez)https://www.maplesoft.com/products/Maple/z2.19)/andZassumingbreakZbyZcatchdescriptiondodoneelifelseenderrorZ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addZ	addressofZanamesr   ZandmapZandseqZappendtoZArrayarrayZArrayOptionsassembleASSERTZassignassigned
attributescatceilZcoeffZcoeffs	conjugateconvertZCopySignDEBUGZ	debugoptsZDefault0ZDefaultOverflowZDefaultUnderflowZdegreedenomdiffdisassembledivider   entriesZEqualEntriesevalZevalbZevalfZevalhfZ
evalindetsZevalnexpandexports	factorialfloorfracZfremZ	FromInertZfrontendgcZgenpolyhasZhastypeZhfarrayZicontentZigcdZilcmZilog10ZImr   Zindetsindicesr!   ZiolibZiquoZiremirootrQ   isqrtZ
kerneloptsZlcoeffZldegreelengthZlexorderlhsZ
lowerboundZlprintmacromapmaxZmaxnormmemberZ
membertypeminr#   r$   ZmodpZmodp1Zmodp2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ssystemr0   r   subsr1   Z
subsindetsZsubsopZ	substringsystemtableZtaylorZtcoefftimeZ	timelimitZToInertZ	traperrortrunctypeZ	typematchZunamesZunassignr4   Z	UnorderedZ
upperbounduserinfoZwritetor6   ZxormapZxorseqc                 c   sv    | 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   get_tokens_unprocessed)selfmatchctxZorig_end ry   H/var/www/html/venv/lib/python3.10/site-packages/pygments/lexers/maple.pydelayed_callback   s   

zMapleLexer.delayed_callbackz#.*\nz\(\*commentz"(\\.|.|\s)*?"z('+)((.|\n)*?)\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)rootr|   c                 C   s   d| v rdS d S )Nz:=g?ry   )textry   ry   rz   analyse_text!  s   zMapleLexer.analyse_textN)__name__
__module____qualname____doc__namealiases	filenames	mimetypesurlversion_addedkeywordsbuiltinsr{   r   Single	Multiliner   r   r   r   Builtinr	   r
   r   r   IntegerFloatr   tokensr   ry   ry   ry   rz   r      sB    0 0


N)r   Zpygments.lexerr   r   r   Zpygments.tokenr   r   r   r   r	   r
   r   r   __all__r   ry   ry   ry   rz   <module>   s
    
(