Server : Apache System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64 User : dh_edsupp ( 6597262) PHP Version : 8.2.26 Disable Function : NONE Directory : /lib/python3/dist-packages/pygments/lexers/__pycache__/ |
Upload File : |
o ���aV � @ s� d Z ddlZddlmZmZmZmZmZmZ ddl m Z mZmZm Z mZmZmZmZmZmZ g d�ZG dd� de�ZG dd � d e�ZG d d� de�ZG dd � d e�ZdS )z� pygments.lexers.grammar_notation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for grammar notations like BNF. :copyright: Copyright 2006-2021 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� Whitespace)�BnfLexer� AbnfLexer� JsgfLexer�PegLexerc @ sP e Zd ZdZdZdgZdgZdgZddee e je �fdefd e fd e fgiZdS )r a> This lexer is for grammar 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 �BNF�bnfz*.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 ���r 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 �ABNF�abnfz*.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]+�\*�\b��suffixz[a-zA-Z][a-zA-Z0-9-]*\bz(=/|=|/)z[\[\]()]�\s+r N)r r r r r r r r! �_core_rulesr �Singler r r r r r"