a
    ¨ˆcŠ  ã                   @   s^   d 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 dgZG dd„ deƒZdS )zÕ
    pygments.lexers.promql
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexer for Prometheus Query Language.

    :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    )Ú
RegexLexerÚbygroupsÚdefaultÚwords)ÚCommentÚKeywordÚNameÚNumberÚOperatorÚPunctuationÚStringÚ
WhitespaceÚPromQLLexerc                   @   s8  e Zd ZdZdZdZdgZdgZeddd�e	fZ
ed	dd�e	fZed
dd�e	jfZdefdefdefe
eedefdejfdejfdejfdefdefdejfdejfdeeeeƒfdedfdefdedfdedfgdedfdefdefdefd eejeeeeeeƒfgd!edfdefgdedfded"fedƒgd#œZd$S )%r   z¦
    For PromQL queries.

    For details about the grammar see:
    https://github.com/prometheus/prometheus/tree/master/promql/parser

    .. versionadded: 2.7
    ZPromQLz=https://prometheus.io/docs/prometheus/latest/querying/basics/Zpromqlz*.promql)ÚboolZbyZ
group_leftZgroup_rightZignoringÚoffsetÚonZwithoutz\b)Úsuffix)ÚsumÚminÚmaxÚavgÚgroupZstddevZstdvarÚcountZcount_valuesZbottomkZtopkZquantile)/ÚabsZabsentZabsent_over_timeZavg_over_timeÚceilÚchangesZ	clamp_maxZ	clamp_minZcount_over_timeZday_of_monthZday_of_weekZdays_in_monthÚdeltaZderivÚexpÚfloorZhistogram_quantileZholt_wintersÚhourZideltaZincreaseZirateZ
label_joinZlabel_replaceÚlnÚlog10Úlog2Zmax_over_timeZmin_over_timeÚminuteÚmonthZpredict_linearZquantile_over_timeZrateZresetsÚroundZscalarÚsortZ	sort_descÚsqrtZstddev_over_timeZstdvar_over_timeZsum_over_timeÚtimeÚ	timestampZvectorÚyearz\nz\s+ú,z[1-9][0-9]*[smhdwy]z-?[0-9]+\.[0-9]+z-?[0-9]+z#.*?$z(\+|\-|\*|\/|\%|\^)z==|!=|>=|<=|<|>zand|or|unlessz[_a-zA-Z][a-zA-Z0-9_]+z(["\'])(.*?)(["\'])z\(Úfunctionz\)z\{Úlabelsz\[Úrangez\}z#popzB([_a-zA-Z][a-zA-Z0-9_]*?)(\s*?)(=~|!=|=|!~)(\s*?)("|\')(.*?)("|\')z\]z#push)Úrootr-   r.   r,   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚurlÚaliasesÚ	filenamesr   r   Zbase_keywordsZaggregator_keywordsZReservedZfunction_keywordsr   r   r   r	   ZFloatZIntegerr   ÚSingler
   ÚWordr   ÚVariabler   ZLabelr   Útokens© r<   r<   úY/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pygments/lexers/promql.pyr      sz   	
õòñî1Î4Ë:åÿÿû
þýÕN)r3   Zpygments.lexerr   r   r   r   Zpygments.tokenr   r   r   r	   r
   r   r   r   Ú__all__r   r<   r<   r<   r=   Ú<module>   s   
(