3 ��X� � @ 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 �&/usr/lib/python3.6/grammar_notation.pyr s c @ s� e Zd ZdZdZdgZdgZdgZd+Zdde j fdefdefdefdefdefdefdefdefd efd!efd"efe ed#d$�efd%ejfd&efd'efd(efd)efgiZd*S ),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�ALPHA�BIT�CHAR�CR�CRLF�CTL�DIGIT�DQUOTE�HEXDIG�HTAB�LF�LWSP�OCTET�SP�VCHAR�WSPr 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]+z\*z\b)�suffixz[a-zA-Z][a-zA-Z0-9-]+\bz(=/|=|/)z[\[\]()]z\s+r N)r"