+
    TBi&                         R t ^ RIt^ RIHtHtHtHtHt ^ RIH	t	H
t
HtHtHtHtHtHtHtHt . ROt ! R	 R]4      t ! R
 R]4      t ! R R]4      t ! R R]4      t ! R R]4      tR# )z
pygments.lexers.algebra
~~~~~~~~~~~~~~~~~~~~~~~

Lexers for computer algebra systems.

:copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
N)Lexer
RegexLexerbygroupsdo_insertionswords)
TextCommentOperatorKeywordNameStringNumberPunctuationGeneric
WhitespaceGAPLexerGAPConsoleLexerMathematicaLexer
MuPADLexerBCLexerc                      a  ] tR t^t o RtRtRtR.t. ROtRt	RR]
P                  3R]3R	]3R
]3R]P                   3R]P"                  3R]3R]P&                  3R]P(                  3R]3R]3R]3./tR tRtV tR# )r   z
For GAP source code.
GAPhttps://www.gap-system.orggap2.0rootz#.*$"(?:[^"\\]|\\.)*"\(|\)|\[|\]|\{|\}aV  (?x)\b(?:
                if|then|elif|else|fi|
                for|while|do|od|
                repeat|until|
                break|continue|
                function|local|return|end|
                rec|
                quit|QUIT|
                IsBound|Unbind|
                TryNextMethod|
                Info|Assert
              )\bzD(?x)\b(?:
                true|false|fail|infinity
              )\bzx(?x)\b(?:
                (Declare|Install)([A-Z][A-Za-z]+)|
                   BindGlobal|BIND_GLOBAL
              )\bz\.|,|:=|;|=|\+|-|\*|/|\^|>|<z=(?x)\b(?:
                and|or|not|mod|in
              )\bzC(?x)
              (?:\w+|`[^`]*`)
              (?:::\w+|`[^`]*`)*[0-9]+(?:\.[0-9]*)?(?:e[0-9]+)?\.[0-9]+(?:e[0-9]+)?.c                    R p\         P                  ! RV 4      '       d
   VR,          p\         P                  ! RV 4      '       d
   VR,          p\        VR4      # )        gffffff?g      ?zl(InstallTrueMethod|Declare(Attribute|Category|Filter|Operation|GlobalFunction|Synonym|SynonymAttr|Property))zm(DeclareRepresentation|Install(GlobalFunction|Method|ImmediateMethod|OtherMethod)|New(Family|Type)|Objectify))researchmin)textscores   & </usr/lib/python3.14/site-packages/pygments/lexers/algebra.pyanalyse_textGAPLexer.analyse_textG   s`     99>?C
 
 SLE 99HIM
 
 SLE5#     N)z*.gz*.gdz*.giz*.gap)__name__
__module____qualname____firstlineno____doc__nameurlaliases	filenamesversion_addedr   Singler   r   r
   r   ConstantBuiltinr	   WordVariabler   r   tokensr)   __static_attributes____classdictcell____classdict__s   @r(   r   r      s      D
&CgG0IM 	gnn%!6*!;/  ]] \\	
 -h7 ]]$%)]]4 08$f-4LG$
