3 �;�e�q � @ s� d Z ddlZddlmZmZmZmZmZ ddlm Z m Z mZmZm Z mZmZmZmZmZ ddlmZ dddd gZG d d� de�Zejd�ZG dd� de�ZG d d� de�ZG dd � d e�ZdS )z� pygments.lexers.matlab ~~~~~~~~~~~~~~~~~~~~~~ Lexers for Matlab and related languages. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � N)�Lexer� RegexLexer�bygroups�words� do_insertions) �Text�Comment�Operator�Keyword�Name�String�Number�Punctuation�Generic� Whitespace)�_scilab_builtins�MatlabLexer�MatlabSessionLexer�OctaveLexer�ScilabLexerc C @ s6 e Zd ZdZdZdgZdgZdgZd�Zd�Z d�Z d�ejfd�e jd�fd�e fd�ed�fed�d�dэefd�d�jee e � d� ejfd�e fd�efd�efd�efd�efd�efd�ejfd�ejfd�ejfd�ed�fd�efd�efgd�ed�fgd�e jd�fd�e jfd�e jfgd�eeeeeeejeeee� d�fd�eeej�d�fgd�Zd�d� Zd�S )�r z= For Matlab source code. .. versionadded:: 0.10 ZMatlabZmatlabz*.mztext/matlab�sin�sind�sinh�asin�asind�asinh�cos�cosd�cosh�acos�acosd�acosh�tan�tand�tanh�atan�atand�atan2�atanh�sec�secd�sech�asec�asecd�asech�csc�cscd�csch�acsc�acscd�acsch�cot�cotd�coth�acot�acotd�acoth�hypot�exp�expm1�log�log1p�log10�log2�pow2�realpow�reallog�realsqrt�sqrt�nthroot�nextpow2�abs�angle�complex�conj�imag�real�unwrap�isreal�cplxpair�fix�floor�ceil�round�mod�rem�sign�airy�besselj�bessely�besselh�besseli�besselk�beta�betainc�betaln�ellipj�ellipke�erf�erfc�erfcx�erfinv�expint�gamma�gammainc�gammaln�psi�legendre�cross�dot�factor�isprime�primes�gcd�lcm�rat�rats�perms�nchoosek� factorial�cart2sph�cart2pol�pol2cart�sph2cart�hsv2rgb�rgb2hsv�zeros�ones�eye�repmat�rand�randn�linspace�logspace� freqspace�meshgrid� accumarray�size�length�ndims�numel�disp�isempty�isequal�isequalwithequalnans�cat�reshape�diag�blkdiag�tril�triu�fliplr�flipud�flipdim�rot90�find�end�sub2ind�ind2sub�bsxfun�ndgrid�permute�ipermute�shiftdim� circshift�squeeze�isscalar�isvector�ans�eps�realmax�realmin�pi�i�inf�nan�isnan�isinf�isfinite�j�why�compan�gallery�hadamard�hankel�hilb�invhilb�magic�pascal�rosser�toeplitz�vander� wilkinsonz^!.*z%\{\s*\n�blockcommentz%.*$z^\s*function�deffunc�break�case�catch�classdef�continue�else�elseif� enumerated�events�for�function�global�if�methods� otherwise�parfor� persistent� properties�return�spmd�switch�try�whilez\b)�suffix�(�|z)\bz \.\.\..*$z-|==|~=|<|>|<=|>=|&&|&|~|\|\|?z\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\z\[|\]|\(|\)|\{|\}|:|@|\.|,z=|:|;z(?<=[\w)\].])\'+z&(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?z\d+[eEf][+-]?[0-9]+z\d+z(?<![\w)\].])\'�stringz[a-zA-Z_]\w*�.z[^\']*\'z#popz^\s*%\}z^.*\nz1(\s*)(?:(\S+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)z(\s*)([a-zA-Z_]\w*))�rootr� r� r� c C s, t jd| t j�rdS t jd| t j�r(dS d S )Nz^\s*%g�������?z^!\w+)�re�match�M)�text� r� �/usr/lib/python3.6/matlab.py�analyse_text� s zMatlabLexer.analyse_textN)Cr r r r r r r r r r r r! r"