3

V'íciã@s„dZddlmZmZmZmZmZmZmZddl	m
Z
mZmZm
Z
mZmZmZmZmZmZddgZGdd„deƒZGdd„deƒZdS)	zÓ
    pygments.lexers.varnish
    ~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for Varnish configuration

    :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é)Ú
RegexLexerÚincludeÚbygroupsÚusingÚthisÚinheritÚwords)
ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚLiteralÚ
WhitespaceÚVCLLexerÚVCLSnippetLexercH@speZdZdZdZdgZdgZdgZdd„Ze	dƒe	d	ƒd
e
eje
eeƒeƒfdedfge	dƒe	d	ƒd
e
fdefdefdedfge	dƒde
eje
ejjeƒfde
eje
eƒdfde
eje
eeƒeƒfdedfdedfgdejfdejfdejfdejfdejfed”dZd[ejfd\e
fd]efd^efed•dZd[efdqejfed–ƒejfdtefdue
eejjeƒdvfdwe
eejjeƒdfdxe
eejjeƒdyfdze
ejejeƒfd{e
eejeƒfd|e
ejeejeeƒƒfd}efgd~ejfdejdfd€ejdfdejfgd‚efdejdƒfd„efgd…edfd†efgd‡efdˆedfd‰efgdŠed‹fdŒedfdŽefdefde fge	dƒe	d	ƒe	d‘ƒdefgd’œ
Z!d“S)—rzN
    For Varnish Configuration Language (VCL).

    .. versionadded:: 2.2
    ZVCLZvclz*.vclz
text/x-vclsrccCs&|jdƒrdSd|dd…kr"dSdS)Nzvcl 4.0;gð?z	
vcl 4.0;iègÍÌÌÌÌÌì?)Ú
startswith)Útext©rú;/tmp/pip-build-gk9425m9/Pygments/pygments/lexers/varnish.pyÚanalyse_texts
zVCLLexer.analyse_textÚ
whitespaceÚcommentsz(\.\w+)(\s*=\s*)([^;]*)(;)z\}z#popz[!/]+ú;z\d+z(\.probe)(\s*=\s*)(\w+)(;)z(\.probe)(\s*=\s*)(\{)Úprobez!(\.\w+\b)(\s*=\s*)([^;\s]*)(\s*;)z\{z#pushz(\d\.)?\d+[sdwhmy]z(\d\.)?\d+msz£(vcl_pass|vcl_hash|vcl_hit|vcl_init|vcl_backend_fetch|vcl_pipe|vcl_backend_response|vcl_synth|vcl_deliver|vcl_backend_error|vcl_fini|vcl_recv|vcl_purge|vcl_miss)\bzV(pipe|retry|hash|synth|deliver|purge|abandon|lookup|pass|fail|ok|miss|fetch|restart)\bz8(beresp|obj|resp|req|req_top|bereq)\.http\.[a-zA-Z_-]+\bú
obj.statusúreq.hash_always_missúberesp.backendú
req.esi_levelúreq.can_gzipú
beresp.ttlúobj.uncacheableúreq.ttlúobj.hitsúclient.identityúreq.hash_ignore_busyú
obj.reasonúreq.xidú
req_top.protoú
beresp.ageú	obj.protoúobj.ageúlocal.ipúberesp.uncacheableú
req.methodúberesp.backend.ipÚnowú	obj.graceúreq.restartsúberesp.keepú	req.protoú
resp.protoú	bereq.xidúbereq.between_bytes_timeoutúreq.esiúbereq.first_byte_timeoutúbereq.methodúbereq.connect_timeoutúberesp.do_gzipúresp.statusúberesp.do_gunzipúberesp.storage_hintúresp.is_streamingúberesp.do_streamúreq_top.methodú
bereq.backendúberesp.backend.nameú
beresp.statusúreq.urlúobj.keepúobj.ttlú
beresp.reasonú
bereq.retriesúresp.reasonú	bereq.urlú
beresp.do_esiúberesp.protoú	client.ipúbereq.protoúserver.hostnameú	remote.ipúreq.backend_hintúserver.identityúreq_top.urlúberesp.graceúberesp.was_304ú	server.ipúbereq.uncacheablez\b)Úsuffixz[!%&+*\-,/<.}{>=|~]+z[();]z[,]+Ú	hash_dataÚregsubÚ	regsuballÚifÚelseÚelsifÚelifÚsynthÚ	syntheticÚbanÚreturnÚsetÚunsetÚimportrÚnewÚrollbackÚcallzstorage\.\w+\.\w+\bÚtrueÚfalsez\d+\bz(backend)(\s+\w+)(\s*\{)Úbackendz(probe\s)(\s*\w+\s)(\{)z(acl\s)(\s*\w+\s)(\{)Úaclz(vcl )(4.0)(;)$z(sub\s+)([a-zA-Z]\w*)(\s*\{)z+([a-zA-Z_]\w*)(\.)([a-zA-Z_]\w*)(\s*\(.*\))z[a-zA-Z_]\w*z[^*/]+z/\*z\*/z[*/]z#.*$Úcommentz//.*$ú"z[^"\n]+z[^"}]z"\}z["}]zL?"Ústringz\{"Úmultistringz\nz\s+z\\\nÚ
statements)
rrrrqrwrsrrurvrÚrootN)?rrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\)r^r_r`rarbrcrdrerfrgrhrirjrkrrlrmrn)rorp)"Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesrrrr
Ú	AttributerrrrrÚVariableÚGlobalrÚDateZFunctionÚConstantrrZBuiltinÚReservedr
Z	Multilinerrr	ÚtokensrrrrrsÀ







c@s^eZdZdZdZddgZdgZgZdd„Zde	fd	e
jfgd
ej
fgedƒeedƒgd
œZdS)rzQ
    For Varnish Configuration Language snippets.

    .. versionadded:: 2.2
    ZVCLSnippetsZvclsnippetsZ
vclsnippetztext/x-vclsnippetcCsdS)Nrr)rrrrr«szVCLSnippetLexer.analyse_textz\.\.\.+zN(bereq|req|req_top|resp|beresp|obj|client|server|local|remote|storage)($|\.\*)z(backend)\bÚsnippetspreÚsnippetspost)rˆr‰rxN)ryrzr{r|r}r~r€rrr
r
r‚rr†rrr‡rrrrr s
N)r|Zpygments.lexerrrrrrrrZpygments.tokenr	r
rrr
rrrrrÚ__all__rrrrrrÚ<module>	s$0