Ë
    !täiM  ã                   óÆ   — d Z ddlZddlmZmZmZmZ ddlmZm	Z	m
Z
mZmZmZmZmZmZmZ g d¢Z ej&                  d«      Z G d„ de«      Z G d	„ d
e«      Z G d„ de«      Zy)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Ú
RegexLexerÚincludeÚdo_insertions)
ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚGenericÚ
Whitespace)ÚRConsoleLexerÚSLexerÚRdLexerz.*?
c                   ó4   — e Zd ZdZdZddgZdgZdZdZdZ	d	„ Z
y
)r   z@
    For R console transcripts or R CMD BATCH output files.
    ÚRConsoleÚrconsoleÚroutz*.Routúhttps://www.r-project.orgÚ z"rconsole/r-console-transcript.Routc           	   #   ó6  K  — t        di | j                  ¤Ž}d}g }t        j                  |«      D ]º  }|j	                  «       }|j                  d«      s|j                  d«      r:|j                  t        |«      dt        j                  |d d fgf«       ||dd  z  }Œo|r't        ||j                  |«      «      E d {  –—†  d}g }|j                  «       t        j                  |f–— Œ¼ |r$t        ||j                  |«      «      E d {  –—†  y y 7 ŒT7 Œ­w)Nr   Ú>Ú+r   é   © )r   ÚoptionsÚline_reÚfinditerÚgroupÚ
startswithÚappendÚlenr   ÚPromptr   Úget_tokens_unprocessedÚstartÚOutput)ÚselfÚtextÚslexerÚcurrent_code_blockÚ
insertionsÚmatchÚlines          ú`/Volumes/fast/ai/experiments/MLX_z-image/.venv/lib/python3.12/site-packages/pygments/lexers/r.pyr'   z$RConsoleLexer.get_tokens_unprocessed#   s,  è ø€ ÜÑ'˜$Ÿ,™,Ñ'ˆàÐØˆ
ä×%Ñ% dÖ+ˆEØ—;‘;“=ˆDØ�‰˜sÔ# t§¡°sÔ';ð ×!Ñ!¤3Ð'9Ó#:Ø%&¬¯©¸¸R¸a¸Ð$AÐ#Bð#Dô Eà" d¨1¨2 hÑ.Ñ"ñ &ä,Ø" F×$AÑ$AÐBTÓ$Uó W÷ Wð Wð *,Ð&Ø!#�Jà—k‘k“m¤W§^¡^°TÐ9Ó9ð' ,ñ0 Ü$Ø˜F×9Ñ9Ð:LÓMóO÷ Oñ Oð ðWøðOús%   ‚B>DÃ DÃADÄDÄDÄDN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚurlÚversion_addedÚ_exampler'   r   ó    r1   r   r      s4   „ ñð €DØ˜6Ð"€GØ�
€IØ
%€CØ€MØ3€Hó Or<   r   c                   óâ  — e Zd ZdZdZg d¢Zg d¢Zg d¢ZdZdZ	dZ
d	ej                  fge
efgd
e
› d�ej                  fgdefgdej"                  fgdefdefgdej&                  fdej(                  j*                  fgdej.                  fdefg ed«      defdedfdedf ed«       ed«       ed«       ed«       ed«       ed«       ed «      g ed!«      d"efd#efgd$ed%fgd&ed%fgd'œZd(„ Zy))*r   z+
    For S, S-plus, and R source code.
    ÚS)ÚsplusÚsÚr)z*.Sz*.Rz	.Rhistoryz	.Rprofilez	.Renviron)ztext/S-plusztext/Sztext/x-r-sourceztext/x-rztext/x-Rztext/x-r-historyztext/x-r-profiler   z0.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_dquoteÚbuiltin_symbolsÚkeywordsÚfunction_nameÚ
valid_nameÚnumbersÚpunctuationÚ	operatorsÚ
statementsz\{|\}Ú.z([^\'\\]|\\.)*\'z#popz([^"\\]|\\.)*")rC   rI   rH   rK   rG   rL   rF   rJ   rM   ÚrootrD   rE   c                 ó2   — t        j                  d| «      ryy )Nz[a-z0-9_\])\s]<-(?!-)g)\�Âõ(¼?)ÚreÚsearch)r+   s    r1   Úanalyse_textzSLexer.analyse_text›   s   € Ü�9‰9Ð-¨tÔ4Øð 5r<   N)r2   r3   r4   r5   r6   r7   r8   Ú	mimetypesr9   r:   rI   r   ÚSingler   ÚFunctionr   r
   ÚReservedr	   ÚConstantÚBuiltinÚPseudor   ÚHexr   r   r   r   ÚtokensrS   r   r<   r1   r   r   F   sª  „ ñð €DÚ!€GÚE€IòE€Ià
%€CØ€MàO€Jð �g—n‘nÐ%ð
ð ˜Ðð
ð �*�˜ZÐ(¨$¯-©-Ð8ð
ð *¨;Ð7ð
ðà×Ñðð
ð =¸hÐGØ4°hÐ?ð
ð
ð ×Ñðð ˜Ÿ™×,Ñ,Ð-ð
ð 4°V·Z±ZÐ@àKØðð	
ñ �JÓà�ZÐ Ø�F˜OÐ,Ø�F˜OÐ,ÙÐ%Ó&Ù�JÓÙ�OÓ$Ù�LÓ!Ù�IÓÙ�MÓ"Ù�KÓ ð
ñ  �LÓ!à�{Ð#à�4ˆLð
ð ! &¨&Ð1ð
ð  ¨Ð/ð
ñEE€FóNr<   r   c            
       ó¶   — e Zd ZdZdZdgZdgZdgZdZdZ	dd	e
j                  fd
efdej                  fdefdej                  fdej"                  fdefdefgiZy)r   aR  
    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>`_.
    ÚRdÚrdz*.Rdztext/x-r-docz1http://cran.r-project.org/doc/manuals/R-exts.htmlz1.6rO   z	\\[\\{}%]z%.*$z\\(?:cr|l?dots|R|tab)\bz\\[a-zA-Z]+\bz^\s*#(?:ifn?def|endif).*\bz[{}]z[^\\%\n{}]+rN   N)r2   r3   r4   r5   r6   r7   r8   rT   r9   r:   r   ÚEscaper   r
   rX   ÚPreprocr   rY   r   r\   r   r<   r1   r   r       s�   „ ñð €DØˆf€GØ�€IØÐ €IØ
=€CØ€Mð
 	à˜6Ÿ=™=Ð)à�gÐà'¨×)9Ñ)9Ð:à˜wÐ'à*¨G¯O©OÐ<à�d—l‘lÐ#à˜TÐ"Ø�4ˆLð
ð�Fr<   r   )r5   rQ   Úpygments.lexerr   r   r   r   Úpygments.tokenr   r   r	   r
   r   r   r   r   r   r   Ú__all__Úcompiler    r   r   r   r   r<   r1   Ú<module>rf      sg   ðñó 
ç DÓ D÷-÷ -÷ -ò 1€ð ˆ2�:‰:�gÓ€ô,O�Eô ,Oô^WˆZô Wôt$ˆjõ $r<   