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.

516 lines
29KB

  1. <?php
  2. /*************************************************************************************
  3. * octave.php
  4. * -----------
  5. * Author: Carnë Draug (carandraug+dev@gmail.com)
  6. * Juan Pablo Carbajal (carbajal@ifi.uzh.ch)
  7. * Copyright: (c) 2012 Carnë Draug
  8. * (c) 2012 Juan Pablo Carbajal
  9. * Release Version: 1.0.8.11
  10. * Date Started: 2012/05/22
  11. *
  12. * GNU Octave M-file language file for GeSHi.
  13. *
  14. * This file was heavily based on octave.lang from gtksourceview. If bugs are
  15. * found and/or fixed on this file, please send them to the gtksourceview
  16. * project or e-mail them to this file authors. Thanks in advance
  17. *
  18. * CHANGES
  19. * -------
  20. * 2012/05/22 (1.0.8.11)
  21. * - First Release
  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' => 'GNU Octave',
  44. 'COMMENT_SINGLE' => array(1 => '#', 2 => '%'),
  45. // we can't use COMMENT_MULTI since start and end of block comments need to
  46. // be alone on the line (optionally, with whitespace). See COMMENT_REGEXP
  47. 'COMMENT_MULTI' => array(),
  48. // we can't use QUOTEMARKS, not even HARDQUOTE, see COMMENT_REGEXP
  49. 'QUOTEMARKS' => array(),
  50. 'ESCAPE_CHAR' => '',
  51. 'COMMENT_REGEXP' => array(
  52. // Single quote strings: we can't use QUOTEMARKS here since new
  53. // lines will break the string. Plus, single quote strings do not even
  54. // allow for continuation markers, only double quote strings allow it.
  55. // Also, to do not misdetect the transpose operator ' as the start of a
  56. // string we assert to not follow a variable name (letters, digits and
  57. // underscores) or a closing bracket (round, square or curly) or a dot
  58. // (to form the array transpose operator ".'" ).
  59. 3 => "/(?<![0-9a-zA-Z_\)\]}\.])'.*?'/",
  60. // Double quote strings: we also can't use QUOTEMARKS here (see single
  61. // line quotes). However, with double quote strings both \ and ... can
  62. // be used to make multiline strings. Continuation markers can be
  63. // followed by whitespace
  64. 4 => '/"(.|(\.\.\.|\\\)(\s)*?\n)*?(?<!\\\)"/',
  65. // Block comments: the ms modifiers treat strings as multiple lines (to
  66. // be able to use ^ and $ instead of newline and thus support block
  67. // comments on the first and last line of source) and make . also match
  68. // a newline
  69. 5 => "/^\s*?[%#]{\s*?$.*?^\s*?[%#]}\s*?$/ms",
  70. // Packaging system: comes here so that pkg can also be used in the
  71. // function form. The list of pkg commands is optional to the match so
  72. // that at least pkg is highlighted if new commands are implemented
  73. 6 => "/\bpkg(?!\s*\()\s+((un)?install|update|(un)?load|list|(global|local)_list|describe|prefix|(re)?build)?\b/",
  74. // Function handles
  75. 7 => "/@([a-z_][a-z1-9_]*)?/i",
  76. ),
  77. 'NUMBERS' =>
  78. GESHI_NUMBER_INT_BASIC |
  79. GESHI_NUMBER_OCT_PREFIX |
  80. GESHI_NUMBER_HEX_PREFIX |
  81. GESHI_NUMBER_FLT_SCI_ZERO,
  82. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  83. 'KEYWORDS' => array(
  84. // Data types
  85. 1 => array(
  86. 'cell', 'char', 'double', 'uint8', 'uint16', 'uint32', 'uint64',
  87. 'int8','int16', 'int32', 'int64', 'logical', 'single', 'struct'
  88. ),
  89. // Storage type
  90. 2 => array(
  91. 'global', 'persistent', 'static'
  92. ),
  93. // Internal variable
  94. 3 => array(
  95. 'ans'
  96. ),
  97. // Reserved words
  98. 4 => array(
  99. 'break', 'case', 'catch', 'continue', 'do', 'else', 'elseif', 'end',
  100. 'end_try_catch', 'end_unwind_protect', 'endfor', 'endfunction',
  101. 'endif', 'endparfor', 'endswitch', 'endwhile', 'for', 'function',
  102. 'if', 'otherwise', 'parfor', 'return',
  103. 'switch', 'try', 'until', 'unwind_protect',
  104. 'unwind_protect_cleanup', 'varargin', 'varargout', 'while'
  105. ),
  106. // Built in
  107. 5 => array(
  108. 'P_tmpdir', 'abs', 'acos', 'acosh',
  109. 'add_input_event_hook', 'addlistener', 'addpath', 'addproperty',
  110. 'all', 'allow_noninteger_range_as_index', 'and', 'angle', 'any',
  111. 'arg', 'argnames', 'argv', 'asin', 'asinh', 'assignin', 'atan',
  112. 'atan2', 'atanh', 'atexit', 'autoload', 'available_graphics_toolkits',
  113. 'beep_on_error', 'bitand', 'bitmax', 'bitor', 'bitshift', 'bitxor',
  114. 'builtin', 'canonicalize_file_name', 'cat', 'cbrt', 'cd', 'ceil',
  115. 'cell2struct', 'cellstr', 'chdir', 'class', 'clc',
  116. 'clear', 'columns', 'command_line_path', 'completion_append_char',
  117. 'completion_matches', 'complex', 'confirm_recursive_rmdir', 'conj',
  118. 'cos', 'cosh', 'cputime', 'crash_dumps_octave_core', 'ctranspose',
  119. 'cumprod', 'cumsum', 'dbclear', 'dbcont', 'dbdown', 'dbnext',
  120. 'dbquit', 'dbstack', 'dbstatus', 'dbstep', 'dbstop', 'dbtype', 'dbup',
  121. 'dbwhere', 'debug_on_error', 'debug_on_interrupt', 'debug_on_warning',
  122. 'default_save_options', 'dellistener', 'diag', 'diary', 'diff',
  123. 'disp', 'do_braindead_shortcircuit_evaluation', 'do_string_escapes',
  124. 'doc_cache_file', 'drawnow', 'dup2', 'echo',
  125. 'echo_executing_commands', 'edit_history','eq', 'erf', 'erfc',
  126. 'erfcx', 'erfinv', 'errno', 'errno_list', 'error', 'eval', 'evalin',
  127. 'exec', 'exist', 'exit', 'exp', 'expm1', 'eye', 'fclear',
  128. 'fclose', 'fcntl', 'fdisp', 'feof', 'ferror', 'feval', 'fflush',
  129. 'fgetl', 'fgets', 'fieldnames', 'file_in_loadpath', 'file_in_path',
  130. 'filemarker', 'filesep', 'find_dir_in_path', 'finite', 'fix',
  131. 'fixed_point_format', 'floor', 'fmod', 'fnmatch', 'fopen', 'fork',
  132. 'format', 'formula', 'fprintf', 'fputs', 'fread', 'freport',
  133. 'frewind', 'fscanf', 'fseek', 'fskipl', 'ftell', 'full', 'func2str',
  134. 'functions', 'fwrite', 'gamma', 'gammaln', 'ge', 'genpath', 'get',
  135. 'get_help_text', 'get_help_text_from_file', 'getegid', 'getenv',
  136. 'geteuid', 'getgid', 'gethostname', 'getpgrp', 'getpid', 'getppid',
  137. 'getuid', 'glob', 'gt', 'history', 'history_control', 'history_file',
  138. 'history_size', 'history_timestamp_format_string', 'home', 'horzcat',
  139. 'hypot', 'ifelse', 'ignore_function_time_stamp', 'imag',
  140. 'inferiorto', 'info_file', 'info_program', 'inline', 'input',
  141. 'intmax', 'intmin', 'ipermute',
  142. 'is_absolute_filename', 'is_dq_string', 'is_function_handle',
  143. 'is_rooted_relative_filename', 'is_sq_string', 'isalnum', 'isalpha',
  144. 'isargout', 'isascii', 'isbool', 'iscell', 'iscellstr', 'ischar',
  145. 'iscntrl', 'iscomplex', 'isdebugmode', 'isdigit', 'isempty',
  146. 'isfield', 'isfinite', 'isfloat', 'isglobal', 'isgraph', 'ishandle',
  147. 'isieee', 'isindex', 'isinf', 'isinteger', 'iskeyword', 'islogical',
  148. 'islower', 'ismatrix', 'ismethod', 'isna', 'isnan', 'isnull',
  149. 'isnumeric', 'isobject', 'isprint', 'ispunct', 'isreal', 'issorted',
  150. 'isspace', 'issparse', 'isstruct', 'isupper', 'isvarname', 'isxdigit',
  151. 'kbhit', 'keyboard', 'kill', 'lasterr', 'lasterror', 'lastwarn',
  152. 'ldivide', 'le', 'length', 'lgamma', 'link', 'linspace',
  153. 'list_in_columns', 'load', 'loaded_graphics_toolkits', 'log', 'log10',
  154. 'log1p', 'log2', 'lower', 'lstat', 'lt',
  155. 'make_absolute_filename', 'makeinfo_program', 'max_recursion_depth',
  156. 'merge', 'methods', 'mfilename', 'minus', 'mislocked',
  157. 'missing_function_hook', 'mkdir', 'mkfifo', 'mkstemp', 'mldivide',
  158. 'mlock', 'mod', 'more', 'mpower', 'mrdivide', 'mtimes', 'munlock',
  159. 'nargin', 'nargout', 'native_float_format', 'ndims', 'ne',
  160. 'nfields', 'nnz', 'norm', 'not', 'nth_element', 'numel', 'nzmax',
  161. 'octave_config_info', 'octave_core_file_limit',
  162. 'octave_core_file_name', 'octave_core_file_options',
  163. 'octave_tmp_file_name', 'onCleanup', 'ones',
  164. 'optimize_subsasgn_calls', 'or', 'output_max_field_width',
  165. 'output_precision', 'page_output_immediately', 'page_screen_output',
  166. 'path', 'pathsep', 'pause', 'pclose', 'permute', 'pipe', 'plus',
  167. 'popen', 'popen2', 'power', 'print_empty_dimensions',
  168. 'print_struct_array_contents', 'printf', 'prod',
  169. 'program_invocation_name', 'program_name', 'putenv', 'puts', 'pwd',
  170. 'quit', 'rats', 'rdivide', 're_read_readline_init_file',
  171. 'read_readline_init_file', 'readdir', 'readlink', 'real', 'realmax',
  172. 'realmin', 'register_graphics_toolkit', 'rehash', 'rem',
  173. 'remove_input_event_hook', 'rename', 'repelems', 'reset', 'reshape',
  174. 'resize', 'restoredefaultpath', 'rethrow', 'rmdir', 'rmfield',
  175. 'rmpath', 'round', 'roundb', 'rows', 'run_history', 'save',
  176. 'save_header_format_string', 'save_precision', 'saving_history',
  177. 'scanf', 'set', 'setenv', 'sighup_dumps_octave_core', 'sign',
  178. 'sigterm_dumps_octave_core', 'silent_functions', 'sin',
  179. 'sinh', 'size', 'size_equal', 'sizemax', 'sizeof', 'sleep', 'sort',
  180. 'source', 'spalloc', 'sparse', 'sparse_auto_mutate',
  181. 'split_long_rows', 'sprintf', 'sqrt', 'squeeze', 'sscanf', 'stat',
  182. 'stderr', 'stdin', 'stdout', 'str2func', 'strcmp', 'strcmpi',
  183. 'string_fill_char', 'strncmp', 'strncmpi', 'struct2cell',
  184. 'struct_levels_to_print', 'strvcat', 'subsasgn', 'subsref', 'sum',
  185. 'sumsq', 'superiorto', 'suppress_verbose_help_message', 'symlink',
  186. 'system', 'tan', 'tanh', 'terminal_size', 'tic', 'tilde_expand',
  187. 'times', 'tmpfile', 'tmpnam', 'toascii', 'toc', 'tolower', 'toupper',
  188. 'transpose', 'typeinfo',
  189. 'umask', 'uminus', 'uname', 'undo_string_escapes', 'unlink',
  190. 'uplus', 'upper', 'usage', 'usleep', 'vec', 'vectorize', 'vertcat',
  191. 'waitfor', 'waitpid', 'warning', 'warranty', 'who', 'whos',
  192. 'whos_line_format', 'yes_or_no', 'zeros'
  193. ),
  194. // Octave functions
  195. 6 => array(
  196. 'accumarray', 'accumdim', 'acosd', 'acot', 'acotd', 'acoth', 'acsc',
  197. 'acscd', 'acsch', 'addpref', 'addtodate', 'allchild', 'amd',
  198. 'ancestor', 'anova', 'arch_fit', 'arch_rnd', 'arch_test',
  199. 'area', 'arma_rnd', 'asctime', 'asec', 'asecd', 'asech', 'asind',
  200. 'assert', 'atand', 'autoreg_matrix', 'autumn',
  201. 'axes', 'axis', 'balance', 'bar', 'barh', 'bartlett', 'bartlett_test',
  202. 'base2dec', 'beep', 'bessel', 'besselj', 'beta', 'betacdf',
  203. 'betainc', 'betainv', 'betaln', 'betapdf', 'betarnd', 'bicg',
  204. 'bicgstab', 'bicubic', 'bin2dec', 'bincoeff', 'binocdf', 'binoinv',
  205. 'binopdf', 'binornd', 'bitcmp', 'bitget', 'bitset', 'blackman',
  206. 'blanks', 'blkdiag', 'bone', 'box', 'brighten', 'bsxfun',
  207. 'bug_report', 'bunzip2', 'bzip2', 'calendar', 'cart2pol', 'cart2sph',
  208. 'cast', 'cauchy_cdf', 'cauchy_inv', 'cauchy_pdf', 'cauchy_rnd',
  209. 'caxis', 'ccolamd', 'cell2mat', 'celldisp', 'cellfun',
  210. 'center', 'cgs', 'chi2cdf', 'chi2inv', 'chi2pdf', 'chi2rnd',
  211. 'chisquare_test_homogeneity', 'chisquare_test_independence', 'chol',
  212. 'chop', 'circshift', 'cla', 'clabel', 'clf', 'clock',
  213. 'cloglog', 'close', 'closereq', 'colamd', 'colloc', 'colon',
  214. 'colorbar', 'colormap', 'colperm', 'colstyle', 'comet', 'comet3',
  215. 'comma', 'common_size', 'commutation_matrix', 'compan',
  216. 'compare_versions', 'compass', 'computer', 'cond', 'condest',
  217. 'contour', 'contour3', 'contourc', 'contourf', 'contrast', 'conv',
  218. 'conv2', 'convhull', 'convhulln', 'cool', 'copper', 'copyfile',
  219. 'cor_test', 'corr', 'cosd', 'cot', 'cotd', 'coth', 'cov',
  220. 'cplxpair', 'cross', 'csc', 'cscd', 'csch', 'cstrcat',
  221. 'csvread', 'csvwrite', 'ctime', 'cumtrapz', 'curl', 'cylinder',
  222. 'daspect', 'daspk', 'dasrt', 'dassl', 'date', 'datenum', 'datestr',
  223. 'datetick', 'datevec', 'dblquad', 'deal', 'deblank', 'debug',
  224. 'dec2base', 'dec2bin', 'dec2hex', 'deconv', 'del2', 'delaunay',
  225. 'delaunay3', 'delaunayn', 'delete', 'demo', 'det', 'detrend',
  226. 'diffpara', 'diffuse', 'dir', 'discrete_cdf', 'discrete_inv',
  227. 'discrete_pdf', 'discrete_rnd', 'display', 'divergence',
  228. 'dlmread', 'dlmwrite', 'dmperm', 'doc', 'dos', 'dot', 'dsearch',
  229. 'dsearchn', 'dump_prefs', 'duplication_matrix', 'durbinlevinson',
  230. 'edit', 'eig', 'eigs', 'ellipsoid', 'empirical_cdf', 'empirical_inv',
  231. 'empirical_pdf', 'empirical_rnd', 'eomday', 'errorbar',
  232. 'etime', 'etreeplot', 'example', 'expcdf', 'expinv', 'expm', 'exppdf',
  233. 'exprnd', 'ezcontour', 'ezcontourf', 'ezmesh', 'ezmeshc', 'ezplot',
  234. 'ezplot3', 'ezpolar', 'ezsurf', 'ezsurfc', 'f_test_regression',
  235. 'fact', 'factor', 'factorial', 'fail', 'fcdf', 'feather', 'fft',
  236. 'fft2', 'fftconv', 'fftfilt', 'fftn', 'fftshift', 'fftw', 'figure',
  237. 'fileattrib', 'fileparts', 'fileread', 'fill', 'filter', 'filter2',
  238. 'find', 'findall', 'findobj', 'findstr', 'finv', 'flag', 'flipdim',
  239. 'fliplr', 'flipud', 'fminbnd', 'fminunc', 'fpdf', 'fplot',
  240. 'fractdiff', 'freqz', 'freqz_plot', 'frnd', 'fsolve',
  241. 'fullfile', 'fzero', 'gamcdf', 'gaminv', 'gammainc',
  242. 'gampdf', 'gamrnd', 'gca', 'gcbf', 'gcbo', 'gcd', 'gcf',
  243. 'gen_doc_cache', 'genvarname', 'geocdf', 'geoinv', 'geopdf', 'geornd',
  244. 'get_first_help_sentence', 'getappdata', 'getfield', 'getgrent',
  245. 'getpref', 'getpwent', 'getrusage', 'ginput', 'givens', 'glpk',
  246. 'gls', 'gmap40', 'gmres', 'gnuplot_binary', 'gplot',
  247. 'gradient', 'graphics_toolkit', 'gray', 'gray2ind', 'grid',
  248. 'griddata', 'griddata3', 'griddatan', 'gtext', 'guidata',
  249. 'guihandles', 'gunzip', 'gzip', 'hadamard', 'hamming', 'hankel',
  250. 'hanning', 'help', 'hess', 'hex2dec', 'hex2num', 'hggroup', 'hidden',
  251. 'hilb', 'hist', 'histc', 'hold', 'hot', 'hotelling_test',
  252. 'hotelling_test_2', 'housh', 'hsv', 'hsv2rgb', 'hurst', 'hygecdf',
  253. 'hygeinv', 'hygepdf', 'hygernd', 'idivide', 'ifftshift', 'image',
  254. 'imagesc', 'imfinfo', 'imread', 'imshow', 'imwrite', 'ind2gray',
  255. 'ind2rgb', 'index', 'info', 'inpolygon', 'inputname', 'int2str',
  256. 'interp1', 'interp1q', 'interp2', 'interp3', 'interpft', 'interpn',
  257. 'intersect', 'inv', 'invhilb', 'iqr',
  258. 'is_leap_year', 'is_valid_file_id',
  259. 'isa', 'isappdata', 'iscolumn', 'isdefinite', 'isdeployed', 'isdir',
  260. 'isequal', 'isequalwithequalnans', 'isfigure', 'ishermitian',
  261. 'ishghandle', 'ishold', 'isletter', 'ismac', 'ismember', 'isocolors',
  262. 'isonormals', 'isosurface', 'ispc', 'ispref', 'isprime', 'isprop',
  263. 'isrow', 'isscalar', 'issquare', 'isstrprop', 'issymmetric',
  264. 'isunix', 'isvector', 'jet', 'kendall', 'kolmogorov_smirnov_cdf',
  265. 'kolmogorov_smirnov_test', 'kolmogorov_smirnov_test_2', 'kron',
  266. 'kruskal_wallis_test', 'krylov', 'kurtosis', 'laplace_cdf',
  267. 'laplace_inv', 'laplace_pdf', 'laplace_rnd', 'lcm', 'legend',
  268. 'legendre', 'license', 'lin2mu', 'line', 'linkprop', 'list_primes',
  269. 'loadaudio', 'loadobj', 'logistic_cdf', 'logistic_inv',
  270. 'logistic_pdf', 'logistic_regression', 'logistic_rnd', 'logit',
  271. 'loglog', 'loglogerr', 'logm', 'logncdf', 'logninv', 'lognpdf',
  272. 'lognrnd', 'logspace', 'lookfor', 'lookup', 'ls', 'ls_command',
  273. 'lsode', 'lsqnonneg', 'lu', 'luinc', 'magic', 'mahalanobis', 'manova',
  274. 'mat2str', 'matlabroot', 'matrix_type', 'max', 'mcnemar_test',
  275. 'md5sum', 'mean', 'meansq', 'median', 'menu', 'mesh', 'meshc',
  276. 'meshgrid', 'meshz', 'mex', 'mexext', 'mgorth', 'mkoctfile', 'mkpp',
  277. 'mode', 'moment', 'movefile', 'mpoles', 'mu2lin', 'namelengthmax',
  278. 'nargchk', 'narginchk', 'nargoutchk', 'nbincdf', 'nbininv', 'nbinpdf',
  279. 'nbinrnd', 'nchoosek', 'ndgrid', 'newplot', 'news', 'nextpow2',
  280. 'nonzeros', 'normcdf', 'normest', 'norminv', 'normpdf', 'normrnd',
  281. 'now', 'nproc', 'nthargout', 'nthroot', 'ntsc2rgb', 'null', 'num2str',
  282. 'ocean', 'ols', 'onenormest', 'optimget', 'optimset', 'orderfields',
  283. 'orient', 'orth', 'pack', 'paren', 'pareto', 'parseparams', 'pascal',
  284. 'patch', 'pathdef', 'pbaspect', 'pcg', 'pchip', 'pcolor', 'pcr',
  285. 'peaks', 'periodogram', 'perl', 'perms', 'pie', 'pie3',
  286. 'pink', 'pinv', 'pkg', 'planerot', 'playaudio', 'plot', 'plot3',
  287. 'plotmatrix', 'plotyy', 'poisscdf', 'poissinv', 'poisspdf',
  288. 'poissrnd', 'pol2cart', 'polar', 'poly', 'polyaffine', 'polyarea',
  289. 'polyder', 'polyfit', 'polygcd', 'polyint', 'polyout',
  290. 'polyreduce', 'polyval', 'polyvalm', 'postpad', 'pow2', 'powerset',
  291. 'ppder', 'ppint', 'ppjumps', 'ppplot', 'ppval', 'pqpnonneg',
  292. 'prctile', 'prepad', 'primes', 'print', 'printAllBuiltins',
  293. 'print_usage', 'prism', 'probit', 'profexplore', 'profile',
  294. 'profshow', 'prop_test_2', 'python', 'qp', 'qqplot', 'qr', 'quad',
  295. 'quadcc', 'quadgk', 'quadl', 'quadv', 'quantile', 'quiver', 'quiver3',
  296. 'qz', 'qzhess', 'rainbow', 'rand', 'randi', 'range', 'rank', 'ranks',
  297. 'rat', 'rcond', 'reallog', 'realpow', 'realsqrt', 'record',
  298. 'rectangle', 'rectint', 'recycle', 'refresh', 'refreshdata', 'regexp',
  299. 'regexptranslate', 'repmat', 'residue', 'rgb2hsv',
  300. 'rgb2ind', 'rgb2ntsc', 'ribbon', 'rindex', 'rmappdata', 'rmpref',
  301. 'roots', 'rose', 'rosser', 'rot90', 'rotdim', 'rref', 'run',
  302. 'run_count', 'run_test', 'rundemos', 'runlength', 'runtests',
  303. 'saveas', 'saveaudio', 'saveobj', 'savepath', 'scatter',
  304. 'scatter3', 'schur', 'sec', 'secd', 'sech', 'semicolon', 'semilogx',
  305. 'semilogxerr', 'semilogy', 'semilogyerr', 'setappdata', 'setaudio',
  306. 'setdiff', 'setfield', 'setpref', 'setxor', 'shading',
  307. 'shg', 'shift', 'shiftdim', 'sign_test', 'sinc', 'sind',
  308. 'sinetone', 'sinewave', 'skewness', 'slice', 'sombrero', 'sortrows',
  309. 'spaugment', 'spconvert', 'spdiags', 'spearman', 'spectral_adf',
  310. 'spectral_xdf', 'specular', 'speed', 'spencer', 'speye', 'spfun',
  311. 'sph2cart', 'sphere', 'spinmap', 'spline', 'spones', 'spparms',
  312. 'sprand', 'sprandn', 'sprandsym', 'spring', 'spstats', 'spy', 'sqp',
  313. 'sqrtm', 'stairs', 'statistics', 'std', 'stdnormal_cdf',
  314. 'stdnormal_inv', 'stdnormal_pdf', 'stdnormal_rnd', 'stem', 'stem3',
  315. 'stft', 'str2double', 'str2num', 'strcat', 'strchr',
  316. 'strfind', 'strjust', 'strmatch', 'strread', 'strsplit', 'strtok',
  317. 'strtrim', 'strtrunc', 'structfun', 'sub2ind',
  318. 'subplot', 'subsindex', 'subspace', 'substr', 'substruct', 'summer',
  319. 'surf', 'surface', 'surfc', 'surfl', 'surfnorm', 'svd', 'svds',
  320. 'swapbytes', 'syl', 'symbfact', 'symrcm',
  321. 'symvar', 'synthesis', 't_test', 't_test_2', 't_test_regression',
  322. 'table', 'tand', 'tar', 'tcdf', 'tempdir', 'tempname', 'test', 'text',
  323. 'textread', 'textscan', 'time', 'tinv', 'title', 'toeplitz', 'tpdf',
  324. 'trace', 'trapz', 'treelayout', 'treeplot', 'tril', 'trimesh',
  325. 'triplequad', 'triplot', 'trisurf', 'trnd', 'tsearch', 'tsearchn',
  326. 'type', 'typecast', 'u_test', 'uicontextmenu', 'uicontrol',
  327. 'uigetdir', 'uigetfile', 'uimenu', 'uipanel', 'uipushtool',
  328. 'uiputfile', 'uiresume', 'uitoggletool', 'uitoolbar', 'uiwait',
  329. 'unidcdf', 'unidinv', 'unidpdf', 'unidrnd', 'unifcdf', 'unifinv',
  330. 'unifpdf', 'unifrnd', 'unimplemented', 'union', 'unique', 'unix',
  331. 'unmkpp', 'unpack', 'untabify', 'untar', 'unwrap', 'unzip',
  332. 'urlwrite', 'usejava', 'validatestring', 'vander', 'var',
  333. 'var_test', 'vech', 'ver', 'version', 'view', 'voronoi', 'voronoin',
  334. 'waitbar', 'waitforbuttonpress', 'warning_ids', 'wavread', 'wavwrite',
  335. 'wblcdf', 'wblinv', 'wblpdf', 'wblrnd', 'weekday',
  336. 'welch_test', 'what', 'which',
  337. 'white', 'whitebg', 'wienrnd', 'wilcoxon_test', 'wilkinson', 'winter',
  338. 'xlabel', 'xlim', 'xor', 'ylabel', 'ylim', 'yulewalker', 'z_test',
  339. 'z_test_2', 'zip', 'zlabel', 'zlim', 'zscore', 'airy', 'arrayfun',
  340. 'besselh', 'besseli', 'besselk', 'bessely', 'bitpack', 'bitunpack',
  341. 'blkmm', 'cellindexmat', 'cellslices', 'chol2inv', 'choldelete',
  342. 'cholinsert', 'cholinv', 'cholshift', 'cholupdate', 'convn',
  343. 'csymamd', 'cummax', 'cummin', 'daspk_options', 'dasrt_options',
  344. 'dassl_options', 'endgrent', 'endpwent', 'etree', 'getgrgid',
  345. 'getgrnam', 'getpwnam', 'getpwuid', 'gmtime', 'gui_mode', 'ifft',
  346. 'ifft2', 'ifftn', 'ind2sub', 'inverse', 'localtime', 'lsode_options',
  347. 'luupdate', 'mat2cell', 'min', 'mktime', 'mouse_wheel_zoom',
  348. 'num2cell', 'num2hex', 'qrdelete', 'qrinsert', 'qrshift', 'qrupdate',
  349. 'quad_options', 'rande', 'randg', 'randn', 'randp', 'randperm',
  350. 'regexpi', 'regexprep', 'rsf2csf', 'setgrent', 'setpwent', 'sprank',
  351. 'strftime', 'strptime', 'strrep', 'svd_driver', 'symamd', 'triu',
  352. 'urlread'
  353. ),
  354. // Private builtin
  355. 7 => array(
  356. '__accumarray_max__', '__accumarray_min__', '__accumarray_sum__',
  357. '__accumdim_sum__', '__builtins__', '__calc_dimensions__',
  358. '__current_scope__', '__display_tokens__', '__dump_symtab_info__',
  359. '__end__', '__get__', '__go_axes__', '__go_axes_init__',
  360. '__go_delete__', '__go_execute_callback__', '__go_figure__',
  361. '__go_figure_handles__', '__go_handles__', '__go_hggroup__',
  362. '__go_image__', '__go_line__', '__go_patch__', '__go_surface__',
  363. '__go_text__', '__go_uicontextmenu__', '__go_uicontrol__',
  364. '__go_uimenu__', '__go_uipanel__', '__go_uipushtool__',
  365. '__go_uitoggletool__', '__go_uitoolbar__', '__gud_mode__',
  366. '__image_pixel_size__', '__is_handle_visible__', '__isa_parent__',
  367. '__keywords__', '__lexer_debug_flag__', '__list_functions__',
  368. '__operators__', '__parent_classes__', '__parser_debug_flag__',
  369. '__pathorig__', '__profiler_data__', '__profiler_enable__',
  370. '__profiler_reset__', '__request_drawnow__', '__sort_rows_idx__',
  371. '__token_count__', '__varval__', '__version_info__', '__which__'
  372. ),
  373. // Private Octave functions
  374. 8 => array(
  375. '__all_opts__', '__contourc__', '__delaunayn__', '__dispatch__',
  376. '__dsearchn__', '__finish__', '__fltk_uigetfile__',
  377. '__glpk__', '__gnuplot_drawnow__', '__init_fltk__',
  378. '__init_gnuplot__', '__lin_interpn__', '__magick_read__',
  379. '__makeinfo__', '__pchip_deriv__', '__plt_get_axis_arg__', '__qp__',
  380. '__voronoi__', '__fltk_maxtime__', '__fltk_redraw__', '__ftp__',
  381. '__ftp_ascii__', '__ftp_binary__', '__ftp_close__', '__ftp_cwd__',
  382. '__ftp_delete__', '__ftp_dir__', '__ftp_mget__', '__ftp_mkdir__',
  383. '__ftp_mode__', '__ftp_mput__', '__ftp_pwd__', '__ftp_rename__',
  384. '__ftp_rmdir__', '__magick_finfo__', '__magick_format_list__',
  385. '__magick_write__'
  386. ),
  387. // Builtin Global Variables
  388. 9 => array(
  389. 'EDITOR', 'EXEC_PATH', 'F_DUPFD', 'F_GETFD', 'F_GETFL', 'F_SETFD',
  390. 'F_SETFL', 'IMAGE_PATH', 'OCTAVE_HOME',
  391. 'OCTAVE_VERSION', 'O_APPEND', 'O_ASYNC', 'O_CREAT', 'O_EXCL',
  392. 'O_NONBLOCK', 'O_RDONLY', 'O_RDWR', 'O_SYNC', 'O_TRUNC', 'O_WRONLY',
  393. 'PAGER', 'PAGER_FLAGS', 'PS1', 'PS2', 'PS4', 'SEEK_CUR', 'SEEK_END',
  394. 'SEEK_SET', 'SIG', 'S_ISBLK', 'S_ISCHR', 'S_ISDIR', 'S_ISFIFO',
  395. 'S_ISLNK', 'S_ISREG', 'S_ISSOCK', 'WCONTINUE', 'WCOREDUMP',
  396. 'WEXITSTATUS', 'WIFCONTINUED', 'WIFEXITED', 'WIFSIGNALED',
  397. 'WIFSTOPPED', 'WNOHANG', 'WSTOPSIG', 'WTERMSIG', 'WUNTRACED'
  398. ),
  399. // Constant functions
  400. 10 => array (
  401. 'e', 'eps', 'inf', 'Inf', 'nan', 'NaN', 'NA', 'pi', 'i', 'I', 'j',
  402. 'J', 'true', 'false'
  403. ),
  404. ),
  405. 'SYMBOLS' => array(
  406. // Comparison & logical
  407. 0 => array(
  408. '!', '!=', '&', '&&','|', '||', '~', '~=',
  409. '<', '<=', '==', '>', '>='
  410. ),
  411. // Aritmethical
  412. 1 => array(
  413. '*', '**', '+', '++', '-', '--', '/', "\\","'"
  414. ),
  415. // Elementwise arithmetical
  416. 2 => array(
  417. '.*', '.**','./', '.^', '^',".\\",".'"
  418. ),
  419. // Arithmetical & assignation
  420. 3 => array(
  421. '*=','+=','-=','/=','\=','**=','^=',
  422. '.*=','.+=','.-=','./=','.\=','.**=','.^=','='
  423. ),
  424. // Indexer
  425. 4 => array(
  426. ':'
  427. ),
  428. // Delimiters
  429. 5 => array(
  430. ',', '...', ';'
  431. ),
  432. ),
  433. 'CASE_SENSITIVE' => array(
  434. GESHI_COMMENTS => true,
  435. 1 => true,
  436. 2 => true,
  437. 3 => true,
  438. 4 => true,
  439. 5 => true,
  440. 6 => true,
  441. 7 => true,
  442. 8 => true,
  443. 9 => true,
  444. 10 => true,
  445. ),
  446. 'URLS' => array(
  447. 1 => 'http://octave.sourceforge.net/octave/function/{FNAME}.html',
  448. 2 => '',
  449. 3 => '',
  450. 4 => '',
  451. 5 => 'http://octave.sourceforge.net/octave/function/{FNAME}.html',
  452. 6 => 'http://octave.sourceforge.net/octave/function/{FNAME}.html',
  453. 7 => '',
  454. 8 => '',
  455. 9 => 'http://octave.sourceforge.net/octave/function/{FNAME}.html',
  456. 10 => 'http://octave.sourceforge.net/octave/function/{FNAME}.html',
  457. ),
  458. 'OOLANG' => true,
  459. 'OBJECT_SPLITTERS' => array(
  460. 1 => '.',
  461. ),
  462. 'REGEXPS' => array(),
  463. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  464. 'SCRIPT_DELIMITERS' => array(),
  465. 'HIGHLIGHT_STRICT_BLOCK' => array(),
  466. 'STYLES' => array(
  467. 'COMMENTS' => array(
  468. 1 => 'color: #0000FF; font-style: italic;', // single quote strings
  469. 2 => 'color: #0000FF; font-style: italic;', // double quote strings
  470. 3 => 'color: #FF00FF; font-style: italic;', // single quote strings
  471. 4 => 'color: #FF00FF; font-style: italic;', // double quote strings
  472. 5 => 'color: #0000FF; font-style: italic;', // block comments
  473. 6 => 'color: #996600; font-weight:bold;', // packaging system
  474. 7 => 'color: #006600; font-weight:bold;', // function handles
  475. 'MULTI' => 'color: #0000FF; font-style: italic;',
  476. ),
  477. 'KEYWORDS' => array(
  478. 1 => 'color: #2E8B57; font-weight:bold;', // Data types
  479. 2 => 'color: #2E8B57;', // Storage type
  480. 3 => 'color: #0000FF; font-weight:bold;', // Internal variable
  481. 4 => 'color: #990000; font-weight:bold;', // Reserved words
  482. 5 => 'color: #008A8C; font-weight:bold;', // Built-in
  483. 6 => 'color: #008A8C;', // Octave functions
  484. 9 => 'color: #000000; font-weight:bold;', // Builtin Global Variables
  485. 10 => 'color: #008A8C; font-weight:bold;', // Constant functions
  486. ),
  487. 'ESCAPE_CHAR' => array(),
  488. 'BRACKETS' => array(
  489. 0 => 'color: #080;',
  490. ),
  491. 'STRINGS' => array(
  492. // strings were specified on the COMMENT_REGEXP section
  493. ),
  494. 'NUMBERS' => array(
  495. 0 => 'color: #cc66cc;',
  496. GESHI_NUMBER_OCT_PREFIX => 'color: #208080;',
  497. GESHI_NUMBER_HEX_PREFIX => 'color: #208080;',
  498. GESHI_NUMBER_FLT_SCI_ZERO => 'color:#800080;',
  499. ),
  500. 'METHODS' => array(),
  501. 'SYMBOLS' => array(
  502. 0 => 'color: #FF9696; font-weight:bold;', // Comparison & logical
  503. 1 => 'color: #CC0000; font-weight:bold;', // Aritmethical
  504. 2 => 'color: #993333; font-weight:bold;', // Elementwise arithmetical
  505. 3 => 'color: #FF0000; font-weight:bold;', // Arithmetical & assignation
  506. 4 => 'color: #33F;', // Indexer
  507. 5 => 'color: #33F;', // Delimiters
  508. ),
  509. 'REGEXPS' => array(),
  510. 'SCRIPT' => array(),
  511. )
  512. );
  513. ?>