3 ��X1 � @ s^ d Z ddlmZmZmZmZ ddlmZmZm Z m Z mZmZm Z mZ dgZG dd� de�ZdS )z� pygments.lexers.praat ~~~~~~~~~~~~~~~~~~~~~ Lexer for Praat :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. � )� RegexLexer�words�bygroups�include)�Name�Text�Comment�Keyword�String�Punctuation�Number�Operator� PraatLexerc � @ s2 e Zd ZdZdZdgZdddgZ�d�Z�d�Z�d�Z �d�Z �d�Z�d�Z�d�Z �dXeeej�f�dYejf�dZejf�d[ef�d\e�d]f�d^e�d_f�d`ej�d_fe�da�ee�db�dc�ef�ddeeee��def�dfeee��dgf�dheeeej�fe�di�ed���djed7fee�dk�dc�ej�dgf�dle�dmf�dnefg�doef�dpej�dqf�dre�d�f�due�d�f�dwe�dsfg�d[ef�dxeeje��dsf�dyej�d�fg�dwef�dzeeje��dsf�d{eeje��dsfgee�d|�dc�ej�d}fee �d~�dc�ej�d}fee �d�dc�ej�d}fg�d[ef�due�d�f�d�e�d�fg�d�eee�f�d�e�dsf�d[ef�djed7f�d�efe�da�e�di�e�d��ed���d�ef�d�efg�d�e�dsfe�di�e�d��ed���djed7f�d�efg�d�e�dsf�d�efg�d�ej�dsf�d�eeje��dif�d�eeje��d�fge�d��ed��ee �d��dc�ejjfee�db�dc�ejjf�d�ej�d�fee�db�d��d��ej�d�f�d�eejej��d�fee�db�d��d��eejejej��d�f�d�ef�d�e�dvf�dpej�dqfg�d�e f�d�e j!fg�d�ejf�d�ej�dsfg�d�eee�f�d�e�dsf�dwef�dpej�dqf�d�ef�d�efg�d�eee�f�dje�dsf�dpej�dqf�d�ef�d�efg�d[ef�d�eee�d�f�d�eee��dgf�d�eee��dgf�d�eeeee�f�d�eeeej�f�d�eeee e�f�d�eee��dgf�d�e�dsfg �d��Z"�d�S (� r zQ For `Praat <http://www.praat.org>`_ scripts. .. versionadded:: 2.1 ZPraatZpraatz*.praatz*.procz*.psc�if�then�else�elsif�elif�endif�fi�for�from�to�endfor�endproc�while�endwhile�repeat�until�select�plus�minus�demo�assert� stopwatch�nocheck�nowarn� noprogress�editor� endeditor� clearinfo�backslashTrigraphsToUnicode�chooseDirectory�chooseReadFile�chooseWriteFile�date�demoKey�do�environment�extractLine�extractWord�fixed�info�left�mid�percent�readFile�replace� replace_regex�right�selected�string�unicodeToBackslashTrigraphs�abs� appendFile�appendFileLine� appendInfo�appendInfoLine�arccos�arccosh�arcsin�arcsinh�arctan�arctan2�arctanh�barkToHertz� beginPause�beginSendPraat�besselI�besselK�beta�beta2� binomialP� binomialQ�boolean�ceiling� chiSquareP� chiSquareQ�choice�comment�cos�cosh�createDirectory� deleteFile�demoClicked� demoClickedIn�demoCommandKeyPressed�demoExtraControlKeyPressed� demoInput�demoKeyPressed�demoOptionKeyPressed�demoShiftKeyPressed�demoShow�demoWaitForInput�demoWindowTitle�demoX�demoY�differenceLimensToPhon�endPause�endSendPraat�endsWith�erb� erbToHertz�erf�erfc� exitScript�exp� extractNumber�fileReadable�fisherP�fisherQ�floor�gaussP�gaussQ�hertzToBark� hertzToErb� hertzToMel�hertzToSemitones�imax�imin�incompleteBeta�incompleteGammaP�index�index_regex�invBinomialP�invBinomialQ� invChiSquareQ� invFisherQ� invGaussQ� invSigmoid�invStudentQ�length�ln�lnBeta�lnGamma�log10�log2�max� melToHertz�min�minusObject�natural�number�numberOfColumns�numberOfRows�numberOfSelected�objectsAreIdentical�option� optionMenu�pauseScript�phonToDifferenceLimens� plusObject�positive�randomBinomial�randomGauss� randomInteger� randomPoisson� randomUniform�real�removeObject�rindex�rindex_regex�round� runScript� runSystem�runSystem_nocheck�selectObject�semitonesToHertz�sentencetext�sigmoid�sin�sinc�sincpi�sinh�soundPressureToPhon�sqrt� startsWith�studentP�studentQ�tan�tanh�variableExists�word� writeFile� writeFileLine� writeInfo� writeInfoLine�linear�zero� Activation�AffineTransform� AmplitudeTier�Art�Artword�Autosegment� BarkFilter�BarkSpectrogram�CCA� Categories�Cepstrogram�Cepstrum� Cepstrumc�ChebyshevSeries�ClassificationTable�Cochleagram� Collection�ComplexSpectrogram� Configuration� Confusion�ContingencyTable�Corpus�Correlation� Covariance�CrossCorrelationTable�CrossCorrelationTables�DTW�DataModeler�Diagonalizer�Discriminant� Dissimilarity�Distance� Distributions�DurationTier�EEG�ERP�ERPTier�EditCostsTable�EditDistanceTable�Eigen� Excitation�Excitations� ExperimentMFC�FFNet�FeatureWeights�FileInMemory� FilesInMemory�Formant� FormantFilter�FormantGrid�FormantModeler�FormantPoint�FormantTier�GaussianMixture�HMM�HMM_Observation�HMM_ObservationSequence� HMM_State�HMM_StateSequence�Harmonicity�ISpline�Index� Intensity� IntensityTier�IntervalTier�KNN� KlattGrid� KlattTable�LFCC�LPC�Label�LegendreSeries�LinearRegression�LogisticRegression� LongSound�Ltas�MFCC�MSpline�ManPages�Manipulation�Matrix� MelFilter�MelSpectrogram�MixingMatrix�Movie�Network� OTGrammar� OTHistory�OTMulti�PCA�PairDistribution� ParamCurve�Pattern�Permutation�Photo�Pitch�PitchModeler� PitchTier�PointProcess�Polygon� Polynomial�PowerCepstrogram� PowerCepstrum� Procrustes� RealPoint�RealTier� ResultsMFC�Roots�SPINET�SSCP�SVD�Salience� ScalarProduct� Similarity�SimpleString�SortedSetOfString�Sound�Speaker�Spectrogram�Spectrum�SpectrumTier�SpeechSynthesizer�SpellingChecker�Strings�StringsIndex�Table�TableOfReal�TextGrid�TextInterval� TextPoint�TextTier�Tier� Transition� VocalTract�VocalTractTier�Weight�WordList� macintosh�windows�unix�praatVersion�pi�e� undefined�tab�shellDirectory� homeDirectory�preferencesDirectory�newline�temporaryDirectory�defaultDirectoryz(\s+)(#.*?$)z^#.*?$z;[^\n]*z\s+z \bprocedure\b�procedure_definitionz\bcall\b�procedure_call�@� function_callz\b)�suffixz(\bform\b)(\s+)([^\n]+)�old_formzn(print(?:line|tab)?|echo|exit|asserterror|pause|send(?:praat|socket)|include|execute|system(?:_nocheck)?)(\s+)�string_unquotedz(goto|label)(\s+)(\w+)� variable_name�"z(?=\s+\S+\n)z\b[A-Z]�commandz (\.{3}|[)(,])z( ?[\w()-]+ ?)z'(?=.*')�string_interpolatedz\.{3}�#pop� old_arguments�:� comma_listz\sz([\w.]+)(:|\s*\()z([\w.]+)z([\w.]+)(\s*?[(:])z([\w.]+)([^\n]*)z \$(?=\s*[:(])�functionz#(?=\s*[:(])z(?=\s*[:(])z\s*\(z(\s*\n\s*)(\.{3})z(\s*[])\n])z\b(if|then|else|fi|endif)\b�operatorz[()]�,z\nz[^\n]z\b\d+(\.\d*)?([eE][-+]?\d+)?%?z*\.?(n(col|row)|[xy]min|[xy]max|[nd][xy])\bz(\.?(?:col|row)\$)(\[)z (\$?)(\[)z\$z\bObject_\w+�object_attributesz_\w+)�prefixrd z\b(Object_)(')z(_)(')z\.?_?[a-z][\w.]*(\$|#)?z[\[\]]z!([+\/*<>=!-]=?|[&*|][&*|]?|\^|<>)z'(?<![\w.])(and|or|not|div|mod)(?![\w.])z4\.?[_a-z][\w.]*[$#]?(?:\[[a-zA-Z0-9,]+\])?(:[0-9]+)?�'z(\n\s*)(\.{3})z[^'\n]+z [^\'"\n]+z%(optionmenu|choice)([ \t]+\S+:[ \t]+)z(option|button)([ \t]+)z(sentence|text)([ \t]+\S+)z((word)([ \t]+\S+[ \t]*)(\S+)?([ \t]+.*)?z((boolean)(\s+\S+\s*)(0|1|"?(?:yes|no)"?)zY(real|natural|positive|integer)([ \t]+\S+[ \t]*)([+-]?)(\d+(?:\.\d*)?(?:[eE][-+]?\d+)?%?)z(comment)(\s+)z\bendform\b)�rootri ra r` rc ro rn rl r� rr rg rp rj rf r? re N)r r r r r r r r r r r r r r r r r r r! r"