&FP r+   c                   N   a  ] tR t^[t o RtRtRR.tR.tRtRt	Rt
R	 tR
 tRtV tR# )r   z<
For GAP console sessions. Modeled after JuliaConsoleLexer.
zGAP sessionzgap-consolezgap-replz*.tstr   z2.14zgap-repl/euclidean.tstc              #    "   \        R/ V P                  B p^ pRp. pRpRpVP                  RR7       EFm  pVP                  R4      '       g   VP                  R4      '       dJ   VP	                  \        V4      ^ \        P                  VR,          3.34       WHR,          ,          pRpRpMV'       g]   VP                  R	4      '       dF   VP	                  \        V4      ^ \        P                  VR
,          3.34       WHR,          ,          pM|V'       d'   \        WRP                  V4      4       Rj  xL
  Rp. pVP                  R4      '       g	   V'       d   V\        P                  V3x  RpMV\        P                  V3x  RpV\        V4      ,          pEKp  	  V'       d%   \        WRP                  V4      4       Rj  xL
  R# R#  L L
5i)     FT)keependszgap> zbrk> :N   N:rF   NNz> :N   N:rG   NNNzError, r,   )r   options
splitlines
startswithappendlenr   Promptr   get_tokens_unprocessedErrorOutput)	selfr&   gaplexerstartcurcode
insertionsoutputerrorlines	   &&       r(   rN   &GAPConsoleLexer.get_tokens_unprocessedf   s    +dll+
OOTO2Dw''4??7+C+C!!3w<1gnnd2h2O1P"QR8# 5 5!!3w<1gnnd2h2O1P"QR8#,"$C$CG$L N N N G!#J??9--44 E55SYE+ 3. $;;GDF F F NFsQ   A#G&AG7GAGG8G9GG AG.GG	GGc                D    \         P                  ! R V 4      '       d   R# R# )z^gap> g?r"   )r#   r$   )r&   s   &r(   r)   GAPConsoleLexer.analyse_text   s    
 99Y%%r+   r,   N)r-   r.   r/   r0   r1   r2   r4   r5   r3   r6   _examplerN   r)   r=   r>   r?   s   @r(   r   r   [   sB      Dj)G	I
&CM'H!FH r+   c                   J  a  ] tR t^t o RtRtRt. ROt. ROt. ROt	Rt
RtRtR tRR]3R]P                   3R	]P"                  3R
]P"                  3R]3R]P&                  3R]P&                  3R]P(                  3]! ]4      ]3]! ]4      ]3R]3R]P4                  3./tRtV tR# )r   z$
Lexer for Mathematica source code.
Mathematicaz#http://www.wolfram.com/mathematica/r   c                P    R P                  RP                  R V  4       4      4      # )z({})|c              3   N   "   T F  p\         P                  ! V4      x  K  	  R # 5i)N)r#   escape).0entrys   & r(   	<genexpr>1MathematicaLexer._multi_escape.<locals>.<genexpr>   s     %LG5bii&6&6Gs   #%)formatjoin)entriess   &r(   _multi_escapeMathematicaLexer._multi_escape   s     }}SXX%LG%LLMMr+   r   z(?s)\(\*.*?\*\)z([a-zA-Z]+[A-Za-z0-9]*`)z([A-Za-z0-9]*_+[A-Za-z0-9]*)z#\d*z([a-zA-Z]+[a-zA-Z0-9]*)z
-?\d+\.\d*z
-?\d*\.\d+z-?\d+z".*?"\s+r,   N)mathematicammanb)z*.nbz*.cdfz*.nbpz*.ma)zapplication/mathematicaz#application/vnd.wolfram.mathematicaz+application/vnd.wolfram.mathematica.packagezapplication/vnd.wolfram.cdf) z;;=z=.z!===z:=z->z:>z/.+-*/^z&&z||!z<>r`   z/;?@z//z/@z@@z@@@z~~z===&<>z<=z>=),;()[]{})r-   r.   r/   r0   r1   r2   r3   r4   r5   	mimetypesr6   	operatorspunctuationrj   r   r   	Namespacer;   r   FloatIntegerr   r	   r   r   r   r   r<   r=   r>   r?   s   @r(   r   r      s      D
/C*G2I0I MI ;KN 	)($..9,dmm<dmm$'.FLL)FLL)v~~&9x(;-vT__%
Fr+   c                      ] tR t^tRtRtRtR.tR.tRt	RR]
P                  3R	]
P                  R
3R]3R]3R]3R]P"                  3R]P$                  3R]P&                  P(                  3R]3R]P,                  3R]3R]! ]P2                  ]]4      3R]P6                  3R]3R]3R]3R]3.R
R]
P                  3R	]
P                  R3R]
P                  R3R]
P                  3./tRtR # )!r   zO
A MuPAD lexer.
Contributed by Christopher Creutzig <christopher@creutzig.de>.
MuPADzhttp://www.mupad.commupadz*.muz0.8r   z//.*?$/\*commentr   r   a  (?x)\b(?:
                next|break|end|
                axiom|end_axiom|category|end_category|domain|end_domain|inherits|
                if|%if|then|elif|else|end_if|
                case|of|do|otherwise|end_case|
                while|end_while|
                repeat|until|end_repeat|
                for|from|to|downto|step|end_for|
                proc|local|option|save|begin|end_proc|
                delete|frame
              )\baU  (?x)\b(?:
                DOM_ARRAY|DOM_BOOL|DOM_COMPLEX|DOM_DOMAIN|DOM_EXEC|DOM_EXPR|
                DOM_FAIL|DOM_FLOAT|DOM_FRAME|DOM_FUNC_ENV|DOM_HFARRAY|DOM_IDENT|
                DOM_INT|DOM_INTERVAL|DOM_LIST|DOM_NIL|DOM_NULL|DOM_POLY|DOM_PROC|
                DOM_PROC_ENV|DOM_RAT|DOM_SET|DOM_STRING|DOM_TABLE|DOM_VAR
              )\bz(?x)\b(?:
                PI|EULER|E|CATALAN|
                NIL|FAIL|undefined|infinity|
                TRUE|FALSE|UNKNOWN
              )\bz\b(?:dom|procname)\bz-\.|,|:|;|=|\+|-|\*|/|\^|@|>|<|\$|\||!|\'|%|~=z(?x)\b(?:
                and|or|not|xor|
                assuming|
                div|mod|
                union|minus|intersect|in|subset
              )\bz \b(?:I|RDN_INF|RD_NINF|RD_NAN)\bzi(?x)
              ((?:[a-zA-Z_#][\w#]*|`[^`]*`)
              (?:::[a-zA-Z_#][\w#]*|`[^`]*`)*)(\s*)([(])z](?x)
              (?:[a-zA-Z_#][\w#]*|`[^`]*`)
              (?:::[a-zA-Z_#][\w#]*|`[^`]*`)*r   r   rl   r    z[^/*]+z#push\*/#pop[*/]r,   N)r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r   r7   	Multiliner   r   r
   r   Classr8   r9   Pseudor	   r:   r   r   Functionr   r;   r   r<   r=   r,   r+   r(   r   r      si    D
 CiGIM 	'W&&	2!6*!;/
 

 jj"
 ]] %dll&9&9:=xH ]] 1&9< dmmT;79126--A 08$f-Z 4Lc2
f 	))*W&&0W&&/g''(	
i:Fr+   c            
           ] tR tRtRtRtRtR.tR.tRt	RR	]
P                  R
3R]3R]3]! RRR7      ]3R]3R]3R]3R]3.R
R]
P                  3R]
P                  R3R]
P                  3./tRtR# )r   i  z
A BC lexer.
BCz https://www.gnu.org/software/bc/bcz*.bcz2.1r   r   r   r   z[{}();,]z\b)suffixz!\+\+|--|\|\||&&|([-<>+*%\^/!=])=?z[0-9]+(\.[0-9]*)?z\.[0-9]+r    z[^*/]+r   r   r   r,   N)ifelsewhileforbreakcontinuehaltreturndefineautoprintreadlengthscalesqrtlimitsquitwarranty)r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r   r   r   r   r   r
   r	   r   r   r<   r=   r,   r+   r(   r   r     s     D
,CfGIM 	W&&	2!6*+&   )./ 189"#+- "6*&!4L
 	))*W&&/g''(
!Fr+   )r   r   r   r   r   )r1   r#   pygments.lexerr   r   r   r   r   pygments.tokenr   r   r	   r
   r   r   r   r   r   r   __all__r   r   r   r   r   r,   r+   r(   <module>r      so    
 L L- - -Cz CL7e 7t,z ,^E EPj r+   