Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/pygments/lexers/matlab.py: 47%
86 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-07-01 06:54 +0000
« prev ^ index » next coverage.py v7.2.7, created at 2023-07-01 06:54 +0000
1"""
2 pygments.lexers.matlab
3 ~~~~~~~~~~~~~~~~~~~~~~
5 Lexers for Matlab and related languages.
7 :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
8 :license: BSD, see LICENSE for details.
9"""
11import re
13from pygments.lexer import Lexer, RegexLexer, bygroups, default, words, \
14 do_insertions, include
15from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
16 Number, Punctuation, Generic, Whitespace
18from pygments.lexers import _scilab_builtins
20__all__ = ['MatlabLexer', 'MatlabSessionLexer', 'OctaveLexer', 'ScilabLexer']
23class MatlabLexer(RegexLexer):
24 """
25 For Matlab source code.
27 .. versionadded:: 0.10
28 """
29 name = 'Matlab'
30 aliases = ['matlab']
31 filenames = ['*.m']
32 mimetypes = ['text/matlab']
34 _operators = r'-|==|~=|<=|>=|<|>|&&|&|~|\|\|?|\.\*|\*|\+|\.\^|\.\\|\./|/|\\'
36 tokens = {
37 'expressions': [
38 # operators:
39 (_operators, Operator),
41 # numbers (must come before punctuation to handle `.5`; cannot use
42 # `\b` due to e.g. `5. + .5`). The negative lookahead on operators
43 # avoids including the dot in `1./x` (the dot is part of `./`).
44 (r'(?<!\w)((\d+\.\d+)|(\d*\.\d+)|(\d+\.(?!%s)))'
45 r'([eEf][+-]?\d+)?(?!\w)' % _operators, Number.Float),
46 (r'\b\d+[eEf][+-]?[0-9]+\b', Number.Float),
47 (r'\b\d+\b', Number.Integer),
49 # punctuation:
50 (r'\[|\]|\(|\)|\{|\}|:|@|\.|,', Punctuation),
51 (r'=|:|;', Punctuation),
53 # quote can be transpose, instead of string:
54 # (not great, but handles common cases...)
55 (r'(?<=[\w)\].])\'+', Operator),
57 (r'"(""|[^"])*"', String),
59 (r'(?<![\w)\].])\'', String, 'string'),
60 (r'[a-zA-Z_]\w*', Name),
61 (r'\s+', Whitespace),
62 (r'.', Text),
63 ],
64 'root': [
65 # line starting with '!' is sent as a system command. not sure what
66 # label to use...
67 (r'^!.*', String.Other),
68 (r'%\{\s*\n', Comment.Multiline, 'blockcomment'),
69 (r'%.*$', Comment),
70 (r'(\s*^\s*)(function)\b', bygroups(Whitespace, Keyword), 'deffunc'),
71 (r'(\s*^\s*)(properties)(\s+)(\()',
72 bygroups(Whitespace, Keyword, Whitespace, Punctuation),
73 ('defprops', 'propattrs')),
74 (r'(\s*^\s*)(properties)\b',
75 bygroups(Whitespace, Keyword), 'defprops'),
77 # from 'iskeyword' on version 9.4 (R2018a):
78 # Check that there is no preceding dot, as keywords are valid field
79 # names.
80 (words(('break', 'case', 'catch', 'classdef', 'continue',
81 'dynamicprops', 'else', 'elseif', 'end', 'for', 'function',
82 'global', 'if', 'methods', 'otherwise', 'parfor',
83 'persistent', 'return', 'spmd', 'switch',
84 'try', 'while'),
85 prefix=r'(?<!\.)(\s*)(', suffix=r')\b'),
86 bygroups(Whitespace, Keyword)),
88 (
89 words(
90 [
91 # See https://mathworks.com/help/matlab/referencelist.html
92 # Below data from 2021-02-10T18:24:08Z
93 # for Matlab release R2020b
94 "BeginInvoke",
95 "COM",
96 "Combine",
97 "CombinedDatastore",
98 "EndInvoke",
99 "Execute",
100 "FactoryGroup",
101 "FactorySetting",
102 "Feval",
103 "FunctionTestCase",
104 "GetCharArray",
105 "GetFullMatrix",
106 "GetVariable",
107 "GetWorkspaceData",
108 "GraphPlot",
109 "H5.close",
110 "H5.garbage_collect",
111 "H5.get_libversion",
112 "H5.open",
113 "H5.set_free_list_limits",
114 "H5A.close",
115 "H5A.create",
116 "H5A.delete",
117 "H5A.get_info",
118 "H5A.get_name",
119 "H5A.get_space",
120 "H5A.get_type",
121 "H5A.iterate",
122 "H5A.open",
123 "H5A.open_by_idx",
124 "H5A.open_by_name",
125 "H5A.read",
126 "H5A.write",
127 "H5D.close",
128 "H5D.create",
129 "H5D.get_access_plist",
130 "H5D.get_create_plist",
131 "H5D.get_offset",
132 "H5D.get_space",
133 "H5D.get_space_status",
134 "H5D.get_storage_size",
135 "H5D.get_type",
136 "H5D.open",
137 "H5D.read",
138 "H5D.set_extent",
139 "H5D.vlen_get_buf_size",
140 "H5D.write",
141 "H5DS.attach_scale",
142 "H5DS.detach_scale",
143 "H5DS.get_label",
144 "H5DS.get_num_scales",
145 "H5DS.get_scale_name",
146 "H5DS.is_scale",
147 "H5DS.iterate_scales",
148 "H5DS.set_label",
149 "H5DS.set_scale",
150 "H5E.clear",
151 "H5E.get_major",
152 "H5E.get_minor",
153 "H5E.walk",
154 "H5F.close",
155 "H5F.create",
156 "H5F.flush",
157 "H5F.get_access_plist",
158 "H5F.get_create_plist",
159 "H5F.get_filesize",
160 "H5F.get_freespace",
161 "H5F.get_info",
162 "H5F.get_mdc_config",
163 "H5F.get_mdc_hit_rate",
164 "H5F.get_mdc_size",
165 "H5F.get_name",
166 "H5F.get_obj_count",
167 "H5F.get_obj_ids",
168 "H5F.is_hdf5",
169 "H5F.mount",
170 "H5F.open",
171 "H5F.reopen",
172 "H5F.set_mdc_config",
173 "H5F.unmount",
174 "H5G.close",
175 "H5G.create",
176 "H5G.get_info",
177 "H5G.open",
178 "H5I.dec_ref",
179 "H5I.get_file_id",
180 "H5I.get_name",
181 "H5I.get_ref",
182 "H5I.get_type",
183 "H5I.inc_ref",
184 "H5I.is_valid",
185 "H5L.copy",
186 "H5L.create_external",
187 "H5L.create_hard",
188 "H5L.create_soft",
189 "H5L.delete",
190 "H5L.exists",
191 "H5L.get_info",
192 "H5L.get_name_by_idx",
193 "H5L.get_val",
194 "H5L.iterate",
195 "H5L.iterate_by_name",
196 "H5L.move",
197 "H5L.visit",
198 "H5L.visit_by_name",
199 "H5ML.compare_values",
200 "H5ML.get_constant_names",
201 "H5ML.get_constant_value",
202 "H5ML.get_function_names",
203 "H5ML.get_mem_datatype",
204 "H5O.close",
205 "H5O.copy",
206 "H5O.get_comment",
207 "H5O.get_comment_by_name",
208 "H5O.get_info",
209 "H5O.link",
210 "H5O.open",
211 "H5O.open_by_idx",
212 "H5O.set_comment",
213 "H5O.set_comment_by_name",
214 "H5O.visit",
215 "H5O.visit_by_name",
216 "H5P.all_filters_avail",
217 "H5P.close",
218 "H5P.close_class",
219 "H5P.copy",
220 "H5P.create",
221 "H5P.equal",
222 "H5P.exist",
223 "H5P.fill_value_defined",
224 "H5P.get",
225 "H5P.get_alignment",
226 "H5P.get_alloc_time",
227 "H5P.get_attr_creation_order",
228 "H5P.get_attr_phase_change",
229 "H5P.get_btree_ratios",
230 "H5P.get_char_encoding",
231 "H5P.get_chunk",
232 "H5P.get_chunk_cache",
233 "H5P.get_class",
234 "H5P.get_class_name",
235 "H5P.get_class_parent",
236 "H5P.get_copy_object",
237 "H5P.get_create_intermediate_group",
238 "H5P.get_driver",
239 "H5P.get_edc_check",
240 "H5P.get_external",
241 "H5P.get_external_count",
242 "H5P.get_family_offset",
243 "H5P.get_fapl_core",
244 "H5P.get_fapl_family",
245 "H5P.get_fapl_multi",
246 "H5P.get_fclose_degree",
247 "H5P.get_fill_time",
248 "H5P.get_fill_value",
249 "H5P.get_filter",
250 "H5P.get_filter_by_id",
251 "H5P.get_gc_references",
252 "H5P.get_hyper_vector_size",
253 "H5P.get_istore_k",
254 "H5P.get_layout",
255 "H5P.get_libver_bounds",
256 "H5P.get_link_creation_order",
257 "H5P.get_link_phase_change",
258 "H5P.get_mdc_config",
259 "H5P.get_meta_block_size",
260 "H5P.get_multi_type",
261 "H5P.get_nfilters",
262 "H5P.get_nprops",
263 "H5P.get_sieve_buf_size",
264 "H5P.get_size",
265 "H5P.get_sizes",
266 "H5P.get_small_data_block_size",
267 "H5P.get_sym_k",
268 "H5P.get_userblock",
269 "H5P.get_version",
270 "H5P.isa_class",
271 "H5P.iterate",
272 "H5P.modify_filter",
273 "H5P.remove_filter",
274 "H5P.set",
275 "H5P.set_alignment",
276 "H5P.set_alloc_time",
277 "H5P.set_attr_creation_order",
278 "H5P.set_attr_phase_change",
279 "H5P.set_btree_ratios",
280 "H5P.set_char_encoding",
281 "H5P.set_chunk",
282 "H5P.set_chunk_cache",
283 "H5P.set_copy_object",
284 "H5P.set_create_intermediate_group",
285 "H5P.set_deflate",
286 "H5P.set_edc_check",
287 "H5P.set_external",
288 "H5P.set_family_offset",
289 "H5P.set_fapl_core",
290 "H5P.set_fapl_family",
291 "H5P.set_fapl_log",
292 "H5P.set_fapl_multi",
293 "H5P.set_fapl_sec2",
294 "H5P.set_fapl_split",
295 "H5P.set_fapl_stdio",
296 "H5P.set_fclose_degree",
297 "H5P.set_fill_time",
298 "H5P.set_fill_value",
299 "H5P.set_filter",
300 "H5P.set_fletcher32",
301 "H5P.set_gc_references",
302 "H5P.set_hyper_vector_size",
303 "H5P.set_istore_k",
304 "H5P.set_layout",
305 "H5P.set_libver_bounds",
306 "H5P.set_link_creation_order",
307 "H5P.set_link_phase_change",
308 "H5P.set_mdc_config",
309 "H5P.set_meta_block_size",
310 "H5P.set_multi_type",
311 "H5P.set_nbit",
312 "H5P.set_scaleoffset",
313 "H5P.set_shuffle",
314 "H5P.set_sieve_buf_size",
315 "H5P.set_sizes",
316 "H5P.set_small_data_block_size",
317 "H5P.set_sym_k",
318 "H5P.set_userblock",
319 "H5R.create",
320 "H5R.dereference",
321 "H5R.get_name",
322 "H5R.get_obj_type",
323 "H5R.get_region",
324 "H5S.close",
325 "H5S.copy",
326 "H5S.create",
327 "H5S.create_simple",
328 "H5S.extent_copy",
329 "H5S.get_select_bounds",
330 "H5S.get_select_elem_npoints",
331 "H5S.get_select_elem_pointlist",
332 "H5S.get_select_hyper_blocklist",
333 "H5S.get_select_hyper_nblocks",
334 "H5S.get_select_npoints",
335 "H5S.get_select_type",
336 "H5S.get_simple_extent_dims",
337 "H5S.get_simple_extent_ndims",
338 "H5S.get_simple_extent_npoints",
339 "H5S.get_simple_extent_type",
340 "H5S.is_simple",
341 "H5S.offset_simple",
342 "H5S.select_all",
343 "H5S.select_elements",
344 "H5S.select_hyperslab",
345 "H5S.select_none",
346 "H5S.select_valid",
347 "H5S.set_extent_none",
348 "H5S.set_extent_simple",
349 "H5T.array_create",
350 "H5T.close",
351 "H5T.commit",
352 "H5T.committed",
353 "H5T.copy",
354 "H5T.create",
355 "H5T.detect_class",
356 "H5T.enum_create",
357 "H5T.enum_insert",
358 "H5T.enum_nameof",
359 "H5T.enum_valueof",
360 "H5T.equal",
361 "H5T.get_array_dims",
362 "H5T.get_array_ndims",
363 "H5T.get_class",
364 "H5T.get_create_plist",
365 "H5T.get_cset",
366 "H5T.get_ebias",
367 "H5T.get_fields",
368 "H5T.get_inpad",
369 "H5T.get_member_class",
370 "H5T.get_member_index",
371 "H5T.get_member_name",
372 "H5T.get_member_offset",
373 "H5T.get_member_type",
374 "H5T.get_member_value",
375 "H5T.get_native_type",
376 "H5T.get_nmembers",
377 "H5T.get_norm",
378 "H5T.get_offset",
379 "H5T.get_order",
380 "H5T.get_pad",
381 "H5T.get_precision",
382 "H5T.get_sign",
383 "H5T.get_size",
384 "H5T.get_strpad",
385 "H5T.get_super",
386 "H5T.get_tag",
387 "H5T.insert",
388 "H5T.is_variable_str",
389 "H5T.lock",
390 "H5T.open",
391 "H5T.pack",
392 "H5T.set_cset",
393 "H5T.set_ebias",
394 "H5T.set_fields",
395 "H5T.set_inpad",
396 "H5T.set_norm",
397 "H5T.set_offset",
398 "H5T.set_order",
399 "H5T.set_pad",
400 "H5T.set_precision",
401 "H5T.set_sign",
402 "H5T.set_size",
403 "H5T.set_strpad",
404 "H5T.set_tag",
405 "H5T.vlen_create",
406 "H5Z.filter_avail",
407 "H5Z.get_filter_info",
408 "Inf",
409 "KeyValueDatastore",
410 "KeyValueStore",
411 "MException",
412 "MException.last",
413 "MaximizeCommandWindow",
414 "MemoizedFunction",
415 "MinimizeCommandWindow",
416 "NET",
417 "NET.Assembly",
418 "NET.GenericClass",
419 "NET.NetException",
420 "NET.addAssembly",
421 "NET.convertArray",
422 "NET.createArray",
423 "NET.createGeneric",
424 "NET.disableAutoRelease",
425 "NET.enableAutoRelease",
426 "NET.invokeGenericMethod",
427 "NET.isNETSupported",
428 "NET.setStaticProperty",
429 "NaN",
430 "NaT",
431 "OperationResult",
432 "PutCharArray",
433 "PutFullMatrix",
434 "PutWorkspaceData",
435 "PythonEnvironment",
436 "Quit",
437 "RandStream",
438 "ReleaseCompatibilityException",
439 "ReleaseCompatibilityResults",
440 "Remove",
441 "RemoveAll",
442 "Setting",
443 "SettingsGroup",
444 "TallDatastore",
445 "Test",
446 "TestResult",
447 "Tiff",
448 "TransformedDatastore",
449 "ValueIterator",
450 "VersionResults",
451 "VideoReader",
452 "VideoWriter",
453 "abs",
454 "accumarray",
455 "acos",
456 "acosd",
457 "acosh",
458 "acot",
459 "acotd",
460 "acoth",
461 "acsc",
462 "acscd",
463 "acsch",
464 "actxGetRunningServer",
465 "actxserver",
466 "add",
467 "addCause",
468 "addCorrection",
469 "addFile",
470 "addFolderIncludingChildFiles",
471 "addGroup",
472 "addLabel",
473 "addPath",
474 "addReference",
475 "addSetting",
476 "addShortcut",
477 "addShutdownFile",
478 "addStartupFile",
479 "addStyle",
480 "addToolbarExplorationButtons",
481 "addboundary",
482 "addcats",
483 "addedge",
484 "addevent",
485 "addlistener",
486 "addmulti",
487 "addnode",
488 "addpath",
489 "addpoints",
490 "addpref",
491 "addprop",
492 "addsample",
493 "addsampletocollection",
494 "addtodate",
495 "addts",
496 "addvars",
497 "adjacency",
498 "airy",
499 "align",
500 "alim",
501 "all",
502 "allchild",
503 "alpha",
504 "alphaShape",
505 "alphaSpectrum",
506 "alphaTriangulation",
507 "alphamap",
508 "alphanumericBoundary",
509 "alphanumericsPattern",
510 "amd",
511 "analyzeCodeCompatibility",
512 "ancestor",
513 "angle",
514 "animatedline",
515 "annotation",
516 "ans",
517 "any",
518 "appdesigner",
519 "append",
520 "area",
521 "arguments",
522 "array2table",
523 "array2timetable",
524 "arrayDatastore",
525 "arrayfun",
526 "asFewOfPattern",
527 "asManyOfPattern",
528 "ascii",
529 "asec",
530 "asecd",
531 "asech",
532 "asin",
533 "asind",
534 "asinh",
535 "assert",
536 "assignin",
537 "atan",
538 "atan2",
539 "atan2d",
540 "atand",
541 "atanh",
542 "audiodevinfo",
543 "audiodevreset",
544 "audioinfo",
545 "audioplayer",
546 "audioread",
547 "audiorecorder",
548 "audiowrite",
549 "autumn",
550 "axes",
551 "axis",
552 "axtoolbar",
553 "axtoolbarbtn",
554 "balance",
555 "bandwidth",
556 "bar",
557 "bar3",
558 "bar3h",
559 "barh",
560 "barycentricToCartesian",
561 "base2dec",
562 "batchStartupOptionUsed",
563 "bctree",
564 "beep",
565 "bench",
566 "besselh",
567 "besseli",
568 "besselj",
569 "besselk",
570 "bessely",
571 "beta",
572 "betainc",
573 "betaincinv",
574 "betaln",
575 "between",
576 "bfsearch",
577 "bicg",
578 "bicgstab",
579 "bicgstabl",
580 "biconncomp",
581 "bin2dec",
582 "binary",
583 "binscatter",
584 "bitand",
585 "bitcmp",
586 "bitget",
587 "bitnot",
588 "bitor",
589 "bitset",
590 "bitshift",
591 "bitxor",
592 "blanks",
593 "ble",
594 "blelist",
595 "blkdiag",
596 "bluetooth",
597 "bluetoothlist",
598 "bone",
599 "boundary",
600 "boundaryFacets",
601 "boundaryshape",
602 "boundingbox",
603 "bounds",
604 "box",
605 "boxchart",
606 "brighten",
607 "brush",
608 "bsxfun",
609 "bubblechart",
610 "bubblechart3",
611 "bubblelegend",
612 "bubblelim",
613 "bubblesize",
614 "builddocsearchdb",
615 "builtin",
616 "bvp4c",
617 "bvp5c",
618 "bvpget",
619 "bvpinit",
620 "bvpset",
621 "bvpxtend",
622 "caldays",
623 "caldiff",
624 "calendar",
625 "calendarDuration",
626 "calllib",
627 "calmonths",
628 "calquarters",
629 "calweeks",
630 "calyears",
631 "camdolly",
632 "cameratoolbar",
633 "camlight",
634 "camlookat",
635 "camorbit",
636 "campan",
637 "campos",
638 "camproj",
639 "camroll",
640 "camtarget",
641 "camup",
642 "camva",
643 "camzoom",
644 "canUseGPU",
645 "canUseParallelPool",
646 "cart2pol",
647 "cart2sph",
648 "cartesianToBarycentric",
649 "caseInsensitivePattern",
650 "caseSensitivePattern",
651 "cast",
652 "cat",
653 "categorical",
654 "categories",
655 "caxis",
656 "cd",
657 "cdf2rdf",
658 "cdfepoch",
659 "cdfinfo",
660 "cdflib",
661 "cdfread",
662 "ceil",
663 "cell",
664 "cell2mat",
665 "cell2struct",
666 "cell2table",
667 "celldisp",
668 "cellfun",
669 "cellplot",
670 "cellstr",
671 "centrality",
672 "centroid",
673 "cgs",
674 "char",
675 "characterListPattern",
676 "characteristic",
677 "checkcode",
678 "chol",
679 "cholupdate",
680 "choose",
681 "chooseContextMenu",
682 "circshift",
683 "circumcenter",
684 "cla",
685 "clabel",
686 "class",
687 "classUnderlying",
688 "clc",
689 "clear",
690 "clearAllMemoizedCaches",
691 "clearPersonalValue",
692 "clearTemporaryValue",
693 "clearpoints",
694 "clearvars",
695 "clf",
696 "clibArray",
697 "clibConvertArray",
698 "clibIsNull",
699 "clibIsReadOnly",
700 "clibRelease",
701 "clibgen.buildInterface",
702 "clibgen.generateLibraryDefinition",
703 "clipboard",
704 "clock",
705 "clone",
706 "close",
707 "closeFile",
708 "closereq",
709 "cmap2gray",
710 "cmpermute",
711 "cmunique",
712 "codeCompatibilityReport",
713 "colamd",
714 "collapse",
715 "colon",
716 "colorbar",
717 "colorcube",
718 "colormap",
719 "colororder",
720 "colperm",
721 "com.mathworks.engine.MatlabEngine",
722 "com.mathworks.matlab.types.CellStr",
723 "com.mathworks.matlab.types.Complex",
724 "com.mathworks.matlab.types.HandleObject",
725 "com.mathworks.matlab.types.Struct",
726 "combine",
727 "comet",
728 "comet3",
729 "compan",
730 "compass",
731 "complex",
732 "compose",
733 "computer",
734 "comserver",
735 "cond",
736 "condeig",
737 "condensation",
738 "condest",
739 "coneplot",
740 "configureCallback",
741 "configureTerminator",
742 "conj",
743 "conncomp",
744 "containers.Map",
745 "contains",
746 "containsrange",
747 "contour",
748 "contour3",
749 "contourc",
750 "contourf",
751 "contourslice",
752 "contrast",
753 "conv",
754 "conv2",
755 "convertCharsToStrings",
756 "convertContainedStringsToChars",
757 "convertStringsToChars",
758 "convertTo",
759 "convertvars",
760 "convexHull",
761 "convhull",
762 "convhulln",
763 "convn",
764 "cool",
765 "copper",
766 "copyHDU",
767 "copyfile",
768 "copygraphics",
769 "copyobj",
770 "corrcoef",
771 "cos",
772 "cosd",
773 "cosh",
774 "cospi",
775 "cot",
776 "cotd",
777 "coth",
778 "count",
779 "countcats",
780 "cov",
781 "cplxpair",
782 "cputime",
783 "createCategory",
784 "createFile",
785 "createImg",
786 "createLabel",
787 "createTbl",
788 "criticalAlpha",
789 "cross",
790 "csc",
791 "cscd",
792 "csch",
793 "ctranspose",
794 "cummax",
795 "cummin",
796 "cumprod",
797 "cumsum",
798 "cumtrapz",
799 "curl",
800 "currentProject",
801 "cylinder",
802 "daspect",
803 "dataTipInteraction",
804 "dataTipTextRow",
805 "datacursormode",
806 "datastore",
807 "datatip",
808 "date",
809 "datenum",
810 "dateshift",
811 "datestr",
812 "datetick",
813 "datetime",
814 "datevec",
815 "day",
816 "days",
817 "dbclear",
818 "dbcont",
819 "dbdown",
820 "dbmex",
821 "dbquit",
822 "dbstack",
823 "dbstatus",
824 "dbstep",
825 "dbstop",
826 "dbtype",
827 "dbup",
828 "dde23",
829 "ddeget",
830 "ddensd",
831 "ddesd",
832 "ddeset",
833 "deblank",
834 "dec2base",
835 "dec2bin",
836 "dec2hex",
837 "decic",
838 "decomposition",
839 "deconv",
840 "deg2rad",
841 "degree",
842 "del2",
843 "delaunay",
844 "delaunayTriangulation",
845 "delaunayn",
846 "delete",
847 "deleteCol",
848 "deleteFile",
849 "deleteHDU",
850 "deleteKey",
851 "deleteRecord",
852 "deleteRows",
853 "delevent",
854 "delimitedTextImportOptions",
855 "delsample",
856 "delsamplefromcollection",
857 "demo",
858 "descriptor",
859 "det",
860 "details",
861 "detectImportOptions",
862 "detrend",
863 "deval",
864 "dfsearch",
865 "diag",
866 "dialog",
867 "diary",
868 "diff",
869 "diffuse",
870 "digitBoundary",
871 "digitsPattern",
872 "digraph",
873 "dir",
874 "disableDefaultInteractivity",
875 "discretize",
876 "disp",
877 "display",
878 "dissect",
879 "distances",
880 "dither",
881 "divergence",
882 "dmperm",
883 "doc",
884 "docsearch",
885 "dos",
886 "dot",
887 "double",
888 "drag",
889 "dragrect",
890 "drawnow",
891 "dsearchn",
892 "duration",
893 "dynamicprops",
894 "echo",
895 "echodemo",
896 "echotcpip",
897 "edgeAttachments",
898 "edgecount",
899 "edges",
900 "edit",
901 "eig",
902 "eigs",
903 "ellipj",
904 "ellipke",
905 "ellipsoid",
906 "empty",
907 "enableDefaultInteractivity",
908 "enableLegacyExplorationModes",
909 "enableNETfromNetworkDrive",
910 "enableservice",
911 "endsWith",
912 "enumeration",
913 "eomday",
914 "eps",
915 "eq",
916 "equilibrate",
917 "erase",
918 "eraseBetween",
919 "erf",
920 "erfc",
921 "erfcinv",
922 "erfcx",
923 "erfinv",
924 "error",
925 "errorbar",
926 "errordlg",
927 "etime",
928 "etree",
929 "etreeplot",
930 "eval",
931 "evalc",
932 "evalin",
933 "event.ClassInstanceEvent",
934 "event.DynamicPropertyEvent",
935 "event.EventData",
936 "event.PropertyEvent",
937 "event.hasListener",
938 "event.listener",
939 "event.proplistener",
940 "eventlisteners",
941 "events",
942 "exceltime",
943 "exist",
944 "exit",
945 "exp",
946 "expand",
947 "expint",
948 "expm",
949 "expm1",
950 "export",
951 "export2wsdlg",
952 "exportapp",
953 "exportgraphics",
954 "exportsetupdlg",
955 "extract",
956 "extractAfter",
957 "extractBefore",
958 "extractBetween",
959 "eye",
960 "ezpolar",
961 "faceNormal",
962 "factor",
963 "factorial",
964 "false",
965 "fclose",
966 "fcontour",
967 "feather",
968 "featureEdges",
969 "feof",
970 "ferror",
971 "feval",
972 "fewerbins",
973 "fft",
974 "fft2",
975 "fftn",
976 "fftshift",
977 "fftw",
978 "fgetl",
979 "fgets",
980 "fieldnames",
981 "figure",
982 "figurepalette",
983 "fileDatastore",
984 "fileMode",
985 "fileName",
986 "fileattrib",
987 "filemarker",
988 "fileparts",
989 "fileread",
990 "filesep",
991 "fill",
992 "fill3",
993 "fillmissing",
994 "filloutliers",
995 "filter",
996 "filter2",
997 "fimplicit",
998 "fimplicit3",
999 "find",
1000 "findCategory",
1001 "findEvent",
1002 "findFile",
1003 "findLabel",
1004 "findall",
1005 "findedge",
1006 "findfigs",
1007 "findgroups",
1008 "findnode",
1009 "findobj",
1010 "findprop",
1011 "finish",
1012 "fitsdisp",
1013 "fitsinfo",
1014 "fitsread",
1015 "fitswrite",
1016 "fix",
1017 "fixedWidthImportOptions",
1018 "flag",
1019 "flintmax",
1020 "flip",
1021 "flipedge",
1022 "fliplr",
1023 "flipud",
1024 "floor",
1025 "flow",
1026 "flush",
1027 "fmesh",
1028 "fminbnd",
1029 "fminsearch",
1030 "fopen",
1031 "format",
1032 "fplot",
1033 "fplot3",
1034 "fprintf",
1035 "frame2im",
1036 "fread",
1037 "freeBoundary",
1038 "freqspace",
1039 "frewind",
1040 "fscanf",
1041 "fseek",
1042 "fsurf",
1043 "ftell",
1044 "ftp",
1045 "full",
1046 "fullfile",
1047 "func2str",
1048 "function_handle",
1049 "functions",
1050 "functiontests",
1051 "funm",
1052 "fwrite",
1053 "fzero",
1054 "gallery",
1055 "gamma",
1056 "gammainc",
1057 "gammaincinv",
1058 "gammaln",
1059 "gather",
1060 "gca",
1061 "gcbf",
1062 "gcbo",
1063 "gcd",
1064 "gcf",
1065 "gcmr",
1066 "gco",
1067 "genpath",
1068 "geoaxes",
1069 "geobasemap",
1070 "geobubble",
1071 "geodensityplot",
1072 "geolimits",
1073 "geoplot",
1074 "geoscatter",
1075 "geotickformat",
1076 "get",
1077 "getAColParms",
1078 "getAxes",
1079 "getBColParms",
1080 "getColName",
1081 "getColType",
1082 "getColorbar",
1083 "getConstantValue",
1084 "getEqColType",
1085 "getFileFormats",
1086 "getHDUnum",
1087 "getHDUtype",
1088 "getHdrSpace",
1089 "getImgSize",
1090 "getImgType",
1091 "getLayout",
1092 "getLegend",
1093 "getMockHistory",
1094 "getNumCols",
1095 "getNumHDUs",
1096 "getNumInputs",
1097 "getNumInputsImpl",
1098 "getNumOutputs",
1099 "getNumOutputsImpl",
1100 "getNumRows",
1101 "getOpenFiles",
1102 "getProfiles",
1103 "getPropertyGroupsImpl",
1104 "getReport",
1105 "getTimeStr",
1106 "getVersion",
1107 "getabstime",
1108 "getappdata",
1109 "getaudiodata",
1110 "getdatasamples",
1111 "getdatasamplesize",
1112 "getenv",
1113 "getfield",
1114 "getframe",
1115 "getinterpmethod",
1116 "getnext",
1117 "getpinstatus",
1118 "getpixelposition",
1119 "getplayer",
1120 "getpoints",
1121 "getpref",
1122 "getqualitydesc",
1123 "getrangefromclass",
1124 "getsamples",
1125 "getsampleusingtime",
1126 "gettimeseriesnames",
1127 "gettsafteratevent",
1128 "gettsafterevent",
1129 "gettsatevent",
1130 "gettsbeforeatevent",
1131 "gettsbeforeevent",
1132 "gettsbetweenevents",
1133 "getvaropts",
1134 "ginput",
1135 "gmres",
1136 "gobjects",
1137 "gplot",
1138 "grabcode",
1139 "gradient",
1140 "graph",
1141 "gray",
1142 "grid",
1143 "griddata",
1144 "griddatan",
1145 "griddedInterpolant",
1146 "groot",
1147 "groupcounts",
1148 "groupfilter",
1149 "groupsummary",
1150 "grouptransform",
1151 "gsvd",
1152 "gtext",
1153 "guidata",
1154 "guide",
1155 "guihandles",
1156 "gunzip",
1157 "gzip",
1158 "h5create",
1159 "h5disp",
1160 "h5info",
1161 "h5read",
1162 "h5readatt",
1163 "h5write",
1164 "h5writeatt",
1165 "hadamard",
1166 "handle",
1167 "hankel",
1168 "hasFactoryValue",
1169 "hasFrame",
1170 "hasGroup",
1171 "hasPersonalValue",
1172 "hasSetting",
1173 "hasTemporaryValue",
1174 "hasdata",
1175 "hasnext",
1176 "hdfan",
1177 "hdfdf24",
1178 "hdfdfr8",
1179 "hdfh",
1180 "hdfhd",
1181 "hdfhe",
1182 "hdfhx",
1183 "hdfinfo",
1184 "hdfml",
1185 "hdfpt",
1186 "hdfread",
1187 "hdfv",
1188 "hdfvf",
1189 "hdfvh",
1190 "hdfvs",
1191 "head",
1192 "heatmap",
1193 "height",
1194 "help",
1195 "helpdlg",
1196 "hess",
1197 "hex2dec",
1198 "hex2num",
1199 "hgexport",
1200 "hggroup",
1201 "hgtransform",
1202 "hidden",
1203 "highlight",
1204 "hilb",
1205 "histcounts",
1206 "histcounts2",
1207 "histogram",
1208 "histogram2",
1209 "hms",
1210 "hold",
1211 "holes",
1212 "home",
1213 "horzcat",
1214 "hot",
1215 "hour",
1216 "hours",
1217 "hover",
1218 "hsv",
1219 "hsv2rgb",
1220 "hypot",
1221 "i",
1222 "ichol",
1223 "idealfilter",
1224 "idivide",
1225 "ifft",
1226 "ifft2",
1227 "ifftn",
1228 "ifftshift",
1229 "ilu",
1230 "im2double",
1231 "im2frame",
1232 "im2gray",
1233 "im2java",
1234 "imag",
1235 "image",
1236 "imageDatastore",
1237 "imagesc",
1238 "imapprox",
1239 "imfinfo",
1240 "imformats",
1241 "imgCompress",
1242 "import",
1243 "importdata",
1244 "imread",
1245 "imresize",
1246 "imshow",
1247 "imtile",
1248 "imwrite",
1249 "inShape",
1250 "incenter",
1251 "incidence",
1252 "ind2rgb",
1253 "ind2sub",
1254 "indegree",
1255 "inedges",
1256 "infoImpl",
1257 "inmem",
1258 "inner2outer",
1259 "innerjoin",
1260 "inpolygon",
1261 "input",
1262 "inputParser",
1263 "inputdlg",
1264 "inputname",
1265 "insertATbl",
1266 "insertAfter",
1267 "insertBTbl",
1268 "insertBefore",
1269 "insertCol",
1270 "insertImg",
1271 "insertRows",
1272 "int16",
1273 "int2str",
1274 "int32",
1275 "int64",
1276 "int8",
1277 "integral",
1278 "integral2",
1279 "integral3",
1280 "interp1",
1281 "interp2",
1282 "interp3",
1283 "interpft",
1284 "interpn",
1285 "interpstreamspeed",
1286 "intersect",
1287 "intmax",
1288 "intmin",
1289 "inv",
1290 "invhilb",
1291 "ipermute",
1292 "iqr",
1293 "isCompressedImg",
1294 "isConnected",
1295 "isDiscreteStateSpecificationMutableImpl",
1296 "isDone",
1297 "isDoneImpl",
1298 "isInactivePropertyImpl",
1299 "isInputComplexityMutableImpl",
1300 "isInputDataTypeMutableImpl",
1301 "isInputSizeMutableImpl",
1302 "isInterior",
1303 "isKey",
1304 "isLoaded",
1305 "isLocked",
1306 "isMATLABReleaseOlderThan",
1307 "isPartitionable",
1308 "isShuffleable",
1309 "isStringScalar",
1310 "isTunablePropertyDataTypeMutableImpl",
1311 "isUnderlyingType",
1312 "isa",
1313 "isaUnderlying",
1314 "isappdata",
1315 "isbanded",
1316 "isbetween",
1317 "iscalendarduration",
1318 "iscategorical",
1319 "iscategory",
1320 "iscell",
1321 "iscellstr",
1322 "ischange",
1323 "ischar",
1324 "iscolumn",
1325 "iscom",
1326 "isdag",
1327 "isdatetime",
1328 "isdiag",
1329 "isdst",
1330 "isduration",
1331 "isempty",
1332 "isenum",
1333 "isequal",
1334 "isequaln",
1335 "isevent",
1336 "isfield",
1337 "isfile",
1338 "isfinite",
1339 "isfloat",
1340 "isfolder",
1341 "isgraphics",
1342 "ishandle",
1343 "ishermitian",
1344 "ishold",
1345 "ishole",
1346 "isinf",
1347 "isinteger",
1348 "isinterface",
1349 "isinterior",
1350 "isisomorphic",
1351 "isjava",
1352 "iskeyword",
1353 "isletter",
1354 "islocalmax",
1355 "islocalmin",
1356 "islogical",
1357 "ismac",
1358 "ismatrix",
1359 "ismember",
1360 "ismembertol",
1361 "ismethod",
1362 "ismissing",
1363 "ismultigraph",
1364 "isnan",
1365 "isnat",
1366 "isnumeric",
1367 "isobject",
1368 "isocaps",
1369 "isocolors",
1370 "isomorphism",
1371 "isonormals",
1372 "isordinal",
1373 "isosurface",
1374 "isoutlier",
1375 "ispc",
1376 "isplaying",
1377 "ispref",
1378 "isprime",
1379 "isprop",
1380 "isprotected",
1381 "isreal",
1382 "isrecording",
1383 "isregular",
1384 "isrow",
1385 "isscalar",
1386 "issimplified",
1387 "issorted",
1388 "issortedrows",
1389 "isspace",
1390 "issparse",
1391 "isstring",
1392 "isstrprop",
1393 "isstruct",
1394 "isstudent",
1395 "issymmetric",
1396 "istable",
1397 "istall",
1398 "istimetable",
1399 "istril",
1400 "istriu",
1401 "isundefined",
1402 "isunix",
1403 "isvalid",
1404 "isvarname",
1405 "isvector",
1406 "isweekend",
1407 "j",
1408 "javaArray",
1409 "javaMethod",
1410 "javaMethodEDT",
1411 "javaObject",
1412 "javaObjectEDT",
1413 "javaaddpath",
1414 "javachk",
1415 "javaclasspath",
1416 "javarmpath",
1417 "jet",
1418 "join",
1419 "jsondecode",
1420 "jsonencode",
1421 "juliandate",
1422 "keyboard",
1423 "keys",
1424 "kron",
1425 "labeledge",
1426 "labelnode",
1427 "lag",
1428 "laplacian",
1429 "lastwarn",
1430 "layout",
1431 "lcm",
1432 "ldl",
1433 "leapseconds",
1434 "legend",
1435 "legendre",
1436 "length",
1437 "letterBoundary",
1438 "lettersPattern",
1439 "lib.pointer",
1440 "libfunctions",
1441 "libfunctionsview",
1442 "libisloaded",
1443 "libpointer",
1444 "libstruct",
1445 "license",
1446 "light",
1447 "lightangle",
1448 "lighting",
1449 "lin2mu",
1450 "line",
1451 "lineBoundary",
1452 "lines",
1453 "linkaxes",
1454 "linkdata",
1455 "linkprop",
1456 "linsolve",
1457 "linspace",
1458 "listModifiedFiles",
1459 "listRequiredFiles",
1460 "listdlg",
1461 "listener",
1462 "listfonts",
1463 "load",
1464 "loadObjectImpl",
1465 "loadlibrary",
1466 "loadobj",
1467 "localfunctions",
1468 "log",
1469 "log10",
1470 "log1p",
1471 "log2",
1472 "logical",
1473 "loglog",
1474 "logm",
1475 "logspace",
1476 "lookAheadBoundary",
1477 "lookBehindBoundary",
1478 "lookfor",
1479 "lower",
1480 "ls",
1481 "lscov",
1482 "lsqminnorm",
1483 "lsqnonneg",
1484 "lsqr",
1485 "lu",
1486 "magic",
1487 "makehgtform",
1488 "makima",
1489 "mapreduce",
1490 "mapreducer",
1491 "maskedPattern",
1492 "mat2cell",
1493 "mat2str",
1494 "matches",
1495 "matchpairs",
1496 "material",
1497 "matfile",
1498 "matlab.System",
1499 "matlab.addons.disableAddon",
1500 "matlab.addons.enableAddon",
1501 "matlab.addons.install",
1502 "matlab.addons.installedAddons",
1503 "matlab.addons.isAddonEnabled",
1504 "matlab.addons.toolbox.installToolbox",
1505 "matlab.addons.toolbox.installedToolboxes",
1506 "matlab.addons.toolbox.packageToolbox",
1507 "matlab.addons.toolbox.toolboxVersion",
1508 "matlab.addons.toolbox.uninstallToolbox",
1509 "matlab.addons.uninstall",
1510 "matlab.apputil.create",
1511 "matlab.apputil.getInstalledAppInfo",
1512 "matlab.apputil.install",
1513 "matlab.apputil.package",
1514 "matlab.apputil.run",
1515 "matlab.apputil.uninstall",
1516 "matlab.codetools.requiredFilesAndProducts",
1517 "matlab.engine.FutureResult",
1518 "matlab.engine.MatlabEngine",
1519 "matlab.engine.connect_matlab",
1520 "matlab.engine.engineName",
1521 "matlab.engine.find_matlab",
1522 "matlab.engine.isEngineShared",
1523 "matlab.engine.shareEngine",
1524 "matlab.engine.start_matlab",
1525 "matlab.exception.JavaException",
1526 "matlab.exception.PyException",
1527 "matlab.graphics.chartcontainer.ChartContainer",
1528 "matlab.graphics.chartcontainer.mixin.Colorbar",
1529 "matlab.graphics.chartcontainer.mixin.Legend",
1530 "matlab.io.Datastore",
1531 "matlab.io.datastore.BlockedFileSet",
1532 "matlab.io.datastore.DsFileReader",
1533 "matlab.io.datastore.DsFileSet",
1534 "matlab.io.datastore.FileSet",
1535 "matlab.io.datastore.FileWritable",
1536 "matlab.io.datastore.FoldersPropertyProvider",
1537 "matlab.io.datastore.HadoopLocationBased",
1538 "matlab.io.datastore.Partitionable",
1539 "matlab.io.datastore.Shuffleable",
1540 "matlab.io.hdf4.sd",
1541 "matlab.io.hdfeos.gd",
1542 "matlab.io.hdfeos.sw",
1543 "matlab.io.saveVariablesToScript",
1544 "matlab.lang.OnOffSwitchState",
1545 "matlab.lang.correction.AppendArgumentsCorrection",
1546 "matlab.lang.correction.ConvertToFunctionNotationCorrection",
1547 "matlab.lang.correction.ReplaceIdentifierCorrection",
1548 "matlab.lang.makeUniqueStrings",
1549 "matlab.lang.makeValidName",
1550 "matlab.mex.MexHost",
1551 "matlab.mixin.Copyable",
1552 "matlab.mixin.CustomDisplay",
1553 "matlab.mixin.Heterogeneous",
1554 "matlab.mixin.SetGet",
1555 "matlab.mixin.SetGetExactNames",
1556 "matlab.mixin.util.PropertyGroup",
1557 "matlab.mock.AnyArguments",
1558 "matlab.mock.InteractionHistory",
1559 "matlab.mock.InteractionHistory.forMock",
1560 "matlab.mock.MethodCallBehavior",
1561 "matlab.mock.PropertyBehavior",
1562 "matlab.mock.PropertyGetBehavior",
1563 "matlab.mock.PropertySetBehavior",
1564 "matlab.mock.TestCase",
1565 "matlab.mock.actions.AssignOutputs",
1566 "matlab.mock.actions.DoNothing",
1567 "matlab.mock.actions.Invoke",
1568 "matlab.mock.actions.ReturnStoredValue",
1569 "matlab.mock.actions.StoreValue",
1570 "matlab.mock.actions.ThrowException",
1571 "matlab.mock.constraints.Occurred",
1572 "matlab.mock.constraints.WasAccessed",
1573 "matlab.mock.constraints.WasCalled",
1574 "matlab.mock.constraints.WasSet",
1575 "matlab.net.ArrayFormat",
1576 "matlab.net.QueryParameter",
1577 "matlab.net.URI",
1578 "matlab.net.base64decode",
1579 "matlab.net.base64encode",
1580 "matlab.net.http.AuthInfo",
1581 "matlab.net.http.AuthenticationScheme",
1582 "matlab.net.http.Cookie",
1583 "matlab.net.http.CookieInfo",
1584 "matlab.net.http.Credentials",
1585 "matlab.net.http.Disposition",
1586 "matlab.net.http.HTTPException",
1587 "matlab.net.http.HTTPOptions",
1588 "matlab.net.http.HeaderField",
1589 "matlab.net.http.LogRecord",
1590 "matlab.net.http.MediaType",
1591 "matlab.net.http.Message",
1592 "matlab.net.http.MessageBody",
1593 "matlab.net.http.MessageType",
1594 "matlab.net.http.ProgressMonitor",
1595 "matlab.net.http.ProtocolVersion",
1596 "matlab.net.http.RequestLine",
1597 "matlab.net.http.RequestMessage",
1598 "matlab.net.http.RequestMethod",
1599 "matlab.net.http.ResponseMessage",
1600 "matlab.net.http.StartLine",
1601 "matlab.net.http.StatusClass",
1602 "matlab.net.http.StatusCode",
1603 "matlab.net.http.StatusLine",
1604 "matlab.net.http.field.AcceptField",
1605 "matlab.net.http.field.AuthenticateField",
1606 "matlab.net.http.field.AuthenticationInfoField",
1607 "matlab.net.http.field.AuthorizationField",
1608 "matlab.net.http.field.ContentDispositionField",
1609 "matlab.net.http.field.ContentLengthField",
1610 "matlab.net.http.field.ContentLocationField",
1611 "matlab.net.http.field.ContentTypeField",
1612 "matlab.net.http.field.CookieField",
1613 "matlab.net.http.field.DateField",
1614 "matlab.net.http.field.GenericField",
1615 "matlab.net.http.field.GenericParameterizedField",
1616 "matlab.net.http.field.HTTPDateField",
1617 "matlab.net.http.field.IntegerField",
1618 "matlab.net.http.field.LocationField",
1619 "matlab.net.http.field.MediaRangeField",
1620 "matlab.net.http.field.SetCookieField",
1621 "matlab.net.http.field.URIReferenceField",
1622 "matlab.net.http.io.BinaryConsumer",
1623 "matlab.net.http.io.ContentConsumer",
1624 "matlab.net.http.io.ContentProvider",
1625 "matlab.net.http.io.FileConsumer",
1626 "matlab.net.http.io.FileProvider",
1627 "matlab.net.http.io.FormProvider",
1628 "matlab.net.http.io.GenericConsumer",
1629 "matlab.net.http.io.GenericProvider",
1630 "matlab.net.http.io.ImageConsumer",
1631 "matlab.net.http.io.ImageProvider",
1632 "matlab.net.http.io.JSONConsumer",
1633 "matlab.net.http.io.JSONProvider",
1634 "matlab.net.http.io.MultipartConsumer",
1635 "matlab.net.http.io.MultipartFormProvider",
1636 "matlab.net.http.io.MultipartProvider",
1637 "matlab.net.http.io.StringConsumer",
1638 "matlab.net.http.io.StringProvider",
1639 "matlab.perftest.FixedTimeExperiment",
1640 "matlab.perftest.FrequentistTimeExperiment",
1641 "matlab.perftest.TestCase",
1642 "matlab.perftest.TimeExperiment",
1643 "matlab.perftest.TimeResult",
1644 "matlab.project.Project",
1645 "matlab.project.convertDefinitionFiles",
1646 "matlab.project.createProject",
1647 "matlab.project.deleteProject",
1648 "matlab.project.loadProject",
1649 "matlab.project.rootProject",
1650 "matlab.settings.FactoryGroup.createToolboxGroup",
1651 "matlab.settings.SettingsFileUpgrader",
1652 "matlab.settings.loadSettingsCompatibilityResults",
1653 "matlab.settings.mustBeIntegerScalar",
1654 "matlab.settings.mustBeLogicalScalar",
1655 "matlab.settings.mustBeNumericScalar",
1656 "matlab.settings.mustBeStringScalar",
1657 "matlab.settings.reloadFactoryFile",
1658 "matlab.system.mixin.FiniteSource",
1659 "matlab.tall.blockMovingWindow",
1660 "matlab.tall.movingWindow",
1661 "matlab.tall.reduce",
1662 "matlab.tall.transform",
1663 "matlab.test.behavior.Missing",
1664 "matlab.ui.componentcontainer.ComponentContainer",
1665 "matlab.uitest.TestCase",
1666 "matlab.uitest.TestCase.forInteractiveUse",
1667 "matlab.uitest.unlock",
1668 "matlab.unittest.Test",
1669 "matlab.unittest.TestCase",
1670 "matlab.unittest.TestResult",
1671 "matlab.unittest.TestRunner",
1672 "matlab.unittest.TestSuite",
1673 "matlab.unittest.constraints.BooleanConstraint",
1674 "matlab.unittest.constraints.Constraint",
1675 "matlab.unittest.constraints.Tolerance",
1676 "matlab.unittest.diagnostics.ConstraintDiagnostic",
1677 "matlab.unittest.diagnostics.Diagnostic",
1678 "matlab.unittest.fixtures.Fixture",
1679 "matlab.unittest.measurement.DefaultMeasurementResult",
1680 "matlab.unittest.measurement.MeasurementResult",
1681 "matlab.unittest.measurement.chart.ComparisonPlot",
1682 "matlab.unittest.plugins.OutputStream",
1683 "matlab.unittest.plugins.Parallelizable",
1684 "matlab.unittest.plugins.QualifyingPlugin",
1685 "matlab.unittest.plugins.TestRunnerPlugin",
1686 "matlab.wsdl.createWSDLClient",
1687 "matlab.wsdl.setWSDLToolPath",
1688 "matlabRelease",
1689 "matlabrc",
1690 "matlabroot",
1691 "max",
1692 "maxflow",
1693 "maxk",
1694 "mean",
1695 "median",
1696 "memmapfile",
1697 "memoize",
1698 "memory",
1699 "mergecats",
1700 "mergevars",
1701 "mesh",
1702 "meshc",
1703 "meshgrid",
1704 "meshz",
1705 "meta.ArrayDimension",
1706 "meta.DynamicProperty",
1707 "meta.EnumeratedValue",
1708 "meta.FixedDimension",
1709 "meta.MetaData",
1710 "meta.UnrestrictedDimension",
1711 "meta.Validation",
1712 "meta.abstractDetails",
1713 "meta.class",
1714 "meta.class.fromName",
1715 "meta.event",
1716 "meta.method",
1717 "meta.package",
1718 "meta.package.fromName",
1719 "meta.package.getAllPackages",
1720 "meta.property",
1721 "metaclass",
1722 "methods",
1723 "methodsview",
1724 "mex",
1725 "mexext",
1726 "mexhost",
1727 "mfilename",
1728 "mget",
1729 "milliseconds",
1730 "min",
1731 "mink",
1732 "minres",
1733 "minspantree",
1734 "minute",
1735 "minutes",
1736 "mislocked",
1737 "missing",
1738 "mkdir",
1739 "mkpp",
1740 "mldivide",
1741 "mlintrpt",
1742 "mlock",
1743 "mmfileinfo",
1744 "mod",
1745 "mode",
1746 "month",
1747 "more",
1748 "morebins",
1749 "movAbsHDU",
1750 "movNamHDU",
1751 "movRelHDU",
1752 "move",
1753 "movefile",
1754 "movegui",
1755 "movevars",
1756 "movie",
1757 "movmad",
1758 "movmax",
1759 "movmean",
1760 "movmedian",
1761 "movmin",
1762 "movprod",
1763 "movstd",
1764 "movsum",
1765 "movvar",
1766 "mpower",
1767 "mput",
1768 "mrdivide",
1769 "msgbox",
1770 "mtimes",
1771 "mu2lin",
1772 "multibandread",
1773 "multibandwrite",
1774 "munlock",
1775 "mustBeA",
1776 "mustBeFile",
1777 "mustBeFinite",
1778 "mustBeFloat",
1779 "mustBeFolder",
1780 "mustBeGreaterThan",
1781 "mustBeGreaterThanOrEqual",
1782 "mustBeInRange",
1783 "mustBeInteger",
1784 "mustBeLessThan",
1785 "mustBeLessThanOrEqual",
1786 "mustBeMember",
1787 "mustBeNegative",
1788 "mustBeNonNan",
1789 "mustBeNonempty",
1790 "mustBeNonmissing",
1791 "mustBeNonnegative",
1792 "mustBeNonpositive",
1793 "mustBeNonsparse",
1794 "mustBeNonzero",
1795 "mustBeNonzeroLengthText",
1796 "mustBeNumeric",
1797 "mustBeNumericOrLogical",
1798 "mustBePositive",
1799 "mustBeReal",
1800 "mustBeScalarOrEmpty",
1801 "mustBeText",
1802 "mustBeTextScalar",
1803 "mustBeUnderlyingType",
1804 "mustBeValidVariableName",
1805 "mustBeVector",
1806 "namedPattern",
1807 "namedargs2cell",
1808 "namelengthmax",
1809 "nargin",
1810 "narginchk",
1811 "nargout",
1812 "nargoutchk",
1813 "native2unicode",
1814 "nccreate",
1815 "ncdisp",
1816 "nchoosek",
1817 "ncinfo",
1818 "ncread",
1819 "ncreadatt",
1820 "ncwrite",
1821 "ncwriteatt",
1822 "ncwriteschema",
1823 "ndgrid",
1824 "ndims",
1825 "nearest",
1826 "nearestNeighbor",
1827 "nearestvertex",
1828 "neighbors",
1829 "netcdf.abort",
1830 "netcdf.close",
1831 "netcdf.copyAtt",
1832 "netcdf.create",
1833 "netcdf.defDim",
1834 "netcdf.defGrp",
1835 "netcdf.defVar",
1836 "netcdf.defVarChunking",
1837 "netcdf.defVarDeflate",
1838 "netcdf.defVarFill",
1839 "netcdf.defVarFletcher32",
1840 "netcdf.delAtt",
1841 "netcdf.endDef",
1842 "netcdf.getAtt",
1843 "netcdf.getChunkCache",
1844 "netcdf.getConstant",
1845 "netcdf.getConstantNames",
1846 "netcdf.getVar",
1847 "netcdf.inq",
1848 "netcdf.inqAtt",
1849 "netcdf.inqAttID",
1850 "netcdf.inqAttName",
1851 "netcdf.inqDim",
1852 "netcdf.inqDimID",
1853 "netcdf.inqDimIDs",
1854 "netcdf.inqFormat",
1855 "netcdf.inqGrpName",
1856 "netcdf.inqGrpNameFull",
1857 "netcdf.inqGrpParent",
1858 "netcdf.inqGrps",
1859 "netcdf.inqLibVers",
1860 "netcdf.inqNcid",
1861 "netcdf.inqUnlimDims",
1862 "netcdf.inqVar",
1863 "netcdf.inqVarChunking",
1864 "netcdf.inqVarDeflate",
1865 "netcdf.inqVarFill",
1866 "netcdf.inqVarFletcher32",
1867 "netcdf.inqVarID",
1868 "netcdf.inqVarIDs",
1869 "netcdf.open",
1870 "netcdf.putAtt",
1871 "netcdf.putVar",
1872 "netcdf.reDef",
1873 "netcdf.renameAtt",
1874 "netcdf.renameDim",
1875 "netcdf.renameVar",
1876 "netcdf.setChunkCache",
1877 "netcdf.setDefaultFormat",
1878 "netcdf.setFill",
1879 "netcdf.sync",
1880 "newline",
1881 "newplot",
1882 "nextpow2",
1883 "nexttile",
1884 "nnz",
1885 "nonzeros",
1886 "norm",
1887 "normalize",
1888 "normest",
1889 "notify",
1890 "now",
1891 "nsidedpoly",
1892 "nthroot",
1893 "nufft",
1894 "nufftn",
1895 "null",
1896 "num2cell",
1897 "num2hex",
1898 "num2ruler",
1899 "num2str",
1900 "numArgumentsFromSubscript",
1901 "numRegions",
1902 "numboundaries",
1903 "numedges",
1904 "numel",
1905 "numnodes",
1906 "numpartitions",
1907 "numsides",
1908 "nzmax",
1909 "ode113",
1910 "ode15i",
1911 "ode15s",
1912 "ode23",
1913 "ode23s",
1914 "ode23t",
1915 "ode23tb",
1916 "ode45",
1917 "odeget",
1918 "odeset",
1919 "odextend",
1920 "onCleanup",
1921 "ones",
1922 "open",
1923 "openDiskFile",
1924 "openFile",
1925 "openProject",
1926 "openfig",
1927 "opengl",
1928 "openvar",
1929 "optimget",
1930 "optimset",
1931 "optionalPattern",
1932 "ordeig",
1933 "orderfields",
1934 "ordqz",
1935 "ordschur",
1936 "orient",
1937 "orth",
1938 "outdegree",
1939 "outedges",
1940 "outerjoin",
1941 "overlaps",
1942 "overlapsrange",
1943 "pack",
1944 "pad",
1945 "padecoef",
1946 "pagectranspose",
1947 "pagemtimes",
1948 "pagetranspose",
1949 "pan",
1950 "panInteraction",
1951 "parallelplot",
1952 "pareto",
1953 "parquetDatastore",
1954 "parquetinfo",
1955 "parquetread",
1956 "parquetwrite",
1957 "partition",
1958 "parula",
1959 "pascal",
1960 "patch",
1961 "path",
1962 "pathsep",
1963 "pathtool",
1964 "pattern",
1965 "pause",
1966 "pbaspect",
1967 "pcg",
1968 "pchip",
1969 "pcode",
1970 "pcolor",
1971 "pdepe",
1972 "pdeval",
1973 "peaks",
1974 "perimeter",
1975 "perl",
1976 "perms",
1977 "permute",
1978 "pi",
1979 "pie",
1980 "pie3",
1981 "pink",
1982 "pinv",
1983 "planerot",
1984 "play",
1985 "playblocking",
1986 "plot",
1987 "plot3",
1988 "plotbrowser",
1989 "plotedit",
1990 "plotmatrix",
1991 "plottools",
1992 "plus",
1993 "pointLocation",
1994 "pol2cart",
1995 "polaraxes",
1996 "polarbubblechart",
1997 "polarhistogram",
1998 "polarplot",
1999 "polarscatter",
2000 "poly",
2001 "polyarea",
2002 "polybuffer",
2003 "polyder",
2004 "polyeig",
2005 "polyfit",
2006 "polyint",
2007 "polyshape",
2008 "polyval",
2009 "polyvalm",
2010 "posixtime",
2011 "possessivePattern",
2012 "pow2",
2013 "ppval",
2014 "predecessors",
2015 "prefdir",
2016 "preferences",
2017 "press",
2018 "preview",
2019 "primes",
2020 "print",
2021 "printdlg",
2022 "printopt",
2023 "printpreview",
2024 "prism",
2025 "processInputSpecificationChangeImpl",
2026 "processTunedPropertiesImpl",
2027 "prod",
2028 "profile",
2029 "propedit",
2030 "properties",
2031 "propertyeditor",
2032 "psi",
2033 "publish",
2034 "pwd",
2035 "pyargs",
2036 "pyenv",
2037 "qmr",
2038 "qr",
2039 "qrdelete",
2040 "qrinsert",
2041 "qrupdate",
2042 "quad2d",
2043 "quadgk",
2044 "quarter",
2045 "questdlg",
2046 "quit",
2047 "quiver",
2048 "quiver3",
2049 "qz",
2050 "rad2deg",
2051 "rand",
2052 "randi",
2053 "randn",
2054 "randperm",
2055 "rank",
2056 "rat",
2057 "rats",
2058 "rbbox",
2059 "rcond",
2060 "read",
2061 "readATblHdr",
2062 "readBTblHdr",
2063 "readCard",
2064 "readCol",
2065 "readFrame",
2066 "readImg",
2067 "readKey",
2068 "readKeyCmplx",
2069 "readKeyDbl",
2070 "readKeyLongLong",
2071 "readKeyLongStr",
2072 "readKeyUnit",
2073 "readRecord",
2074 "readall",
2075 "readcell",
2076 "readline",
2077 "readlines",
2078 "readmatrix",
2079 "readstruct",
2080 "readtable",
2081 "readtimetable",
2082 "readvars",
2083 "real",
2084 "reallog",
2085 "realmax",
2086 "realmin",
2087 "realpow",
2088 "realsqrt",
2089 "record",
2090 "recordblocking",
2091 "rectangle",
2092 "rectint",
2093 "recycle",
2094 "reducepatch",
2095 "reducevolume",
2096 "refresh",
2097 "refreshSourceControl",
2098 "refreshdata",
2099 "regexp",
2100 "regexpPattern",
2101 "regexpi",
2102 "regexprep",
2103 "regexptranslate",
2104 "regionZoomInteraction",
2105 "regions",
2106 "registerevent",
2107 "regmatlabserver",
2108 "rehash",
2109 "relationaloperators",
2110 "release",
2111 "releaseImpl",
2112 "reload",
2113 "rem",
2114 "remove",
2115 "removeCategory",
2116 "removeFile",
2117 "removeGroup",
2118 "removeLabel",
2119 "removePath",
2120 "removeReference",
2121 "removeSetting",
2122 "removeShortcut",
2123 "removeShutdownFile",
2124 "removeStartupFile",
2125 "removeStyle",
2126 "removeToolbarExplorationButtons",
2127 "removecats",
2128 "removets",
2129 "removevars",
2130 "rename",
2131 "renamecats",
2132 "renamevars",
2133 "rendererinfo",
2134 "reordercats",
2135 "reordernodes",
2136 "repelem",
2137 "replace",
2138 "replaceBetween",
2139 "repmat",
2140 "resample",
2141 "rescale",
2142 "reset",
2143 "resetImpl",
2144 "reshape",
2145 "residue",
2146 "restoredefaultpath",
2147 "resume",
2148 "rethrow",
2149 "retime",
2150 "reverse",
2151 "rgb2gray",
2152 "rgb2hsv",
2153 "rgb2ind",
2154 "rgbplot",
2155 "ribbon",
2156 "rlim",
2157 "rmappdata",
2158 "rmboundary",
2159 "rmdir",
2160 "rmedge",
2161 "rmfield",
2162 "rmholes",
2163 "rmmissing",
2164 "rmnode",
2165 "rmoutliers",
2166 "rmpath",
2167 "rmpref",
2168 "rmprop",
2169 "rmslivers",
2170 "rng",
2171 "roots",
2172 "rosser",
2173 "rot90",
2174 "rotate",
2175 "rotate3d",
2176 "rotateInteraction",
2177 "round",
2178 "rowfun",
2179 "rows2vars",
2180 "rref",
2181 "rsf2csf",
2182 "rtickangle",
2183 "rtickformat",
2184 "rticklabels",
2185 "rticks",
2186 "ruler2num",
2187 "rulerPanInteraction",
2188 "run",
2189 "runChecks",
2190 "runperf",
2191 "runtests",
2192 "save",
2193 "saveObjectImpl",
2194 "saveas",
2195 "savefig",
2196 "saveobj",
2197 "savepath",
2198 "scale",
2199 "scatter",
2200 "scatter3",
2201 "scatteredInterpolant",
2202 "scatterhistogram",
2203 "schur",
2204 "scroll",
2205 "sec",
2206 "secd",
2207 "sech",
2208 "second",
2209 "seconds",
2210 "semilogx",
2211 "semilogy",
2212 "sendmail",
2213 "serialport",
2214 "serialportlist",
2215 "set",
2216 "setBscale",
2217 "setCompressionType",
2218 "setDTR",
2219 "setHCompScale",
2220 "setHCompSmooth",
2221 "setProperties",
2222 "setRTS",
2223 "setTileDim",
2224 "setTscale",
2225 "setabstime",
2226 "setappdata",
2227 "setcats",
2228 "setdiff",
2229 "setenv",
2230 "setfield",
2231 "setinterpmethod",
2232 "setpixelposition",
2233 "setpref",
2234 "settimeseriesnames",
2235 "settings",
2236 "setuniformtime",
2237 "setup",
2238 "setupImpl",
2239 "setvaropts",
2240 "setvartype",
2241 "setxor",
2242 "sgtitle",
2243 "shading",
2244 "sheetnames",
2245 "shg",
2246 "shiftdim",
2247 "shortestpath",
2248 "shortestpathtree",
2249 "showplottool",
2250 "shrinkfaces",
2251 "shuffle",
2252 "sign",
2253 "simplify",
2254 "sin",
2255 "sind",
2256 "single",
2257 "sinh",
2258 "sinpi",
2259 "size",
2260 "slice",
2261 "smooth3",
2262 "smoothdata",
2263 "snapnow",
2264 "sort",
2265 "sortboundaries",
2266 "sortregions",
2267 "sortrows",
2268 "sortx",
2269 "sorty",
2270 "sound",
2271 "soundsc",
2272 "spalloc",
2273 "sparse",
2274 "spaugment",
2275 "spconvert",
2276 "spdiags",
2277 "specular",
2278 "speye",
2279 "spfun",
2280 "sph2cart",
2281 "sphere",
2282 "spinmap",
2283 "spline",
2284 "split",
2285 "splitapply",
2286 "splitlines",
2287 "splitvars",
2288 "spones",
2289 "spparms",
2290 "sprand",
2291 "sprandn",
2292 "sprandsym",
2293 "sprank",
2294 "spreadsheetDatastore",
2295 "spreadsheetImportOptions",
2296 "spring",
2297 "sprintf",
2298 "spy",
2299 "sqrt",
2300 "sqrtm",
2301 "squeeze",
2302 "ss2tf",
2303 "sscanf",
2304 "stack",
2305 "stackedplot",
2306 "stairs",
2307 "standardizeMissing",
2308 "start",
2309 "startat",
2310 "startsWith",
2311 "startup",
2312 "std",
2313 "stem",
2314 "stem3",
2315 "step",
2316 "stepImpl",
2317 "stlread",
2318 "stlwrite",
2319 "stop",
2320 "str2double",
2321 "str2func",
2322 "str2num",
2323 "strcat",
2324 "strcmp",
2325 "strcmpi",
2326 "stream2",
2327 "stream3",
2328 "streamline",
2329 "streamparticles",
2330 "streamribbon",
2331 "streamslice",
2332 "streamtube",
2333 "strfind",
2334 "string",
2335 "strings",
2336 "strip",
2337 "strjoin",
2338 "strjust",
2339 "strlength",
2340 "strncmp",
2341 "strncmpi",
2342 "strrep",
2343 "strsplit",
2344 "strtok",
2345 "strtrim",
2346 "struct",
2347 "struct2cell",
2348 "struct2table",
2349 "structfun",
2350 "sub2ind",
2351 "subgraph",
2352 "subplot",
2353 "subsasgn",
2354 "subscribe",
2355 "subsindex",
2356 "subspace",
2357 "subsref",
2358 "substruct",
2359 "subtitle",
2360 "subtract",
2361 "subvolume",
2362 "successors",
2363 "sum",
2364 "summary",
2365 "summer",
2366 "superclasses",
2367 "surf",
2368 "surf2patch",
2369 "surface",
2370 "surfaceArea",
2371 "surfc",
2372 "surfl",
2373 "surfnorm",
2374 "svd",
2375 "svds",
2376 "svdsketch",
2377 "swapbytes",
2378 "swarmchart",
2379 "swarmchart3",
2380 "sylvester",
2381 "symamd",
2382 "symbfact",
2383 "symmlq",
2384 "symrcm",
2385 "synchronize",
2386 "sysobjupdate",
2387 "system",
2388 "table",
2389 "table2array",
2390 "table2cell",
2391 "table2struct",
2392 "table2timetable",
2393 "tabularTextDatastore",
2394 "tail",
2395 "tall",
2396 "tallrng",
2397 "tan",
2398 "tand",
2399 "tanh",
2400 "tar",
2401 "tcpclient",
2402 "tempdir",
2403 "tempname",
2404 "testsuite",
2405 "tetramesh",
2406 "texlabel",
2407 "text",
2408 "textBoundary",
2409 "textscan",
2410 "textwrap",
2411 "tfqmr",
2412 "thetalim",
2413 "thetatickformat",
2414 "thetaticklabels",
2415 "thetaticks",
2416 "thingSpeakRead",
2417 "thingSpeakWrite",
2418 "throw",
2419 "throwAsCaller",
2420 "tic",
2421 "tiledlayout",
2422 "time",
2423 "timeit",
2424 "timeofday",
2425 "timer",
2426 "timerange",
2427 "timerfind",
2428 "timerfindall",
2429 "timeseries",
2430 "timetable",
2431 "timetable2table",
2432 "timezones",
2433 "title",
2434 "toc",
2435 "todatenum",
2436 "toeplitz",
2437 "toolboxdir",
2438 "topkrows",
2439 "toposort",
2440 "trace",
2441 "transclosure",
2442 "transform",
2443 "translate",
2444 "transpose",
2445 "transreduction",
2446 "trapz",
2447 "treelayout",
2448 "treeplot",
2449 "triangulation",
2450 "tril",
2451 "trimesh",
2452 "triplot",
2453 "trisurf",
2454 "triu",
2455 "true",
2456 "tscollection",
2457 "tsdata.event",
2458 "tsearchn",
2459 "turbo",
2460 "turningdist",
2461 "type",
2462 "typecast",
2463 "tzoffset",
2464 "uialert",
2465 "uiaxes",
2466 "uibutton",
2467 "uibuttongroup",
2468 "uicheckbox",
2469 "uiconfirm",
2470 "uicontextmenu",
2471 "uicontrol",
2472 "uidatepicker",
2473 "uidropdown",
2474 "uieditfield",
2475 "uifigure",
2476 "uigauge",
2477 "uigetdir",
2478 "uigetfile",
2479 "uigetpref",
2480 "uigridlayout",
2481 "uihtml",
2482 "uiimage",
2483 "uiknob",
2484 "uilabel",
2485 "uilamp",
2486 "uilistbox",
2487 "uimenu",
2488 "uint16",
2489 "uint32",
2490 "uint64",
2491 "uint8",
2492 "uiopen",
2493 "uipanel",
2494 "uiprogressdlg",
2495 "uipushtool",
2496 "uiputfile",
2497 "uiradiobutton",
2498 "uiresume",
2499 "uisave",
2500 "uisetcolor",
2501 "uisetfont",
2502 "uisetpref",
2503 "uislider",
2504 "uispinner",
2505 "uistack",
2506 "uistyle",
2507 "uiswitch",
2508 "uitab",
2509 "uitabgroup",
2510 "uitable",
2511 "uitextarea",
2512 "uitogglebutton",
2513 "uitoggletool",
2514 "uitoolbar",
2515 "uitree",
2516 "uitreenode",
2517 "uiwait",
2518 "uminus",
2519 "underlyingType",
2520 "underlyingValue",
2521 "unicode2native",
2522 "union",
2523 "unique",
2524 "uniquetol",
2525 "unix",
2526 "unloadlibrary",
2527 "unmesh",
2528 "unmkpp",
2529 "unregisterallevents",
2530 "unregisterevent",
2531 "unstack",
2532 "unsubscribe",
2533 "untar",
2534 "unwrap",
2535 "unzip",
2536 "update",
2537 "updateDependencies",
2538 "uplus",
2539 "upper",
2540 "usejava",
2541 "userpath",
2542 "validateFunctionSignaturesJSON",
2543 "validateInputsImpl",
2544 "validatePropertiesImpl",
2545 "validateattributes",
2546 "validatecolor",
2547 "validatestring",
2548 "values",
2549 "vander",
2550 "var",
2551 "varargin",
2552 "varargout",
2553 "varfun",
2554 "vartype",
2555 "vecnorm",
2556 "ver",
2557 "verLessThan",
2558 "version",
2559 "vertcat",
2560 "vertexAttachments",
2561 "vertexNormal",
2562 "view",
2563 "viewmtx",
2564 "visdiff",
2565 "volume",
2566 "volumebounds",
2567 "voronoi",
2568 "voronoiDiagram",
2569 "voronoin",
2570 "wait",
2571 "waitbar",
2572 "waitfor",
2573 "waitforbuttonpress",
2574 "warndlg",
2575 "warning",
2576 "waterfall",
2577 "web",
2578 "weboptions",
2579 "webread",
2580 "websave",
2581 "webwrite",
2582 "week",
2583 "weekday",
2584 "what",
2585 "which",
2586 "whitespaceBoundary",
2587 "whitespacePattern",
2588 "who",
2589 "whos",
2590 "width",
2591 "wildcardPattern",
2592 "wilkinson",
2593 "winopen",
2594 "winqueryreg",
2595 "winter",
2596 "withinrange",
2597 "withtol",
2598 "wordcloud",
2599 "write",
2600 "writeChecksum",
2601 "writeCol",
2602 "writeComment",
2603 "writeDate",
2604 "writeHistory",
2605 "writeImg",
2606 "writeKey",
2607 "writeKeyUnit",
2608 "writeVideo",
2609 "writeall",
2610 "writecell",
2611 "writeline",
2612 "writematrix",
2613 "writestruct",
2614 "writetable",
2615 "writetimetable",
2616 "xcorr",
2617 "xcov",
2618 "xlabel",
2619 "xlim",
2620 "xline",
2621 "xmlread",
2622 "xmlwrite",
2623 "xor",
2624 "xslt",
2625 "xtickangle",
2626 "xtickformat",
2627 "xticklabels",
2628 "xticks",
2629 "year",
2630 "years",
2631 "ylabel",
2632 "ylim",
2633 "yline",
2634 "ymd",
2635 "ytickangle",
2636 "ytickformat",
2637 "yticklabels",
2638 "yticks",
2639 "yyaxis",
2640 "yyyymmdd",
2641 "zeros",
2642 "zip",
2643 "zlabel",
2644 "zlim",
2645 "zoom",
2646 "zoomInteraction",
2647 "ztickangle",
2648 "ztickformat",
2649 "zticklabels",
2650 "zticks",
2651 ],
2652 prefix=r"(?<!\.)(", # Exclude field names
2653 suffix=r")\b"
2654 ),
2655 Name.Builtin
2656 ),
2658 # line continuation with following comment:
2659 (r'(\.\.\.)(.*)$', bygroups(Keyword, Comment)),
2661 # command form:
2662 # "How MATLAB Recognizes Command Syntax" specifies that an operator
2663 # is recognized if it is either surrounded by spaces or by no
2664 # spaces on both sides (this allows distinguishing `cd ./foo` from
2665 # `cd ./ foo`.). Here, the regex checks that the first word in the
2666 # line is not followed by <spaces> and then
2667 # (equal | open-parenthesis | <operator><space> | <space>).
2668 (r'(?:^|(?<=;))(\s*)(\w+)(\s+)(?!=|\(|%s\s|\s)' % _operators,
2669 bygroups(Whitespace, Name, Whitespace), 'commandargs'),
2671 include('expressions')
2672 ],
2673 'blockcomment': [
2674 (r'^\s*%\}', Comment.Multiline, '#pop'),
2675 (r'^.*\n', Comment.Multiline),
2676 (r'.', Comment.Multiline),
2677 ],
2678 'deffunc': [
2679 (r'(\s*)(?:(\S+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)',
2680 bygroups(Whitespace, Text, Whitespace, Punctuation,
2681 Whitespace, Name.Function, Punctuation, Text,
2682 Punctuation, Whitespace), '#pop'),
2683 # function with no args
2684 (r'(\s*)([a-zA-Z_]\w*)',
2685 bygroups(Whitespace, Name.Function), '#pop'),
2686 ],
2687 'propattrs': [
2688 (r'(\w+)(\s*)(=)(\s*)(\d+)',
2689 bygroups(Name.Builtin, Whitespace, Punctuation, Whitespace,
2690 Number)),
2691 (r'(\w+)(\s*)(=)(\s*)([a-zA-Z]\w*)',
2692 bygroups(Name.Builtin, Whitespace, Punctuation, Whitespace,
2693 Keyword)),
2694 (r',', Punctuation),
2695 (r'\)', Punctuation, '#pop'),
2696 (r'\s+', Whitespace),
2697 (r'.', Text),
2698 ],
2699 'defprops': [
2700 (r'%\{\s*\n', Comment.Multiline, 'blockcomment'),
2701 (r'%.*$', Comment),
2702 (r'(?<!\.)end\b', Keyword, '#pop'),
2703 include('expressions'),
2704 ],
2705 'string': [
2706 (r"[^']*'", String, '#pop'),
2707 ],
2708 'commandargs': [
2709 # If an equal sign or other operator is encountered, this
2710 # isn't a command. It might be a variable assignment or
2711 # comparison operation with multiple spaces before the
2712 # equal sign or operator
2713 (r"=", Punctuation, '#pop'),
2714 (_operators, Operator, '#pop'),
2715 (r"[ \t]+", Whitespace),
2716 ("'[^']*'", String),
2717 (r"[^';\s]+", String),
2718 (";", Punctuation, '#pop'),
2719 default('#pop'),
2720 ]
2721 }
2723 def analyse_text(text):
2724 # function declaration.
2725 first_non_comment = next((line for line in text.splitlines()
2726 if not re.match(r'^\s*%', text)), '').strip()
2727 if (first_non_comment.startswith('function')
2728 and '{' not in first_non_comment):
2729 return 1.
2730 # comment
2731 elif re.search(r'^\s*%', text, re.M):
2732 return 0.2
2733 # system cmd
2734 elif re.search(r'^!\w+', text, re.M):
2735 return 0.2
2738line_re = re.compile('.*?\n')
2741class MatlabSessionLexer(Lexer):
2742 """
2743 For Matlab sessions. Modeled after PythonConsoleLexer.
2744 Contributed by Ken Schutte <kschutte@csail.mit.edu>.
2746 .. versionadded:: 0.10
2747 """
2748 name = 'Matlab session'
2749 aliases = ['matlabsession']
2751 def get_tokens_unprocessed(self, text):
2752 mlexer = MatlabLexer(**self.options)
2754 curcode = ''
2755 insertions = []
2756 continuation = False
2758 for match in line_re.finditer(text):
2759 line = match.group()
2761 if line.startswith('>> '):
2762 insertions.append((len(curcode),
2763 [(0, Generic.Prompt, line[:3])]))
2764 curcode += line[3:]
2766 elif line.startswith('>>'):
2767 insertions.append((len(curcode),
2768 [(0, Generic.Prompt, line[:2])]))
2769 curcode += line[2:]
2771 elif line.startswith('???'):
2773 idx = len(curcode)
2775 # without is showing error on same line as before...?
2776 # line = "\n" + line
2777 token = (0, Generic.Traceback, line)
2778 insertions.append((idx, [token]))
2779 elif continuation and insertions:
2780 # line_start is the length of the most recent prompt symbol
2781 line_start = len(insertions[-1][-1][-1])
2782 # Set leading spaces with the length of the prompt to be a generic prompt
2783 # This keeps code aligned when prompts are removed, say with some Javascript
2784 if line.startswith(' '*line_start):
2785 insertions.append(
2786 (len(curcode), [(0, Generic.Prompt, line[:line_start])]))
2787 curcode += line[line_start:]
2788 else:
2789 curcode += line
2790 else:
2791 if curcode:
2792 yield from do_insertions(
2793 insertions, mlexer.get_tokens_unprocessed(curcode))
2794 curcode = ''
2795 insertions = []
2797 yield match.start(), Generic.Output, line
2799 # Does not allow continuation if a comment is included after the ellipses.
2800 # Continues any line that ends with ..., even comments (lines that start with %)
2801 if line.strip().endswith('...'):
2802 continuation = True
2803 else:
2804 continuation = False
2806 if curcode: # or item:
2807 yield from do_insertions(
2808 insertions, mlexer.get_tokens_unprocessed(curcode))
2811class OctaveLexer(RegexLexer):
2812 """
2813 For GNU Octave source code.
2815 .. versionadded:: 1.5
2816 """
2817 name = 'Octave'
2818 url = 'https://www.gnu.org/software/octave/index'
2819 aliases = ['octave']
2820 filenames = ['*.m']
2821 mimetypes = ['text/octave']
2823 # These lists are generated automatically.
2824 # Run the following in bash shell:
2825 #
2826 # First dump all of the Octave manual into a plain text file:
2827 #
2828 # $ info octave --subnodes -o octave-manual
2829 #
2830 # Now grep through it:
2832 # for i in \
2833 # "Built-in Function" "Command" "Function File" \
2834 # "Loadable Function" "Mapping Function";
2835 # do
2836 # perl -e '@name = qw('"$i"');
2837 # print lc($name[0]),"_kw = [\n"';
2838 #
2839 # perl -n -e 'print "\"$1\",\n" if /-- '"$i"': .* (\w*) \(/;' \
2840 # octave-manual | sort | uniq ;
2841 # echo "]" ;
2842 # echo;
2843 # done
2845 # taken from Octave Mercurial changeset 8cc154f45e37 (30-jan-2011)
2847 builtin_kw = (
2848 "addlistener", "addpath", "addproperty", "all",
2849 "and", "any", "argnames", "argv", "assignin",
2850 "atexit", "autoload",
2851 "available_graphics_toolkits", "beep_on_error",
2852 "bitand", "bitmax", "bitor", "bitshift", "bitxor",
2853 "cat", "cell", "cellstr", "char", "class", "clc",
2854 "columns", "command_line_path",
2855 "completion_append_char", "completion_matches",
2856 "complex", "confirm_recursive_rmdir", "cputime",
2857 "crash_dumps_octave_core", "ctranspose", "cumprod",
2858 "cumsum", "debug_on_error", "debug_on_interrupt",
2859 "debug_on_warning", "default_save_options",
2860 "dellistener", "diag", "diff", "disp",
2861 "doc_cache_file", "do_string_escapes", "double",
2862 "drawnow", "e", "echo_executing_commands", "eps",
2863 "eq", "errno", "errno_list", "error", "eval",
2864 "evalin", "exec", "exist", "exit", "eye", "false",
2865 "fclear", "fclose", "fcntl", "fdisp", "feof",
2866 "ferror", "feval", "fflush", "fgetl", "fgets",
2867 "fieldnames", "file_in_loadpath", "file_in_path",
2868 "filemarker", "filesep", "find_dir_in_path",
2869 "fixed_point_format", "fnmatch", "fopen", "fork",
2870 "formula", "fprintf", "fputs", "fread", "freport",
2871 "frewind", "fscanf", "fseek", "fskipl", "ftell",
2872 "functions", "fwrite", "ge", "genpath", "get",
2873 "getegid", "getenv", "geteuid", "getgid",
2874 "getpgrp", "getpid", "getppid", "getuid", "glob",
2875 "gt", "gui_mode", "history_control",
2876 "history_file", "history_size",
2877 "history_timestamp_format_string", "home",
2878 "horzcat", "hypot", "ifelse",
2879 "ignore_function_time_stamp", "inferiorto",
2880 "info_file", "info_program", "inline", "input",
2881 "intmax", "intmin", "ipermute",
2882 "is_absolute_filename", "isargout", "isbool",
2883 "iscell", "iscellstr", "ischar", "iscomplex",
2884 "isempty", "isfield", "isfloat", "isglobal",
2885 "ishandle", "isieee", "isindex", "isinteger",
2886 "islogical", "ismatrix", "ismethod", "isnull",
2887 "isnumeric", "isobject", "isreal",
2888 "is_rooted_relative_filename", "issorted",
2889 "isstruct", "isvarname", "kbhit", "keyboard",
2890 "kill", "lasterr", "lasterror", "lastwarn",
2891 "ldivide", "le", "length", "link", "linspace",
2892 "logical", "lstat", "lt", "make_absolute_filename",
2893 "makeinfo_program", "max_recursion_depth", "merge",
2894 "methods", "mfilename", "minus", "mislocked",
2895 "mkdir", "mkfifo", "mkstemp", "mldivide", "mlock",
2896 "mouse_wheel_zoom", "mpower", "mrdivide", "mtimes",
2897 "munlock", "nargin", "nargout",
2898 "native_float_format", "ndims", "ne", "nfields",
2899 "nnz", "norm", "not", "numel", "nzmax",
2900 "octave_config_info", "octave_core_file_limit",
2901 "octave_core_file_name",
2902 "octave_core_file_options", "ones", "or",
2903 "output_max_field_width", "output_precision",
2904 "page_output_immediately", "page_screen_output",
2905 "path", "pathsep", "pause", "pclose", "permute",
2906 "pi", "pipe", "plus", "popen", "power",
2907 "print_empty_dimensions", "printf",
2908 "print_struct_array_contents", "prod",
2909 "program_invocation_name", "program_name",
2910 "putenv", "puts", "pwd", "quit", "rats", "rdivide",
2911 "readdir", "readlink", "read_readline_init_file",
2912 "realmax", "realmin", "rehash", "rename",
2913 "repelems", "re_read_readline_init_file", "reset",
2914 "reshape", "resize", "restoredefaultpath",
2915 "rethrow", "rmdir", "rmfield", "rmpath", "rows",
2916 "save_header_format_string", "save_precision",
2917 "saving_history", "scanf", "set", "setenv",
2918 "shell_cmd", "sighup_dumps_octave_core",
2919 "sigterm_dumps_octave_core", "silent_functions",
2920 "single", "size", "size_equal", "sizemax",
2921 "sizeof", "sleep", "source", "sparse_auto_mutate",
2922 "split_long_rows", "sprintf", "squeeze", "sscanf",
2923 "stat", "stderr", "stdin", "stdout", "strcmp",
2924 "strcmpi", "string_fill_char", "strncmp",
2925 "strncmpi", "struct", "struct_levels_to_print",
2926 "strvcat", "subsasgn", "subsref", "sum", "sumsq",
2927 "superiorto", "suppress_verbose_help_message",
2928 "symlink", "system", "tic", "tilde_expand",
2929 "times", "tmpfile", "tmpnam", "toc", "toupper",
2930 "transpose", "true", "typeinfo", "umask", "uminus",
2931 "uname", "undo_string_escapes", "unlink", "uplus",
2932 "upper", "usage", "usleep", "vec", "vectorize",
2933 "vertcat", "waitpid", "warning", "warranty",
2934 "whos_line_format", "yes_or_no", "zeros",
2935 "inf", "Inf", "nan", "NaN")
2937 command_kw = ("close", "load", "who", "whos")
2939 function_kw = (
2940 "accumarray", "accumdim", "acosd", "acotd",
2941 "acscd", "addtodate", "allchild", "ancestor",
2942 "anova", "arch_fit", "arch_rnd", "arch_test",
2943 "area", "arma_rnd", "arrayfun", "ascii", "asctime",
2944 "asecd", "asind", "assert", "atand",
2945 "autoreg_matrix", "autumn", "axes", "axis", "bar",
2946 "barh", "bartlett", "bartlett_test", "beep",
2947 "betacdf", "betainv", "betapdf", "betarnd",
2948 "bicgstab", "bicubic", "binary", "binocdf",
2949 "binoinv", "binopdf", "binornd", "bitcmp",
2950 "bitget", "bitset", "blackman", "blanks",
2951 "blkdiag", "bone", "box", "brighten", "calendar",
2952 "cast", "cauchy_cdf", "cauchy_inv", "cauchy_pdf",
2953 "cauchy_rnd", "caxis", "celldisp", "center", "cgs",
2954 "chisquare_test_homogeneity",
2955 "chisquare_test_independence", "circshift", "cla",
2956 "clabel", "clf", "clock", "cloglog", "closereq",
2957 "colon", "colorbar", "colormap", "colperm",
2958 "comet", "common_size", "commutation_matrix",
2959 "compan", "compare_versions", "compass",
2960 "computer", "cond", "condest", "contour",
2961 "contourc", "contourf", "contrast", "conv",
2962 "convhull", "cool", "copper", "copyfile", "cor",
2963 "corrcoef", "cor_test", "cosd", "cotd", "cov",
2964 "cplxpair", "cross", "cscd", "cstrcat", "csvread",
2965 "csvwrite", "ctime", "cumtrapz", "curl", "cut",
2966 "cylinder", "date", "datenum", "datestr",
2967 "datetick", "datevec", "dblquad", "deal",
2968 "deblank", "deconv", "delaunay", "delaunayn",
2969 "delete", "demo", "detrend", "diffpara", "diffuse",
2970 "dir", "discrete_cdf", "discrete_inv",
2971 "discrete_pdf", "discrete_rnd", "display",
2972 "divergence", "dlmwrite", "dos", "dsearch",
2973 "dsearchn", "duplication_matrix", "durbinlevinson",
2974 "ellipsoid", "empirical_cdf", "empirical_inv",
2975 "empirical_pdf", "empirical_rnd", "eomday",
2976 "errorbar", "etime", "etreeplot", "example",
2977 "expcdf", "expinv", "expm", "exppdf", "exprnd",
2978 "ezcontour", "ezcontourf", "ezmesh", "ezmeshc",
2979 "ezplot", "ezpolar", "ezsurf", "ezsurfc", "factor",
2980 "factorial", "fail", "fcdf", "feather", "fftconv",
2981 "fftfilt", "fftshift", "figure", "fileattrib",
2982 "fileparts", "fill", "findall", "findobj",
2983 "findstr", "finv", "flag", "flipdim", "fliplr",
2984 "flipud", "fpdf", "fplot", "fractdiff", "freqz",
2985 "freqz_plot", "frnd", "fsolve",
2986 "f_test_regression", "ftp", "fullfile", "fzero",
2987 "gamcdf", "gaminv", "gampdf", "gamrnd", "gca",
2988 "gcbf", "gcbo", "gcf", "genvarname", "geocdf",
2989 "geoinv", "geopdf", "geornd", "getfield", "ginput",
2990 "glpk", "gls", "gplot", "gradient",
2991 "graphics_toolkit", "gray", "grid", "griddata",
2992 "griddatan", "gtext", "gunzip", "gzip", "hadamard",
2993 "hamming", "hankel", "hanning", "hggroup",
2994 "hidden", "hilb", "hist", "histc", "hold", "hot",
2995 "hotelling_test", "housh", "hsv", "hurst",
2996 "hygecdf", "hygeinv", "hygepdf", "hygernd",
2997 "idivide", "ifftshift", "image", "imagesc",
2998 "imfinfo", "imread", "imshow", "imwrite", "index",
2999 "info", "inpolygon", "inputname", "interpft",
3000 "interpn", "intersect", "invhilb", "iqr", "isa",
3001 "isdefinite", "isdir", "is_duplicate_entry",
3002 "isequal", "isequalwithequalnans", "isfigure",
3003 "ishermitian", "ishghandle", "is_leap_year",
3004 "isletter", "ismac", "ismember", "ispc", "isprime",
3005 "isprop", "isscalar", "issquare", "isstrprop",
3006 "issymmetric", "isunix", "is_valid_file_id",
3007 "isvector", "jet", "kendall",
3008 "kolmogorov_smirnov_cdf",
3009 "kolmogorov_smirnov_test", "kruskal_wallis_test",
3010 "krylov", "kurtosis", "laplace_cdf", "laplace_inv",
3011 "laplace_pdf", "laplace_rnd", "legend", "legendre",
3012 "license", "line", "linkprop", "list_primes",
3013 "loadaudio", "loadobj", "logistic_cdf",
3014 "logistic_inv", "logistic_pdf", "logistic_rnd",
3015 "logit", "loglog", "loglogerr", "logm", "logncdf",
3016 "logninv", "lognpdf", "lognrnd", "logspace",
3017 "lookfor", "ls_command", "lsqnonneg", "magic",
3018 "mahalanobis", "manova", "matlabroot",
3019 "mcnemar_test", "mean", "meansq", "median", "menu",
3020 "mesh", "meshc", "meshgrid", "meshz", "mexext",
3021 "mget", "mkpp", "mode", "moment", "movefile",
3022 "mpoles", "mput", "namelengthmax", "nargchk",
3023 "nargoutchk", "nbincdf", "nbininv", "nbinpdf",
3024 "nbinrnd", "nchoosek", "ndgrid", "newplot", "news",
3025 "nonzeros", "normcdf", "normest", "norminv",
3026 "normpdf", "normrnd", "now", "nthroot", "null",
3027 "ocean", "ols", "onenormest", "optimget",
3028 "optimset", "orderfields", "orient", "orth",
3029 "pack", "pareto", "parseparams", "pascal", "patch",
3030 "pathdef", "pcg", "pchip", "pcolor", "pcr",
3031 "peaks", "periodogram", "perl", "perms", "pie",
3032 "pink", "planerot", "playaudio", "plot",
3033 "plotmatrix", "plotyy", "poisscdf", "poissinv",
3034 "poisspdf", "poissrnd", "polar", "poly",
3035 "polyaffine", "polyarea", "polyderiv", "polyfit",
3036 "polygcd", "polyint", "polyout", "polyreduce",
3037 "polyval", "polyvalm", "postpad", "powerset",
3038 "ppder", "ppint", "ppjumps", "ppplot", "ppval",
3039 "pqpnonneg", "prepad", "primes", "print",
3040 "print_usage", "prism", "probit", "qp", "qqplot",
3041 "quadcc", "quadgk", "quadl", "quadv", "quiver",
3042 "qzhess", "rainbow", "randi", "range", "rank",
3043 "ranks", "rat", "reallog", "realpow", "realsqrt",
3044 "record", "rectangle_lw", "rectangle_sw",
3045 "rectint", "refresh", "refreshdata",
3046 "regexptranslate", "repmat", "residue", "ribbon",
3047 "rindex", "roots", "rose", "rosser", "rotdim",
3048 "rref", "run", "run_count", "rundemos", "run_test",
3049 "runtests", "saveas", "saveaudio", "saveobj",
3050 "savepath", "scatter", "secd", "semilogx",
3051 "semilogxerr", "semilogy", "semilogyerr",
3052 "setaudio", "setdiff", "setfield", "setxor",
3053 "shading", "shift", "shiftdim", "sign_test",
3054 "sinc", "sind", "sinetone", "sinewave", "skewness",
3055 "slice", "sombrero", "sortrows", "spaugment",
3056 "spconvert", "spdiags", "spearman", "spectral_adf",
3057 "spectral_xdf", "specular", "speed", "spencer",
3058 "speye", "spfun", "sphere", "spinmap", "spline",
3059 "spones", "sprand", "sprandn", "sprandsym",
3060 "spring", "spstats", "spy", "sqp", "stairs",
3061 "statistics", "std", "stdnormal_cdf",
3062 "stdnormal_inv", "stdnormal_pdf", "stdnormal_rnd",
3063 "stem", "stft", "strcat", "strchr", "strjust",
3064 "strmatch", "strread", "strsplit", "strtok",
3065 "strtrim", "strtrunc", "structfun", "studentize",
3066 "subplot", "subsindex", "subspace", "substr",
3067 "substruct", "summer", "surf", "surface", "surfc",
3068 "surfl", "surfnorm", "svds", "swapbytes",
3069 "sylvester_matrix", "symvar", "synthesis", "table",
3070 "tand", "tar", "tcdf", "tempdir", "tempname",
3071 "test", "text", "textread", "textscan", "tinv",
3072 "title", "toeplitz", "tpdf", "trace", "trapz",
3073 "treelayout", "treeplot", "triangle_lw",
3074 "triangle_sw", "tril", "trimesh", "triplequad",
3075 "triplot", "trisurf", "triu", "trnd", "tsearchn",
3076 "t_test", "t_test_regression", "type", "unidcdf",
3077 "unidinv", "unidpdf", "unidrnd", "unifcdf",
3078 "unifinv", "unifpdf", "unifrnd", "union", "unique",
3079 "unix", "unmkpp", "unpack", "untabify", "untar",
3080 "unwrap", "unzip", "u_test", "validatestring",
3081 "vander", "var", "var_test", "vech", "ver",
3082 "version", "view", "voronoi", "voronoin",
3083 "waitforbuttonpress", "wavread", "wavwrite",
3084 "wblcdf", "wblinv", "wblpdf", "wblrnd", "weekday",
3085 "welch_test", "what", "white", "whitebg",
3086 "wienrnd", "wilcoxon_test", "wilkinson", "winter",
3087 "xlabel", "xlim", "ylabel", "yulewalker", "zip",
3088 "zlabel", "z_test")
3090 loadable_kw = (
3091 "airy", "amd", "balance", "besselh", "besseli",
3092 "besselj", "besselk", "bessely", "bitpack",
3093 "bsxfun", "builtin", "ccolamd", "cellfun",
3094 "cellslices", "chol", "choldelete", "cholinsert",
3095 "cholinv", "cholshift", "cholupdate", "colamd",
3096 "colloc", "convhulln", "convn", "csymamd",
3097 "cummax", "cummin", "daspk", "daspk_options",
3098 "dasrt", "dasrt_options", "dassl", "dassl_options",
3099 "dbclear", "dbdown", "dbstack", "dbstatus",
3100 "dbstop", "dbtype", "dbup", "dbwhere", "det",
3101 "dlmread", "dmperm", "dot", "eig", "eigs",
3102 "endgrent", "endpwent", "etree", "fft", "fftn",
3103 "fftw", "filter", "find", "full", "gcd",
3104 "getgrent", "getgrgid", "getgrnam", "getpwent",
3105 "getpwnam", "getpwuid", "getrusage", "givens",
3106 "gmtime", "gnuplot_binary", "hess", "ifft",
3107 "ifftn", "inv", "isdebugmode", "issparse", "kron",
3108 "localtime", "lookup", "lsode", "lsode_options",
3109 "lu", "luinc", "luupdate", "matrix_type", "max",
3110 "min", "mktime", "pinv", "qr", "qrdelete",
3111 "qrinsert", "qrshift", "qrupdate", "quad",
3112 "quad_options", "qz", "rand", "rande", "randg",
3113 "randn", "randp", "randperm", "rcond", "regexp",
3114 "regexpi", "regexprep", "schur", "setgrent",
3115 "setpwent", "sort", "spalloc", "sparse", "spparms",
3116 "sprank", "sqrtm", "strfind", "strftime",
3117 "strptime", "strrep", "svd", "svd_driver", "syl",
3118 "symamd", "symbfact", "symrcm", "time", "tsearch",
3119 "typecast", "urlread", "urlwrite")
3121 mapping_kw = (
3122 "abs", "acos", "acosh", "acot", "acoth", "acsc",
3123 "acsch", "angle", "arg", "asec", "asech", "asin",
3124 "asinh", "atan", "atanh", "beta", "betainc",
3125 "betaln", "bincoeff", "cbrt", "ceil", "conj", "cos",
3126 "cosh", "cot", "coth", "csc", "csch", "erf", "erfc",
3127 "erfcx", "erfinv", "exp", "finite", "fix", "floor",
3128 "fmod", "gamma", "gammainc", "gammaln", "imag",
3129 "isalnum", "isalpha", "isascii", "iscntrl",
3130 "isdigit", "isfinite", "isgraph", "isinf",
3131 "islower", "isna", "isnan", "isprint", "ispunct",
3132 "isspace", "isupper", "isxdigit", "lcm", "lgamma",
3133 "log", "lower", "mod", "real", "rem", "round",
3134 "roundb", "sec", "sech", "sign", "sin", "sinh",
3135 "sqrt", "tan", "tanh", "toascii", "tolower", "xor")
3137 builtin_consts = (
3138 "EDITOR", "EXEC_PATH", "I", "IMAGE_PATH", "NA",
3139 "OCTAVE_HOME", "OCTAVE_VERSION", "PAGER",
3140 "PAGER_FLAGS", "SEEK_CUR", "SEEK_END", "SEEK_SET",
3141 "SIG", "S_ISBLK", "S_ISCHR", "S_ISDIR", "S_ISFIFO",
3142 "S_ISLNK", "S_ISREG", "S_ISSOCK", "WCONTINUE",
3143 "WCOREDUMP", "WEXITSTATUS", "WIFCONTINUED",
3144 "WIFEXITED", "WIFSIGNALED", "WIFSTOPPED", "WNOHANG",
3145 "WSTOPSIG", "WTERMSIG", "WUNTRACED")
3147 tokens = {
3148 'root': [
3149 (r'%\{\s*\n', Comment.Multiline, 'percentblockcomment'),
3150 (r'#\{\s*\n', Comment.Multiline, 'hashblockcomment'),
3151 (r'[%#].*$', Comment),
3152 (r'^\s*function\b', Keyword, 'deffunc'),
3154 # from 'iskeyword' on hg changeset 8cc154f45e37
3155 (words((
3156 '__FILE__', '__LINE__', 'break', 'case', 'catch', 'classdef',
3157 'continue', 'do', 'else', 'elseif', 'end', 'end_try_catch',
3158 'end_unwind_protect', 'endclassdef', 'endevents', 'endfor',
3159 'endfunction', 'endif', 'endmethods', 'endproperties', 'endswitch',
3160 'endwhile', 'events', 'for', 'function', 'get', 'global', 'if',
3161 'methods', 'otherwise', 'persistent', 'properties', 'return',
3162 'set', 'static', 'switch', 'try', 'until', 'unwind_protect',
3163 'unwind_protect_cleanup', 'while'), suffix=r'\b'),
3164 Keyword),
3166 (words(builtin_kw + command_kw + function_kw + loadable_kw + mapping_kw,
3167 suffix=r'\b'), Name.Builtin),
3169 (words(builtin_consts, suffix=r'\b'), Name.Constant),
3171 # operators in Octave but not Matlab:
3172 (r'-=|!=|!|/=|--', Operator),
3173 # operators:
3174 (r'-|==|~=|<|>|<=|>=|&&|&|~|\|\|?', Operator),
3175 # operators in Octave but not Matlab requiring escape for re:
3176 (r'\*=|\+=|\^=|\/=|\\=|\*\*|\+\+|\.\*\*', Operator),
3177 # operators requiring escape for re:
3178 (r'\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\', Operator),
3181 # punctuation:
3182 (r'[\[\](){}:@.,]', Punctuation),
3183 (r'=|:|;', Punctuation),
3185 (r'"[^"]*"', String),
3187 (r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float),
3188 (r'\d+[eEf][+-]?[0-9]+', Number.Float),
3189 (r'\d+', Number.Integer),
3191 # quote can be transpose, instead of string:
3192 # (not great, but handles common cases...)
3193 (r'(?<=[\w)\].])\'+', Operator),
3194 (r'(?<![\w)\].])\'', String, 'string'),
3196 (r'[a-zA-Z_]\w*', Name),
3197 (r'\s+', Text),
3198 (r'.', Text),
3199 ],
3200 'percentblockcomment': [
3201 (r'^\s*%\}', Comment.Multiline, '#pop'),
3202 (r'^.*\n', Comment.Multiline),
3203 (r'.', Comment.Multiline),
3204 ],
3205 'hashblockcomment': [
3206 (r'^\s*#\}', Comment.Multiline, '#pop'),
3207 (r'^.*\n', Comment.Multiline),
3208 (r'.', Comment.Multiline),
3209 ],
3210 'string': [
3211 (r"[^']*'", String, '#pop'),
3212 ],
3213 'deffunc': [
3214 (r'(\s*)(?:(\S+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)',
3215 bygroups(Whitespace, Text, Whitespace, Punctuation,
3216 Whitespace, Name.Function, Punctuation, Text,
3217 Punctuation, Whitespace), '#pop'),
3218 # function with no args
3219 (r'(\s*)([a-zA-Z_]\w*)',
3220 bygroups(Whitespace, Name.Function), '#pop'),
3221 ],
3222 }
3224 def analyse_text(text):
3225 """Octave is quite hard to spot, and it looks like Matlab as well."""
3226 return 0
3229class ScilabLexer(RegexLexer):
3230 """
3231 For Scilab source code.
3233 .. versionadded:: 1.5
3234 """
3235 name = 'Scilab'
3236 url = 'https://www.scilab.org/'
3237 aliases = ['scilab']
3238 filenames = ['*.sci', '*.sce', '*.tst']
3239 mimetypes = ['text/scilab']
3241 tokens = {
3242 'root': [
3243 (r'//.*?$', Comment.Single),
3244 (r'^\s*function\b', Keyword, 'deffunc'),
3246 (words((
3247 '__FILE__', '__LINE__', 'break', 'case', 'catch', 'classdef', 'continue', 'do', 'else',
3248 'elseif', 'end', 'end_try_catch', 'end_unwind_protect', 'endclassdef',
3249 'endevents', 'endfor', 'endfunction', 'endif', 'endmethods', 'endproperties',
3250 'endswitch', 'endwhile', 'events', 'for', 'function', 'get', 'global', 'if', 'methods',
3251 'otherwise', 'persistent', 'properties', 'return', 'set', 'static', 'switch', 'try',
3252 'until', 'unwind_protect', 'unwind_protect_cleanup', 'while'), suffix=r'\b'),
3253 Keyword),
3255 (words(_scilab_builtins.functions_kw +
3256 _scilab_builtins.commands_kw +
3257 _scilab_builtins.macros_kw, suffix=r'\b'), Name.Builtin),
3259 (words(_scilab_builtins.variables_kw, suffix=r'\b'), Name.Constant),
3261 # operators:
3262 (r'-|==|~=|<|>|<=|>=|&&|&|~|\|\|?', Operator),
3263 # operators requiring escape for re:
3264 (r'\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\', Operator),
3266 # punctuation:
3267 (r'[\[\](){}@.,=:;]+', Punctuation),
3269 (r'"[^"]*"', String),
3271 # quote can be transpose, instead of string:
3272 # (not great, but handles common cases...)
3273 (r'(?<=[\w)\].])\'+', Operator),
3274 (r'(?<![\w)\].])\'', String, 'string'),
3276 (r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float),
3277 (r'\d+[eEf][+-]?[0-9]+', Number.Float),
3278 (r'\d+', Number.Integer),
3280 (r'[a-zA-Z_]\w*', Name),
3281 (r'\s+', Whitespace),
3282 (r'.', Text),
3283 ],
3284 'string': [
3285 (r"[^']*'", String, '#pop'),
3286 (r'.', String, '#pop'),
3287 ],
3288 'deffunc': [
3289 (r'(\s*)(?:(\S+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)',
3290 bygroups(Whitespace, Text, Whitespace, Punctuation,
3291 Whitespace, Name.Function, Punctuation, Text,
3292 Punctuation, Whitespace), '#pop'),
3293 # function with no args
3294 (r'(\s*)([a-zA-Z_]\w*)', bygroups(Text, Name.Function), '#pop'),
3295 ],
3296 }
3298 # the following is needed to distinguish Scilab and GAP .tst files
3299 def analyse_text(text):
3300 score = 0.0
3302 # Scilab comments (don't appear in e.g. GAP code)
3303 if re.search(r"^\s*//", text):
3304 score += 0.1
3305 if re.search(r"^\s*/\*", text):
3306 score += 0.1
3308 return min(score, 1.0)