File: //usr/lib/python3/dist-packages/pygments/lexers/__pycache__/algebra.cpython-310.pyc
o
���aa � @ s� d Z ddlZddlmZmZmZ ddlmZmZm Z m
Z
mZmZm
Z
mZmZ g d�ZG dd� de�ZG dd � d e�ZG d
d� de�ZG dd
� d
e�ZdS )z�
pygments.lexers.algebra
~~~~~~~~~~~~~~~~~~~~~~~
Lexers for computer algebra systems.
:copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
� N)�
RegexLexer�bygroups�words) �Text�Comment�Operator�Keyword�Name�String�Number�Punctuation�
Whitespace)�GAPLexer�MathematicaLexer�
MuPADLexer�BCLexerc @ s� e Zd ZdZdZdgZg d�Zddejfde fde
fd efd
ej
fdejfdefd
ejfdejfdefdefdefgiZdd� ZdS )r zX
For `GAP <http://www.gap-system.org>`_ source code.
.. versionadded:: 2.0
�GAP�gap)z*.gz*.gdz*.giz*.gap�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 C s6 d}t �d| �r|d7 }t �d| �r|d7 }t|d�S )Ng zl(InstallTrueMethod|Declare(Attribute|Category|Filter|Operation|GlobalFunction|Synonym|SynonymAttr|Property))gffffff�?zm(DeclareRepresentation|Install(GlobalFunction|Method|ImmediateMethod|OtherMethod)|New(Family|Type)|Objectify)g �?)�re�search�min)�text�score� r �9/usr/lib/python3/dist-packages/pygments/lexers/algebra.py�analyse_textF s ��
zGAPLexer.analyse_textN)�__name__�
__module__�__qualname__�__doc__�name�aliases� filenamesr �Singler
r r r �Constant�Builtinr �Word�Variabler r �tokensr! r r r r r s>