3

V'ícsã@s|dZddlZddlmZmZmZmZmZddlm	Z	m
Z
mZmZm
Z
mZmZmZddgZGdd„deƒZGdd„deƒZdS)	zß
    pygments.lexers.bibtex
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexers for BibTeX bibliography data and styles

    :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
éN)Ú
RegexLexerÚExtendedRegexLexerÚincludeÚdefaultÚwords)ÚNameÚCommentÚStringÚErrorÚNumberÚKeywordÚPunctuationÚ
WhitespaceÚBibTeXLexerÚBSTLexerc@sleZdZdZdZddgZdgZdgZej	Z
dZdjd	ed
eƒZ
dd„Zd
d„Zedƒdefdejd.fdejd/fde
ejd0fdefgedƒdedfgedƒdedfgedƒdejd1fgedƒdedfedƒgedƒe
ejd2fedƒgedƒd edfgedƒe
ejfd!ed"fd#ed$fd%efd&efedƒgd#ed$fd!edfd'efgd#ed(fd)edfd*efgd+efgd,œZd-S)3rzQ
    A lexer for BibTeX bibliography data format.

    .. versionadded:: 2.2
    ZBibTeXZbibtexZbibz*.bibz
text/x-bibtexz@!$&*+\-./:;<>?\[\\\]^`|~z	[{}][{}]*za-z_z\wccs,|jƒ}||_|jƒt|fV|jƒ|_dS)N)ÚgroupÚ
opening_braceÚstartr
ÚendÚpos)ÚselfÚmatchÚctxr©rú:/tmp/pip-build-gk9425m9/Pygments/pygments/lexers/bibtex.pyÚopen_brace_callback%szBibTeXLexer.open_brace_callbackccs`|jƒ}|jdkr|dks,|jdkr>|dkr>|jƒt|fVn|jƒt|fV|`|jƒ|_dS)NÚ{Ú}ú(ú))rrrr
r
rr)rrrZ
closing_bracerrrÚclose_brace_callback+sz BibTeXLexer.close_brace_callbackÚ
whitespacez@comment(?!ary)z	@preambleú
closing-braceÚvalueú
opening-bracez@stringÚfieldú@úcommand-bodyz.+z[{(]ú#popz[})]z
[^\s\,\}]+Úfieldsú,ú=ú"z
quoted-stringz\{z
braced-stringz[\d]+ú#z[^\{\"]+z#pushz\}z[^\{\}]+z\s+)Úrootz
opening-bracez
closing-bracezcommand-bodyr)r%r+r#z
quoted-stringz
braced-stringr!N)r"r#r$)r"r%r$)r"r'r$)r(r))r#r+)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesÚreÚ
IGNORECASEÚflagsZ
ALLOWED_CHARSÚformatÚ
IDENTIFIERrr rrrZClassZLabelr
rÚ	AttributeÚVariabler	rrÚtokensrrrrrsZ






c
@sèeZdZdZdZddgZdgZejej	BZ
edƒeddgƒe
fed	d
ddd
gƒe
dfeddgƒe
d fedgƒe
d!fgedƒded"fgedƒdedfgedƒdejfdejfdejfdefdefded#fedƒgdefdejfgdœZdS)$rzL
    A lexer for BibTeX bibliography styles.

    .. versionadded:: 2.2
    ZBSTZbstz
bst-pybtexz*.bstr!ÚreadÚsortÚexecuteZintegersZiterateÚreverseÚstringsrÚfunctionÚmacroÚentryz\{ú#popú	group-endÚbodyz\}z\'[^#\"\{\}\s]+z[^#\"\{\}\s]+\$z
[^#\"\{\}\s]+z"[^\"]*"z#-?\d+z\s+z%.*?$)r.rz	group-endrIr!N)rr)rrr)rGrHrI)rHrI)r/r0r1r2r3r4r5r7r8Ú	MULTILINEr9rrrr
rZFunctionZBuiltinr=r	rrrrÚSingler>rrrrrts2

)r2r7Zpygments.lexerrrrrrZpygments.tokenrrr	r
rrr
rÚ__all__rrrrrrÚ<module>	s(_