|edZddlZddlmZmZmZmZmZmZm Z ddl m Z m Z m Z mZmZmZmZmZmZmZddlmZgdZGddeZej2d ZGd d eZGd d eZGddeZy)z pygments.lexers.matlab ~~~~~~~~~~~~~~~~~~~~~~ Lexers for Matlab and related languages. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. N)Lexer RegexLexerbygroupsdefaultwords do_insertionsinclude) TextCommentOperatorKeywordNameStringNumber PunctuationGeneric Whitespace)_scilab_builtins) MatlabLexerMatlabSessionLexer OctaveLexer ScilabLexerceZdZdZdZdgZdgZdgZdZee fdeze jfde jfd e jfd e fd e fd e fd efdedfdefdefdefg dej$fdej(dfdefdeeedfdeeeee dfdeeedfeddd eeefegd!d"d ej0fd#eeefd$ezeeeed%fed&g d'ej(d(fd)ej(fdej(fgd*eeeee eej4e ee e d(fd+eeej4d(fgd,eej0ee ee fd-eej0ee eefd.e fd/e d(fdefdefgdej(dfdefd0ed(fed&gd1ed(fgd2e d(fee d(fd3efd4efd5efd6e d(fed(gd7Zd8Zy9):rz= For Matlab source code. .. versionadded:: 0.10 Matlabmatlab*.mz text/matlabz<-|==|~=|<=|>=|<|>|&&|&|~|\|\|?|\.\*|\*|\+|\.\^|\.\\|\./|/|\\zB(?z+MatlabLexer.analyse_text.. s("C4)+(D)A#'"Cs"%r3{?rg?z^!\w+)nextrr startswithrsearchM)rfirst_non_comments` r analyse_textzMatlabLexer.analyse_text s} "C4??3D"CDFHHM   ( ( 400 YYxrtt , YYxrtt ,-N)__name__ __module__ __qualname____doc__namealiases filenames mimetypes _operatorsr rFloatIntegerrrrrr Otherr Multilinerr rBuiltinr Functionrtokensr rrrrs3 DjGIIPJ  " ')345;\\ C ' 6  (+K 8 { #!( + f %  2 d # Z 4L3 <fll # '++^ < g  %x G'Di P . j':{ C & (( j' *J 8 $ +6 ; j' *  ,A(DP'!IPE(LP OPH( VPx9 :. .. versionadded:: 0.10 zMatlab session matlabsessionc #^Ktd i|j}d}g}d}tj|D]}|j }|j dr;|j t|dtj|ddfgf||ddz }nG|j dr:|j t|dtj|ddfgf||ddz }n|j dr3t|}dtj|f} |j || gfn|rj|rht|d d d } |j d | zr:|j t|dtj|d| fgf||| dz }nR||z }nL|r't||j|Ed{d}g}|jtj|f|jj!d rd }d}|r$t||j|Ed{yy7z7w)NrFz>> rz>>z??? z...Tr)roptionsline_refinditergroupr rlenrPrompt Tracebackrget_tokens_unprocessedrOutputrendswith) selfrmlexercurcode insertions continuationrrDidxtoken line_starts rr.z)MatlabSessionLexer.get_tokens_unprocessed sD,t||,  %%d+. %E;;=Du%!!3w<%&Ra$A#B#DE48#&!!3w<%&Ra$A#B#DE48#''lG--t4!!3.1* B!3B!78 ??3z>2%%WGNND*eeee d(fd-eeej>d(fgd.Z d/Z!y0)1rz@ For GNU Octave source code. .. versionadded:: 1.5 Octavez)https://www.gnu.org/software/octave/indexoctaverz text/octave(=rr addpropertyrandrargnamesargvratexitautoloadavailable_graphics_toolkits beep_on_errorrbitmaxrrrr7rBrIrMrYr[columnscommand_line_pathcompletion_append_charcompletion_matchesrconfirm_recursive_rmdirrcrash_dumps_octave_corerrrdebug_on_errordebug_on_interruptdebug_on_warningdefault_save_options dellistenerrrrdoc_cache_filedo_string_escapesrreecho_executing_commandsr4r5errno errno_listr>rDrFexecrJrKrZr_fclearr`fcntlfdisprdrerffflushrmrnrofile_in_loadpath file_in_pathrvryfind_dir_in_pathfixed_point_formatfnmatchrforkformularfputsrfreportrrrfskiplrrrgerrgetegidrgeteuidgetgidgetpgrpgetpidgetppidgetuidglobgtgui_modehistory_control history_file history_sizehistory_timestamp_format_stringrWrXr_ifelseignore_function_time_stamp inferiorto info_file info_programinlinerrrris_absolute_filenameisargoutisboolrrr iscomplexrrrisglobalrisieeeisindexrrrrisnullrrris_rooted_relative_filenamerr rkbhitr)killlasterr lasterrorr0ldivideler7linkrKrZlstatltmake_absolute_filenamemakeinfo_programmax_recursion_depthmerger6rminusrrmkfifomkstemprrmouse_wheel_zoomrrrrrrnative_float_formatrnenfieldsrrnotrr octave_config_infooctave_core_file_limitoctave_core_file_nameoctave_core_file_optionsroroutput_max_field_widthoutput_precisionpage_output_immediatelypage_screen_outputrArBrEpcloserQrRpiper`popenpowerprint_empty_dimensionsprintfprint_struct_array_contentsrprogram_invocation_name program_nameputenvputsrrrrdividereaddirreadlinkread_readline_init_filerrrrrepelemsre_read_readline_init_filerrresizerrrr rrowssave_header_format_stringsave_precisionsaving_historyscanfr?rM shell_cmdsighup_dumps_octave_coresigterm_dumps_octave_coresilent_functionsrhrk size_equalsizemaxsizeofsleepsourcesparse_auto_mutatesplit_long_rowsrrrstatstderrstdinstdoutrrstring_fill_charrrrstruct_levels_to_printstrvcatrrrsumsq superiortosuppress_verbose_help_messagesymlinkrr  tilde_expandtimestmpfiletmpnamrtoupperr#r.typeinfoumaskrlunameundo_string_escapesunlinkrrusageusleepvec vectorizerwaitpidrwarrantywhos_line_format yes_or_norinfrPnanrX)rkrQrr(hrqaccumdimrsrvryrrranovaarch_fitarch_rnd arch_testrarma_rndrrasctimerrrrautoreg_matrixrrrrrbartlett bartlett_testrbetacdfbetainvbetapdfbetarndrbicubicrbinocdfbinoinvbinopdfbinorndrrrblackmanrrrrr rr6 cauchy_cdf cauchy_inv cauchy_pdf cauchy_rndr:rFcenterrLchisquare_test_homogeneitychisquare_test_independencerUrWrXrbricloglogrmrtrurwryr{ common_sizecommutation_matrixr}compare_versionsr~rrrrrrrrrrrrcorrcor_testrrrrrrcstrcatcsvreadcsvwritectimerrcutrrrrrrdblquaddealrrrrrrrdiffpararr  discrete_cdf discrete_inv discrete_pdf discrete_rndrrdlmwriterdsearchrduplication_matrixdurbinlevinsonr+ empirical_cdf empirical_inv empirical_pdf empirical_rndr3r?rArCexampleexpcdfexpinvrOexppdfexprnd ezcontour ezcontourfezmeshezmeshcezplotr[ezsurfezsurfcr]r^failfcdfrbfftconvfftfiltrkrprurwrzrrfindstrfinvrflipdimrrfpdfr fractdifffreqz freqz_plotfrndfsolvef_test_regressionrrrgamcdfgaminvgampdfgamrndrrrr genvarnamegeocdfgeoinvgeopdfgeorndrr glpkglsr rgraphics_toolkitrrrrrrr r(hammingr*hanningrKrMrOhisthistcrUrYhotelling_testhoushr]hursthygecdfhygeinvhygepdfhygerndrcrgrnrprrrwryr{indexinforrrrrrrr isdefiniteisdiris_duplicate_entryrisequalwithequalnansisfigurer ishghandle is_leap_yearrrrrrrrissquarer rris_valid_file_idrr$kendallkolmogorov_smirnov_cdfkolmogorov_smirnov_testkruskal_wallis_testkrylovkurtosis laplace_cdf laplace_inv laplace_pdf laplace_rndr5r6r?rDrI list_primes loadaudiorT logistic_cdf logistic_inv logistic_pdf logistic_rndlogitr[ loglogerrr\logncdflogninvlognpdflognrndr]r` ls_commandrerh mahalanobismanovarv mcnemar_testrzmeansqr{menurrrrrrrrmomentrmpolesrrnargchkrnbincdfnbininvnbinpdfnbinrndrrrnewsrnormcdfrnorminvnormpdfnormrndrrroceanols onenormestr!r"r%r(r)r/r8 parseparamsr?r@pathdefrGrHrJpcrrM periodogramrOrPrSrUrW playaudiorZr^plotyypoisscdfpoissinvpoisspdfpoissrndpolarrh polyaffineri polyderivrmpolygcdrnpolyout polyreducerprqpostpadpowersetppderppintppjumpsppplotru pqpnonnegprepadr{r| print_usagerprobitqpqqplotquadccrquadlquadvrqzhessrainbowrrangerranksrrrrr rectangle_lw rectangle_swrrrrrrrrindexrroserrotdimrr$ run_countrundemosrun_testr'r* saveaudior,r-r/r6r: semilogxerrr; semilogyerrsetaudiorLrNrYr[shiftr^ sign_testsincrgsinetonesinewaveskewnessrlsombrerorsrzr{r|spearman spectral_adf spectral_xdfr}speedspencerr~rrrrrrrrrspstatsrsqpr statisticsr stdnormal_cdf stdnormal_inv stdnormal_pdf stdnormal_rndrstftrstrchrrstrmatchstrreadrrrstrtruncr studentizerrrsubstrrrrrrrrrrsylvester_matrixsymvar synthesisrrrtcdfrrtestrtextreadrtinvrrtpdfrr%r&r' triangle_lw triangle_swr)r* triplequadr+r,r-trndr0t_testt_test_regressionr3unidcdfunidinvunidpdfunidrndunifcdfunifinvunifpdfunifrndrprqrsrvunpackuntabifyr{r|r}u_testrrrvar_testvechrrrrrrwavreadwavwritewblcdfwblinvwblpdfwblrndr welch_testrwhitewhitebgwienrnd wilcoxon_testrrrrr yulewalkerrrz_test)rrrrrrrrbitpackr rccolamdrG cellslicesrQ choldelete cholinsertcholinv cholshiftrRrrcollocrrcsymamdrrdaspk daspk_optionsdasrt dasrt_optionsdassl dassl_optionsrrrrrrrdbwhererdlmreadrrr'r(endgrentendpwentrBrhrjrlr~rrrgetgrentgetgrgidgetgrnamgetpwentgetpwnamgetpwuid getrusagegivensgmtimegnuplot_binaryrGrdrfr isdebugmoder r+ localtimelookuplsode lsode_optionsrgluincluupdate matrix_typerwrmktimerVrrrqrshiftrquad quad_optionsrrranderandgrrandprrrrrr3setgrentsetpwentrprxryrrrrstrftimestrptimerr svd_driversylrrrr tsearchr4urlreadurlwrite)MrprrrtrurwrxrzrargrrrrrrrrrbincoeffcbrtrArrrrrrrr9r:r<r=rLfiniterrfmodrrrrmisalnumisalphaisasciiiscntrlisdigitrisgraphrislowerisnarisprintispunctrisupperisxdigitr2lgammarVrarrrrroundbr5r7rdrfrirrrtoasciitolowerr)EDITOR EXEC_PATHI IMAGE_PATHNA OCTAVE_HOMEOCTAVE_VERSIONPAGER PAGER_FLAGSSEEK_CURSEEK_ENDSEEK_SETSIGS_ISBLKS_ISCHRS_ISDIRS_ISFIFOS_ISLNKS_ISREGS_ISSOCK WCONTINUE WCOREDUMP WEXITSTATUS WIFCONTINUED WIFEXITED WIFSIGNALED WIFSTOPPEDWNOHANGWSTOPSIGWTERMSIG WUNTRACEDr$percentblockcommentz#\{\s*\nhashblockcommentz[%#].*$^\s*function\br&)__FILE____LINE__r)r*r+r,r-dor/r0r1 end_try_catchend_unwind_protect endclassdef endeventsendfor endfunctionendif endmethods endproperties endswitchendwhilerHr2r3rr4r5r6r7r9rr:r?staticr<r=untilunwind_protectunwind_protect_cleanupr>\br@z -=|!=|!|/=|---|==|~=|<|>|<=|>=|&&|&|~|\|\|?z$\*=|\+=|\^=|\/=|\\=|\*\*|\+\+|\.\*\*\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\z[\[\](){}:@.,]r"[^"]*"&(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?\d+[eEf][+-]?[0-9]+\d+rrr r!r"r#rrrz^\s*#\}rrr)rrX rY r r&cy)z?Octave is quite hard to spot, and it looks like Matlab as well.rr)rs rr zOctaveLexer.analyse_text srN)"rrrrrurlrrr builtin_kw command_kw function_kw loadable_kw mapping_kwbuiltin_constsr rr rrrConstantr rrrrrr rrrrr rrrrr sV D 5CjGII4X$Jt2JUKn+K>% 0$-- @x ( . 9 4h ? / : , { #  6 E #V\\ 2 V^^ $!( +  2 d # TN 4Le3 j**F 3 w(( ) 7$$ % **F 3 w(( ) 7$$ %  ' B j$ K $--d!:/06 8 $ j$-- 0& :  EKFZrrc eZdZdZdZdZdgZgdZdgZde jfde d fe d d e fe e je jze j zd ej$fe e j&d ej(fd efdefdefdefdefdedfdej2fdej2fdej4fdefdefdefgdedfdedfgdeeeeeeej<eeee dfdeeej<dfgdZdZ y )!rz< For Scilab source code. .. versionadded:: 1.5 Scilabzhttps://www.scilab.org/scilab)z*.sciz*.scez*.tstz text/scilabz//.*?$rZ r&r[ rn ro rp rq z[\[\](){}@.,=:;]+rr rrr rs rt ru r!r"r#rrrr)rr r&cd}tjd|r|dz }tjd|r|dz }t|dS)Ngz^\s*//g?z^\s*/\*r)rr r)rscores rr zScilabLexer.analyse_text sC 99Y % SLE 99Z & SLE5#rN)!rrrrrrw rrrr Singler rr functions_kw commands_kw macros_kwrr variables_kwr~ r rrrrrrr rrrr rrrrr s D #CjG+II '  3 N W\ ] #00#//0#--.6;=>Bll L#00 ? O/ 9 / :"; /  !( +  2 6 E #V\\ 2 V^^ $ d # Z 4LQ) V ' 66 " B j$ K $--d!:/06 8 $XdDMM%BF K  _7Ft rr)rrpygments.lexerrrrrrrr pygments.tokenr r r r rrrrrrpygments.lexersr__all__rcompiler(rrrrrrr s ---- MX**X*vT 2::g CDCDL_*_D O*Or