a
    lc6                     @   s   d Z ddlZddlmZmZmZmZmZmZ ddl	m
Z
mZmZmZmZmZmZmZmZmZ g dZG dd deZG dd	 d	eZG d
d deZG dd deZdS )z
    pygments.lexers.grammar_notation
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for grammar notations like BNF.

    :copyright: Copyright 2006-2022 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 Zd ZdZdZdgZdgZdgZddee	e
je	fdefd	efd
efgiZdS )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 decision 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$   \/var/www/html/django/DPS/env/lib/python3.9/site-packages/pygments/lexers/grammar_notation.pyr      s   r   c                   @   s   e Zd ZdZdZdZdgZdgZdgZdZ	dd	e
jfd
efdefdefdefdefdefdefdefdefdefdefee	ddefdejfdefdefdefdefgiZdS )r   z
    Lexer for IETF 7405 ABNF.

    (Updates `5234 <http://www.ietf.org/rfc/rfc5234.txt>`_) grammars.

    .. versionadded:: 2.1
    ABNFz#http://www.ietf.org/rfc/rfc7405.txtabnfz*.abnfztext/x-abnf)ZALPHAZBITZCHARCRCRLFZCTLDIGITZDQUOTEZHEXDIGZHTABZLFZLWSPZOCTETSPZVCHARZ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   urlr   r    r!   Z_core_rulesr   Singler
   r   r   r	   r   r"   r   r   r   r#   r$   r$   r$   r%   r   D   s8   r   c                   @   s  e Zd ZdZdZdZdgZdgZg dZe	de	dgd	e
jd
fde
jfde
jfgde
jfdefdefdefdejfdejdfdejdfedddejfdejdfdeeejefdedfdefgdejdfd ejfd!ejfgd"ejdfd ejfd#ejfgdedfdefd$efd%ejfgd&edfd'efdefd(eejeefd)ejfgd*e
jdfd+eee
jee
j ee!e"d,d-fd.ee
je
j fd/e
jfgd0eee
jfe	dd1e
jfgd2	Z#d3S )4r   zI
    For JSpeech Grammar Format grammars.

    .. versionadded:: 2.2
    JSGFzhttps://www.w3.org/TR/jsgf/jsgfz*.jsgf)zapplication/jsgfzapplication/x-jsgfz	text/jsgfcommentsnon-commentsz
/\*\*(?!/)documentation commentz/\*[\w\W]*?\*/z//.*$z\A#JSGF[^;]*r0   ;z[=|()\[\]*+]z/[^/]+/"stringz\{tag)importpublicr-   r.   z	grammar\bgrammar namez(<)(NULL|VOID)(>)<rulenamez\w+|[^\s;=|()\[\]*+/"{<\w]+z#popz\\.z[^\\"]+z\}z[^\\}]+\.z[^;\s.]+>r,   z([^.>]+)(\s*)(\.)z[^.>]+z\*/zH^(\s*)(\*?)(\s*)(@(?:example|see))(\s+)([\w\W]*?(?=(?:^\s*\*?\s*@|\*/)))example)statez(^\s*\*?\s*)(@\S*)z[^*\n@]+|\w|\Wz(\n\s*)(\*)r   )	r   r5   r6   r:   r;   r>   r@   r7   rC   N)$r   r   r   r   r   r1   r   r    r!   r   r   	Multiliner2   Preprocr   r   r   r   Floatr   DoubleOtherr   r	   Reservedr   r   Builtinr   Escape	NamespaceConstantSpecialr   r   r#   r$   r$   r$   r%   r      s~   






r   c                   @   sx   e Zd ZdZdZdZdgZdgZdgZdde	j
fd	efd
efdefdeeeefdejfdej
fdejfdefg	iZdS )r   u-  
    This lexer is for Parsing Expression Grammars (PEG).

    Various implementations of PEG have made different decisions
    regarding the syntax, so let's try to be accommodating:

    * `<-`, `←`, `:`, and `=` are all accepted as rule operators.

    * Both `|` and `/` are choice operators.

    * `^`, `↑`, and `~` are cut operators.

    * A single `a-z` character immediately before a string, or
      multiple `a-z` characters following a string, are part of the
      string (e.g., `r"..."` or `"..."ilmsuxa`).

    .. versionadded:: 2.6
    PEGz#https://bford.info/pub/lang/peg.pdfpegz*.pegz
text/x-pegr   z#.*$u   <-|[←:=/|&!?*+^↑~]z[()]rA   z (\[)([^\]]*(?:\\.[^\]\\]*)*)(\])z$[a-z]?"[^"\\]*(?:\\.[^"\\]*)*"[a-z]*z$[a-z]?'[^'\\]*(?:\\.[^'\\]*)*'[a-z]*u#   [^\s<←:=/|&!?*+\^↑~()\[\]"\'#]+r   N)r   r   r   r   r   r1   r   r    r!   r   r2   r   r   r	   r   r   rH   r   r"   r   r#   r$   r$   r$   r%   r      s(   
r   )r   reZpygments.lexerr   r   r   r   r   r   Zpygments.tokenr   r	   r
   r   r   r   r   r   r   r   __all__r   r   r   r   r$   r$   r$   r%   <module>   s   
 00CN