Team:Newcastle/script/shBrushMatlab.js

From 2013.igem.org

/**

*  Author: James Rohal
*  http://www.jamesrohal.com
*/

SyntaxHighlighter.brushes.Matlab = function() { var functions = 'abs accumarray acos acosd acosh acot acotd acoth acsc acscd acsch actxcontrol actxcontrollist actxcontrolselect actxGetRunningServer actxserver addCause addevent addframe addlistener addOptional addParamValue addpath addpref addprop addproperty addRequired addsample addsampletocollection addtodate addts airy align alim all allchild alpha alphamap amd ancestor and angle annotation Annotation Arrow Properties Annotation Doublearrow Properties Annotation Ellipse Properties Annotation Line Properties Annotation Rectangle Properties Annotation Textarrow Properties Annotation Textbox Properties ans any area Areaseries Properties arrayfun ascii asec asecd asech asin asind asinh assert assignin atan atan2 atand atanh audioplayer audiorecorder aufinfo auread auwrite avifile aviinfo aviread axes Axes Properties axis balance bar barh bar3 bar3h Barseries Properties base2dec beep bench besselh besseli besselj besselk bessely beta betainc betaln bicg bicgstab bin2dec binary bitand bitcmp bitget bitmax bitor bitset bitshift bitxor blanks blkdiag box break brighten brush bsxfun builddocsearchdb builtin bvp4c bvp5c bvpget bvpinit bvpset bvpxtend calendar calllib callSoapService camdolly cameratoolbar camlight camlookat camorbit campan campos camproj camroll camtarget camup camva camzoom cart2pol cart2sph case cast cat catch caxis cd cd cdf2rdf cdfepoch cdfinfo cdfread cdfwrite ceil cell cell2mat cell2struct celldisp cellfun cellplot cellstr cgs char checkin checkout chol cholinc cholupdate circshift cla clabel class classdef clc clear clearvars clear clf clipboard clock close close close closereq cmopts colamd colorbar colordef colormap colormapeditor ColorSpec colperm comet comet3 commandhistory commandwindow compan compass complex computer cond condeig condest coneplot conj continue contour contour3 contourc contourf Contourgroup Properties contourslice contrast conv conv2 convhull convhulln convn copyfile copyobj corrcoef cos cosd cosh cot cotd coth cov cplxpair cputime create createClassFromWsdl createCopy createSoapMessage cross csc cscd csch csvread csvwrite ctranspose cumprod cumsum cumtrapz curl customverctrl cylinder daqread daspect datacursormode datatipinfo date datenum datestr datetick datevec dbclear dbcont dbdown dblquad dbmex dbquit dbstack dbstatus dbstep dbstop dbtype dbup dde23 ddeget ddesd ddeset deal deblank debug dec2base dec2bin dec2hex decic deconv del2 delaunay delaunay3 delaunayn delete delete delete delete delete delete deleteproperty delevent delsample delsamplefromcollection demo depdir depfun det detrend detrend deval diag dialog diary diff diffuse dir dir disp disp disp disp disp display divergence dlmread dlmwrite dmperm doc docopt docsearch dos dot double dragrect drawnow dsearch dsearchn dynamicprops echo echodemo edit eig eigs ellipj ellipke ellipsoid else elseif enableservice end eomday eps eq eq erf erfc erfcx erfinv erfcinv error errorbar Errorbarseries Properties errordlg etime etree etreeplot eval evalc evalin eventlisteners events events Execute exifread exist exit exp expint expm expm1 export2wsdlg eye ezcontour ezcontourf ezmesh ezmeshc ezplot ezplot3 ezpolar ezsurf ezsurfc factor factorial FALSE fclose fclose feather feof ferror feval Feval fft fft2 fftn fftshift fftw fgetl fgetl fgets fgets fieldnames figure Figure Properties figurepalette fileattrib filebrowser File Formats filemarker fileparts fileread filesep fill fill3 filter filter filter2 find findall findfigs findobj findobj findprop findstr finish fitsinfo fitsread fix flipdim fliplr flipud floor flow fminbnd fminsearch fopen fopen for format fplot fprintf fprintf frame2im fread fread freqspace frewind fscanf fscanf fseek ftell ftp full fullfile func2str function function_handle functions funm fwrite fwrite fzero gallery gamma gammainc gammaln gca gcbf gcbo gcd gcf gco ge genpath genvarname get get get get get get get get get getabstime getabstime getappdata GetCharArray getdatasamplesize getDefaultStream getdisp getenv getfield getframe GetFullMatrix getinterpmethod getpixelposition getpref getqualitydesc getReport getsampleusingtime getsampleusingtime gettimeseriesnames gettsafteratevent gettsafterevent gettsatevent gettsbeforeatevent gettsbeforeevent gettsbetweenevents GetVariable GetWorkspaceData ginput global gmres gplot grabcode gradient graymon grid griddata griddata3 griddatan gsvd gtext guidata guide guihandles gunzip gzip hadamard handle hankel hdf hdf5 hdf5info hdf5read hdf5write hdfinfo hdfread hdftool help helpbrowser helpdesk helpdlg helpwin hess hex2dec hex2num hgexport hggroup Hggroup Properties hgload hgsave hgsetget hgtransform Hgtransform Properties hidden hilb hist histc hold home horzcat horzcat hostid hsv2rgb hypot i idealfilter idivide if ifft ifft2 ifftn ifftshift ilu im2frame im2java imag image Image Properties imagesc imfinfo imformats import importdata imread imwrite ind2rgb ind2sub Inf inferiorto info inline inmem inpolygon input inputdlg inputname inputParser inspect instrcallback instrfind instrfindall int2str int8 int16 int32 int64 interfaces interp1 interp1q interp2 interp3 interpft interpn interpstreamspeed intersect intmax intmin intwarning inv invhilb invoke ipermute iqr is* isa isappdata iscell iscellstr ischar iscom isdir isempty isempty isempty isequal isequal isequalwithequalnans isevent isfield isfinite isfloat isglobal ishandle ishold isinf isinteger isinterface isjava isKey iskeyword isletter islogical ismac ismember ismethod isnan isnumeric isobject isocaps isocolors isonormals isosurface ispc ispref isprime isprop isreal isscalar issorted isspace issparse isstr isstrprop isstruct isstudent isunix isvalid isvalid isvalid isvarname isvector j javaaddpath javaArray javachk javaclasspath javaMethod javaObject javarmpath keyboard keys kron last lasterr lasterror lastwarn lcm ldl ldivide rdivide le legend legendre length length length length length libfunctions libfunctionsview libisloaded libpointer libstruct license light Light Properties lightangle lighting lin2mu line Line Properties Lineseries Properties LineSpec linkaxes linkdata linkprop linsolve linspace list listdlg listfonts load load load loadlibrary loadobj log log10 log1p log2 logical loglog logm logspace lookfor lower ls lscov lsqnonneg lsqr lu luinc magic makehgtform mat2cell mat2str material matlabcolon matlabrc matlabroot matlab matlab max max MaximizeCommandWindow maxNumCompThreads mean mean median median memmapfile memory menu mesh meshc meshz meshgrid metaclass methods methodsview mex MException mexext mfilename mget min min MinimizeCommandWindow minres mislocked mkdir mkdir mkpp mldivide mrdivide mlint mlintrpt mlock mmfileinfo mmreader mod mode more move movefile movegui movie movie2avi mput msgbox mtimes mu2lin multibandread multibandwrite munlock namelengthmax NaN nargchk nargin nargout nargoutchk native2unicode nchoosek ndgrid ndims ne ne netcdf newplot nextpow2 nnz noanimate nonzeros norm normest not notebook notify now nthroot null num2cell num2hex num2str numel nzmax ode15i ode23 ode45 ode113 ode15s ode23s ode23t ode23tb odefile odeget odeset odextend onCleanup ones open openfig opengl openvar optimget optimset or ordeig orderfields ordqz ordschur orient orth otherwise pack padecoef pagesetupdlg pan pareto parfor parse parseSoapResponse partialpath pascal patch Patch Properties path path2rc pathsep pathtool pause pbaspect pcg pchip pcode pcolor pdepe pdeval peaks perl perms permute persistent pi pie pie3 pinv planerot playshow plot plot plot3 plotbrowser plotedit plotmatrix plottools plotyy pol2cart polar poly polyarea polyder polyeig polyfit polyint polyval polyvalm pow2 power ppval prefdir preferences primes print printopt printdlg printpreview prod profile profsave propedit propedit properties propertyeditor psi publish PutCharArray PutFullMatrix PutWorkspaceData pwd qmr qr qrdelete qrinsert qrupdate quad quadgk quadl quadv questdlg quit Quit quiver quiver3 Quivergroup Properties qz rand rand randi randi randn randn randperm randperm RandStream RandStream rank rat rats rbbox rcond read readasync real reallog realmax realmin realpow realsqrt record rectangle Rectangle Properties rectint recycle reducepatch reducevolume refresh refreshdata regexp regexpi regexprep regexptranslate registerevent rehash release relationaloperators rem remove removets rename repmat resample resample reset reset reshape residue restoredefaultpath rethrow rethrow return rgb2hsv rgbplot ribbon rmappdata rmdir rmdir rmfield rmpath rmpref root object Root Properties roots rose rosser rot90 rotate rotate3d round rref rsf2csf run save save save saveas saveobj savepath scatter scatter3 Scattergroup Properties schur script sec secd sech selectmoveresize semilogx semilogy sendmail serial serialbreak set set set set set set set set setabstime setabstime setappdata setDefaultStream setdiff setdisp setenv setfield setinterpmethod setpixelposition setpref setstr settimeseriesnames setxor shading shg shiftdim showplottool shrinkfaces sign sin sind single sinh size size size size size slice smooth3 snapnow sort sortrows sound soundsc spalloc sparse spaugment spconvert spdiags specular speye spfun sph2cart sphere spinmap spline spones spparms sprand sprandn sprandsym sprank sprintf spy sqrt sqrtm squeeze ss2tf sscanf stairs Stairseries Properties start startat startup std std stem stem3 Stemseries Properties stop stopasync str2double str2func str2mat str2num strcat strcmp strcmpi stream2 stream3 streamline streamparticles streamribbon streamslice streamtube strfind strings strjust strmatch strncmp strncmpi strread strrep strtok strtrim struct struct2cell structfun strvcat sub2ind subplot subsasgn subsindex subspace subsref substruct subvolume sum sum superiorto support surf surfc surf2patch surface Surface Properties Surfaceplot Properties surfl surfnorm svd svds swapbytes switch symamd symbfact symmlq symrcm symvar synchronize syntax system tan tand tanh tar tempdir tempname tetramesh texlabel text Text Properties textread textscan textwrap throw throwAsCaller tic toc timer timerfind timerfindall timeseries title todatenum toeplitz toolboxdir trace transpose trapz treelayout treeplot tril trimesh triplequad triplot trisurf triu TRUE try tscollection tsearch tsearchn tsprops tstool type typecast uibuttongroup Uibuttongroup Properties uicontextmenu Uicontextmenu Properties uicontrol Uicontrol Properties uigetdir uigetfile uigetpref uiimport uimenu Uimenu Properties uint8 uint16 uint32 uint64 uiopen uipanel Uipanel Properties uipushtool Uipushtool Properties uiputfile uiresume uisave uisetcolor uisetfont uisetpref uistack uitable Uitable Properties uitoggletool Uitoggletool Properties uitoolbar Uitoolbar Properties uiwait undocheckout unicode2native union unique unix unloadlibrary unmkpp unregisterallevents unregisterevent untar unwrap unzip upper urlread urlwrite usejava userpath validateattributes validatestring values vander var var varargin varargout vectorize ver verctrl verLessThan version vertcat vertcat vertcat view viewmtx visdiff volumebounds voronoi voronoin wait waitbar waitfor waitforbuttonpress warndlg warning waterfall wavfinfo wavplay wavread wavrecord wavwrite web weekday what whatsnew which while whitebg who whos wilkinson winopen winqueryreg wk1finfo wk1read wk1write workspace xlabel ylabel zlabel xlim ylim zlim xlsfinfo xlsread xlswrite xmlread xmlwrite xor xslt zeros zip zoom';

this.regexList = [ { regex: /%.*$/gm, css: 'comments' }, // one line comments { regex: /\{\%[\s\S]*?\%\}/gm, css: 'comments' }, // multiline comments { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings { regex: new RegExp(this.getKeywords(functions), 'gm'), css: 'functions bold' } ]; }; SyntaxHighlighter.brushes.Matlab.prototype = new SyntaxHighlighter.Highlighter(); SyntaxHighlighter.brushes.Matlab.aliases = ['matlab'];