3
V'íc ã @ sx d Z ddlmZmZmZmZmZ ddlmZm Z m
Z
mZmZm
Z
mZmZmZ ddgZG dd deZG dd deZdS ) zÌ
pygments.lexers.q
~~~~~~~~~~~~~~~~~
Lexer for the Q programming language.
:copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
é )Ú
RegexLexerÚwordsÚincludeÚbygroupsÚinherit) ÚCommentÚNameÚNumberÚOperatorÚPunctuationÚStringÚ
WhitespaceÚLiteralÚGenericÚKLexerÚQLexerc 0 @ sà e Zd ZdZdZdgZdgZdejfdej dfdej
fd efd
ej
dfgeded
edgedkd<d=ejfgd>ejfd?eejej
fd@ejfdAejfdBeejeeeedCfdDeejeefdEedCfdFedGfdHedIfdJejfdKejfdLejfedMdNefdOefdPefgedQdRedSfgedQdTedSfgedQdUedSfgdVejfdWefdXejfdYejfdZejfd[ej fd\ej fd]ej!fd^ej!fd_ej!fd`efdaej"fdbej"j#fg
dcej fddej dSfdeej fgdfej
fdgej$fdhej
dSfgdi
Z%djS )lr zR
For `K <https://code.kx.com/>`_ source code.
.. versionadded:: 2.12
ÚKÚkz*.kz^#!.*z^/\s*\nÚcommentsz
(?<!\S)/.*z\s+z\"ÚstringsÚ
whitespaceÚkeywordsÚdeclarationsÚabsÚacosÚasinÚatanÚavgÚbinÚbinrÚbyÚcorÚcosÚcovÚdevÚdeleteÚdivÚdoÚenlistÚexecÚexitÚexpÚfromÚgetenvÚhopenÚifÚinÚinsertÚlastÚlikeÚlogÚmaxÚminÚprdÚselectÚsetenvÚsinÚsqrtÚssÚsumÚtanÚupdateÚvarÚwavgÚwhileÚwithinÚwsumÚxexpz\b)Úsuffixz^\\ts?z^(\\\w\s+[^/\n]*?)(/.*)z^\\\w.*z^[a-zA-Z]\)z@([.]?[a-zA-Z][\w.]*)(\s*)([-.~=!@#$%^&*_+|,<>?/\\:']?:)(\s*)(\{)Ú functionsz7([.]?[a-zA-Z][\w.]*)(\s*)([-.~=!@#$%^&*_+|,<>?/\\:']?:)z\{z\(Úparenthesesz\[Úbracketsz'`([a-zA-Z][\w.]*)?z`:([a-zA-Z/][\w./]*)?z`([a-zA-Z][\w.]*)?Únumbersz[a-zA-Z][\w.]*z[-=+*#$%@!~^&:.,<>'\\|/?_]ú;Úrootz\}z#popz\)z\]z[01]+bz0[nNwW][cefghijmndzuvtp]?zh(?:[0-9]{4}[.][0-9]{2}[.][0-9]{2}|[0-9]+)D(?:[0-9](?:[0-9](?::[0-9]{2}(?::[0-9]{2}(?:[.][0-9]*)?)?)?)?)?z\[0-9]{4}[.][0-9]{2}(?:m|[.][0-9]{2}(?:T(?:[0-9]{2}:[0-9]{2}(?::[0-9]{2}(?:[.][0-9]*)?)?)?)?)z1[0-9]{2}:[0-9]{2}(?::[0-9]{2}(?:[.][0-9]{1,3})?)?z<[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}z0x[0-9a-fA-F]+z7([0-9]*[.]?[0-9]+|[0-9]+[.]?[0-9]*)[eE][+-]?[0-9]+[ef]?z&([0-9]*[.][0-9]+|[0-9]+[.][0-9]*)[ef]?z
[0-9]+[ef]z[0-9]+cz
[0-9]+[ihtuv]z[0-9]+[jnp]?z[^\\]+z^\\z\\z[^"\\]+z\\.ú")
r rL r r rG rH rI rJ r r N)-r r r r r r r r r! r"