Your IP : 216.73.216.61


Current Path : /opt/alt/python37/lib/python3.7/site-packages/pygments/lexers/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/pygments/lexers/__pycache__/r.cpython-37.opt-1.pyc

B

ɽ�\��@s�dZddlZddlmZmZmZmZmZddlm	Z	m
Z
mZmZm
Z
mZmZmZmZdddgZe�d�ZGd	d�de�ZGd
d�de�ZGdd�de�ZdS)z�
    pygments.lexers.r
    ~~~~~~~~~~~~~~~~~

    Lexers for the R/S languages.

    :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�Lexer�
RegexLexer�include�
do_insertions�bygroups)	�Text�Comment�Operator�Keyword�Name�String�Number�Punctuation�Generic�
RConsoleLexer�SLexer�RdLexerz.*?
c@s*eZdZdZdZddgZdgZdd�ZdS)	rz@
    For R console transcripts or R CMD BATCH output files.
    ZRConsoleZrconsoleZroutz*.Routc	cs�tf|j�}d}g}x�t�|�D]�}|��}|�d�s@|�d�rv|�t|�dtj	|dd�fgf�||dd�7}q |r�xt
||�|��D]
}|Vq�Wd}g}|��tj
|fVq W|r�xt
||�|��D]
}|Vq�WdS)N��>�+r�)r�options�line_re�finditer�group�
startswith�append�lenrZPromptr�get_tokens_unprocessed�startZOutput)�self�textZslexerZcurrent_code_blockZ
insertions�match�line�item�r%�B/opt/alt/python37/lib/python3.7/site-packages/pygments/lexers/r.pyr!s(

z$RConsoleLexer.get_tokens_unprocessedN)�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenamesrr%r%r%r&rs
c@seZdZdZdZdddgZdddd	d
gZddd
ddddgZdZde	j
fgeefgdefgde
jfgdefdefgde
jfdejjfgdejfdefged�defdedfd ed!fed"�ed#�ed$�ed%�ed&�ed'�g
d(eejfed)�d*efd+efgd,ed-fgd.ed-fgd/�Zd0d1�Zd2S)3rzG
    For S, S-plus, and R source code.

    .. versionadded:: 0.10
    �SZsplus�s�rz*.Sz*.Rz	.Rhistoryz	.Rprofilez	.Renvironztext/S-plusztext/Sztext/x-r-sourceztext/x-rztext/x-Rztext/x-r-historyztext/x-r-profilez?(?:`[^`\\]*(?:\\.[^`\\]*)*`)|(?:(?:[a-zA-z]|[_.][^0-9])[\w_.]*)z#.*$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_dquote�builtin_symbols�
valid_name�numbers�keywords�punctuation�	operatorsz
(%s)\s*(?=\()�
statementsz\{|\}�.z([^\'\\]|\\.)*\'z#popz([^"\\]|\\.)*")r1r5r8r7r9r4r6r:�rootr2r3cCst�d|�rdSdS)Nz[a-z0-9_\])\s]<-(?!-)g)\��(�?)�re�search)r!r%r%r&�analyse_text�szSLexer.analyse_textN)r'r(r)r*r+r,r-�	mimetypesr5r�Singlerrr
ZReservedr	�Constant�BuiltinZPseudor
ZHexrrrZFunction�tokensr?r%r%r%r&rFsJ



c
@sfeZdZdZdZdgZdgZdgZddej	fde
fd	ejfd
efde
j
fdejfd
efdefgiZdS)ram
    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 <http://cran.r-project.org/doc/manuals/R-exts.html>`_
    and `Parsing Rd files <http://developer.r-project.org/parseRd.pdf>`_.

    .. versionadded:: 1.6
    ZRdZrdz*.Rdztext/x-r-docr<z	\\[\\{}%]z%.*$z\\(?:cr|l?dots|R|tab)\bz
\\[a-zA-Z]+\bz^\s*#(?:ifn?def|endif).*\bz[{}]z[^\\%\n{}]+r;N)r'r(r)r*r+r,r-r@rZEscaperr
rBZPreprocrrCrrDr%r%r%r&r�s
)r*r=Zpygments.lexerrrrrrZpygments.tokenrrr	r
rrr
rr�__all__�compilerrrrr%r%r%r&�<module>
s,

.W