3 ��X! � @ s� d Z ddlZddlmZmZmZ ddlmZmZm Z m Z mZmZm Z mZ ddddgZG d d� de�ZG d d� de�ZG dd� de�ZG dd� de�ZdS ) z� pygments.lexers.algebra ~~~~~~~~~~~~~~~~~~~~~~~ Lexers for computer algebra systems. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � N)� RegexLexer�bygroups�words)�Text�Comment�Operator�Keyword�Name�String�Number�Punctuation�GAPLexer�MathematicaLexer� MuPADLexer�BCLexerc @ s� e Zd ZdZdZdgZddddgZdd ejfd e fde fdefd ej fdejfdefdejfdejfdefdefdefgiZdS )r zX For `GAP <http://www.gap-system.org>`_ source code. .. versionadded:: 2.0 ZGAPZgapz*.gz*.gdz*.giz*.gap�rootz#.*$z"(?:[^"\\]|\\.)*"z\(|\)|\[|\]|\{|\}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+|`[^`]*`)*z[0-9]+(?:\.[0-9]*)?(?:e[0-9]+)?z\.[0-9]+(?:e[0-9]+)?�.N)�__name__� __module__�__qualname__�__doc__�name�aliases� filenamesr �Singler r r r �Constant�Builtinr �Word�Variabler r �tokens� r r �/usr/lib/python3.6/algebra.pyr s( c @ s� e Zd ZdZdZdddgZdddd gZd ddd gZdDZdEZ d6d7� Z d8d9efd:ej fd;ejfd<ejfd=efd>ejfd?ejfd@ejfee�efee �efdAefdBejfgiZdCS )Fr zp Lexer for `Mathematica <http://www.wolfram.com/mathematica/>`_ source code. .. versionadded:: 2.0 ZMathematicaZmathematicaZmmaZnbz*.nbz*.cdfz*.nbpz*.mazapplication/mathematicaz#application/vnd.wolfram.mathematicaz+application/vnd.wolfram.mathematica.packagezapplication/vnd.wolfram.cdf�;;�=�=.�!===�:=�->�:>�/.�+�-�*�/�^�&&�||�!�<>�|�/;�?�@�//�/@�@@�@@@�~~�===�&�<�>�<=�>=�,�;�(�)�[�]�{�}c C s ddj dd� | D �� S )Nz(%s)r3 c s s | ]}t j|�V qd S )N)�re�escape)�.0�entryr r r! � <genexpr>` s z1MathematicaLexer._multi_escape.<locals>.<genexpr>)�join)Zentriesr r r! � _multi_escape_ s zMathematicaLexer._multi_escaper 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".*?"z\s+N) r"