fJc @sNdZddkZyeWn#ej oddklZnXddklZlZl Z l Z l Z ddk l Z lZlZlZlZlZlZlZlZddklZddd d d gZdefd YZdefd YZeidZd efdYZd efdYZd efdYZdS(s pygments.lexers.math ~~~~~~~~~~~~~~~~~~~~ Lexers for math languages. :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. iN(tSet(tLexert RegexLexertbygroupstincludet do_insertions( tCommenttStringt PunctuationtKeywordtNametOperatortNumbertTexttGeneric(t PythonLexert MuPADLexert MatlabLexertMatlabSessionLexert NumPyLexertSLexercBs'eZdZdZdgZdgZhdeifdeidfde fde fd e fd e i fd e ifd e iifd efdeifdefdee ie fde ifdefdefdefgd6deifdeidfdeidfdeifgd6ZRS(s A `MuPAD `_ lexer. Contributed by Christopher Creutzig . *New in Pygments 0.8.* tMuPADtmupads*.mus//.*?$s/\*tcomments"(?:[^"\\]|\\.)*"s\(|\)|\[|\]|\{|\}s(?x)\b(?: next|break|end| axiom|end_axiom|category|end_category|domain|end_domain|inherits| if|%if|then|elif|else|end_if| case|of|do|otherwise|end_case| while|end_while| repeat|until|end_repeat| for|from|to|downto|step|end_for| proc|local|option|save|begin|end_proc| delete|frame )\bsA(?x)\b(?: DOM_ARRAY|DOM_BOOL|DOM_COMPLEX|DOM_DOMAIN|DOM_EXEC|DOM_EXPR| DOM_FAIL|DOM_FLOAT|DOM_FRAME|DOM_FUNC_ENV|DOM_HFARRAY|DOM_IDENT| DOM_INT|DOM_INTERVAL|DOM_LIST|DOM_NIL|DOM_NULL|DOM_POLY|DOM_PROC| DOM_PROC_ENV|DOM_RAT|DOM_SET|DOM_STRING|DOM_TABLE|DOM_VAR )\bs(?x)\b(?: PI|EULER|E|CATALAN| NIL|FAIL|undefined|infinity| TRUE|FALSE|UNKNOWN )\bs\b(?:dom|procname)\bs-\.|,|:|;|=|\+|-|\*|/|\^|@|>|<|\$|\||!|\'|%|~=s(?x)\b(?: and|or|not|xor| assuming| div|mod| union|minus|intersect|in|subset )\bs \b(?:I|RDN_INF|RD_NINF|RD_NAN)\bso(?x) ((?:[a-zA-Z_#][a-zA-Z_#0-9]*|`[^`]*`) (?:::[a-zA-Z_#][a-zA-Z_#0-9]*|`[^`]*`)*)\s*([(])se(?x) (?:[a-zA-Z_#][a-zA-Z_#0-9]*|`[^`]*`) (?:::[a-zA-Z_#][a-zA-Z_#0-9]*|`[^`]*`)*s[0-9]+(?:\.[0-9]*)?(?:e[0-9]+)?s\.[0-9]+(?:e[0-9]+)?t.troots[^*/]s#pushs\*/s#pops[*/](t__name__t __module__t__doc__tnametaliasest filenamesRtSinglet MultilineRRR R tClasstConstanttBuiltintPseudoR tWordR RtFunctiontVariableR ttokens(((s8/usr/lib/python2.6/site-packages/pygments/lexers/math.pyRs8              cCBsQeZdZdZddgZdgZdgZdddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHgCZdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndog'Zdpdqdrdsdtdudvdwdxdydzd{d|d}d~ddddddddddddddddddddddddddddddddddddddddddddddddddddgCZ hde i fde fde dfde fddieee deifdefdefdefdefdefde dfdefdefg d6de dfgd6deeieeieeieieeeei dfgd6ZdZRS(s For Matlab (or GNU Octave) source code. Contributed by Ken Schutte . *New in Pygments 0.10.* tMatlabtmatlabtoctaves*.ms text/matlabtsintsindtsinhtasintasindtasinhtcostcosdtcoshtacostacosdtacoshttanttandttanhtatantatandtatan2tatanhtsectsecdtsechtasectasecdtasechtcsctcscdtcschtacsctacscdtacschtcottcotdtcothtacottacotdtacoththypottexptexpm1tlogtlog1ptlog10tlog2tpow2trealpowtreallogtrealsqrttsqrttnthroottnextpow2tabstangletcomplextconjtimagtrealtunwraptisrealtcplxpairtfixtfloortceiltroundtmodtremtsigntairytbesseljtbesselytbesselhtbesselitbesselktbetatbetainctbetalntellipjtellipketerfterfcterfcxterfinvtexpinttgammatgammainctgammalntpsitlegendretcrosstdottfactortisprimetprimestgcdtlcmtrattratstpermstnchoosekt factorialtcart2sphtcart2poltpol2carttsph2cartthsv2rgbtrgb2hsvtzerostonesteyetrepmattrandtrandntlinspacetlogspacet freqspacetmeshgridt accumarraytsizetlengthtndimstnumeltdisptisemptytisequaltisequalwithequalnanstcattreshapetdiagtblkdiagttrilttriutfliplrtflipudtflipdimtrot90tfindtendtsub2indtind2subtbsxfuntndgridtpermutetipermutetshiftdimt circshifttsqueezetisscalartisvectortanstepstrealmaxtrealmintpititinftnantisnantisinftisfinitetjtwhytcompantgallerythadamardthankelthilbtinvhilbtmagictpascaltrosserttoeplitztvandert wilkinsons^!.*s%.*$s ^\s*functiontdeffuncs(break|case|catch|classdef|continue|else|elseif|end|for|function|global|if|otherwise|parfor|persistent|return|switch|try|while)\bt(t|s)\bs-|==|~=|<|>|<=|>=|&&|&|~|\|\|?s\.\*|\*|\+|\.\^|\.\\|\.\/|\/|\\s\[|\]|\(|\)|\{|\}|:|@|\.|,s=|:|;s(?<=[\w\)\]])\'s(?. *New in Pygments 0.10.* sMatlab sessiont matlabsessionc csnt|i}d}g}xti|D]}|i}|ido>|it|dti |d fgf||d7}q+|idoBt|}d|}dti |f}|i||gfq+|o8x%t ||i |D] } | VqWd}g}n|i ti|fVq+W|o,x)t ||i |D] } | VqWWndS(Nts>>iis???s (Rtoptionstline_retfinditertgroupt startswithtappendtlenRtPromptt TracebackRtget_tokens_unprocessedtstarttOutput( tselfRtmlexertcurcodet insertionsRtlinetidxttokentitem((s8/usr/lib/python2.6/site-packages/pygments/lexers/math.pyRs8     (RRRRRR(((s8/usr/lib/python2.6/site-packages/pygments/lexers/math.pyRs cBseZdZdZdgZgZgZeddddddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzd{d|d}d~ddddddgZdZ RS(s\ A Python lexer recognizing Numerical Python builtins. *New in Pygments 0.10.* tNumPytnumpyR`tabsolutet accumulatetaddtalentalltallclosetalltruetalterdottamaxtaminRatanyRtapply_along_axistapply_over_axestarangetarccostarccoshtarcsintarcsinhtarctantarctan2tarctanhtargmaxtargmintargsorttargwheretaroundtarrayt array2stringt array_equalt array_equivt array_reprt array_splitt array_strt arrayranget asanyarraytasarraytasarray_chkfinitetascontiguousarraytasfarraytasfortranarraytasmatrixtasscalartastypet atleast_1dt atleast_2dt atleast_3dtaveragetbartlettt base_reprRvt binary_reprtbincounttbinomialt bitwise_andt bitwise_nott bitwise_ort bitwise_xortblackmantbmatt broadcastt byte_boundstbytestbyteswaptc_tcan_castRktchoosetclipt column_stackt common_typetcompare_chararraystcompresst concatenateRct conjugatetconvolvetcopytcorrcoeft correlateR3R5tcovRtcumprodt cumproducttcumsumtdeletet deprecateRtdiagflattdiagonaltdifftdigitizeRtdivideRtdsplittdstacktdtypetdumptdumpstediff1dtemptyt empty_liketequalRSt expand_dimsRTtextractRtfabstfastCopyAndTransposetffttfftfreqtfftshifttfilltfinfoRitflatt flatnonzerotflattenRRRjt floor_dividetfmodtfrexpt fromarrayst frombuffertfromfilet fromfunctiontfromitert frompyfunct fromstringtgenerictget_array_wrapt get_includetget_numarray_includetget_numpy_includetget_printoptionst getbuffert getbufsizetgeterrt geterrcallt geterrobjtgetfieldtgradienttgreatert greater_equaltgumbelthammingthanningt histogramt histogram2dt histogramddthsplitthstackRRti0tidentitytifftRdt index_exptindicesRtinfotinnertinsertt int_asbuffertinterpt intersect1dtintersect1d_nutinvtinvertt iscomplext iscomplexobjRt isfortranRRtisneginftisposinfRgt isrealobjRtissctypet issubclass_t issubdtypet issubsctypeRtitemsettiterabletix_tkaisertkrontldexpt left_shifttlesst less_equaltlexsortRtloadtloadstloadtxtRURWRVRXt logical_andt logical_nott logical_ort logical_xorRtlstsqtmattmatrixtmaxtmaximumtmaximum_sctypetmay_share_memorytmeantmedianRtmgridtmintminimumt mintypecodeRmtmodftmsorttmultiplyRt nan_to_numt nanargmaxt nanargmintnanmaxtnanmintnansumt ndenumeratetndimtndindextnegativetnewaxist newbuffert newbyteordertnonzerot not_equalt obj2sctypetogridRt ones_liketoutert permutationt piecewisetpinvtpkgloadtplacetpoissontpolytpoly1dtpolyaddtpolydertpolydivtpolyfittpolyinttpolymultpolysubtpolyvaltpowertprodtproducttptptputtputmasktr_trandinttrandom_integerst random_sampletranftranktravelRet real_if_closetrecarrayt reciprocaltreducet remaindertrepeattrequireRtresizet restoredott right_shifttrinttrolltrollaxistrootsRRltround_t row_stackts_tsampletsavetxtt sctype2chart searchsortedtseedtselecttset_numeric_opstset_printoptionstset_string_functiont setbufsizet setdiff1dtseterrt seterrcallt seterrobjtsetfieldtsetflagst setmember1dtsetxor1dtshapet show_configtshuffleRotsignbitR-tsincR/Rtslicetsolvetsometruetsortt sort_complextsourcetsplitR]tsquareRtstandard_normaltstdtsubtracttsumtsvdtswapaxesttakeR9R;t tensordotttestttilettofilettolistttostringttracet transposettrapzttriRt trim_zerosRt true_dividettypeDictttypenametuniformtunion1dtuniquetunique1dt unravel_indexRfRtvartvdott vectorizetviewtvonmisestvsplittvstacktweibulltwheretwhoRt zeros_likeccsjxcti||D]O\}}}|tjo%||ijo|ti|fVq|||fVqWdS(N(RRR tEXTRA_KEYWORDSR R%(RRtindexRtvalue((s8/usr/lib/python2.6/site-packages/pygments/lexers/math.pyRNs ( RRRRRRRtsetRMR(((s8/usr/lib/python2.6/site-packages/pygments/lexers/math.pyRs     c BseZdZdZdddgZddgZddd gZh d eifgd 6d e fd e i fgd6de fgd6de ifgd6defdefdefgd6de ifde ifgd6defdefgd6ed de fde dfd e d!fededededededg d"6ed"d#e fd$e fgd%6d&e d'fgd6d(e d'fgd!6Zd)ZRS(*sH For S, S-plus, and R source code. *New in Pygments 0.10.* tStspluststrs*.Ss*.Rs text/S-plusstext/Sstext/Rs#.*$tcommentss[a-zA-Z][0-9a-zA-Z\._]+s`.+`t valid_names#\[|\]|\[\[|\]\]|\$|\(|\)|@|:::?|;|,t punctuationsifor(?=\s*\()|while(?=\s*\()|if(?=\s*\()|(?<=\s)else|(?<=\s)break(?=;|$)|return(?=\s*\()|function(?=\s*\()tkeywordss<-|-|==|<=|>=|<|>|&&|&|!=|\|\|?s\*|\+|\^|/|%%|%/%|=s%in%|%*%t operatorss(NULL|NA|TRUE|FALSE|NaN)\bs(T|F)\btbuiltin_symbolssQ(? s  (@  Gg1Z