KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

227 lines
11KB

  1. <?php
  2. /*************************************************************************************
  3. * matlab.php
  4. * -----------
  5. * Author: Florian Knorn (floz@gmx.de)
  6. * Copyright: (c) 2004 Florian Knorn (http://www.florian-knorn.com)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2005/02/09
  9. *
  10. * Matlab M-file language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2006-03-25 (1.0.7.22)
  15. * - support for the transpose operator
  16. * - many keywords added
  17. * - links to the matlab documentation at mathworks
  18. * by: Olivier Verdier (olivier.verdier@free.fr)
  19. * 2005/05/07 (1.0.0)
  20. * - First Release
  21. *
  22. *
  23. *************************************************************************************
  24. *
  25. * This file is part of GeSHi.
  26. *
  27. * GeSHi is free software; you can redistribute it and/or modify
  28. * it under the terms of the GNU General Public License as published by
  29. * the Free Software Foundation; either version 2 of the License, or
  30. * (at your option) any later version.
  31. *
  32. * GeSHi is distributed in the hope that it will be useful,
  33. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  34. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  35. * GNU General Public License for more details.
  36. *
  37. * You should have received a copy of the GNU General Public License
  38. * along with GeSHi; if not, write to the Free Software
  39. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  40. *
  41. ************************************************************************************/
  42. $language_data = array (
  43. 'LANG_NAME' => 'Matlab M',
  44. 'COMMENT_SINGLE' => array(1 => '%'),
  45. 'COMMENT_MULTI' => array(),
  46. //Matlab Strings
  47. 'COMMENT_REGEXP' => array(
  48. 2 => "/(?<![\\w\\)\\]\\}\\.])('[^\\n']*?')/"
  49. ),
  50. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  51. 'QUOTEMARKS' => array(),
  52. 'ESCAPE_CHAR' => '',
  53. 'KEYWORDS' => array(
  54. 1 => array(
  55. 'break', 'case', 'catch', 'continue', 'elseif', 'else', 'end', 'for',
  56. 'function', 'global', 'if', 'otherwise', 'persistent', 'return',
  57. 'switch', 'try', 'while'
  58. ),
  59. 2 => array(
  60. 'all','any','exist','is','logical','mislocked',
  61. 'abs','acos','acosh','acot','acoth','acsc','acsch','airy','angle',
  62. 'ans','area','asec','asech','asin','asinh','atan','atan2','atanh',
  63. 'auread','autumn','auwrite','axes','axis','balance','bar','bar3',
  64. 'bar3h','barh','besselh','besseli','besselj','besselk','Bessely',
  65. 'beta','betainc','betaln','bicg','bicgstab','bin2dec','bitand',
  66. 'bitcmp','bitget','bitmax','bitor','bitset','bitshift','bitxor',
  67. 'blkdiag','bone','box','brighten','builtin','bwcontr','calendar',
  68. 'camdolly','camlight','camlookat','camorbit','campan','campos',
  69. 'camproj','camroll','camtarget','camup','camva','camzoom','capture',
  70. 'cart2pol','cart2sph','cat','caxis','cdf2rdf','ceil','cell',
  71. 'cell2struct','celldisp','cellfun','cellplot','cellstr','cgs',
  72. 'char','chol','cholinc','cholupdate','cla','clabel','class','clc',
  73. 'clf','clg','clock','close','colmmd','colorbar','colorcube',
  74. 'colordef','colormap','colperm','comet','comet3','compan','compass',
  75. 'complex','computer','cond','condeig','condest','coneplot','conj',
  76. 'contour','contourc','contourf','contourslice','contrast','conv',
  77. 'conv2','convhull','cool','copper','copyobj','corrcoef','cos',
  78. 'cosh','cot','coth','cov','cplxpair','cputime','cross','csc','csch',
  79. 'cumprod','cumsum','cumtrapz','cylinder','daspect','date','datenum',
  80. 'datestr','datetick','datevec','dbclear','dbcont','dbdown',
  81. 'dblquad','dbmex','dbquit','dbstack','dbstatus','dbstep','dbstop',
  82. 'dbtype','dbup','deblank','dec2bin','dec2hex','deconv','del2',
  83. 'delaunay','det','diag','dialog','diff','diffuse','dlmread',
  84. 'dlmwrite','dmperm','double','dragrect','drawnow','dsearch','eig',
  85. 'eigs','ellipj','ellipke','eomday','eps','erf','erfc','erfcx',
  86. 'erfiny','error','errorbar','errordlg','etime','eval','evalc',
  87. 'evalin','exp','expint','expm','eye','ezcontour','ezcontourf',
  88. 'ezmesh','ezmeshc','ezplot','ezplot3','ezpolar','ezsurf','ezsurfc',
  89. 'factor','factorial','fclose','feather','feof','ferror','feval',
  90. 'fft','fft2','fftshift','fgetl','fgets','fieldnames','figure',
  91. 'fill','fill3','filter','filter2','find','findfigs','findobj',
  92. 'findstr','fix','flag','flipdim','fliplr','flipud','floor','flops',
  93. 'fmin','fmins','fopen','fplot','fprintf','fread','frewind','fscanf',
  94. 'fseek','ftell','full','funm','fwrite','fzero','gallery','gamma',
  95. 'gammainc','gammaln','gca','gcbo','gcd','gcf','gco','get',
  96. 'getfield','ginput','gmres','gradient','gray','graymon','grid',
  97. 'griddata','gsvd','gtext','hadamard','hankel','hdf','helpdlg',
  98. 'hess','hex2dec','hex2num','hidden','hilb','hist','hold','hot',
  99. 'hsv','hsv2rgb','i','ifft','ifft2','ifftn','ifftshift','imag',
  100. 'image','imfinfo','imread','imwrite','ind2sub','Inf','inferiorto',
  101. 'inline','inpolygon','input','inputdlg','inputname','int16',
  102. 'int2str','int32','int8','interp1','interp2','interp3','interpft',
  103. 'interpn','intersect','inv','invhilb','ipermute','isa','ishandle',
  104. 'ismember','isocaps','isonormals','isosurface','j','jet','keyboard',
  105. 'lcm','legend','legendre','light','lighting','lightingangle',
  106. 'lin2mu','line','lines','linspace','listdlg','loadobj','log',
  107. 'log10','log2','loglog','logm','logspace','lower','lscov','lu',
  108. 'luinc','magic','mat2str','material','max','mean','median','menu',
  109. 'menuedit','mesh','meshc','meshgrid','min','mod','msgbox','mu2lin',
  110. 'NaN','nargchk','nargin','nargout','nchoosek','ndgrid','ndims',
  111. 'newplot','nextpow2','nnls','nnz','nonzeros','norm','normest','now',
  112. 'null','num2cell','num2str','nzmax','ode113,','ode15s,','ode23s,',
  113. 'ode23t,','ode23tb','ode45,','odefile','odeget','odeset','ones',
  114. 'orient','orth','pagedlg','pareto','pascal','patch','pause',
  115. 'pbaspect','pcg','pcolor','peaks','perms','permute','pi','pie',
  116. 'pie3','pinv','plot','plot3','plotmatrix','plotyy','pol2cart',
  117. 'polar','poly','polyarea','polyder','polyeig','polyfit','polyval',
  118. 'polyvalm','pow2','primes','print','printdlg','printopt','prism',
  119. 'prod','propedit','qmr','qr','qrdelete','qrinsert','qrupdate',
  120. 'quad','questdlg','quiver','quiver3','qz','rand','randn','randperm',
  121. 'rank','rat','rats','rbbox','rcond','real','realmax','realmin',
  122. 'rectangle','reducepatch','reducevolume','refresh','rem','repmat',
  123. 'reset','reshape','residue','rgb2hsv','rgbplot','ribbon','rmfield',
  124. 'roots','rose','rot90','rotate','rotate3d','round','rref',
  125. 'rrefmovie','rsf2csf','saveobj','scatter','scatter3','schur',
  126. 'script','sec','sech','selectmoveresize','semilogx','semilogy',
  127. 'set','setdiff','setfield','setxor','shading','shg','shiftdim',
  128. 'shrinkfaces','sign','sin','single','sinh','slice','smooth3','sort',
  129. 'sortrows','sound','soundsc','spalloc','sparse','spconvert',
  130. 'spdiags','specular','speye','spfun','sph2cart','sphere','spinmap',
  131. 'spline','spones','spparms','sprand','sprandn','sprandsym','spring',
  132. 'sprintf','sqrt','sqrtm','squeeze','sscanf','stairs','std','stem',
  133. 'stem3','str2double','str2num','strcat','strcmp','strcmpi',
  134. 'stream2','stream3','streamline','strings','strjust','strmatch',
  135. 'strncmp','strrep','strtok','struct','struct2cell','strvcat',
  136. 'sub2ind','subplot','subspace','subvolume','sum','summer',
  137. 'superiorto','surf','surf2patch','surface','surfc','surfl',
  138. 'surfnorm','svd','svds','symmmd','symrcm','symvar','tan','tanh',
  139. 'texlabel','text Create','textread','textwrap','tic','title','toc',
  140. 'toeplitz','trace','trapz','tril','trimesh','trisurf','triu',
  141. 'tsearch','uicontext Create','uicontextmenu','uicontrol',
  142. 'uigetfile','uimenu','uint32','uint8','uiputfile','uiresume',
  143. 'uisetcolor','uisetfont','uiwait Used','union','unique','unwrap',
  144. 'upper','var','varargin','varargout','vectorize','view','viewmtx',
  145. 'voronoi','waitbar','waitforbuttonpress','warndlg','warning',
  146. 'waterfall','wavread','wavwrite','weekday','whitebg','wilkinson',
  147. 'winter','wk1read','wk1write','xlabel','xlim','ylabel','ylim',
  148. 'zeros','zlabel','zlim','zoom',
  149. //'[Keywords 6]',
  150. 'addpath','cd','clear','copyfile','delete','diary','dir','disp',
  151. 'doc','docopt','echo','edit','fileparts','format','fullfile','help',
  152. 'helpdesk','helpwin','home','inmem','lasterr','lastwarn','length',
  153. 'load','lookfor','ls','matlabrc','matlabroot','mkdir','mlock',
  154. 'more','munlock','open','openvar','pack','partialpath','path',
  155. 'pathtool','profile','profreport','pwd','quit','rmpath','save',
  156. 'saveas','size','tempdir','tempname','type','ver','version','web',
  157. 'what','whatsnew','which','who','whos','workspace'
  158. )
  159. ),
  160. 'SYMBOLS' => array(
  161. '...'
  162. ),
  163. 'CASE_SENSITIVE' => array(
  164. GESHI_COMMENTS => false,
  165. 1 => false,
  166. 2 => false,
  167. //3 => false,
  168. //4 => false,
  169. ),
  170. 'STYLES' => array(
  171. 'KEYWORDS' => array(
  172. 1 => 'color: #0000FF;',
  173. 2 => 'color: #0000FF;'
  174. ),
  175. 'COMMENTS' => array(
  176. 1 => 'color: #228B22;',
  177. 2 => 'color:#A020F0;'
  178. ),
  179. 'ESCAPE_CHAR' => array(
  180. 0 => ''
  181. ),
  182. 'BRACKETS' => array(
  183. 0 => 'color: #080;'
  184. ),
  185. 'STRINGS' => array(
  186. //0 => 'color: #A020F0;'
  187. ),
  188. 'NUMBERS' => array(
  189. 0 => 'color: #33f;'
  190. ),
  191. 'METHODS' => array(
  192. 1 => '',
  193. 2 => ''
  194. ),
  195. 'SYMBOLS' => array(
  196. 0 => 'color: #080;'
  197. ),
  198. 'REGEXPS' => array(
  199. 0 => 'color: #33f;'
  200. ),
  201. 'SCRIPT' => array(
  202. 0 => ''
  203. )
  204. ),
  205. 'URLS' => array(
  206. 1 => '',
  207. 2 => 'http://www.mathworks.com/access/helpdesk/help/techdoc/ref/{FNAMEL}.html'
  208. ),
  209. 'OOLANG' => true,
  210. 'OBJECT_SPLITTERS' => array(
  211. 1 => '.',
  212. 2 => '::'
  213. ),
  214. 'REGEXPS' => array(
  215. //Complex numbers
  216. 0 => '(?<![\\w\\/])[+-]?[\\d]*([\\d]\\.|\\.[\\d])?[\\d]*[ij](?![\\w]|\<DOT>html)'
  217. ),
  218. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  219. 'SCRIPT_DELIMITERS' => array(
  220. ),
  221. 'HIGHLIGHT_STRICT_BLOCK' => array(
  222. )
  223. );
  224. ?>