12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293 |
- """
- pygments.lexers.matlab
- ~~~~~~~~~~~~~~~~~~~~~~
- Lexers for Matlab and related languages.
- :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
- :license: BSD, see LICENSE for details.
- """
- import re
- from pygments.lexer import Lexer, RegexLexer, bygroups, default, words, \
- do_insertions, include
- from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
- Number, Punctuation, Generic, Whitespace
- from pygments.lexers import _scilab_builtins
- __all__ = ['MatlabLexer', 'MatlabSessionLexer', 'OctaveLexer', 'ScilabLexer']
- class MatlabLexer(RegexLexer):
- """
- For Matlab source code.
- .. versionadded:: 0.10
- """
- name = 'Matlab'
- aliases = ['matlab']
- filenames = ['*.m']
- mimetypes = ['text/matlab']
- _operators = r'-|==|~=|<=|>=|<|>|&&|&|~|\|\|?|\.\*|\*|\+|\.\^|\.\\|\./|/|\\'
- tokens = {
- 'expressions': [
- # operators:
- (_operators, Operator),
- # numbers (must come before punctuation to handle `.5`; cannot use
- # `\b` due to e.g. `5. + .5`). The negative lookahead on operators
- # avoids including the dot in `1./x` (the dot is part of `./`).
- (r'(?<!\w)((\d+\.\d+)|(\d*\.\d+)|(\d+\.(?!%s)))'
- r'([eEf][+-]?\d+)?(?!\w)' % _operators, Number.Float),
- (r'\b\d+[eEf][+-]?[0-9]+\b', Number.Float),
- (r'\b\d+\b', Number.Integer),
- # punctuation:
- (r'\[|\]|\(|\)|\{|\}|:|@|\.|,', Punctuation),
- (r'=|:|;', Punctuation),
- # quote can be transpose, instead of string:
- # (not great, but handles common cases...)
- (r'(?<=[\w)\].])\'+', Operator),
- (r'"(""|[^"])*"', String),
- (r'(?<![\w)\].])\'', String, 'string'),
- (r'[a-zA-Z_]\w*', Name),
- (r'\s+', Whitespace),
- (r'.', Text),
- ],
- 'root': [
- # line starting with '!' is sent as a system command. not sure what
- # label to use...
- (r'^!.*', String.Other),
- (r'%\{\s*\n', Comment.Multiline, 'blockcomment'),
- (r'%.*$', Comment),
- (r'(\s*^\s*)(function)\b', bygroups(Whitespace, Keyword), 'deffunc'),
- (r'(\s*^\s*)(properties)(\s+)(\()',
- bygroups(Whitespace, Keyword, Whitespace, Punctuation),
- ('defprops', 'propattrs')),
- (r'(\s*^\s*)(properties)\b',
- bygroups(Whitespace, Keyword), 'defprops'),
- # from 'iskeyword' on version 9.4 (R2018a):
- # Check that there is no preceding dot, as keywords are valid field
- # names.
- (words(('break', 'case', 'catch', 'classdef', 'continue',
- 'dynamicprops', 'else', 'elseif', 'end', 'for', 'function',
- 'global', 'if', 'methods', 'otherwise', 'parfor',
- 'persistent', 'return', 'spmd', 'switch',
- 'try', 'while'),
- prefix=r'(?<!\.)(\s*)(', suffix=r')\b'),
- bygroups(Whitespace, Keyword)),
- (
- words(
- [
- # See https://mathworks.com/help/matlab/referencelist.html
- # Below data from 2021-02-10T18:24:08Z
- # for Matlab release R2020b
- "BeginInvoke",
- "COM",
- "Combine",
- "CombinedDatastore",
- "EndInvoke",
- "Execute",
- "FactoryGroup",
- "FactorySetting",
- "Feval",
- "FunctionTestCase",
- "GetCharArray",
- "GetFullMatrix",
- "GetVariable",
- "GetWorkspaceData",
- "GraphPlot",
- "H5.close",
- "H5.garbage_collect",
- "H5.get_libversion",
- "H5.open",
- "H5.set_free_list_limits",
- "H5A.close",
- "H5A.create",
- "H5A.delete",
- "H5A.get_info",
- "H5A.get_name",
- "H5A.get_space",
- "H5A.get_type",
- "H5A.iterate",
- "H5A.open",
- "H5A.open_by_idx",
- "H5A.open_by_name",
- "H5A.read",
- "H5A.write",
- "H5D.close",
- "H5D.create",
- "H5D.get_access_plist",
- "H5D.get_create_plist",
- "H5D.get_offset",
- "H5D.get_space",
- "H5D.get_space_status",
- "H5D.get_storage_size",
- "H5D.get_type",
- "H5D.open",
- "H5D.read",
- "H5D.set_extent",
- "H5D.vlen_get_buf_size",
- "H5D.write",
- "H5DS.attach_scale",
- "H5DS.detach_scale",
- "H5DS.get_label",
- "H5DS.get_num_scales",
- "H5DS.get_scale_name",
- "H5DS.is_scale",
- "H5DS.iterate_scales",
- "H5DS.set_label",
- "H5DS.set_scale",
- "H5E.clear",
- "H5E.get_major",
- "H5E.get_minor",
- "H5E.walk",
- "H5F.close",
- "H5F.create",
- "H5F.flush",
- "H5F.get_access_plist",
- "H5F.get_create_plist",
- "H5F.get_filesize",
- "H5F.get_freespace",
- "H5F.get_info",
- "H5F.get_mdc_config",
- "H5F.get_mdc_hit_rate",
- "H5F.get_mdc_size",
- "H5F.get_name",
- "H5F.get_obj_count",
- "H5F.get_obj_ids",
- "H5F.is_hdf5",
- "H5F.mount",
- "H5F.open",
- "H5F.reopen",
- "H5F.set_mdc_config",
- "H5F.unmount",
- "H5G.close",
- "H5G.create",
- "H5G.get_info",
- "H5G.open",
- "H5I.dec_ref",
- "H5I.get_file_id",
- "H5I.get_name",
- "H5I.get_ref",
- "H5I.get_type",
- "H5I.inc_ref",
- "H5I.is_valid",
- "H5L.copy",
- "H5L.create_external",
- "H5L.create_hard",
- "H5L.create_soft",
- "H5L.delete",
- "H5L.exists",
- "H5L.get_info",
- "H5L.get_name_by_idx",
- "H5L.get_val",
- "H5L.iterate",
- "H5L.iterate_by_name",
- "H5L.move",
- "H5L.visit",
- "H5L.visit_by_name",
- "H5ML.compare_values",
- "H5ML.get_constant_names",
- "H5ML.get_constant_value",
- "H5ML.get_function_names",
- "H5ML.get_mem_datatype",
- "H5O.close",
- "H5O.copy",
- "H5O.get_comment",
- "H5O.get_comment_by_name",
- "H5O.get_info",
- "H5O.link",
- "H5O.open",
- "H5O.open_by_idx",
- "H5O.set_comment",
- "H5O.set_comment_by_name",
- "H5O.visit",
- "H5O.visit_by_name",
- "H5P.all_filters_avail",
- "H5P.close",
- "H5P.close_class",
- "H5P.copy",
- "H5P.create",
- "H5P.equal",
- "H5P.exist",
- "H5P.fill_value_defined",
- "H5P.get",
- "H5P.get_alignment",
- "H5P.get_alloc_time",
- "H5P.get_attr_creation_order",
- "H5P.get_attr_phase_change",
- "H5P.get_btree_ratios",
- "H5P.get_char_encoding",
- "H5P.get_chunk",
- "H5P.get_chunk_cache",
- "H5P.get_class",
- "H5P.get_class_name",
- "H5P.get_class_parent",
- "H5P.get_copy_object",
- "H5P.get_create_intermediate_group",
- "H5P.get_driver",
- "H5P.get_edc_check",
- "H5P.get_external",
- "H5P.get_external_count",
- "H5P.get_family_offset",
- "H5P.get_fapl_core",
- "H5P.get_fapl_family",
- "H5P.get_fapl_multi",
- "H5P.get_fclose_degree",
- "H5P.get_fill_time",
- "H5P.get_fill_value",
- "H5P.get_filter",
- "H5P.get_filter_by_id",
- "H5P.get_gc_references",
- "H5P.get_hyper_vector_size",
- "H5P.get_istore_k",
- "H5P.get_layout",
- "H5P.get_libver_bounds",
- "H5P.get_link_creation_order",
- "H5P.get_link_phase_change",
- "H5P.get_mdc_config",
- "H5P.get_meta_block_size",
- "H5P.get_multi_type",
- "H5P.get_nfilters",
- "H5P.get_nprops",
- "H5P.get_sieve_buf_size",
- "H5P.get_size",
- "H5P.get_sizes",
- "H5P.get_small_data_block_size",
- "H5P.get_sym_k",
- "H5P.get_userblock",
- "H5P.get_version",
- "H5P.isa_class",
- "H5P.iterate",
- "H5P.modify_filter",
- "H5P.remove_filter",
- "H5P.set",
- "H5P.set_alignment",
- "H5P.set_alloc_time",
- "H5P.set_attr_creation_order",
- "H5P.set_attr_phase_change",
- "H5P.set_btree_ratios",
- "H5P.set_char_encoding",
- "H5P.set_chunk",
- "H5P.set_chunk_cache",
- "H5P.set_copy_object",
- "H5P.set_create_intermediate_group",
- "H5P.set_deflate",
- "H5P.set_edc_check",
- "H5P.set_external",
- "H5P.set_family_offset",
- "H5P.set_fapl_core",
- "H5P.set_fapl_family",
- "H5P.set_fapl_log",
- "H5P.set_fapl_multi",
- "H5P.set_fapl_sec2",
- "H5P.set_fapl_split",
- "H5P.set_fapl_stdio",
- "H5P.set_fclose_degree",
- "H5P.set_fill_time",
- "H5P.set_fill_value",
- "H5P.set_filter",
- "H5P.set_fletcher32",
- "H5P.set_gc_references",
- "H5P.set_hyper_vector_size",
- "H5P.set_istore_k",
- "H5P.set_layout",
- "H5P.set_libver_bounds",
- "H5P.set_link_creation_order",
- "H5P.set_link_phase_change",
- "H5P.set_mdc_config",
- "H5P.set_meta_block_size",
- "H5P.set_multi_type",
- "H5P.set_nbit",
- "H5P.set_scaleoffset",
- "H5P.set_shuffle",
- "H5P.set_sieve_buf_size",
- "H5P.set_sizes",
- "H5P.set_small_data_block_size",
- "H5P.set_sym_k",
- "H5P.set_userblock",
- "H5R.create",
- "H5R.dereference",
- "H5R.get_name",
- "H5R.get_obj_type",
- "H5R.get_region",
- "H5S.close",
- "H5S.copy",
- "H5S.create",
- "H5S.create_simple",
- "H5S.extent_copy",
- "H5S.get_select_bounds",
- "H5S.get_select_elem_npoints",
- "H5S.get_select_elem_pointlist",
- "H5S.get_select_hyper_blocklist",
- "H5S.get_select_hyper_nblocks",
- "H5S.get_select_npoints",
- "H5S.get_select_type",
- "H5S.get_simple_extent_dims",
- "H5S.get_simple_extent_ndims",
- "H5S.get_simple_extent_npoints",
- "H5S.get_simple_extent_type",
- "H5S.is_simple",
- "H5S.offset_simple",
- "H5S.select_all",
- "H5S.select_elements",
- "H5S.select_hyperslab",
- "H5S.select_none",
- "H5S.select_valid",
- "H5S.set_extent_none",
- "H5S.set_extent_simple",
- "H5T.array_create",
- "H5T.close",
- "H5T.commit",
- "H5T.committed",
- "H5T.copy",
- "H5T.create",
- "H5T.detect_class",
- "H5T.enum_create",
- "H5T.enum_insert",
- "H5T.enum_nameof",
- "H5T.enum_valueof",
- "H5T.equal",
- "H5T.get_array_dims",
- "H5T.get_array_ndims",
- "H5T.get_class",
- "H5T.get_create_plist",
- "H5T.get_cset",
- "H5T.get_ebias",
- "H5T.get_fields",
- "H5T.get_inpad",
- "H5T.get_member_class",
- "H5T.get_member_index",
- "H5T.get_member_name",
- "H5T.get_member_offset",
- "H5T.get_member_type",
- "H5T.get_member_value",
- "H5T.get_native_type",
- "H5T.get_nmembers",
- "H5T.get_norm",
- "H5T.get_offset",
- "H5T.get_order",
- "H5T.get_pad",
- "H5T.get_precision",
- "H5T.get_sign",
- "H5T.get_size",
- "H5T.get_strpad",
- "H5T.get_super",
- "H5T.get_tag",
- "H5T.insert",
- "H5T.is_variable_str",
- "H5T.lock",
- "H5T.open",
- "H5T.pack",
- "H5T.set_cset",
- "H5T.set_ebias",
- "H5T.set_fields",
- "H5T.set_inpad",
- "H5T.set_norm",
- "H5T.set_offset",
- "H5T.set_order",
- "H5T.set_pad",
- "H5T.set_precision",
- "H5T.set_sign",
- "H5T.set_size",
- "H5T.set_strpad",
- "H5T.set_tag",
- "H5T.vlen_create",
- "H5Z.filter_avail",
- "H5Z.get_filter_info",
- "Inf",
- "KeyValueDatastore",
- "KeyValueStore",
- "MException",
- "MException.last",
- "MaximizeCommandWindow",
- "MemoizedFunction",
- "MinimizeCommandWindow",
- "NET",
- "NET.Assembly",
- "NET.GenericClass",
- "NET.NetException",
- "NET.addAssembly",
- "NET.convertArray",
- "NET.createArray",
- "NET.createGeneric",
- "NET.disableAutoRelease",
- "NET.enableAutoRelease",
- "NET.invokeGenericMethod",
- "NET.isNETSupported",
- "NET.setStaticProperty",
- "NaN",
- "NaT",
- "OperationResult",
- "PutCharArray",
- "PutFullMatrix",
- "PutWorkspaceData",
- "PythonEnvironment",
- "Quit",
- "RandStream",
- "ReleaseCompatibilityException",
- "ReleaseCompatibilityResults",
- "Remove",
- "RemoveAll",
- "Setting",
- "SettingsGroup",
- "TallDatastore",
- "Test",
- "TestResult",
- "Tiff",
- "TransformedDatastore",
- "ValueIterator",
- "VersionResults",
- "VideoReader",
- "VideoWriter",
- "abs",
- "accumarray",
- "acos",
- "acosd",
- "acosh",
- "acot",
- "acotd",
- "acoth",
- "acsc",
- "acscd",
- "acsch",
- "actxGetRunningServer",
- "actxserver",
- "add",
- "addCause",
- "addCorrection",
- "addFile",
- "addFolderIncludingChildFiles",
- "addGroup",
- "addLabel",
- "addPath",
- "addReference",
- "addSetting",
- "addShortcut",
- "addShutdownFile",
- "addStartupFile",
- "addStyle",
- "addToolbarExplorationButtons",
- "addboundary",
- "addcats",
- "addedge",
- "addevent",
- "addlistener",
- "addmulti",
- "addnode",
- "addpath",
- "addpoints",
- "addpref",
- "addprop",
- "addsample",
- "addsampletocollection",
- "addtodate",
- "addts",
- "addvars",
- "adjacency",
- "airy",
- "align",
- "alim",
- "all",
- "allchild",
- "alpha",
- "alphaShape",
- "alphaSpectrum",
- "alphaTriangulation",
- "alphamap",
- "alphanumericBoundary",
- "alphanumericsPattern",
- "amd",
- "analyzeCodeCompatibility",
- "ancestor",
- "angle",
- "animatedline",
- "annotation",
- "ans",
- "any",
- "appdesigner",
- "append",
- "area",
- "arguments",
- "array2table",
- "array2timetable",
- "arrayDatastore",
- "arrayfun",
- "asFewOfPattern",
- "asManyOfPattern",
- "ascii",
- "asec",
- "asecd",
- "asech",
- "asin",
- "asind",
- "asinh",
- "assert",
- "assignin",
- "atan",
- "atan2",
- "atan2d",
- "atand",
- "atanh",
- "audiodevinfo",
- "audiodevreset",
- "audioinfo",
- "audioplayer",
- "audioread",
- "audiorecorder",
- "audiowrite",
- "autumn",
- "axes",
- "axis",
- "axtoolbar",
- "axtoolbarbtn",
- "balance",
- "bandwidth",
- "bar",
- "bar3",
- "bar3h",
- "barh",
- "barycentricToCartesian",
- "base2dec",
- "batchStartupOptionUsed",
- "bctree",
- "beep",
- "bench",
- "besselh",
- "besseli",
- "besselj",
- "besselk",
- "bessely",
- "beta",
- "betainc",
- "betaincinv",
- "betaln",
- "between",
- "bfsearch",
- "bicg",
- "bicgstab",
- "bicgstabl",
- "biconncomp",
- "bin2dec",
- "binary",
- "binscatter",
- "bitand",
- "bitcmp",
- "bitget",
- "bitnot",
- "bitor",
- "bitset",
- "bitshift",
- "bitxor",
- "blanks",
- "ble",
- "blelist",
- "blkdiag",
- "bluetooth",
- "bluetoothlist",
- "bone",
- "boundary",
- "boundaryFacets",
- "boundaryshape",
- "boundingbox",
- "bounds",
- "box",
- "boxchart",
- "brighten",
- "brush",
- "bsxfun",
- "bubblechart",
- "bubblechart3",
- "bubblelegend",
- "bubblelim",
- "bubblesize",
- "builddocsearchdb",
- "builtin",
- "bvp4c",
- "bvp5c",
- "bvpget",
- "bvpinit",
- "bvpset",
- "bvpxtend",
- "caldays",
- "caldiff",
- "calendar",
- "calendarDuration",
- "calllib",
- "calmonths",
- "calquarters",
- "calweeks",
- "calyears",
- "camdolly",
- "cameratoolbar",
- "camlight",
- "camlookat",
- "camorbit",
- "campan",
- "campos",
- "camproj",
- "camroll",
- "camtarget",
- "camup",
- "camva",
- "camzoom",
- "canUseGPU",
- "canUseParallelPool",
- "cart2pol",
- "cart2sph",
- "cartesianToBarycentric",
- "caseInsensitivePattern",
- "caseSensitivePattern",
- "cast",
- "cat",
- "categorical",
- "categories",
- "caxis",
- "cd",
- "cdf2rdf",
- "cdfepoch",
- "cdfinfo",
- "cdflib",
- "cdfread",
- "ceil",
- "cell",
- "cell2mat",
- "cell2struct",
- "cell2table",
- "celldisp",
- "cellfun",
- "cellplot",
- "cellstr",
- "centrality",
- "centroid",
- "cgs",
- "char",
- "characterListPattern",
- "characteristic",
- "checkcode",
- "chol",
- "cholupdate",
- "choose",
- "chooseContextMenu",
- "circshift",
- "circumcenter",
- "cla",
- "clabel",
- "class",
- "classUnderlying",
- "clc",
- "clear",
- "clearAllMemoizedCaches",
- "clearPersonalValue",
- "clearTemporaryValue",
- "clearpoints",
- "clearvars",
- "clf",
- "clibArray",
- "clibConvertArray",
- "clibIsNull",
- "clibIsReadOnly",
- "clibRelease",
- "clibgen.buildInterface",
- "clibgen.generateLibraryDefinition",
- "clipboard",
- "clock",
- "clone",
- "close",
- "closeFile",
- "closereq",
- "cmap2gray",
- "cmpermute",
- "cmunique",
- "codeCompatibilityReport",
- "colamd",
- "collapse",
- "colon",
- "colorbar",
- "colorcube",
- "colormap",
- "colororder",
- "colperm",
- "com.mathworks.engine.MatlabEngine",
- "com.mathworks.matlab.types.CellStr",
- "com.mathworks.matlab.types.Complex",
- "com.mathworks.matlab.types.HandleObject",
- "com.mathworks.matlab.types.Struct",
- "combine",
- "comet",
- "comet3",
- "compan",
- "compass",
- "complex",
- "compose",
- "computer",
- "comserver",
- "cond",
- "condeig",
- "condensation",
- "condest",
- "coneplot",
- "configureCallback",
- "configureTerminator",
- "conj",
- "conncomp",
- "containers.Map",
- "contains",
- "containsrange",
- "contour",
- "contour3",
- "contourc",
- "contourf",
- "contourslice",
- "contrast",
- "conv",
- "conv2",
- "convertCharsToStrings",
- "convertContainedStringsToChars",
- "convertStringsToChars",
- "convertTo",
- "convertvars",
- "convexHull",
- "convhull",
- "convhulln",
- "convn",
- "cool",
- "copper",
- "copyHDU",
- "copyfile",
- "copygraphics",
- "copyobj",
- "corrcoef",
- "cos",
- "cosd",
- "cosh",
- "cospi",
- "cot",
- "cotd",
- "coth",
- "count",
- "countcats",
- "cov",
- "cplxpair",
- "cputime",
- "createCategory",
- "createFile",
- "createImg",
- "createLabel",
- "createTbl",
- "criticalAlpha",
- "cross",
- "csc",
- "cscd",
- "csch",
- "ctranspose",
- "cummax",
- "cummin",
- "cumprod",
- "cumsum",
- "cumtrapz",
- "curl",
- "currentProject",
- "cylinder",
- "daspect",
- "dataTipInteraction",
- "dataTipTextRow",
- "datacursormode",
- "datastore",
- "datatip",
- "date",
- "datenum",
- "dateshift",
- "datestr",
- "datetick",
- "datetime",
- "datevec",
- "day",
- "days",
- "dbclear",
- "dbcont",
- "dbdown",
- "dbmex",
- "dbquit",
- "dbstack",
- "dbstatus",
- "dbstep",
- "dbstop",
- "dbtype",
- "dbup",
- "dde23",
- "ddeget",
- "ddensd",
- "ddesd",
- "ddeset",
- "deblank",
- "dec2base",
- "dec2bin",
- "dec2hex",
- "decic",
- "decomposition",
- "deconv",
- "deg2rad",
- "degree",
- "del2",
- "delaunay",
- "delaunayTriangulation",
- "delaunayn",
- "delete",
- "deleteCol",
- "deleteFile",
- "deleteHDU",
- "deleteKey",
- "deleteRecord",
- "deleteRows",
- "delevent",
- "delimitedTextImportOptions",
- "delsample",
- "delsamplefromcollection",
- "demo",
- "descriptor",
- "det",
- "details",
- "detectImportOptions",
- "detrend",
- "deval",
- "dfsearch",
- "diag",
- "dialog",
- "diary",
- "diff",
- "diffuse",
- "digitBoundary",
- "digitsPattern",
- "digraph",
- "dir",
- "disableDefaultInteractivity",
- "discretize",
- "disp",
- "display",
- "dissect",
- "distances",
- "dither",
- "divergence",
- "dmperm",
- "doc",
- "docsearch",
- "dos",
- "dot",
- "double",
- "drag",
- "dragrect",
- "drawnow",
- "dsearchn",
- "duration",
- "dynamicprops",
- "echo",
- "echodemo",
- "echotcpip",
- "edgeAttachments",
- "edgecount",
- "edges",
- "edit",
- "eig",
- "eigs",
- "ellipj",
- "ellipke",
- "ellipsoid",
- "empty",
- "enableDefaultInteractivity",
- "enableLegacyExplorationModes",
- "enableNETfromNetworkDrive",
- "enableservice",
- "endsWith",
- "enumeration",
- "eomday",
- "eps",
- "eq",
- "equilibrate",
- "erase",
- "eraseBetween",
- "erf",
- "erfc",
- "erfcinv",
- "erfcx",
- "erfinv",
- "error",
- "errorbar",
- "errordlg",
- "etime",
- "etree",
- "etreeplot",
- "eval",
- "evalc",
- "evalin",
- "event.ClassInstanceEvent",
- "event.DynamicPropertyEvent",
- "event.EventData",
- "event.PropertyEvent",
- "event.hasListener",
- "event.listener",
- "event.proplistener",
- "eventlisteners",
- "events",
- "exceltime",
- "exist",
- "exit",
- "exp",
- "expand",
- "expint",
- "expm",
- "expm1",
- "export",
- "export2wsdlg",
- "exportapp",
- "exportgraphics",
- "exportsetupdlg",
- "extract",
- "extractAfter",
- "extractBefore",
- "extractBetween",
- "eye",
- "ezpolar",
- "faceNormal",
- "factor",
- "factorial",
- "false",
- "fclose",
- "fcontour",
- "feather",
- "featureEdges",
- "feof",
- "ferror",
- "feval",
- "fewerbins",
- "fft",
- "fft2",
- "fftn",
- "fftshift",
- "fftw",
- "fgetl",
- "fgets",
- "fieldnames",
- "figure",
- "figurepalette",
- "fileDatastore",
- "fileMode",
- "fileName",
- "fileattrib",
- "filemarker",
- "fileparts",
- "fileread",
- "filesep",
- "fill",
- "fill3",
- "fillmissing",
- "filloutliers",
- "filter",
- "filter2",
- "fimplicit",
- "fimplicit3",
- "find",
- "findCategory",
- "findEvent",
- "findFile",
- "findLabel",
- "findall",
- "findedge",
- "findfigs",
- "findgroups",
- "findnode",
- "findobj",
- "findprop",
- "finish",
- "fitsdisp",
- "fitsinfo",
- "fitsread",
- "fitswrite",
- "fix",
- "fixedWidthImportOptions",
- "flag",
- "flintmax",
- "flip",
- "flipedge",
- "fliplr",
- "flipud",
- "floor",
- "flow",
- "flush",
- "fmesh",
- "fminbnd",
- "fminsearch",
- "fopen",
- "format",
- "fplot",
- "fplot3",
- "fprintf",
- "frame2im",
- "fread",
- "freeBoundary",
- "freqspace",
- "frewind",
- "fscanf",
- "fseek",
- "fsurf",
- "ftell",
- "ftp",
- "full",
- "fullfile",
- "func2str",
- "function_handle",
- "functions",
- "functiontests",
- "funm",
- "fwrite",
- "fzero",
- "gallery",
- "gamma",
- "gammainc",
- "gammaincinv",
- "gammaln",
- "gather",
- "gca",
- "gcbf",
- "gcbo",
- "gcd",
- "gcf",
- "gcmr",
- "gco",
- "genpath",
- "geoaxes",
- "geobasemap",
- "geobubble",
- "geodensityplot",
- "geolimits",
- "geoplot",
- "geoscatter",
- "geotickformat",
- "get",
- "getAColParms",
- "getAxes",
- "getBColParms",
- "getColName",
- "getColType",
- "getColorbar",
- "getConstantValue",
- "getEqColType",
- "getFileFormats",
- "getHDUnum",
- "getHDUtype",
- "getHdrSpace",
- "getImgSize",
- "getImgType",
- "getLayout",
- "getLegend",
- "getMockHistory",
- "getNumCols",
- "getNumHDUs",
- "getNumInputs",
- "getNumInputsImpl",
- "getNumOutputs",
- "getNumOutputsImpl",
- "getNumRows",
- "getOpenFiles",
- "getProfiles",
- "getPropertyGroupsImpl",
- "getReport",
- "getTimeStr",
- "getVersion",
- "getabstime",
- "getappdata",
- "getaudiodata",
- "getdatasamples",
- "getdatasamplesize",
- "getenv",
- "getfield",
- "getframe",
- "getinterpmethod",
- "getnext",
- "getpinstatus",
- "getpixelposition",
- "getplayer",
- "getpoints",
- "getpref",
- "getqualitydesc",
- "getrangefromclass",
- "getsamples",
- "getsampleusingtime",
- "gettimeseriesnames",
- "gettsafteratevent",
- "gettsafterevent",
- "gettsatevent",
- "gettsbeforeatevent",
- "gettsbeforeevent",
- "gettsbetweenevents",
- "getvaropts",
- "ginput",
- "gmres",
- "gobjects",
- "gplot",
- "grabcode",
- "gradient",
- "graph",
- "gray",
- "grid",
- "griddata",
- "griddatan",
- "griddedInterpolant",
- "groot",
- "groupcounts",
- "groupfilter",
- "groupsummary",
- "grouptransform",
- "gsvd",
- "gtext",
- "guidata",
- "guide",
- "guihandles",
- "gunzip",
- "gzip",
- "h5create",
- "h5disp",
- "h5info",
- "h5read",
- "h5readatt",
- "h5write",
- "h5writeatt",
- "hadamard",
- "handle",
- "hankel",
- "hasFactoryValue",
- "hasFrame",
- "hasGroup",
- "hasPersonalValue",
- "hasSetting",
- "hasTemporaryValue",
- "hasdata",
- "hasnext",
- "hdfan",
- "hdfdf24",
- "hdfdfr8",
- "hdfh",
- "hdfhd",
- "hdfhe",
- "hdfhx",
- "hdfinfo",
- "hdfml",
- "hdfpt",
- "hdfread",
- "hdfv",
- "hdfvf",
- "hdfvh",
- "hdfvs",
- "head",
- "heatmap",
- "height",
- "help",
- "helpdlg",
- "hess",
- "hex2dec",
- "hex2num",
- "hgexport",
- "hggroup",
- "hgtransform",
- "hidden",
- "highlight",
- "hilb",
- "histcounts",
- "histcounts2",
- "histogram",
- "histogram2",
- "hms",
- "hold",
- "holes",
- "home",
- "horzcat",
- "hot",
- "hour",
- "hours",
- "hover",
- "hsv",
- "hsv2rgb",
- "hypot",
- "i",
- "ichol",
- "idealfilter",
- "idivide",
- "ifft",
- "ifft2",
- "ifftn",
- "ifftshift",
- "ilu",
- "im2double",
- "im2frame",
- "im2gray",
- "im2java",
- "imag",
- "image",
- "imageDatastore",
- "imagesc",
- "imapprox",
- "imfinfo",
- "imformats",
- "imgCompress",
- "import",
- "importdata",
- "imread",
- "imresize",
- "imshow",
- "imtile",
- "imwrite",
- "inShape",
- "incenter",
- "incidence",
- "ind2rgb",
- "ind2sub",
- "indegree",
- "inedges",
- "infoImpl",
- "inmem",
- "inner2outer",
- "innerjoin",
- "inpolygon",
- "input",
- "inputParser",
- "inputdlg",
- "inputname",
- "insertATbl",
- "insertAfter",
- "insertBTbl",
- "insertBefore",
- "insertCol",
- "insertImg",
- "insertRows",
- "int16",
- "int2str",
- "int32",
- "int64",
- "int8",
- "integral",
- "integral2",
- "integral3",
- "interp1",
- "interp2",
- "interp3",
- "interpft",
- "interpn",
- "interpstreamspeed",
- "intersect",
- "intmax",
- "intmin",
- "inv",
- "invhilb",
- "ipermute",
- "iqr",
- "isCompressedImg",
- "isConnected",
- "isDiscreteStateSpecificationMutableImpl",
- "isDone",
- "isDoneImpl",
- "isInactivePropertyImpl",
- "isInputComplexityMutableImpl",
- "isInputDataTypeMutableImpl",
- "isInputSizeMutableImpl",
- "isInterior",
- "isKey",
- "isLoaded",
- "isLocked",
- "isMATLABReleaseOlderThan",
- "isPartitionable",
- "isShuffleable",
- "isStringScalar",
- "isTunablePropertyDataTypeMutableImpl",
- "isUnderlyingType",
- "isa",
- "isaUnderlying",
- "isappdata",
- "isbanded",
- "isbetween",
- "iscalendarduration",
- "iscategorical",
- "iscategory",
- "iscell",
- "iscellstr",
- "ischange",
- "ischar",
- "iscolumn",
- "iscom",
- "isdag",
- "isdatetime",
- "isdiag",
- "isdst",
- "isduration",
- "isempty",
- "isenum",
- "isequal",
- "isequaln",
- "isevent",
- "isfield",
- "isfile",
- "isfinite",
- "isfloat",
- "isfolder",
- "isgraphics",
- "ishandle",
- "ishermitian",
- "ishold",
- "ishole",
- "isinf",
- "isinteger",
- "isinterface",
- "isinterior",
- "isisomorphic",
- "isjava",
- "iskeyword",
- "isletter",
- "islocalmax",
- "islocalmin",
- "islogical",
- "ismac",
- "ismatrix",
- "ismember",
- "ismembertol",
- "ismethod",
- "ismissing",
- "ismultigraph",
- "isnan",
- "isnat",
- "isnumeric",
- "isobject",
- "isocaps",
- "isocolors",
- "isomorphism",
- "isonormals",
- "isordinal",
- "isosurface",
- "isoutlier",
- "ispc",
- "isplaying",
- "ispref",
- "isprime",
- "isprop",
- "isprotected",
- "isreal",
- "isrecording",
- "isregular",
- "isrow",
- "isscalar",
- "issimplified",
- "issorted",
- "issortedrows",
- "isspace",
- "issparse",
- "isstring",
- "isstrprop",
- "isstruct",
- "isstudent",
- "issymmetric",
- "istable",
- "istall",
- "istimetable",
- "istril",
- "istriu",
- "isundefined",
- "isunix",
- "isvalid",
- "isvarname",
- "isvector",
- "isweekend",
- "j",
- "javaArray",
- "javaMethod",
- "javaMethodEDT",
- "javaObject",
- "javaObjectEDT",
- "javaaddpath",
- "javachk",
- "javaclasspath",
- "javarmpath",
- "jet",
- "join",
- "jsondecode",
- "jsonencode",
- "juliandate",
- "keyboard",
- "keys",
- "kron",
- "labeledge",
- "labelnode",
- "lag",
- "laplacian",
- "lastwarn",
- "layout",
- "lcm",
- "ldl",
- "leapseconds",
- "legend",
- "legendre",
- "length",
- "letterBoundary",
- "lettersPattern",
- "lib.pointer",
- "libfunctions",
- "libfunctionsview",
- "libisloaded",
- "libpointer",
- "libstruct",
- "license",
- "light",
- "lightangle",
- "lighting",
- "lin2mu",
- "line",
- "lineBoundary",
- "lines",
- "linkaxes",
- "linkdata",
- "linkprop",
- "linsolve",
- "linspace",
- "listModifiedFiles",
- "listRequiredFiles",
- "listdlg",
- "listener",
- "listfonts",
- "load",
- "loadObjectImpl",
- "loadlibrary",
- "loadobj",
- "localfunctions",
- "log",
- "log10",
- "log1p",
- "log2",
- "logical",
- "loglog",
- "logm",
- "logspace",
- "lookAheadBoundary",
- "lookBehindBoundary",
- "lookfor",
- "lower",
- "ls",
- "lscov",
- "lsqminnorm",
- "lsqnonneg",
- "lsqr",
- "lu",
- "magic",
- "makehgtform",
- "makima",
- "mapreduce",
- "mapreducer",
- "maskedPattern",
- "mat2cell",
- "mat2str",
- "matches",
- "matchpairs",
- "material",
- "matfile",
- "matlab.System",
- "matlab.addons.disableAddon",
- "matlab.addons.enableAddon",
- "matlab.addons.install",
- "matlab.addons.installedAddons",
- "matlab.addons.isAddonEnabled",
- "matlab.addons.toolbox.installToolbox",
- "matlab.addons.toolbox.installedToolboxes",
- "matlab.addons.toolbox.packageToolbox",
- "matlab.addons.toolbox.toolboxVersion",
- "matlab.addons.toolbox.uninstallToolbox",
- "matlab.addons.uninstall",
- "matlab.apputil.create",
- "matlab.apputil.getInstalledAppInfo",
- "matlab.apputil.install",
- "matlab.apputil.package",
- "matlab.apputil.run",
- "matlab.apputil.uninstall",
- "matlab.codetools.requiredFilesAndProducts",
- "matlab.engine.FutureResult",
- "matlab.engine.MatlabEngine",
- "matlab.engine.connect_matlab",
- "matlab.engine.engineName",
- "matlab.engine.find_matlab",
- "matlab.engine.isEngineShared",
- "matlab.engine.shareEngine",
- "matlab.engine.start_matlab",
- "matlab.exception.JavaException",
- "matlab.exception.PyException",
- "matlab.graphics.chartcontainer.ChartContainer",
- "matlab.graphics.chartcontainer.mixin.Colorbar",
- "matlab.graphics.chartcontainer.mixin.Legend",
- "matlab.io.Datastore",
- "matlab.io.datastore.BlockedFileSet",
- "matlab.io.datastore.DsFileReader",
- "matlab.io.datastore.DsFileSet",
- "matlab.io.datastore.FileSet",
- "matlab.io.datastore.FileWritable",
- "matlab.io.datastore.FoldersPropertyProvider",
- "matlab.io.datastore.HadoopLocationBased",
- "matlab.io.datastore.Partitionable",
- "matlab.io.datastore.Shuffleable",
- "matlab.io.hdf4.sd",
- "matlab.io.hdfeos.gd",
- "matlab.io.hdfeos.sw",
- "matlab.io.saveVariablesToScript",
- "matlab.lang.OnOffSwitchState",
- "matlab.lang.correction.AppendArgumentsCorrection",
- "matlab.lang.correction.ConvertToFunctionNotationCorrection",
- "matlab.lang.correction.ReplaceIdentifierCorrection",
- "matlab.lang.makeUniqueStrings",
- "matlab.lang.makeValidName",
- "matlab.mex.MexHost",
- "matlab.mixin.Copyable",
- "matlab.mixin.CustomDisplay",
- "matlab.mixin.Heterogeneous",
- "matlab.mixin.SetGet",
- "matlab.mixin.SetGetExactNames",
- "matlab.mixin.util.PropertyGroup",
- "matlab.mock.AnyArguments",
- "matlab.mock.InteractionHistory",
- "matlab.mock.InteractionHistory.forMock",
- "matlab.mock.MethodCallBehavior",
- "matlab.mock.PropertyBehavior",
- "matlab.mock.PropertyGetBehavior",
- "matlab.mock.PropertySetBehavior",
- "matlab.mock.TestCase",
- "matlab.mock.actions.AssignOutputs",
- "matlab.mock.actions.DoNothing",
- "matlab.mock.actions.Invoke",
- "matlab.mock.actions.ReturnStoredValue",
- "matlab.mock.actions.StoreValue",
- "matlab.mock.actions.ThrowException",
- "matlab.mock.constraints.Occurred",
- "matlab.mock.constraints.WasAccessed",
- "matlab.mock.constraints.WasCalled",
- "matlab.mock.constraints.WasSet",
- "matlab.net.ArrayFormat",
- "matlab.net.QueryParameter",
- "matlab.net.URI",
- "matlab.net.base64decode",
- "matlab.net.base64encode",
- "matlab.net.http.AuthInfo",
- "matlab.net.http.AuthenticationScheme",
- "matlab.net.http.Cookie",
- "matlab.net.http.CookieInfo",
- "matlab.net.http.Credentials",
- "matlab.net.http.Disposition",
- "matlab.net.http.HTTPException",
- "matlab.net.http.HTTPOptions",
- "matlab.net.http.HeaderField",
- "matlab.net.http.LogRecord",
- "matlab.net.http.MediaType",
- "matlab.net.http.Message",
- "matlab.net.http.MessageBody",
- "matlab.net.http.MessageType",
- "matlab.net.http.ProgressMonitor",
- "matlab.net.http.ProtocolVersion",
- "matlab.net.http.RequestLine",
- "matlab.net.http.RequestMessage",
- "matlab.net.http.RequestMethod",
- "matlab.net.http.ResponseMessage",
- "matlab.net.http.StartLine",
- "matlab.net.http.StatusClass",
- "matlab.net.http.StatusCode",
- "matlab.net.http.StatusLine",
- "matlab.net.http.field.AcceptField",
- "matlab.net.http.field.AuthenticateField",
- "matlab.net.http.field.AuthenticationInfoField",
- "matlab.net.http.field.AuthorizationField",
- "matlab.net.http.field.ContentDispositionField",
- "matlab.net.http.field.ContentLengthField",
- "matlab.net.http.field.ContentLocationField",
- "matlab.net.http.field.ContentTypeField",
- "matlab.net.http.field.CookieField",
- "matlab.net.http.field.DateField",
- "matlab.net.http.field.GenericField",
- "matlab.net.http.field.GenericParameterizedField",
- "matlab.net.http.field.HTTPDateField",
- "matlab.net.http.field.IntegerField",
- "matlab.net.http.field.LocationField",
- "matlab.net.http.field.MediaRangeField",
- "matlab.net.http.field.SetCookieField",
- "matlab.net.http.field.URIReferenceField",
- "matlab.net.http.io.BinaryConsumer",
- "matlab.net.http.io.ContentConsumer",
- "matlab.net.http.io.ContentProvider",
- "matlab.net.http.io.FileConsumer",
- "matlab.net.http.io.FileProvider",
- "matlab.net.http.io.FormProvider",
- "matlab.net.http.io.GenericConsumer",
- "matlab.net.http.io.GenericProvider",
- "matlab.net.http.io.ImageConsumer",
- "matlab.net.http.io.ImageProvider",
- "matlab.net.http.io.JSONConsumer",
- "matlab.net.http.io.JSONProvider",
- "matlab.net.http.io.MultipartConsumer",
- "matlab.net.http.io.MultipartFormProvider",
- "matlab.net.http.io.MultipartProvider",
- "matlab.net.http.io.StringConsumer",
- "matlab.net.http.io.StringProvider",
- "matlab.perftest.FixedTimeExperiment",
- "matlab.perftest.FrequentistTimeExperiment",
- "matlab.perftest.TestCase",
- "matlab.perftest.TimeExperiment",
- "matlab.perftest.TimeResult",
- "matlab.project.Project",
- "matlab.project.convertDefinitionFiles",
- "matlab.project.createProject",
- "matlab.project.deleteProject",
- "matlab.project.loadProject",
- "matlab.project.rootProject",
- "matlab.settings.FactoryGroup.createToolboxGroup",
- "matlab.settings.SettingsFileUpgrader",
- "matlab.settings.loadSettingsCompatibilityResults",
- "matlab.settings.mustBeIntegerScalar",
- "matlab.settings.mustBeLogicalScalar",
- "matlab.settings.mustBeNumericScalar",
- "matlab.settings.mustBeStringScalar",
- "matlab.settings.reloadFactoryFile",
- "matlab.system.mixin.FiniteSource",
- "matlab.tall.blockMovingWindow",
- "matlab.tall.movingWindow",
- "matlab.tall.reduce",
- "matlab.tall.transform",
- "matlab.test.behavior.Missing",
- "matlab.ui.componentcontainer.ComponentContainer",
- "matlab.uitest.TestCase",
- "matlab.uitest.TestCase.forInteractiveUse",
- "matlab.uitest.unlock",
- "matlab.unittest.Test",
- "matlab.unittest.TestCase",
- "matlab.unittest.TestResult",
- "matlab.unittest.TestRunner",
- "matlab.unittest.TestSuite",
- "matlab.unittest.constraints.BooleanConstraint",
- "matlab.unittest.constraints.Constraint",
- "matlab.unittest.constraints.Tolerance",
- "matlab.unittest.diagnostics.ConstraintDiagnostic",
- "matlab.unittest.diagnostics.Diagnostic",
- "matlab.unittest.fixtures.Fixture",
- "matlab.unittest.measurement.DefaultMeasurementResult",
- "matlab.unittest.measurement.MeasurementResult",
- "matlab.unittest.measurement.chart.ComparisonPlot",
- "matlab.unittest.plugins.OutputStream",
- "matlab.unittest.plugins.Parallelizable",
- "matlab.unittest.plugins.QualifyingPlugin",
- "matlab.unittest.plugins.TestRunnerPlugin",
- "matlab.wsdl.createWSDLClient",
- "matlab.wsdl.setWSDLToolPath",
- "matlabRelease",
- "matlabrc",
- "matlabroot",
- "max",
- "maxflow",
- "maxk",
- "mean",
- "median",
- "memmapfile",
- "memoize",
- "memory",
- "mergecats",
- "mergevars",
- "mesh",
- "meshc",
- "meshgrid",
- "meshz",
- "meta.ArrayDimension",
- "meta.DynamicProperty",
- "meta.EnumeratedValue",
- "meta.FixedDimension",
- "meta.MetaData",
- "meta.UnrestrictedDimension",
- "meta.Validation",
- "meta.abstractDetails",
- "meta.class",
- "meta.class.fromName",
- "meta.event",
- "meta.method",
- "meta.package",
- "meta.package.fromName",
- "meta.package.getAllPackages",
- "meta.property",
- "metaclass",
- "methods",
- "methodsview",
- "mex",
- "mexext",
- "mexhost",
- "mfilename",
- "mget",
- "milliseconds",
- "min",
- "mink",
- "minres",
- "minspantree",
- "minute",
- "minutes",
- "mislocked",
- "missing",
- "mkdir",
- "mkpp",
- "mldivide",
- "mlintrpt",
- "mlock",
- "mmfileinfo",
- "mod",
- "mode",
- "month",
- "more",
- "morebins",
- "movAbsHDU",
- "movNamHDU",
- "movRelHDU",
- "move",
- "movefile",
- "movegui",
- "movevars",
- "movie",
- "movmad",
- "movmax",
- "movmean",
- "movmedian",
- "movmin",
- "movprod",
- "movstd",
- "movsum",
- "movvar",
- "mpower",
- "mput",
- "mrdivide",
- "msgbox",
- "mtimes",
- "mu2lin",
- "multibandread",
- "multibandwrite",
- "munlock",
- "mustBeA",
- "mustBeFile",
- "mustBeFinite",
- "mustBeFloat",
- "mustBeFolder",
- "mustBeGreaterThan",
- "mustBeGreaterThanOrEqual",
- "mustBeInRange",
- "mustBeInteger",
- "mustBeLessThan",
- "mustBeLessThanOrEqual",
- "mustBeMember",
- "mustBeNegative",
- "mustBeNonNan",
- "mustBeNonempty",
- "mustBeNonmissing",
- "mustBeNonnegative",
- "mustBeNonpositive",
- "mustBeNonsparse",
- "mustBeNonzero",
- "mustBeNonzeroLengthText",
- "mustBeNumeric",
- "mustBeNumericOrLogical",
- "mustBePositive",
- "mustBeReal",
- "mustBeScalarOrEmpty",
- "mustBeText",
- "mustBeTextScalar",
- "mustBeUnderlyingType",
- "mustBeValidVariableName",
- "mustBeVector",
- "namedPattern",
- "namedargs2cell",
- "namelengthmax",
- "nargin",
- "narginchk",
- "nargout",
- "nargoutchk",
- "native2unicode",
- "nccreate",
- "ncdisp",
- "nchoosek",
- "ncinfo",
- "ncread",
- "ncreadatt",
- "ncwrite",
- "ncwriteatt",
- "ncwriteschema",
- "ndgrid",
- "ndims",
- "nearest",
- "nearestNeighbor",
- "nearestvertex",
- "neighbors",
- "netcdf.abort",
- "netcdf.close",
- "netcdf.copyAtt",
- "netcdf.create",
- "netcdf.defDim",
- "netcdf.defGrp",
- "netcdf.defVar",
- "netcdf.defVarChunking",
- "netcdf.defVarDeflate",
- "netcdf.defVarFill",
- "netcdf.defVarFletcher32",
- "netcdf.delAtt",
- "netcdf.endDef",
- "netcdf.getAtt",
- "netcdf.getChunkCache",
- "netcdf.getConstant",
- "netcdf.getConstantNames",
- "netcdf.getVar",
- "netcdf.inq",
- "netcdf.inqAtt",
- "netcdf.inqAttID",
- "netcdf.inqAttName",
- "netcdf.inqDim",
- "netcdf.inqDimID",
- "netcdf.inqDimIDs",
- "netcdf.inqFormat",
- "netcdf.inqGrpName",
- "netcdf.inqGrpNameFull",
- "netcdf.inqGrpParent",
- "netcdf.inqGrps",
- "netcdf.inqLibVers",
- "netcdf.inqNcid",
- "netcdf.inqUnlimDims",
- "netcdf.inqVar",
- "netcdf.inqVarChunking",
- "netcdf.inqVarDeflate",
- "netcdf.inqVarFill",
- "netcdf.inqVarFletcher32",
- "netcdf.inqVarID",
- "netcdf.inqVarIDs",
- "netcdf.open",
- "netcdf.putAtt",
- "netcdf.putVar",
- "netcdf.reDef",
- "netcdf.renameAtt",
- "netcdf.renameDim",
- "netcdf.renameVar",
- "netcdf.setChunkCache",
- "netcdf.setDefaultFormat",
- "netcdf.setFill",
- "netcdf.sync",
- "newline",
- "newplot",
- "nextpow2",
- "nexttile",
- "nnz",
- "nonzeros",
- "norm",
- "normalize",
- "normest",
- "notify",
- "now",
- "nsidedpoly",
- "nthroot",
- "nufft",
- "nufftn",
- "null",
- "num2cell",
- "num2hex",
- "num2ruler",
- "num2str",
- "numArgumentsFromSubscript",
- "numRegions",
- "numboundaries",
- "numedges",
- "numel",
- "numnodes",
- "numpartitions",
- "numsides",
- "nzmax",
- "ode113",
- "ode15i",
- "ode15s",
- "ode23",
- "ode23s",
- "ode23t",
- "ode23tb",
- "ode45",
- "odeget",
- "odeset",
- "odextend",
- "onCleanup",
- "ones",
- "open",
- "openDiskFile",
- "openFile",
- "openProject",
- "openfig",
- "opengl",
- "openvar",
- "optimget",
- "optimset",
- "optionalPattern",
- "ordeig",
- "orderfields",
- "ordqz",
- "ordschur",
- "orient",
- "orth",
- "outdegree",
- "outedges",
- "outerjoin",
- "overlaps",
- "overlapsrange",
- "pack",
- "pad",
- "padecoef",
- "pagectranspose",
- "pagemtimes",
- "pagetranspose",
- "pan",
- "panInteraction",
- "parallelplot",
- "pareto",
- "parquetDatastore",
- "parquetinfo",
- "parquetread",
- "parquetwrite",
- "partition",
- "parula",
- "pascal",
- "patch",
- "path",
- "pathsep",
- "pathtool",
- "pattern",
- "pause",
- "pbaspect",
- "pcg",
- "pchip",
- "pcode",
- "pcolor",
- "pdepe",
- "pdeval",
- "peaks",
- "perimeter",
- "perl",
- "perms",
- "permute",
- "pi",
- "pie",
- "pie3",
- "pink",
- "pinv",
- "planerot",
- "play",
- "playblocking",
- "plot",
- "plot3",
- "plotbrowser",
- "plotedit",
- "plotmatrix",
- "plottools",
- "plus",
- "pointLocation",
- "pol2cart",
- "polaraxes",
- "polarbubblechart",
- "polarhistogram",
- "polarplot",
- "polarscatter",
- "poly",
- "polyarea",
- "polybuffer",
- "polyder",
- "polyeig",
- "polyfit",
- "polyint",
- "polyshape",
- "polyval",
- "polyvalm",
- "posixtime",
- "possessivePattern",
- "pow2",
- "ppval",
- "predecessors",
- "prefdir",
- "preferences",
- "press",
- "preview",
- "primes",
- "print",
- "printdlg",
- "printopt",
- "printpreview",
- "prism",
- "processInputSpecificationChangeImpl",
- "processTunedPropertiesImpl",
- "prod",
- "profile",
- "propedit",
- "properties",
- "propertyeditor",
- "psi",
- "publish",
- "pwd",
- "pyargs",
- "pyenv",
- "qmr",
- "qr",
- "qrdelete",
- "qrinsert",
- "qrupdate",
- "quad2d",
- "quadgk",
- "quarter",
- "questdlg",
- "quit",
- "quiver",
- "quiver3",
- "qz",
- "rad2deg",
- "rand",
- "randi",
- "randn",
- "randperm",
- "rank",
- "rat",
- "rats",
- "rbbox",
- "rcond",
- "read",
- "readATblHdr",
- "readBTblHdr",
- "readCard",
- "readCol",
- "readFrame",
- "readImg",
- "readKey",
- "readKeyCmplx",
- "readKeyDbl",
- "readKeyLongLong",
- "readKeyLongStr",
- "readKeyUnit",
- "readRecord",
- "readall",
- "readcell",
- "readline",
- "readlines",
- "readmatrix",
- "readstruct",
- "readtable",
- "readtimetable",
- "readvars",
- "real",
- "reallog",
- "realmax",
- "realmin",
- "realpow",
- "realsqrt",
- "record",
- "recordblocking",
- "rectangle",
- "rectint",
- "recycle",
- "reducepatch",
- "reducevolume",
- "refresh",
- "refreshSourceControl",
- "refreshdata",
- "regexp",
- "regexpPattern",
- "regexpi",
- "regexprep",
- "regexptranslate",
- "regionZoomInteraction",
- "regions",
- "registerevent",
- "regmatlabserver",
- "rehash",
- "relationaloperators",
- "release",
- "releaseImpl",
- "reload",
- "rem",
- "remove",
- "removeCategory",
- "removeFile",
- "removeGroup",
- "removeLabel",
- "removePath",
- "removeReference",
- "removeSetting",
- "removeShortcut",
- "removeShutdownFile",
- "removeStartupFile",
- "removeStyle",
- "removeToolbarExplorationButtons",
- "removecats",
- "removets",
- "removevars",
- "rename",
- "renamecats",
- "renamevars",
- "rendererinfo",
- "reordercats",
- "reordernodes",
- "repelem",
- "replace",
- "replaceBetween",
- "repmat",
- "resample",
- "rescale",
- "reset",
- "resetImpl",
- "reshape",
- "residue",
- "restoredefaultpath",
- "resume",
- "rethrow",
- "retime",
- "reverse",
- "rgb2gray",
- "rgb2hsv",
- "rgb2ind",
- "rgbplot",
- "ribbon",
- "rlim",
- "rmappdata",
- "rmboundary",
- "rmdir",
- "rmedge",
- "rmfield",
- "rmholes",
- "rmmissing",
- "rmnode",
- "rmoutliers",
- "rmpath",
- "rmpref",
- "rmprop",
- "rmslivers",
- "rng",
- "roots",
- "rosser",
- "rot90",
- "rotate",
- "rotate3d",
- "rotateInteraction",
- "round",
- "rowfun",
- "rows2vars",
- "rref",
- "rsf2csf",
- "rtickangle",
- "rtickformat",
- "rticklabels",
- "rticks",
- "ruler2num",
- "rulerPanInteraction",
- "run",
- "runChecks",
- "runperf",
- "runtests",
- "save",
- "saveObjectImpl",
- "saveas",
- "savefig",
- "saveobj",
- "savepath",
- "scale",
- "scatter",
- "scatter3",
- "scatteredInterpolant",
- "scatterhistogram",
- "schur",
- "scroll",
- "sec",
- "secd",
- "sech",
- "second",
- "seconds",
- "semilogx",
- "semilogy",
- "sendmail",
- "serialport",
- "serialportlist",
- "set",
- "setBscale",
- "setCompressionType",
- "setDTR",
- "setHCompScale",
- "setHCompSmooth",
- "setProperties",
- "setRTS",
- "setTileDim",
- "setTscale",
- "setabstime",
- "setappdata",
- "setcats",
- "setdiff",
- "setenv",
- "setfield",
- "setinterpmethod",
- "setpixelposition",
- "setpref",
- "settimeseriesnames",
- "settings",
- "setuniformtime",
- "setup",
- "setupImpl",
- "setvaropts",
- "setvartype",
- "setxor",
- "sgtitle",
- "shading",
- "sheetnames",
- "shg",
- "shiftdim",
- "shortestpath",
- "shortestpathtree",
- "showplottool",
- "shrinkfaces",
- "shuffle",
- "sign",
- "simplify",
- "sin",
- "sind",
- "single",
- "sinh",
- "sinpi",
- "size",
- "slice",
- "smooth3",
- "smoothdata",
- "snapnow",
- "sort",
- "sortboundaries",
- "sortregions",
- "sortrows",
- "sortx",
- "sorty",
- "sound",
- "soundsc",
- "spalloc",
- "sparse",
- "spaugment",
- "spconvert",
- "spdiags",
- "specular",
- "speye",
- "spfun",
- "sph2cart",
- "sphere",
- "spinmap",
- "spline",
- "split",
- "splitapply",
- "splitlines",
- "splitvars",
- "spones",
- "spparms",
- "sprand",
- "sprandn",
- "sprandsym",
- "sprank",
- "spreadsheetDatastore",
- "spreadsheetImportOptions",
- "spring",
- "sprintf",
- "spy",
- "sqrt",
- "sqrtm",
- "squeeze",
- "ss2tf",
- "sscanf",
- "stack",
- "stackedplot",
- "stairs",
- "standardizeMissing",
- "start",
- "startat",
- "startsWith",
- "startup",
- "std",
- "stem",
- "stem3",
- "step",
- "stepImpl",
- "stlread",
- "stlwrite",
- "stop",
- "str2double",
- "str2func",
- "str2num",
- "strcat",
- "strcmp",
- "strcmpi",
- "stream2",
- "stream3",
- "streamline",
- "streamparticles",
- "streamribbon",
- "streamslice",
- "streamtube",
- "strfind",
- "string",
- "strings",
- "strip",
- "strjoin",
- "strjust",
- "strlength",
- "strncmp",
- "strncmpi",
- "strrep",
- "strsplit",
- "strtok",
- "strtrim",
- "struct",
- "struct2cell",
- "struct2table",
- "structfun",
- "sub2ind",
- "subgraph",
- "subplot",
- "subsasgn",
- "subscribe",
- "subsindex",
- "subspace",
- "subsref",
- "substruct",
- "subtitle",
- "subtract",
- "subvolume",
- "successors",
- "sum",
- "summary",
- "summer",
- "superclasses",
- "surf",
- "surf2patch",
- "surface",
- "surfaceArea",
- "surfc",
- "surfl",
- "surfnorm",
- "svd",
- "svds",
- "svdsketch",
- "swapbytes",
- "swarmchart",
- "swarmchart3",
- "sylvester",
- "symamd",
- "symbfact",
- "symmlq",
- "symrcm",
- "synchronize",
- "sysobjupdate",
- "system",
- "table",
- "table2array",
- "table2cell",
- "table2struct",
- "table2timetable",
- "tabularTextDatastore",
- "tail",
- "tall",
- "tallrng",
- "tan",
- "tand",
- "tanh",
- "tar",
- "tcpclient",
- "tempdir",
- "tempname",
- "testsuite",
- "tetramesh",
- "texlabel",
- "text",
- "textBoundary",
- "textscan",
- "textwrap",
- "tfqmr",
- "thetalim",
- "thetatickformat",
- "thetaticklabels",
- "thetaticks",
- "thingSpeakRead",
- "thingSpeakWrite",
- "throw",
- "throwAsCaller",
- "tic",
- "tiledlayout",
- "time",
- "timeit",
- "timeofday",
- "timer",
- "timerange",
- "timerfind",
- "timerfindall",
- "timeseries",
- "timetable",
- "timetable2table",
- "timezones",
- "title",
- "toc",
- "todatenum",
- "toeplitz",
- "toolboxdir",
- "topkrows",
- "toposort",
- "trace",
- "transclosure",
- "transform",
- "translate",
- "transpose",
- "transreduction",
- "trapz",
- "treelayout",
- "treeplot",
- "triangulation",
- "tril",
- "trimesh",
- "triplot",
- "trisurf",
- "triu",
- "true",
- "tscollection",
- "tsdata.event",
- "tsearchn",
- "turbo",
- "turningdist",
- "type",
- "typecast",
- "tzoffset",
- "uialert",
- "uiaxes",
- "uibutton",
- "uibuttongroup",
- "uicheckbox",
- "uiconfirm",
- "uicontextmenu",
- "uicontrol",
- "uidatepicker",
- "uidropdown",
- "uieditfield",
- "uifigure",
- "uigauge",
- "uigetdir",
- "uigetfile",
- "uigetpref",
- "uigridlayout",
- "uihtml",
- "uiimage",
- "uiknob",
- "uilabel",
- "uilamp",
- "uilistbox",
- "uimenu",
- "uint16",
- "uint32",
- "uint64",
- "uint8",
- "uiopen",
- "uipanel",
- "uiprogressdlg",
- "uipushtool",
- "uiputfile",
- "uiradiobutton",
- "uiresume",
- "uisave",
- "uisetcolor",
- "uisetfont",
- "uisetpref",
- "uislider",
- "uispinner",
- "uistack",
- "uistyle",
- "uiswitch",
- "uitab",
- "uitabgroup",
- "uitable",
- "uitextarea",
- "uitogglebutton",
- "uitoggletool",
- "uitoolbar",
- "uitree",
- "uitreenode",
- "uiwait",
- "uminus",
- "underlyingType",
- "underlyingValue",
- "unicode2native",
- "union",
- "unique",
- "uniquetol",
- "unix",
- "unloadlibrary",
- "unmesh",
- "unmkpp",
- "unregisterallevents",
- "unregisterevent",
- "unstack",
- "unsubscribe",
- "untar",
- "unwrap",
- "unzip",
- "update",
- "updateDependencies",
- "uplus",
- "upper",
- "usejava",
- "userpath",
- "validateFunctionSignaturesJSON",
- "validateInputsImpl",
- "validatePropertiesImpl",
- "validateattributes",
- "validatecolor",
- "validatestring",
- "values",
- "vander",
- "var",
- "varargin",
- "varargout",
- "varfun",
- "vartype",
- "vecnorm",
- "ver",
- "verLessThan",
- "version",
- "vertcat",
- "vertexAttachments",
- "vertexNormal",
- "view",
- "viewmtx",
- "visdiff",
- "volume",
- "volumebounds",
- "voronoi",
- "voronoiDiagram",
- "voronoin",
- "wait",
- "waitbar",
- "waitfor",
- "waitforbuttonpress",
- "warndlg",
- "warning",
- "waterfall",
- "web",
- "weboptions",
- "webread",
- "websave",
- "webwrite",
- "week",
- "weekday",
- "what",
- "which",
- "whitespaceBoundary",
- "whitespacePattern",
- "who",
- "whos",
- "width",
- "wildcardPattern",
- "wilkinson",
- "winopen",
- "winqueryreg",
- "winter",
- "withinrange",
- "withtol",
- "wordcloud",
- "write",
- "writeChecksum",
- "writeCol",
- "writeComment",
- "writeDate",
- "writeHistory",
- "writeImg",
- "writeKey",
- "writeKeyUnit",
- "writeVideo",
- "writeall",
- "writecell",
- "writeline",
- "writematrix",
- "writestruct",
- "writetable",
- "writetimetable",
- "xcorr",
- "xcov",
- "xlabel",
- "xlim",
- "xline",
- "xmlread",
- "xmlwrite",
- "xor",
- "xslt",
- "xtickangle",
- "xtickformat",
- "xticklabels",
- "xticks",
- "year",
- "years",
- "ylabel",
- "ylim",
- "yline",
- "ymd",
- "ytickangle",
- "ytickformat",
- "yticklabels",
- "yticks",
- "yyaxis",
- "yyyymmdd",
- "zeros",
- "zip",
- "zlabel",
- "zlim",
- "zoom",
- "zoomInteraction",
- "ztickangle",
- "ztickformat",
- "zticklabels",
- "zticks",
- ],
- prefix=r"(?<!\.)(", # Exclude field names
- suffix=r")\b"
- ),
- Name.Builtin
- ),
- # line continuation with following comment:
- (r'(\.\.\.)(.*)$', bygroups(Keyword, Comment)),
- # command form:
- # "How MATLAB Recognizes Command Syntax" specifies that an operator
- # is recognized if it is either surrounded by spaces or by no
- # spaces on both sides (this allows distinguishing `cd ./foo` from
- # `cd ./ foo`.). Here, the regex checks that the first word in the
- # line is not followed by <spaces> and then
- # (equal | open-parenthesis | <operator><space> | <space>).
- (r'(?:^|(?<=;))(\s*)(\w+)(\s+)(?!=|\(|%s\s|\s)' % _operators,
- bygroups(Whitespace, Name, Whitespace), 'commandargs'),
- include('expressions')
- ],
- 'blockcomment': [
- (r'^\s*%\}', Comment.Multiline, '#pop'),
- (r'^.*\n', Comment.Multiline),
- (r'.', Comment.Multiline),
- ],
- 'deffunc': [
- (r'(\s*)(?:(\S+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)',
- bygroups(Whitespace, Text, Whitespace, Punctuation,
- Whitespace, Name.Function, Punctuation, Text,
- Punctuation, Whitespace), '#pop'),
- # function with no args
- (r'(\s*)([a-zA-Z_]\w*)',
- bygroups(Whitespace, Name.Function), '#pop'),
- ],
- 'propattrs': [
- (r'(\w+)(\s*)(=)(\s*)(\d+)',
- bygroups(Name.Builtin, Whitespace, Punctuation, Whitespace,
- Number)),
- (r'(\w+)(\s*)(=)(\s*)([a-zA-Z]\w*)',
- bygroups(Name.Builtin, Whitespace, Punctuation, Whitespace,
- Keyword)),
- (r',', Punctuation),
- (r'\)', Punctuation, '#pop'),
- (r'\s+', Whitespace),
- (r'.', Text),
- ],
- 'defprops': [
- (r'%\{\s*\n', Comment.Multiline, 'blockcomment'),
- (r'%.*$', Comment),
- (r'(?<!\.)end\b', Keyword, '#pop'),
- include('expressions'),
- ],
- 'string': [
- (r"[^']*'", String, '#pop'),
- ],
- 'commandargs': [
- # If an equal sign or other operator is encountered, this
- # isn't a command. It might be a variable assignment or
- # comparison operation with multiple spaces before the
- # equal sign or operator
- (r"=", Punctuation, '#pop'),
- (_operators, Operator, '#pop'),
- (r"[ \t]+", Whitespace),
- ("'[^']*'", String),
- (r"[^';\s]+", String),
- (";", Punctuation, '#pop'),
- default('#pop'),
- ]
- }
- def analyse_text(text):
- # function declaration.
- first_non_comment = next((line for line in text.splitlines()
- if not re.match(r'^\s*%', text)), '').strip()
- if (first_non_comment.startswith('function')
- and '{' not in first_non_comment):
- return 1.
- # comment
- elif re.search(r'^\s*%', text, re.M):
- return 0.2
- # system cmd
- elif re.search(r'^!\w+', text, re.M):
- return 0.2
- line_re = re.compile('.*?\n')
- class MatlabSessionLexer(Lexer):
- """
- For Matlab sessions. Modeled after PythonConsoleLexer.
- Contributed by Ken Schutte <kschutte@csail.mit.edu>.
- .. versionadded:: 0.10
- """
- name = 'Matlab session'
- aliases = ['matlabsession']
- def get_tokens_unprocessed(self, text):
- mlexer = MatlabLexer(**self.options)
- curcode = ''
- insertions = []
- continuation = False
- for match in line_re.finditer(text):
- line = match.group()
- if line.startswith('>> '):
- insertions.append((len(curcode),
- [(0, Generic.Prompt, line[:3])]))
- curcode += line[3:]
- elif line.startswith('>>'):
- insertions.append((len(curcode),
- [(0, Generic.Prompt, line[:2])]))
- curcode += line[2:]
- elif line.startswith('???'):
- idx = len(curcode)
- # without is showing error on same line as before...?
- # line = "\n" + line
- token = (0, Generic.Traceback, line)
- insertions.append((idx, [token]))
- elif continuation:
- # line_start is the length of the most recent prompt symbol
- line_start = len(insertions[-1][-1][-1])
- # Set leading spaces with the length of the prompt to be a generic prompt
- # This keeps code aligned when prompts are removed, say with some Javascript
- if line.startswith(' '*line_start):
- insertions.append(
- (len(curcode), [(0, Generic.Prompt, line[:line_start])]))
- curcode += line[line_start:]
- else:
- curcode += line
- else:
- if curcode:
- yield from do_insertions(
- insertions, mlexer.get_tokens_unprocessed(curcode))
- curcode = ''
- insertions = []
- yield match.start(), Generic.Output, line
- # Does not allow continuation if a comment is included after the ellipses.
- # Continues any line that ends with ..., even comments (lines that start with %)
- if line.strip().endswith('...'):
- continuation = True
- else:
- continuation = False
- if curcode: # or item:
- yield from do_insertions(
- insertions, mlexer.get_tokens_unprocessed(curcode))
- class OctaveLexer(RegexLexer):
- """
- For GNU Octave source code.
- .. versionadded:: 1.5
- """
- name = 'Octave'
- aliases = ['octave']
- filenames = ['*.m']
- mimetypes = ['text/octave']
- # These lists are generated automatically.
- # Run the following in bash shell:
- #
- # First dump all of the Octave manual into a plain text file:
- #
- # $ info octave --subnodes -o octave-manual
- #
- # Now grep through it:
- # for i in \
- # "Built-in Function" "Command" "Function File" \
- # "Loadable Function" "Mapping Function";
- # do
- # perl -e '@name = qw('"$i"');
- # print lc($name[0]),"_kw = [\n"';
- #
- # perl -n -e 'print "\"$1\",\n" if /-- '"$i"': .* (\w*) \(/;' \
- # octave-manual | sort | uniq ;
- # echo "]" ;
- # echo;
- # done
- # taken from Octave Mercurial changeset 8cc154f45e37 (30-jan-2011)
- builtin_kw = (
- "addlistener", "addpath", "addproperty", "all",
- "and", "any", "argnames", "argv", "assignin",
- "atexit", "autoload",
- "available_graphics_toolkits", "beep_on_error",
- "bitand", "bitmax", "bitor", "bitshift", "bitxor",
- "cat", "cell", "cellstr", "char", "class", "clc",
- "columns", "command_line_path",
- "completion_append_char", "completion_matches",
- "complex", "confirm_recursive_rmdir", "cputime",
- "crash_dumps_octave_core", "ctranspose", "cumprod",
- "cumsum", "debug_on_error", "debug_on_interrupt",
- "debug_on_warning", "default_save_options",
- "dellistener", "diag", "diff", "disp",
- "doc_cache_file", "do_string_escapes", "double",
- "drawnow", "e", "echo_executing_commands", "eps",
- "eq", "errno", "errno_list", "error", "eval",
- "evalin", "exec", "exist", "exit", "eye", "false",
- "fclear", "fclose", "fcntl", "fdisp", "feof",
- "ferror", "feval", "fflush", "fgetl", "fgets",
- "fieldnames", "file_in_loadpath", "file_in_path",
- "filemarker", "filesep", "find_dir_in_path",
- "fixed_point_format", "fnmatch", "fopen", "fork",
- "formula", "fprintf", "fputs", "fread", "freport",
- "frewind", "fscanf", "fseek", "fskipl", "ftell",
- "functions", "fwrite", "ge", "genpath", "get",
- "getegid", "getenv", "geteuid", "getgid",
- "getpgrp", "getpid", "getppid", "getuid", "glob",
- "gt", "gui_mode", "history_control",
- "history_file", "history_size",
- "history_timestamp_format_string", "home",
- "horzcat", "hypot", "ifelse",
- "ignore_function_time_stamp", "inferiorto",
- "info_file", "info_program", "inline", "input",
- "intmax", "intmin", "ipermute",
- "is_absolute_filename", "isargout", "isbool",
- "iscell", "iscellstr", "ischar", "iscomplex",
- "isempty", "isfield", "isfloat", "isglobal",
- "ishandle", "isieee", "isindex", "isinteger",
- "islogical", "ismatrix", "ismethod", "isnull",
- "isnumeric", "isobject", "isreal",
- "is_rooted_relative_filename", "issorted",
- "isstruct", "isvarname", "kbhit", "keyboard",
- "kill", "lasterr", "lasterror", "lastwarn",
- "ldivide", "le", "length", "link", "linspace",
- "logical", "lstat", "lt", "make_absolute_filename",
- "makeinfo_program", "max_recursion_depth", "merge",
- "methods", "mfilename", "minus", "mislocked",
- "mkdir", "mkfifo", "mkstemp", "mldivide", "mlock",
- "mouse_wheel_zoom", "mpower", "mrdivide", "mtimes",
- "munlock", "nargin", "nargout",
- "native_float_format", "ndims", "ne", "nfields",
- "nnz", "norm", "not", "numel", "nzmax",
- "octave_config_info", "octave_core_file_limit",
- "octave_core_file_name",
- "octave_core_file_options", "ones", "or",
- "output_max_field_width", "output_precision",
- "page_output_immediately", "page_screen_output",
- "path", "pathsep", "pause", "pclose", "permute",
- "pi", "pipe", "plus", "popen", "power",
- "print_empty_dimensions", "printf",
- "print_struct_array_contents", "prod",
- "program_invocation_name", "program_name",
- "putenv", "puts", "pwd", "quit", "rats", "rdivide",
- "readdir", "readlink", "read_readline_init_file",
- "realmax", "realmin", "rehash", "rename",
- "repelems", "re_read_readline_init_file", "reset",
- "reshape", "resize", "restoredefaultpath",
- "rethrow", "rmdir", "rmfield", "rmpath", "rows",
- "save_header_format_string", "save_precision",
- "saving_history", "scanf", "set", "setenv",
- "shell_cmd", "sighup_dumps_octave_core",
- "sigterm_dumps_octave_core", "silent_functions",
- "single", "size", "size_equal", "sizemax",
- "sizeof", "sleep", "source", "sparse_auto_mutate",
- "split_long_rows", "sprintf", "squeeze", "sscanf",
- "stat", "stderr", "stdin", "stdout", "strcmp",
- "strcmpi", "string_fill_char", "strncmp",
- "strncmpi", "struct", "struct_levels_to_print",
- "strvcat", "subsasgn", "subsref", "sum", "sumsq",
- "superiorto", "suppress_verbose_help_message",
- "symlink", "system", "tic", "tilde_expand",
- "times", "tmpfile", "tmpnam", "toc", "toupper",
- "transpose", "true", "typeinfo", "umask", "uminus",
- "uname", "undo_string_escapes", "unlink", "uplus",
- "upper", "usage", "usleep", "vec", "vectorize",
- "vertcat", "waitpid", "warning", "warranty",
- "whos_line_format", "yes_or_no", "zeros",
- "inf", "Inf", "nan", "NaN")
- command_kw = ("close", "load", "who", "whos")
- function_kw = (
- "accumarray", "accumdim", "acosd", "acotd",
- "acscd", "addtodate", "allchild", "ancestor",
- "anova", "arch_fit", "arch_rnd", "arch_test",
- "area", "arma_rnd", "arrayfun", "ascii", "asctime",
- "asecd", "asind", "assert", "atand",
- "autoreg_matrix", "autumn", "axes", "axis", "bar",
- "barh", "bartlett", "bartlett_test", "beep",
- "betacdf", "betainv", "betapdf", "betarnd",
- "bicgstab", "bicubic", "binary", "binocdf",
- "binoinv", "binopdf", "binornd", "bitcmp",
- "bitget", "bitset", "blackman", "blanks",
- "blkdiag", "bone", "box", "brighten", "calendar",
- "cast", "cauchy_cdf", "cauchy_inv", "cauchy_pdf",
- "cauchy_rnd", "caxis", "celldisp", "center", "cgs",
- "chisquare_test_homogeneity",
- "chisquare_test_independence", "circshift", "cla",
- "clabel", "clf", "clock", "cloglog", "closereq",
- "colon", "colorbar", "colormap", "colperm",
- "comet", "common_size", "commutation_matrix",
- "compan", "compare_versions", "compass",
- "computer", "cond", "condest", "contour",
- "contourc", "contourf", "contrast", "conv",
- "convhull", "cool", "copper", "copyfile", "cor",
- "corrcoef", "cor_test", "cosd", "cotd", "cov",
- "cplxpair", "cross", "cscd", "cstrcat", "csvread",
- "csvwrite", "ctime", "cumtrapz", "curl", "cut",
- "cylinder", "date", "datenum", "datestr",
- "datetick", "datevec", "dblquad", "deal",
- "deblank", "deconv", "delaunay", "delaunayn",
- "delete", "demo", "detrend", "diffpara", "diffuse",
- "dir", "discrete_cdf", "discrete_inv",
- "discrete_pdf", "discrete_rnd", "display",
- "divergence", "dlmwrite", "dos", "dsearch",
- "dsearchn", "duplication_matrix", "durbinlevinson",
- "ellipsoid", "empirical_cdf", "empirical_inv",
- "empirical_pdf", "empirical_rnd", "eomday",
- "errorbar", "etime", "etreeplot", "example",
- "expcdf", "expinv", "expm", "exppdf", "exprnd",
- "ezcontour", "ezcontourf", "ezmesh", "ezmeshc",
- "ezplot", "ezpolar", "ezsurf", "ezsurfc", "factor",
- "factorial", "fail", "fcdf", "feather", "fftconv",
- "fftfilt", "fftshift", "figure", "fileattrib",
- "fileparts", "fill", "findall", "findobj",
- "findstr", "finv", "flag", "flipdim", "fliplr",
- "flipud", "fpdf", "fplot", "fractdiff", "freqz",
- "freqz_plot", "frnd", "fsolve",
- "f_test_regression", "ftp", "fullfile", "fzero",
- "gamcdf", "gaminv", "gampdf", "gamrnd", "gca",
- "gcbf", "gcbo", "gcf", "genvarname", "geocdf",
- "geoinv", "geopdf", "geornd", "getfield", "ginput",
- "glpk", "gls", "gplot", "gradient",
- "graphics_toolkit", "gray", "grid", "griddata",
- "griddatan", "gtext", "gunzip", "gzip", "hadamard",
- "hamming", "hankel", "hanning", "hggroup",
- "hidden", "hilb", "hist", "histc", "hold", "hot",
- "hotelling_test", "housh", "hsv", "hurst",
- "hygecdf", "hygeinv", "hygepdf", "hygernd",
- "idivide", "ifftshift", "image", "imagesc",
- "imfinfo", "imread", "imshow", "imwrite", "index",
- "info", "inpolygon", "inputname", "interpft",
- "interpn", "intersect", "invhilb", "iqr", "isa",
- "isdefinite", "isdir", "is_duplicate_entry",
- "isequal", "isequalwithequalnans", "isfigure",
- "ishermitian", "ishghandle", "is_leap_year",
- "isletter", "ismac", "ismember", "ispc", "isprime",
- "isprop", "isscalar", "issquare", "isstrprop",
- "issymmetric", "isunix", "is_valid_file_id",
- "isvector", "jet", "kendall",
- "kolmogorov_smirnov_cdf",
- "kolmogorov_smirnov_test", "kruskal_wallis_test",
- "krylov", "kurtosis", "laplace_cdf", "laplace_inv",
- "laplace_pdf", "laplace_rnd", "legend", "legendre",
- "license", "line", "linkprop", "list_primes",
- "loadaudio", "loadobj", "logistic_cdf",
- "logistic_inv", "logistic_pdf", "logistic_rnd",
- "logit", "loglog", "loglogerr", "logm", "logncdf",
- "logninv", "lognpdf", "lognrnd", "logspace",
- "lookfor", "ls_command", "lsqnonneg", "magic",
- "mahalanobis", "manova", "matlabroot",
- "mcnemar_test", "mean", "meansq", "median", "menu",
- "mesh", "meshc", "meshgrid", "meshz", "mexext",
- "mget", "mkpp", "mode", "moment", "movefile",
- "mpoles", "mput", "namelengthmax", "nargchk",
- "nargoutchk", "nbincdf", "nbininv", "nbinpdf",
- "nbinrnd", "nchoosek", "ndgrid", "newplot", "news",
- "nonzeros", "normcdf", "normest", "norminv",
- "normpdf", "normrnd", "now", "nthroot", "null",
- "ocean", "ols", "onenormest", "optimget",
- "optimset", "orderfields", "orient", "orth",
- "pack", "pareto", "parseparams", "pascal", "patch",
- "pathdef", "pcg", "pchip", "pcolor", "pcr",
- "peaks", "periodogram", "perl", "perms", "pie",
- "pink", "planerot", "playaudio", "plot",
- "plotmatrix", "plotyy", "poisscdf", "poissinv",
- "poisspdf", "poissrnd", "polar", "poly",
- "polyaffine", "polyarea", "polyderiv", "polyfit",
- "polygcd", "polyint", "polyout", "polyreduce",
- "polyval", "polyvalm", "postpad", "powerset",
- "ppder", "ppint", "ppjumps", "ppplot", "ppval",
- "pqpnonneg", "prepad", "primes", "print",
- "print_usage", "prism", "probit", "qp", "qqplot",
- "quadcc", "quadgk", "quadl", "quadv", "quiver",
- "qzhess", "rainbow", "randi", "range", "rank",
- "ranks", "rat", "reallog", "realpow", "realsqrt",
- "record", "rectangle_lw", "rectangle_sw",
- "rectint", "refresh", "refreshdata",
- "regexptranslate", "repmat", "residue", "ribbon",
- "rindex", "roots", "rose", "rosser", "rotdim",
- "rref", "run", "run_count", "rundemos", "run_test",
- "runtests", "saveas", "saveaudio", "saveobj",
- "savepath", "scatter", "secd", "semilogx",
- "semilogxerr", "semilogy", "semilogyerr",
- "setaudio", "setdiff", "setfield", "setxor",
- "shading", "shift", "shiftdim", "sign_test",
- "sinc", "sind", "sinetone", "sinewave", "skewness",
- "slice", "sombrero", "sortrows", "spaugment",
- "spconvert", "spdiags", "spearman", "spectral_adf",
- "spectral_xdf", "specular", "speed", "spencer",
- "speye", "spfun", "sphere", "spinmap", "spline",
- "spones", "sprand", "sprandn", "sprandsym",
- "spring", "spstats", "spy", "sqp", "stairs",
- "statistics", "std", "stdnormal_cdf",
- "stdnormal_inv", "stdnormal_pdf", "stdnormal_rnd",
- "stem", "stft", "strcat", "strchr", "strjust",
- "strmatch", "strread", "strsplit", "strtok",
- "strtrim", "strtrunc", "structfun", "studentize",
- "subplot", "subsindex", "subspace", "substr",
- "substruct", "summer", "surf", "surface", "surfc",
- "surfl", "surfnorm", "svds", "swapbytes",
- "sylvester_matrix", "symvar", "synthesis", "table",
- "tand", "tar", "tcdf", "tempdir", "tempname",
- "test", "text", "textread", "textscan", "tinv",
- "title", "toeplitz", "tpdf", "trace", "trapz",
- "treelayout", "treeplot", "triangle_lw",
- "triangle_sw", "tril", "trimesh", "triplequad",
- "triplot", "trisurf", "triu", "trnd", "tsearchn",
- "t_test", "t_test_regression", "type", "unidcdf",
- "unidinv", "unidpdf", "unidrnd", "unifcdf",
- "unifinv", "unifpdf", "unifrnd", "union", "unique",
- "unix", "unmkpp", "unpack", "untabify", "untar",
- "unwrap", "unzip", "u_test", "validatestring",
- "vander", "var", "var_test", "vech", "ver",
- "version", "view", "voronoi", "voronoin",
- "waitforbuttonpress", "wavread", "wavwrite",
- "wblcdf", "wblinv", "wblpdf", "wblrnd", "weekday",
- "welch_test", "what", "white", "whitebg",
- "wienrnd", "wilcoxon_test", "wilkinson", "winter",
- "xlabel", "xlim", "ylabel", "yulewalker", "zip",
- "zlabel", "z_test")
- loadable_kw = (
- "airy", "amd", "balance", "besselh", "besseli",
- "besselj", "besselk", "bessely", "bitpack",
- "bsxfun", "builtin", "ccolamd", "cellfun",
- "cellslices", "chol", "choldelete", "cholinsert",
- "cholinv", "cholshift", "cholupdate", "colamd",
- "colloc", "convhulln", "convn", "csymamd",
- "cummax", "cummin", "daspk", "daspk_options",
- "dasrt", "dasrt_options", "dassl", "dassl_options",
- "dbclear", "dbdown", "dbstack", "dbstatus",
- "dbstop", "dbtype", "dbup", "dbwhere", "det",
- "dlmread", "dmperm", "dot", "eig", "eigs",
- "endgrent", "endpwent", "etree", "fft", "fftn",
- "fftw", "filter", "find", "full", "gcd",
- "getgrent", "getgrgid", "getgrnam", "getpwent",
- "getpwnam", "getpwuid", "getrusage", "givens",
- "gmtime", "gnuplot_binary", "hess", "ifft",
- "ifftn", "inv", "isdebugmode", "issparse", "kron",
- "localtime", "lookup", "lsode", "lsode_options",
- "lu", "luinc", "luupdate", "matrix_type", "max",
- "min", "mktime", "pinv", "qr", "qrdelete",
- "qrinsert", "qrshift", "qrupdate", "quad",
- "quad_options", "qz", "rand", "rande", "randg",
- "randn", "randp", "randperm", "rcond", "regexp",
- "regexpi", "regexprep", "schur", "setgrent",
- "setpwent", "sort", "spalloc", "sparse", "spparms",
- "sprank", "sqrtm", "strfind", "strftime",
- "strptime", "strrep", "svd", "svd_driver", "syl",
- "symamd", "symbfact", "symrcm", "time", "tsearch",
- "typecast", "urlread", "urlwrite")
- mapping_kw = (
- "abs", "acos", "acosh", "acot", "acoth", "acsc",
- "acsch", "angle", "arg", "asec", "asech", "asin",
- "asinh", "atan", "atanh", "beta", "betainc",
- "betaln", "bincoeff", "cbrt", "ceil", "conj", "cos",
- "cosh", "cot", "coth", "csc", "csch", "erf", "erfc",
- "erfcx", "erfinv", "exp", "finite", "fix", "floor",
- "fmod", "gamma", "gammainc", "gammaln", "imag",
- "isalnum", "isalpha", "isascii", "iscntrl",
- "isdigit", "isfinite", "isgraph", "isinf",
- "islower", "isna", "isnan", "isprint", "ispunct",
- "isspace", "isupper", "isxdigit", "lcm", "lgamma",
- "log", "lower", "mod", "real", "rem", "round",
- "roundb", "sec", "sech", "sign", "sin", "sinh",
- "sqrt", "tan", "tanh", "toascii", "tolower", "xor")
- builtin_consts = (
- "EDITOR", "EXEC_PATH", "I", "IMAGE_PATH", "NA",
- "OCTAVE_HOME", "OCTAVE_VERSION", "PAGER",
- "PAGER_FLAGS", "SEEK_CUR", "SEEK_END", "SEEK_SET",
- "SIG", "S_ISBLK", "S_ISCHR", "S_ISDIR", "S_ISFIFO",
- "S_ISLNK", "S_ISREG", "S_ISSOCK", "WCONTINUE",
- "WCOREDUMP", "WEXITSTATUS", "WIFCONTINUED",
- "WIFEXITED", "WIFSIGNALED", "WIFSTOPPED", "WNOHANG",
- "WSTOPSIG", "WTERMSIG", "WUNTRACED")
- tokens = {
- 'root': [
- (r'%\{\s*\n', Comment.Multiline, 'percentblockcomment'),
- (r'#\{\s*\n', Comment.Multiline, 'hashblockcomment'),
- (r'[%#].*$', Comment),
- (r'^\s*function\b', Keyword, 'deffunc'),
- # from 'iskeyword' on hg changeset 8cc154f45e37
- (words((
- '__FILE__', '__LINE__', 'break', 'case', 'catch', 'classdef',
- 'continue', 'do', 'else', 'elseif', 'end', 'end_try_catch',
- 'end_unwind_protect', 'endclassdef', 'endevents', 'endfor',
- 'endfunction', 'endif', 'endmethods', 'endproperties', 'endswitch',
- 'endwhile', 'events', 'for', 'function', 'get', 'global', 'if',
- 'methods', 'otherwise', 'persistent', 'properties', 'return',
- 'set', 'static', 'switch', 'try', 'until', 'unwind_protect',
- 'unwind_protect_cleanup', 'while'), suffix=r'\b'),
- Keyword),
- (words(builtin_kw + command_kw + function_kw + loadable_kw + mapping_kw,
- suffix=r'\b'), Name.Builtin),
- (words(builtin_consts, suffix=r'\b'), Name.Constant),
- # operators in Octave but not Matlab:
- (r'-=|!=|!|/=|--', Operator),
- # operators:
- (r'-|==|~=|<|>|<=|>=|&&|&|~|\|\|?', Operator),
- # operators in Octave but not Matlab requiring escape for re:
- (r'\*=|\+=|\^=|\/=|\\=|\*\*|\+\+|\.\*\*', Operator),
- # operators requiring escape for re:
- (r'\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\', Operator),
- # punctuation:
- (r'[\[\](){}:@.,]', Punctuation),
- (r'=|:|;', Punctuation),
- (r'"[^"]*"', String),
- (r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float),
- (r'\d+[eEf][+-]?[0-9]+', Number.Float),
- (r'\d+', Number.Integer),
- # quote can be transpose, instead of string:
- # (not great, but handles common cases...)
- (r'(?<=[\w)\].])\'+', Operator),
- (r'(?<![\w)\].])\'', String, 'string'),
- (r'[a-zA-Z_]\w*', Name),
- (r'\s+', Text),
- (r'.', Text),
- ],
- 'percentblockcomment': [
- (r'^\s*%\}', Comment.Multiline, '#pop'),
- (r'^.*\n', Comment.Multiline),
- (r'.', Comment.Multiline),
- ],
- 'hashblockcomment': [
- (r'^\s*#\}', Comment.Multiline, '#pop'),
- (r'^.*\n', Comment.Multiline),
- (r'.', Comment.Multiline),
- ],
- 'string': [
- (r"[^']*'", String, '#pop'),
- ],
- 'deffunc': [
- (r'(\s*)(?:(\S+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)',
- bygroups(Whitespace, Text, Whitespace, Punctuation,
- Whitespace, Name.Function, Punctuation, Text,
- Punctuation, Whitespace), '#pop'),
- # function with no args
- (r'(\s*)([a-zA-Z_]\w*)',
- bygroups(Whitespace, Name.Function), '#pop'),
- ],
- }
- def analyse_text(text):
- """Octave is quite hard to spot, and it looks like Matlab as well."""
- return 0
- class ScilabLexer(RegexLexer):
- """
- For Scilab source code.
- .. versionadded:: 1.5
- """
- name = 'Scilab'
- aliases = ['scilab']
- filenames = ['*.sci', '*.sce', '*.tst']
- mimetypes = ['text/scilab']
- tokens = {
- 'root': [
- (r'//.*?$', Comment.Single),
- (r'^\s*function\b', Keyword, 'deffunc'),
- (words((
- '__FILE__', '__LINE__', 'break', 'case', 'catch', 'classdef', 'continue', 'do', 'else',
- 'elseif', 'end', 'end_try_catch', 'end_unwind_protect', 'endclassdef',
- 'endevents', 'endfor', 'endfunction', 'endif', 'endmethods', 'endproperties',
- 'endswitch', 'endwhile', 'events', 'for', 'function', 'get', 'global', 'if', 'methods',
- 'otherwise', 'persistent', 'properties', 'return', 'set', 'static', 'switch', 'try',
- 'until', 'unwind_protect', 'unwind_protect_cleanup', 'while'), suffix=r'\b'),
- Keyword),
- (words(_scilab_builtins.functions_kw +
- _scilab_builtins.commands_kw +
- _scilab_builtins.macros_kw, suffix=r'\b'), Name.Builtin),
- (words(_scilab_builtins.variables_kw, suffix=r'\b'), Name.Constant),
- # operators:
- (r'-|==|~=|<|>|<=|>=|&&|&|~|\|\|?', Operator),
- # operators requiring escape for re:
- (r'\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\', Operator),
- # punctuation:
- (r'[\[\](){}@.,=:;]', Punctuation),
- (r'"[^"]*"', String),
- # quote can be transpose, instead of string:
- # (not great, but handles common cases...)
- (r'(?<=[\w)\].])\'+', Operator),
- (r'(?<![\w)\].])\'', String, 'string'),
- (r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float),
- (r'\d+[eEf][+-]?[0-9]+', Number.Float),
- (r'\d+', Number.Integer),
- (r'[a-zA-Z_]\w*', Name),
- (r'.', Text),
- ],
- 'string': [
- (r"[^']*'", String, '#pop'),
- (r'.', String, '#pop'),
- ],
- 'deffunc': [
- (r'(\s*)(?:(\S+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)',
- bygroups(Whitespace, Text, Whitespace, Punctuation,
- Whitespace, Name.Function, Punctuation, Text,
- Punctuation, Whitespace), '#pop'),
- # function with no args
- (r'(\s*)([a-zA-Z_]\w*)', bygroups(Text, Name.Function), '#pop'),
- ],
- }
|