File: //usr/lib/python3/dist-packages/pygments/lexers/__pycache__/grammar_notation.cpython-38.pyc
U
G�
\� � @ s� d Z ddlZddlmZmZmZmZmZmZ ddl m
Z
mZmZm
Z
mZmZmZmZmZ dddgZG dd� de�ZG d d� de�ZG d
d� de�ZdS )z�
pygments.lexers.grammar_notation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for grammer notations like BNF.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
� N)�
RegexLexer�bygroups�include�this�using�words) �Comment�Keyword�Literal�Name�Number�Operator�Punctuation�String�Text�BnfLexer� AbnfLexer� JsgfLexerc @ sP e Zd ZdZdZdgZdgZdgZddee e
je �fdefd e
fd
e
fgiZdS )r a>
This lexer is for grammer notations which are similar to
original BNF.
In order to maximize a number of targets of this lexer,
let's decide some designs:
* We don't distinguish `Terminal Symbol`.
* We do assume that `NonTerminal Symbol` are always enclosed
with arrow brackets.
* We do assume that `NonTerminal Symbol` may include
any printable characters except arrow brackets and ASCII 0x20.
This assumption is for `RBNF <http://www.rfc-base.org/txt/rfc-5511.txt>`_.
* We do assume that target notation doesn't support comment.
* We don't distinguish any operators and punctuation except
`::=`.
Though these desision making might cause too minimal highlighting
and you might be disappointed, but it is reasonable for us.
.. versionadded:: 2.1
ZBNFZbnfz*.bnfz
text/x-bnf�rootz(<)([ -;=?-~]+)(>)z::=z[^<>:]+�.N)�__name__�
__module__�__qualname__�__doc__�name�aliases� filenames� mimetypesr r r �Classr
r �tokens� r r �B/usr/lib/python3/dist-packages/pygments/lexers/grammar_notation.pyr s ���c @ s� e Zd ZdZdZdgZdgZdgZdZdde j
fd efd
efdefdefd
efdefdefdefdefdefdefe
edd�efdejfdefdefdefdefgiZdS )r z�
Lexer for `IETF 7405 ABNF
<http://www.ietf.org/rfc/rfc7405.txt>`_
(Updates `5234 <http://www.ietf.org/rfc/rfc5234.txt>`_)
grammars.
.. versionadded:: 2.1
ZABNFZabnfz*.abnfztext/x-abnf)ZALPHAZBITZCHARZCRZCRLFZCTLZDIGITZDQUOTEZHEXDIGZHTABZLFZLWSPZOCTETZSPZVCHARZWSPr z;.*$z(%[si])?"[^"]*"z%b[01]+\-[01]+\bz%b[01]+(\.[01]+)*\bz%d[0-9]+\-[0-9]+\bz%d[0-9]+(\.[0-9]+)*\bz%x[0-9a-fA-F]+\-[0-9a-fA-F]+\bz!%x[0-9a-fA-F]+(\.[0-9a-fA-F]+)*\bz\b[0-9]+\*[0-9]+z
\b[0-9]+\*z\b[0-9]+�\*�\b��suffixz[a-zA-Z][a-zA-Z0-9-]+\bz(=/|=|/)z[\[\]()]�\s+r N)r r r r r r r r Z_core_rulesr �Singler
r
r r r r r r r r r r r! r E s6 ��c @ s� e Zd ZdZdZdgZdgZdddgZej ej
B Zed�ed �gd
e
jdfde
jfd
e
jfgde
jfdefdefdefdejfdejdfdejdfeddd�ejfdejdfdeeeje�fdedfdefgdejd fd!ejfd"ejfgd#ejd fd!ejfd$ejfgded fdefd%efd&ej fgd'ed fd(efdefd)eej ee�fd*ej!fgd+e
jd fd,ee
je
j"e#e$d-d.��fd/ee
je
j"�fd0e
jfgd1e
jfed �d2e
jfgd3� Z%d4S )5r zn
For `JSpeech Grammar Format <https://www.w3.org/TR/jsgf/>`_
grammars.
.. versionadded:: 2.2
ZJSGFZjsgfz*.jsgfzapplication/jsgfzapplication/x-jsgfz text/jsgf�comments�non-commentsz
/\*\*(?!/)�documentation commentz/\*[\w\W]*?\*/z//.*z\A#JSGF[^;]*r&