YBFj5dZddlZddlmZmZmZmZmZddlm Z m Z m Z m Z m Z mZmZmZmZddlmZddlmZgdZGdd eZGd d eZGd d eZGddeZdS)z pygments.lexers.modeling ~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for modeling languages. :copyright: Copyright 2006-present by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. N) RegexLexerincludebygroupsusingdefault) TextCommentOperatorKeywordNameStringNumber Punctuation Whitespace) HtmlLexer)_stan_builtins) ModelicaLexer BugsLexer JagsLexer StanLexerc$eZdZdZdZdZdgZdgZdgZdZ e j e j zZ dZd efd ejfd ejfged d ejdfdefdefdejfdejfdejfdejfdejfdejdfdej fdejdfeefg ed dejfdejdfeej!dfe"dged eej#dfe"dgd ejdfdej$fde%e&fd ejfgd!Z'd"S)#rz# For Modelica source code. Modelicazhttp://www.modelica.org/modelicaz*.moztext/x-modelicaz1.1z"(?:'(?:[^\\']|\\.)+'|[a-zA-Z_]\w*)z [\s\ufeff]+z //[^\n]*\n?z /\*.*?\*/ whitespace"stringz [()\[\]{},;]+z\.?[*^/+-]|\.|<>|[<>:=]=?z\d+(\.?\d*[eE][-+]?\d+|\.\d*)z\d+al(abs|acos|actualStream|array|asin|assert|AssertionLevel|atan|atan2|backSample|Boolean|cardinality|cat|ceil|change|Clock|Connections|cos|cosh|cross|delay|diagonal|div|edge|exp|ExternalObject|fill|floor|getInstanceName|hold|homotopy|identity|inStream|integer|Integer|interval|inverse|isPresent|linspace|log|log10|matrix|max|min|mod|ndims|noClock|noEvent|ones|outerProduct|pre|previous|product|Real|reinit|rem|rooted|sample|scalar|semiLinear|shiftSample|sign|sin|sinh|size|skew|smooth|spatialDistribution|sqrt|StateSelect|String|subSample|sum|superSample|symmetric|tan|tanh|terminal|terminate|time|transpose|vector|zeros)\bak(algorithm|annotation|break|connect|constant|constrainedby|der|discrete|each|else|elseif|elsewhen|encapsulated|enumeration|equation|exit|expandable|extends|external|firstTick|final|flow|for|if|import|impure|in|initial|inner|input|interval|loop|nondiscrete|outer|output|parameter|partial|protected|public|pure|redeclare|replaceable|return|stream|then|when|while)\bz(and|not|or)\bzI(block|class|connector|end|function|model|operator|package|record|type)\bclassz(false|true)\bzwithin\bpackage-prefixz(function|record)\bz(if|for|when|while)\bz#popz\\[\'"?\\abfnrtv]z6(?i)<\s*html\s*>([^\\"]|\\.)+?(<\s*/\s*html\s*>|(?="))z <|\\?[^"\\<]+)rrootrrrN)(__name__ __module__ __qualname____doc__nameurlaliases filenames mimetypes version_addedreDOTALL MULTILINEflags_namerr Single Multilinerr Doublerr rFloatIntegerr Builtinr ReservedWordConstantClassr NamespaceEscaperrtokensFC:\PYTHON\_runtimes\venv\Lib\site-packages\pygments/lexers/modeling.pyrrs D $ClGI"#IM I $E 1ET " W^ , 7, - GL ! ! 6=( + { + )8 4 -v| < V^ $ *,0< 9=     . ' 0' ;  0 1 '*,< = DM= B GL ! ! #W%5 6 %w'7 @ DJ ' GFOO   GL ! ! DNF + GFOO 6=& ) !6= 1 F U9    v} -  e99FFFr=rcDeZdZdZdZgdZdgZdZdZdZ dZ d e fgd e j fged ed d eeje efdejfdde e zejfdefdefdefdefdefdefg dZdZdS)rz= Pygments Lexer for OpenBugs and WinBugs models. BUGS)bugswinbugsopenbugs*.bugz4https://www.mrc-bsu.cam.ac.uk/software/bugs/openbugs1.6)>absarccosarccosharcsinarcsinharctanarctanhcloglogcoscosh cumulativecutdensitydevianceequalsexprgammapilogiticloglogintegralloglogfactloggamlogitmaxminphiz post.p.valuepowz prior.p.valueprobitzreplicate.postzreplicate.priorroundsinsinhsolutionsqrtsteptantanhtruncinprod interp.lininverselogdetmeanz eigen.valsodeprodzp.valueMrankrankedzreplicate.postMsdsortsumDIFTC)dberndbindcatdnegbindpoisdhyperdbetadchisqrddexpdexpdflatdgammadgevdfdggammadgpardloglikdlnormdlogisdnormdpardtdunifdweibdmultiddirchdmnormdmtdwish\s+#.*$commentsrz(model)(\s+)(\{)(for|in)(?![\w.]) ({})(?=\s*\()|z[A-Za-z][\w.]*&[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?\[|\]|\(|\)|:|,|;<-|~z \+|-|\*|/[{}]rrrcJtjd|tjrdSdS)Nz ^\s*model\s*{gffffff?r*searchMtexts r> analyse_textzBugsLexer.analyse_texts% 9%tRT 2 2 33r=N)r r!r"r#r$r&r'r%r) _FUNCTIONS_DISTRIBUTIONSrr r/rrr r9rr5formatjoinr r4rr r;rr<r=r>rrbs> D---G I @CM!J &N TN gn % GJ   GL ! ! Xg'{ ; ; ="7#3 4  $ $TYYzN/J%K%K L L \  % 6 ? !; /h  8 $ k "1 ""FHr=rceZdZdZdZdgZddgZdZdZdZ e d d DZ d Z d e fgd efgdejfdejfgededdeeje efdejfdejfdde e ze zejfeddefdefdefdefdefg dZdZdS) rz" Pygments Lexer for JAGS. JAGSjagsz*.jagrDz https://mcmc-jags.sourceforge.iorE)2rFrGrHrIrJrKrLrNrOrMrTexprXifelserWrZr[r\r]r`rarbrcrdrergrhrirjrkrlrmror^rpr_rrrwrurnrsrvtacosacoshasinasinhatanr{ryc# K|] }d|V dS)z[dpq]Nr<).0xs r> zJagsLexer.s@QQ1;1;;QQQQQQr=)bernbetadchiqsqrrrrgammaz gen.gammalogislnormnegbinnchisqrnormparpoisweib)rrdbetabinr}r~rrrrrrrdbinomdchisqdnbinomdweibullddirichrz[a-zA-Z][\w.]*\b (?s)/\*.*?\*/rrrz(model|data)(\s+)(\{)z var(?![\w.])rrrnamesrrrz&\+|-|\*|\/|\|\|[&]{2}|[<>=]=?|\^|%.*?%r)rrrrctjd|tjrFtjd|tjrdStjd|tjrdSdSdS)Nz^\s*model\s*\{z ^\s*data\s*\{g?z^\s*varg333333?rrrs r>rzJagsLexer.analyse_text s` 9&bd 3 3 y)466 s:tRT22 ss1r=N) r r!r"r#r$r&r'r%r)rtupler_OTHER_DISTRIBUTIONSrr r r0r/rrr r9r Declarationr5rrr4rr r;rr<r=r>rrs DhG'"I ,CM JUQQPQQQQQN *TN !$ ' w0 1 gn %   GJ   GL ! ! % Xg'{ ; ; = g1 2 !7#3 4 $ $TYYz,:0;,@0A&B&BCC\  GG   6 ? !; / h  6 A k "3 ))FV     r=rc eZdZdZdZdgZdgZdZdZde fgde j fd e j fgd e fed ed d ddeeje efdefdefddejefdefddejejfdeeeeeefdeeeeeefdefddejejfddejeeeejfdejjfddej ej!fdej"fde#j$fde#j$fde#j$fde#j$fde#j$fd e#j%fd!efd"efd#efd$efd%efgd&Z&d'Z'd(S))raPygments Lexer for Stan models. The Stan modeling language is specified in the *Stan Modeling Language User's Guide and Reference Manual, v2.17.0*, `pdf `__. Stanstanz*.stanzhttps://mc-stan.orgrErrz (//|#).*$z"[^"]*"rrz({})(\s*)(\{{)r) functionsdataztransformed\s+?data parametersztransformed\s+parametersmodelzgenerated\s+quantitiesz target\s*\+=zjacobian\s*\+=z({})\bz T(?=\s*\[)z/(<)(\s*)(upper|lower|offset|multiplier)(\s*)(=)z(,)(\s*)(upper)(\s*)(=)z [;,\[\]()]rz(~)(\s*)({})(?=\s*\()z[A-Za-z]\w*__\bz[A-Za-z]\w*(?=\s*\()]z$[0-9]+(\.[0-9]*)?([eE][+-]?[0-9]+)?iz\.[0-9]+([eE][+-]?[0-9]+)?iz[0-9]+iz#[0-9]+(\.[0-9]*)?([eE][+-]?[0-9]+)?z\.[0-9]+([eE][+-]?[0-9]+)?z[0-9]+z [A-Za-z]\w*\bz<-|(?:\+|-|\.?/|\.?\*|=)?=|~z;\+|-|\.?\*|\.?/|\\|'|\.?\^|!=?|<=?|>=?|\|\||&&|%|\?|:|%/%|!rz\|rcJtjd|tjrdSdS)Nz^\s*parameters\s*\{g?rrrs r>rzStanLexer.analyse_textls% 9+T24 8 8 33r=N)(r r!r"r#r$r&r'r%r)rr r0r/r rrrrr r9rrKEYWORDSTYPESTyper r FUNCTIONSr r4 DISTRIBUTIONSPseudoRESERVEDr5Functionrr2r3r;rr<r=r>rrs DhG I CMTN w0 1 7> *  GJ   GL ! !  % %dii1<'='=>>Xg'{ ; ; = g &  (   dii(?@@ A A7 K G $   dii(<== > > M@ Xh GZ M M O ' Xk:w K P P RK (  $ $SXXn.F%G%G H H$, W % , ,SXXn6R-S-S T T:t|<< > !4 5   dii(?@@ A A7CS T %t} 5 4fl C +V\ :  & 3V\ B *FL 9  ' t $ ,h 7 KX V k " K q9 CCFJr=r)r#r*pygments.lexerrrrrrpygments.tokenrr r r r r rrrpygments.lexers.htmlrpygments.lexersr__all__rrrrr<r=r>rs HHHHHHHHHHHHHH$$$$$$$$$$$$$$$$$$$$$$+*********** B B BHHHHHJHHHV\\\\\ \\\~UUUUU UUUpWWWWW WWWWWr=