YBFjMdZddlZddlmZmZmZmZddlmZm Z m Z m Z m Z m Z mZmZmZmZgdZejdZGddeZGd d eZGd d eZdS) z pygments.lexers.r ~~~~~~~~~~~~~~~~~ Lexers for the R/S languages. :copyright: Copyright 2006-present by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. N)Lexer RegexLexerinclude do_insertions) TextCommentOperatorKeywordNameStringNumber PunctuationGeneric Whitespace) RConsoleLexerSLexerRdLexerz.*? c6eZdZdZdZddgZdgZdZdZdZ d Z d S) rz@ For R console transcripts or R CMD BATCH output files. RConsolerconsoleroutz*.Routhttps://www.r-project.orgz"rconsole/r-console-transcript.Routc #xKtdi|j}d}g}t|D]}|}|ds|drH|t|dtj |ddfgf||ddz }|r-t|| |Ed{Vd}g}| tj |fV|r+t|| |Ed{VdSdS)Nr>+r)roptionsline_refinditergroup startswithappendlenrPromptrget_tokens_unprocessedstartOutput)selftextslexercurrent_code_block insertionsmatchlines ?C:\PYTHON\_runtimes\venv\Lib\site-packages\pygments/lexers/r.pyr'z$RConsoleLexer.get_tokens_unprocessed#s''$,'' %%d++ : :E;;==Ds## :ts';'; :!!3'9#:#:%&RaR$A#B#DEEE"d122h.""&$,"F$A$ABT$U$U W WWWWWWWW*,&!#JkkmmW^T99999  O$F99:LMMOO O O O O O O O O O O ON) __name__ __module__ __qualname____doc__namealiases filenamesurl version_added_exampler'rr2r1rrsY D6"G I %CM3H O O O O Or2rceZdZdZdZgdZgdZgdZdZdZ dZ d e j fge e fgd e d e jfgd efgd ejfgdefdefgdejfde jjfgdejfdefgeddefdedfdedfededededededed g ed!d"efd#efgd$ed%fgd&ed%fgd' Zd(Zd)S)*rz+ For S, S-plus, and R source code. S)splussr)z*.Sz*.Rz .Rhistoryz .Rprofilez .Renviron)z text/S-plusztext/Sztext/x-r-sourceztext/x-rztext/x-Rztext/x-r-historyztext/x-r-profilerz0.10z;`[^`\\]*(?:\\.[^`\\]*)*`|(?:[a-zA-Z]|\.[A-Za-z_.])[\w.]*|\.z#.*$(z )\s*(?=\()z\[{1,2}|\]{1,2}|\(|\)|;|,zH(if|else|for|while|repeat|in|next|break|return|switch|function)(?![\w.])z,<>?|-|==|<=|>=|\|>|<|>|&&?|!=|\|\|?|\?z$\*|\+|\^|/|!|%[^%]*%|=|~|\$|@|:{1,3}zm(NULL|NA(_(integer|real|complex|character)_)?|letters|LETTERS|Inf|TRUE|FALSE|NaN|pi|\.\.(\.|[0-9]+))(?![\w.])z(T|F)\bz#0[xX][a-fA-F0-9]+([pP][0-9]+)?[Li]?z;[+-]?([0-9]+(\.[0-9]+)?|\.[0-9]+|\.)([eE][+-]?[0-9]+)?[Li]?commentsz\s+z\' string_squotez\" string_dquotebuiltin_symbolskeywords function_name valid_namenumbers punctuation operators statementsz\{|\}.z([^\'\\]|\\.)*\'z#popz([^"\\]|\\.)*") rCrIrHrKrGrLrFrJrMrootrDrEc4tjd|rdSdS)Nz[a-z0-9_\])\s]<-(?!-)g)\(?)research)r+s r1 analyse_textzSLexer.analyse_texts& 9-t 4 4 4  r2N)r3r4r5r6r7r8r9 mimetypesr:r;rIrSingler Functionrr Reservedr ConstantBuiltinPseudor Hexrrr rtokensrSrr2r1rrFs D!!!GEEEIEEEI %CMOJgn %   )* ( ( ($- 8 *; 7     =h G 4h ?   , -  4VZ @ K     GJ   Z FO , FO , G% & & GJ   GO $ $ GL ! ! GI   GM " " GK   GL ! ! { # 4L  !&& 1  / EEEFNr2rc eZdZdZdZdgZdgZdgZdZdZ dd e j fd e fd e jfd e fd e jfdejfdefdefgiZdS)raR Pygments Lexer for R documentation (Rd) files This is a very minimal implementation, highlighting little more than the macros. A description of Rd syntax is found in `Writing R Extensions `_ and `Parsing Rd files `_. Rdrdz*.Rdz text/x-r-docz1http://cran.r-project.org/doc/manuals/R-exts.htmlz1.6rOz \\[\\{}%]z%.*$z\\(?:cr|l?dots|R|tab)\bz \\[a-zA-Z]+\bz^\s*#(?:ifn?def|endif).*\bz[{}]z [^\\%\n{}]+rNN)r3r4r5r6r7r8r9rTr:r;r Escaperr rXPreprocr rYrr\rr2r1rrs DfGI I =CM  6= ) g  ')9 : w ' *GO < dl # T " 4L FFFr2r)r6rQpygments.lexerrrrrpygments.tokenrrr r r r r rrr__all__compiler rrrrr2r1rfsp DDDDDDDDDDDD------------------------ 1 0 0 2:g  ,O,O,O,O,OE,O,O,O^WWWWWZWWWt$$$$$j$$$$$r2