|e4dZddlZddlmZmZmZmZmZddlm Z m Z m Z m Z m Z mZmZmZmZddlmZddlmZgdZGdd eZGd d eZGd d eZGddeZy)z pygments.lexers.modeling ~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for modeling languages. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. N) RegexLexerincludebygroupsusingdefault) TextCommentOperatorKeywordNameStringNumber Punctuation Whitespace) HtmlLexer)_stan_builtins) ModelicaLexer BugsLexer JagsLexer StanLexerceZdZdZdZdZdgZdgZdgZe je jzZ dZ defd ej fd ej"fged d ej(d fdefdefdej0fdej2fdej6fdej:fdej<fdej:dfdej>fdej:dfe efg ed dej:fdej:dfe ej@dfe!dged e ejDdfe!dgd ej(dfdejFfde$e%fdej(fgd Z&y!)"rz> For Modelica source code. .. versionadded:: 1.1 Modelicazhttp://www.modelica.org/modelicaz*.moztext/x-modelicaz"(?:'(?:[^\\']|\\.)+'|[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 mimetypesreDOTALL MULTILINEflags_namerr Single Multilinerr Doublerr rFloatIntegerr Builtinr ReservedWordConstantClassr NamespaceEscaperrtokens:/usr/lib/python3/dist-packages/pygments/lexers/modeling.pyrrs D $ClGI"#I II $E 1ET " W^^ , 7,, - L ! 6==( + { + )8 4 -v|| < V^^ $ *,0<< 9=      . ' 0 0' ;  0 0 1 '**,< = DM= B L ! #W%5%5 6 %w'7'7 @ DJJ ' FO   L ! DNNF + FO 6==& ) !6== 1 F 9   v}} -  e9Fr<rc(eZdZdZdZgdZdgZdZ dZ de fgde jfge d e d d e eje efd ej"fd dj%eezzej(fdefdefdefdefdefdefg dZdZy)rzX Pygments Lexer for OpenBugs and WinBugs models. .. versionadded:: 1.6 BUGS)bugswinbugsopenbugs*.bug)>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)(?=\s*\()|z[A-Za-z][\w.]*&[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?\[|\]|\(|\)|:|,|;<-|~z \+|-|\*|/[{}]rrrcPtjd|tjryy)Nz ^\s*model\s*{gffffff?r)searchMtexts r= analyse_textzBugsLexer.analyse_texts 99%tRTT 2r<N)r r!r"r#r$r&r' _FUNCTIONS_DISTRIBUTIONSrr r.rrr r8rr4joinr r3rr r:rr;r<r=rrcs D-G I!J &N TN gnn % J  L ! g''{ ; ="7#3#3 4 yyn456 \\  % 6 ? !; /h  8 $ k "3 #FJr<rceZdZdZdZdgZddgZdZeddDZ d Z d e fgd e fgd e jfd e jfgededdeej&e efdej*fdej,fddj/ee ze zze j0feddefdefdefdefdefg dZdZy)rz= Pygments Lexer for JAGS. .. versionadded:: 1.6 JAGSjagsz*.jagrC)2rDrErFrGrHrIrJrLrMrKrRexprVifelserUrXrYrZr[r^r_r`rarbrcrerfrgrhrirjrkrmr\rnr]rprursrlrqrttacosacoshasinasinhatanryrwc#&K|] }d|z yw)z[dpq]%sNr;).0xs r= zJagsLexer.sQQ9q=Qs)bernbetadchiqsqrrrrgammaz gen.gammalogislnormnegbinnchisqrnormparpoisweib)rrdbetabinr{r|r}rrrrrrdbinomdchisqdnbinomdweibullddirichrz[a-zA-Z][\w.]*\b (?s)/\*.*?\*/rrrz(model|data)(\s+)(\{)z var(?![\w.])rrrnamesrrrz&\+|-|\*|\/|\|\|[&]{2}|[<>=]=?|\^|%.*?%r)rrrrctjd|tjrMtjd|tjrytjd|tjryyy)Nz^\s*model\s*\{z ^\s*data\s*\{g?z^\s*varg333333?rrrs r=rzJagsLexer.analyse_textsL 99&bdd 3yy)46:tRTT2r<N)r r!r"r#r$r&r'rtupler_OTHER_DISTRIBUTIONSrr r r/r.rrr r8r Declarationr4rr3rr r:rr;r<r=rrsO DhG'"I JQPQQN *TN !$ ' w00 1 gnn %   J  L ! % g''{ ; = g11 2 !7#3#3 4 *,:+;,@+A!BB\\  G  6 ? !; / h  6 A k "3 )FV r<rceZdZdZdZdgZdgZdefgdejfdejfgde fe d e d d d jd zeej eefdefdd jej&zefdefdd jej(zej*fdeeeeeefdeeeeeefdefdd jej0zej4fdd jej6zeeeej4fdej4j8fdd jej:zej<fdej>fde jBfde jBfde jBfde jBfde jBfde jDfdefdefd efd!efd"efgd#Z#d$Z$y%)&ra Pygments 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 `__. .. versionadded:: 1.6 Stanstanz*.stanrrz (//|#).*$z"[^"]*"rrz (%s)(\s*)(\{)r) functionsdataztransformed\s+?data parametersztransformed\s+parametersmodelzgenerated\s+quantitiesz target\s*\+=z(%s)\bz T(?=\s*\[)z/(<)(\s*)(upper|lower|offset|multiplier)(\s*)(=)z(,)(\s*)(upper)(\s*)(=)z [;,\[\]()]rz(~)(\s*)(%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\|rcPtjd|tjryy)Nz^\s*parameters\s*\{g?rrrs r=rzStanLexer.analyse_textms 99+T244 8r<N)%r r!r"r#r$r&r'rr r/r.r rrrr r8rrKEYWORDSTYPESTyper r FUNCTIONSr r3 DISTRIBUTIONSPseudoRESERVEDr4Functionrr1r2r:rr;r<r=rrs6 DhG ITN w00 1 7>> *  J  L !  YY<==g''{ ;  = g & >#:#:; ;W E G $ >#7#78 8',, G@ h GZ M O ' k:w K P RK ( )A)A B BDLL Q %1M1M(N N:t||< > !4!4 5 >#:#:; ;W=M=M N %t}} 5 4fll C +V\\ :  & 3V\\ B *FLL 9  ' t $ ,h 7 KX V k " K o8 BFHr<r)r#r)pygments.lexerrrrrrpygments.tokenrr r r r r rrrpygments.lexers.htmlrpygments.lexersr__all__rrrrr;r<r=rsl HH$$$+* BIJIX] ]@U UpV Vr<