igor.py 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. # -*- coding: utf-8 -*-
  2. """
  3. pygments.lexers.igor
  4. ~~~~~~~~~~~~~~~~~~~~
  5. Lexers for Igor Pro.
  6. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
  7. :license: BSD, see LICENSE for details.
  8. """
  9. import re
  10. from pygments.lexer import RegexLexer, words
  11. from pygments.token import Text, Comment, Keyword, Name, String
  12. __all__ = ['IgorLexer']
  13. class IgorLexer(RegexLexer):
  14. """
  15. Pygments Lexer for Igor Pro procedure files (.ipf).
  16. See http://www.wavemetrics.com/ and http://www.igorexchange.com/.
  17. .. versionadded:: 2.0
  18. """
  19. name = 'Igor'
  20. aliases = ['igor', 'igorpro']
  21. filenames = ['*.ipf']
  22. mimetypes = ['text/ipf']
  23. flags = re.IGNORECASE | re.MULTILINE
  24. flowControl = (
  25. 'if', 'else', 'elseif', 'endif', 'for', 'endfor', 'strswitch', 'switch',
  26. 'case', 'default', 'endswitch', 'do', 'while', 'try', 'catch', 'endtry',
  27. 'break', 'continue', 'return', 'AbortOnRTE', 'AbortOnValue'
  28. )
  29. types = (
  30. 'variable', 'string', 'constant', 'strconstant', 'NVAR', 'SVAR', 'WAVE',
  31. 'STRUCT', 'dfref', 'funcref', 'char', 'uchar', 'int16', 'uint16', 'int32',
  32. 'uint32', 'int64', 'uint64', 'float', 'double'
  33. )
  34. keywords = (
  35. 'override', 'ThreadSafe', 'MultiThread', 'static', 'Proc',
  36. 'Picture', 'Prompt', 'DoPrompt', 'macro', 'window', 'function', 'end',
  37. 'Structure', 'EndStructure', 'EndMacro', 'Menu', 'SubMenu'
  38. )
  39. operations = (
  40. 'Abort', 'AddFIFOData', 'AddFIFOVectData', 'AddMovieAudio', 'AddMovieFrame',
  41. 'AdoptFiles', 'APMath', 'Append', 'AppendImage', 'AppendLayoutObject',
  42. 'AppendMatrixContour', 'AppendText', 'AppendToGizmo', 'AppendToGraph',
  43. 'AppendToLayout', 'AppendToTable', 'AppendXYZContour', 'AutoPositionWindow',
  44. 'BackgroundInfo', 'Beep', 'BoundingBall', 'BoxSmooth', 'BrowseURL', 'BuildMenu',
  45. 'Button', 'cd', 'Chart', 'CheckBox', 'CheckDisplayed', 'ChooseColor', 'Close',
  46. 'CloseHelp', 'CloseMovie', 'CloseProc', 'ColorScale', 'ColorTab2Wave',
  47. 'Concatenate', 'ControlBar', 'ControlInfo', 'ControlUpdate',
  48. 'ConvertGlobalStringTextEncoding', 'ConvexHull', 'Convolve', 'CopyFile',
  49. 'CopyFolder', 'CopyScales', 'Correlate', 'CreateAliasShortcut', 'CreateBrowser',
  50. 'Cross', 'CtrlBackground', 'CtrlFIFO', 'CtrlNamedBackground', 'Cursor',
  51. 'CurveFit', 'CustomControl', 'CWT', 'Debugger', 'DebuggerOptions', 'DefaultFont',
  52. 'DefaultGuiControls', 'DefaultGuiFont', 'DefaultTextEncoding', 'DefineGuide',
  53. 'DelayUpdate', 'DeleteAnnotations', 'DeleteFile', 'DeleteFolder', 'DeletePoints',
  54. 'Differentiate', 'dir', 'Display', 'DisplayHelpTopic', 'DisplayProcedure',
  55. 'DoAlert', 'DoIgorMenu', 'DoUpdate', 'DoWindow', 'DoXOPIdle', 'DPSS',
  56. 'DrawAction', 'DrawArc', 'DrawBezier', 'DrawLine', 'DrawOval', 'DrawPICT',
  57. 'DrawPoly', 'DrawRect', 'DrawRRect', 'DrawText', 'DrawUserShape', 'DSPDetrend',
  58. 'DSPPeriodogram', 'Duplicate', 'DuplicateDataFolder', 'DWT', 'EdgeStats', 'Edit',
  59. 'ErrorBars', 'EstimatePeakSizes', 'Execute', 'ExecuteScriptText',
  60. 'ExperimentModified', 'ExportGizmo', 'Extract', 'FastGaussTransform', 'FastOp',
  61. 'FBinRead', 'FBinWrite', 'FFT', 'FIFOStatus', 'FIFO2Wave', 'FilterFIR',
  62. 'FilterIIR', 'FindAPeak', 'FindContour', 'FindDuplicates', 'FindLevel',
  63. 'FindLevels', 'FindPeak', 'FindPointsInPoly', 'FindRoots', 'FindSequence',
  64. 'FindValue', 'FPClustering', 'fprintf', 'FReadLine', 'FSetPos', 'FStatus',
  65. 'FTPCreateDirectory', 'FTPDelete', 'FTPDownload', 'FTPUpload', 'FuncFit',
  66. 'FuncFitMD', 'GBLoadWave', 'GetAxis', 'GetCamera', 'GetFileFolderInfo',
  67. 'GetGizmo', 'GetLastUserMenuInfo', 'GetMarquee', 'GetMouse', 'GetSelection',
  68. 'GetWindow', 'GPIBReadBinaryWave2', 'GPIBReadBinary2', 'GPIBReadWave2',
  69. 'GPIBRead2', 'GPIBWriteBinaryWave2', 'GPIBWriteBinary2', 'GPIBWriteWave2',
  70. 'GPIBWrite2', 'GPIB2', 'GraphNormal', 'GraphWaveDraw', 'GraphWaveEdit', 'Grep',
  71. 'GroupBox', 'Hanning', 'HDF5CloseFile', 'HDF5CloseGroup', 'HDF5ConvertColors',
  72. 'HDF5CreateFile', 'HDF5CreateGroup', 'HDF5CreateLink', 'HDF5Dump',
  73. 'HDF5DumpErrors', 'HDF5DumpState', 'HDF5ListAttributes', 'HDF5ListGroup',
  74. 'HDF5LoadData', 'HDF5LoadGroup', 'HDF5LoadImage', 'HDF5OpenFile', 'HDF5OpenGroup',
  75. 'HDF5SaveData', 'HDF5SaveGroup', 'HDF5SaveImage', 'HDF5TestOperation',
  76. 'HDF5UnlinkObject', 'HideIgorMenus', 'HideInfo', 'HideProcedures', 'HideTools',
  77. 'HilbertTransform', 'Histogram', 'ICA', 'IFFT', 'ImageAnalyzeParticles',
  78. 'ImageBlend', 'ImageBoundaryToMask', 'ImageEdgeDetection', 'ImageFileInfo',
  79. 'ImageFilter', 'ImageFocus', 'ImageFromXYZ', 'ImageGenerateROIMask', 'ImageGLCM',
  80. 'ImageHistModification', 'ImageHistogram', 'ImageInterpolate', 'ImageLineProfile',
  81. 'ImageLoad', 'ImageMorphology', 'ImageRegistration', 'ImageRemoveBackground',
  82. 'ImageRestore', 'ImageRotate', 'ImageSave', 'ImageSeedFill', 'ImageSkeleton3d',
  83. 'ImageSnake', 'ImageStats', 'ImageThreshold', 'ImageTransform',
  84. 'ImageUnwrapPhase', 'ImageWindow', 'IndexSort', 'InsertPoints', 'Integrate',
  85. 'IntegrateODE', 'Integrate2D', 'Interpolate2', 'Interpolate3D', 'Interp3DPath',
  86. 'JCAMPLoadWave', 'JointHistogram', 'KillBackground', 'KillControl',
  87. 'KillDataFolder', 'KillFIFO', 'KillFreeAxis', 'KillPath', 'KillPICTs',
  88. 'KillStrings', 'KillVariables', 'KillWaves', 'KillWindow', 'KMeans', 'Label',
  89. 'Layout', 'LayoutPageAction', 'LayoutSlideShow', 'Legend',
  90. 'LinearFeedbackShiftRegister', 'ListBox', 'LoadData', 'LoadPackagePreferences',
  91. 'LoadPICT', 'LoadWave', 'Loess', 'LombPeriodogram', 'Make', 'MakeIndex',
  92. 'MarkPerfTestTime', 'MatrixConvolve', 'MatrixCorr', 'MatrixEigenV',
  93. 'MatrixFilter', 'MatrixGaussJ', 'MatrixGLM', 'MatrixInverse', 'MatrixLinearSolve',
  94. 'MatrixLinearSolveTD', 'MatrixLLS', 'MatrixLUBkSub', 'MatrixLUD', 'MatrixLUDTD',
  95. 'MatrixMultiply', 'MatrixOP', 'MatrixSchur', 'MatrixSolve', 'MatrixSVBkSub',
  96. 'MatrixSVD', 'MatrixTranspose', 'MeasureStyledText', 'MLLoadWave', 'Modify',
  97. 'ModifyBrowser', 'ModifyCamera', 'ModifyContour', 'ModifyControl',
  98. 'ModifyControlList', 'ModifyFreeAxis', 'ModifyGizmo', 'ModifyGraph',
  99. 'ModifyImage', 'ModifyLayout', 'ModifyPanel', 'ModifyTable', 'ModifyWaterfall',
  100. 'MoveDataFolder', 'MoveFile', 'MoveFolder', 'MoveString', 'MoveSubwindow',
  101. 'MoveVariable', 'MoveWave', 'MoveWindow', 'MultiTaperPSD',
  102. 'MultiThreadingControl', 'NeuralNetworkRun', 'NeuralNetworkTrain', 'NewCamera',
  103. 'NewDataFolder', 'NewFIFO', 'NewFIFOChan', 'NewFreeAxis', 'NewGizmo', 'NewImage',
  104. 'NewLayout', 'NewMovie', 'NewNotebook', 'NewPanel', 'NewPath', 'NewWaterfall',
  105. 'NI4882', 'Note', 'Notebook', 'NotebookAction', 'Open', 'OpenHelp',
  106. 'OpenNotebook', 'Optimize', 'ParseOperationTemplate', 'PathInfo', 'PauseForUser',
  107. 'PauseUpdate', 'PCA', 'PlayMovie', 'PlayMovieAction', 'PlaySound',
  108. 'PopupContextualMenu', 'PopupMenu', 'Preferences', 'PrimeFactors', 'Print',
  109. 'printf', 'PrintGraphs', 'PrintLayout', 'PrintNotebook', 'PrintSettings',
  110. 'PrintTable', 'Project', 'PulseStats', 'PutScrapText', 'pwd', 'Quit',
  111. 'RatioFromNumber', 'Redimension', 'Remove', 'RemoveContour', 'RemoveFromGizmo',
  112. 'RemoveFromGraph', 'RemoveFromLayout', 'RemoveFromTable', 'RemoveImage',
  113. 'RemoveLayoutObjects', 'RemovePath', 'Rename', 'RenameDataFolder', 'RenamePath',
  114. 'RenamePICT', 'RenameWindow', 'ReorderImages', 'ReorderTraces', 'ReplaceText',
  115. 'ReplaceWave', 'Resample', 'ResumeUpdate', 'Reverse', 'Rotate', 'Save',
  116. 'SaveData', 'SaveExperiment', 'SaveGraphCopy', 'SaveNotebook',
  117. 'SavePackagePreferences', 'SavePICT', 'SaveTableCopy', 'SetActiveSubwindow',
  118. 'SetAxis', 'SetBackground', 'SetDashPattern', 'SetDataFolder', 'SetDimLabel',
  119. 'SetDrawEnv', 'SetDrawLayer', 'SetFileFolderInfo', 'SetFormula', 'SetIgorHook',
  120. 'SetIgorMenuMode', 'SetIgorOption', 'SetMarquee', 'SetProcessSleep',
  121. 'SetRandomSeed', 'SetScale', 'SetVariable', 'SetWaveLock', 'SetWaveTextEncoding',
  122. 'SetWindow', 'ShowIgorMenus', 'ShowInfo', 'ShowTools', 'Silent', 'Sleep',
  123. 'Slider', 'Smooth', 'SmoothCustom', 'Sort', 'SortColumns', 'SoundInRecord',
  124. 'SoundInSet', 'SoundInStartChart', 'SoundInStatus', 'SoundInStopChart',
  125. 'SoundLoadWave', 'SoundSaveWave', 'SphericalInterpolate', 'SphericalTriangulate',
  126. 'SplitString', 'SplitWave', 'sprintf', 'sscanf', 'Stack', 'StackWindows',
  127. 'StatsAngularDistanceTest', 'StatsANOVA1Test', 'StatsANOVA2NRTest',
  128. 'StatsANOVA2RMTest', 'StatsANOVA2Test', 'StatsChiTest',
  129. 'StatsCircularCorrelationTest', 'StatsCircularMeans', 'StatsCircularMoments',
  130. 'StatsCircularTwoSampleTest', 'StatsCochranTest', 'StatsContingencyTable',
  131. 'StatsDIPTest', 'StatsDunnettTest', 'StatsFriedmanTest', 'StatsFTest',
  132. 'StatsHodgesAjneTest', 'StatsJBTest', 'StatsKDE', 'StatsKendallTauTest',
  133. 'StatsKSTest', 'StatsKWTest', 'StatsLinearCorrelationTest',
  134. 'StatsLinearRegression', 'StatsMultiCorrelationTest', 'StatsNPMCTest',
  135. 'StatsNPNominalSRTest', 'StatsQuantiles', 'StatsRankCorrelationTest',
  136. 'StatsResample', 'StatsSample', 'StatsScheffeTest', 'StatsShapiroWilkTest',
  137. 'StatsSignTest', 'StatsSRTest', 'StatsTTest', 'StatsTukeyTest',
  138. 'StatsVariancesTest', 'StatsWatsonUSquaredTest', 'StatsWatsonWilliamsTest',
  139. 'StatsWheelerWatsonTest', 'StatsWilcoxonRankTest', 'StatsWRCorrelationTest',
  140. 'String', 'StructGet', 'StructPut', 'SumDimension', 'SumSeries', 'TabControl',
  141. 'Tag', 'TextBox', 'ThreadGroupPutDF', 'ThreadStart', 'Tile', 'TileWindows',
  142. 'TitleBox', 'ToCommandLine', 'ToolsGrid', 'Triangulate3d', 'Unwrap', 'URLRequest',
  143. 'ValDisplay', 'Variable', 'VDTClosePort2', 'VDTGetPortList2', 'VDTGetStatus2',
  144. 'VDTOpenPort2', 'VDTOperationsPort2', 'VDTReadBinaryWave2', 'VDTReadBinary2',
  145. 'VDTReadHexWave2', 'VDTReadHex2', 'VDTReadWave2', 'VDTRead2', 'VDTTerminalPort2',
  146. 'VDTWriteBinaryWave2', 'VDTWriteBinary2', 'VDTWriteHexWave2', 'VDTWriteHex2',
  147. 'VDTWriteWave2', 'VDTWrite2', 'VDT2', 'WaveMeanStdv', 'WaveStats',
  148. 'WaveTransform', 'wfprintf', 'WignerTransform', 'WindowFunction', 'XLLoadWave'
  149. )
  150. functions = (
  151. 'abs', 'acos', 'acosh', 'AddListItem', 'AiryA', 'AiryAD', 'AiryB', 'AiryBD',
  152. 'alog', 'AnnotationInfo', 'AnnotationList', 'area', 'areaXY', 'asin', 'asinh',
  153. 'atan', 'atanh', 'atan2', 'AxisInfo', 'AxisList', 'AxisValFromPixel', 'Besseli',
  154. 'Besselj', 'Besselk', 'Bessely', 'beta', 'betai', 'BinarySearch',
  155. 'BinarySearchInterp', 'binomial', 'binomialln', 'binomialNoise', 'cabs',
  156. 'CaptureHistory', 'CaptureHistoryStart', 'ceil', 'cequal', 'char2num',
  157. 'chebyshev', 'chebyshevU', 'CheckName', 'ChildWindowList', 'CleanupName', 'cmplx',
  158. 'cmpstr', 'conj', 'ContourInfo', 'ContourNameList', 'ContourNameToWaveRef',
  159. 'ContourZ', 'ControlNameList', 'ConvertTextEncoding', 'cos', 'cosh',
  160. 'cosIntegral', 'cot', 'coth', 'CountObjects', 'CountObjectsDFR', 'cpowi',
  161. 'CreationDate', 'csc', 'csch', 'CsrInfo', 'CsrWave', 'CsrWaveRef', 'CsrXWave',
  162. 'CsrXWaveRef', 'CTabList', 'DataFolderDir', 'DataFolderExists',
  163. 'DataFolderRefsEqual', 'DataFolderRefStatus', 'date', 'datetime', 'DateToJulian',
  164. 'date2secs', 'Dawson', 'DDERequestString', 'defined', 'deltax', 'digamma',
  165. 'dilogarithm', 'DimDelta', 'DimOffset', 'DimSize', 'ei', 'enoise', 'equalWaves',
  166. 'erf', 'erfc', 'erfcw', 'exists', 'exp', 'ExpConvExp', 'ExpConvExpFit',
  167. 'ExpConvExpFitBL', 'ExpConvExpFit1Shape', 'ExpConvExpFit1ShapeBL', 'ExpGauss',
  168. 'ExpGaussFit', 'ExpGaussFitBL', 'ExpGaussFit1Shape', 'ExpGaussFit1ShapeBL',
  169. 'expInt', 'expIntegralE1', 'expNoise', 'factorial', 'fakedata', 'faverage',
  170. 'faverageXY', 'FetchURL', 'FindDimLabel', 'FindListItem', 'floor', 'FontList',
  171. 'FontSizeHeight', 'FontSizeStringWidth', 'FresnelCos', 'FresnelSin',
  172. 'FuncRefInfo', 'FunctionInfo', 'FunctionList', 'FunctionPath', 'gamma',
  173. 'gammaEuler', 'gammaInc', 'gammaNoise', 'gammln', 'gammp', 'gammq', 'Gauss',
  174. 'GaussFit', 'GaussFitBL', 'GaussFit1Width', 'GaussFit1WidthBL', 'Gauss1D',
  175. 'Gauss2D', 'gcd', 'GetBrowserLine', 'GetBrowserSelection', 'GetDataFolder',
  176. 'GetDataFolderDFR', 'GetDefaultFont', 'GetDefaultFontSize', 'GetDefaultFontStyle',
  177. 'GetDimLabel', 'GetEnvironmentVariable', 'GetErrMessage', 'GetFormula',
  178. 'GetIndependentModuleName', 'GetIndexedObjName', 'GetIndexedObjNameDFR',
  179. 'GetKeyState', 'GetRTErrMessage', 'GetRTError', 'GetRTLocation', 'GetRTLocInfo',
  180. 'GetRTStackInfo', 'GetScrapText', 'GetUserData', 'GetWavesDataFolder',
  181. 'GetWavesDataFolderDFR', 'GizmoInfo', 'GizmoScale', 'gnoise', 'GrepList',
  182. 'GrepString', 'GuideInfo', 'GuideNameList', 'Hash', 'hcsr', 'HDF5AttributeInfo',
  183. 'HDF5DatasetInfo', 'HDF5LibraryInfo', 'HDF5TypeInfo', 'hermite', 'hermiteGauss',
  184. 'HyperGNoise', 'HyperGPFQ', 'HyperG0F1', 'HyperG1F1', 'HyperG2F1', 'IgorInfo',
  185. 'IgorVersion', 'imag', 'ImageInfo', 'ImageNameList', 'ImageNameToWaveRef',
  186. 'IndependentModuleList', 'IndexedDir', 'IndexedFile', 'Inf', 'Integrate1D',
  187. 'interp', 'Interp2D', 'Interp3D', 'inverseERF', 'inverseERFC', 'ItemsInList',
  188. 'JacobiCn', 'JacobiSn', 'JulianToDate', 'Laguerre', 'LaguerreA', 'LaguerreGauss',
  189. 'LambertW', 'LayoutInfo', 'leftx', 'LegendreA', 'limit', 'ListMatch',
  190. 'ListToTextWave', 'ListToWaveRefWave', 'ln', 'log', 'logNormalNoise',
  191. 'LorentzianFit', 'LorentzianFitBL', 'LorentzianFit1Width',
  192. 'LorentzianFit1WidthBL', 'lorentzianNoise', 'LowerStr', 'MacroList', 'magsqr',
  193. 'MandelbrotPoint', 'MarcumQ', 'MatrixCondition', 'MatrixDet', 'MatrixDot',
  194. 'MatrixRank', 'MatrixTrace', 'max', 'mean', 'median', 'min', 'mod', 'ModDate',
  195. 'MPFXEMGPeak', 'MPFXExpConvExpPeak', 'MPFXGaussPeak', 'MPFXLorenzianPeak',
  196. 'MPFXVoigtPeak', 'NameOfWave', 'NaN', 'NewFreeDataFolder', 'NewFreeWave', 'norm',
  197. 'NormalizeUnicode', 'note', 'NumberByKey', 'numpnts', 'numtype',
  198. 'NumVarOrDefault', 'num2char', 'num2istr', 'num2str', 'NVAR_Exists',
  199. 'OperationList', 'PadString', 'PanelResolution', 'ParamIsDefault',
  200. 'ParseFilePath', 'PathList', 'pcsr', 'Pi', 'PICTInfo', 'PICTList',
  201. 'PixelFromAxisVal', 'pnt2x', 'poissonNoise', 'poly', 'PolygonArea', 'poly2D',
  202. 'PossiblyQuoteName', 'ProcedureText', 'p2rect', 'qcsr', 'real', 'RemoveByKey',
  203. 'RemoveEnding', 'RemoveFromList', 'RemoveListItem', 'ReplaceNumberByKey',
  204. 'ReplaceString', 'ReplaceStringByKey', 'rightx', 'round', 'r2polar', 'sawtooth',
  205. 'scaleToIndex', 'ScreenResolution', 'sec', 'sech', 'Secs2Date', 'Secs2Time',
  206. 'SelectNumber', 'SelectString', 'SetEnvironmentVariable', 'sign', 'sin', 'sinc',
  207. 'sinh', 'sinIntegral', 'SortList', 'SpecialCharacterInfo', 'SpecialCharacterList',
  208. 'SpecialDirPath', 'SphericalBessJ', 'SphericalBessJD', 'SphericalBessY',
  209. 'SphericalBessYD', 'SphericalHarmonics', 'sqrt', 'StartMSTimer', 'StatsBetaCDF',
  210. 'StatsBetaPDF', 'StatsBinomialCDF', 'StatsBinomialPDF', 'StatsCauchyCDF',
  211. 'StatsCauchyPDF', 'StatsChiCDF', 'StatsChiPDF', 'StatsCMSSDCDF',
  212. 'StatsCorrelation', 'StatsDExpCDF', 'StatsDExpPDF', 'StatsErlangCDF',
  213. 'StatsErlangPDF', 'StatsErrorPDF', 'StatsEValueCDF', 'StatsEValuePDF',
  214. 'StatsExpCDF', 'StatsExpPDF', 'StatsFCDF', 'StatsFPDF', 'StatsFriedmanCDF',
  215. 'StatsGammaCDF', 'StatsGammaPDF', 'StatsGeometricCDF', 'StatsGeometricPDF',
  216. 'StatsGEVCDF', 'StatsGEVPDF', 'StatsHyperGCDF', 'StatsHyperGPDF',
  217. 'StatsInvBetaCDF', 'StatsInvBinomialCDF', 'StatsInvCauchyCDF', 'StatsInvChiCDF',
  218. 'StatsInvCMSSDCDF', 'StatsInvDExpCDF', 'StatsInvEValueCDF', 'StatsInvExpCDF',
  219. 'StatsInvFCDF', 'StatsInvFriedmanCDF', 'StatsInvGammaCDF', 'StatsInvGeometricCDF',
  220. 'StatsInvKuiperCDF', 'StatsInvLogisticCDF', 'StatsInvLogNormalCDF',
  221. 'StatsInvMaxwellCDF', 'StatsInvMooreCDF', 'StatsInvNBinomialCDF',
  222. 'StatsInvNCChiCDF', 'StatsInvNCFCDF', 'StatsInvNormalCDF', 'StatsInvParetoCDF',
  223. 'StatsInvPoissonCDF', 'StatsInvPowerCDF', 'StatsInvQCDF', 'StatsInvQpCDF',
  224. 'StatsInvRayleighCDF', 'StatsInvRectangularCDF', 'StatsInvSpearmanCDF',
  225. 'StatsInvStudentCDF', 'StatsInvTopDownCDF', 'StatsInvTriangularCDF',
  226. 'StatsInvUsquaredCDF', 'StatsInvVonMisesCDF', 'StatsInvWeibullCDF',
  227. 'StatsKuiperCDF', 'StatsLogisticCDF', 'StatsLogisticPDF', 'StatsLogNormalCDF',
  228. 'StatsLogNormalPDF', 'StatsMaxwellCDF', 'StatsMaxwellPDF', 'StatsMedian',
  229. 'StatsMooreCDF', 'StatsNBinomialCDF', 'StatsNBinomialPDF', 'StatsNCChiCDF',
  230. 'StatsNCChiPDF', 'StatsNCFCDF', 'StatsNCFPDF', 'StatsNCTCDF', 'StatsNCTPDF',
  231. 'StatsNormalCDF', 'StatsNormalPDF', 'StatsParetoCDF', 'StatsParetoPDF',
  232. 'StatsPermute', 'StatsPoissonCDF', 'StatsPoissonPDF', 'StatsPowerCDF',
  233. 'StatsPowerNoise', 'StatsPowerPDF', 'StatsQCDF', 'StatsQpCDF', 'StatsRayleighCDF',
  234. 'StatsRayleighPDF', 'StatsRectangularCDF', 'StatsRectangularPDF', 'StatsRunsCDF',
  235. 'StatsSpearmanRhoCDF', 'StatsStudentCDF', 'StatsStudentPDF', 'StatsTopDownCDF',
  236. 'StatsTriangularCDF', 'StatsTriangularPDF', 'StatsTrimmedMean',
  237. 'StatsUSquaredCDF', 'StatsVonMisesCDF', 'StatsVonMisesNoise', 'StatsVonMisesPDF',
  238. 'StatsWaldCDF', 'StatsWaldPDF', 'StatsWeibullCDF', 'StatsWeibullPDF',
  239. 'StopMSTimer', 'StringByKey', 'stringCRC', 'StringFromList', 'StringList',
  240. 'stringmatch', 'strlen', 'strsearch', 'StrVarOrDefault', 'str2num', 'StudentA',
  241. 'StudentT', 'sum', 'SVAR_Exists', 'TableInfo', 'TagVal', 'TagWaveRef', 'tan',
  242. 'tanh', 'TextEncodingCode', 'TextEncodingName', 'TextFile', 'ThreadGroupCreate',
  243. 'ThreadGroupGetDF', 'ThreadGroupGetDFR', 'ThreadGroupRelease', 'ThreadGroupWait',
  244. 'ThreadProcessorCount', 'ThreadReturnValue', 'ticks', 'time', 'TraceFromPixel',
  245. 'TraceInfo', 'TraceNameList', 'TraceNameToWaveRef', 'trunc', 'UniqueName',
  246. 'UnPadString', 'UnsetEnvironmentVariable', 'UpperStr', 'URLDecode', 'URLEncode',
  247. 'VariableList', 'Variance', 'vcsr', 'Voigt', 'VoigtFit', 'VoigtFitBL',
  248. 'VoigtFit1Shape', 'VoigtFit1ShapeBL', 'VoigtFit1Shape1Width',
  249. 'VoigtFit1Shape1WidthBL', 'VoigtFunc', 'WaveCRC', 'WaveDims', 'WaveExists',
  250. 'WaveInfo', 'WaveList', 'WaveMax', 'WaveMin', 'WaveName', 'WaveRefIndexed',
  251. 'WaveRefIndexedDFR', 'WaveRefsEqual', 'WaveRefWaveToList', 'WaveTextEncoding',
  252. 'WaveType', 'WaveUnits', 'WhichListItem', 'WinList', 'WinName', 'WinRecreation',
  253. 'WinType', 'WMFindWholeWord', 'WNoise', 'xcsr', 'XWaveName', 'XWaveRefFromTrace',
  254. 'x2pnt', 'zcsr', 'ZernikeR', 'zeta'
  255. )
  256. tokens = {
  257. 'root': [
  258. (r'//.*$', Comment.Single),
  259. (r'"([^"\\]|\\.)*"', String),
  260. # Flow Control.
  261. (words(flowControl, prefix=r'\b', suffix=r'\b'), Keyword),
  262. # Types.
  263. (words(types, prefix=r'\b', suffix=r'\b'), Keyword.Type),
  264. # Keywords.
  265. (words(keywords, prefix=r'\b', suffix=r'\b'), Keyword.Reserved),
  266. # Built-in operations.
  267. (words(operations, prefix=r'\b', suffix=r'\b'), Name.Class),
  268. # Built-in functions.
  269. (words(functions, prefix=r'\b', suffix=r'\b'), Name.Function),
  270. # Compiler directives.
  271. (r'^#(include|pragma|define|undef|ifdef|ifndef|if|elif|else|endif)',
  272. Name.Decorator),
  273. (r'[^a-z"/]+$', Text),
  274. (r'.', Text),
  275. ],
  276. }