i7ikdZddlmZmZmZmZmZmZddlm Z m Z m Z m Z m Z mZmZmZmZmZgdZGddeZGddeZGd d eZGd d eZy )z pygments.lexers.grammar_notation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for grammar notations like BNF. :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. ) RegexLexerbygroupsincludethisusingwords) CommentKeywordLiteralNameNumberOperator PunctuationStringText Whitespace)BnfLexer AbnfLexer JsgfLexerPegLexercreZdZdZdZdgZdgZdgZdZdZ dd e e e je fd efd efd efgiZy )ra# 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 `_. * 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. BNFbnfz*.bnfz text/x-bnfz6https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form2.1rootz(<)([ -;=?-~]+)(>)z::=z[^<>:]+.N)__name__ __module__ __qualname____doc__namealiases filenames mimetypesurl version_addedrrr Classrrtokensi/mnt/ssd/data/python-lab/ChefSystem/venv/lib/python3.12/site-packages/pygments/lexers/grammar_notation.pyrrsq2 DgG II BCM  " k4::{ ; =X   4L   Fr*rceZdZdZdZdZdgZdgZdgZdZ dZ d d e jfd e fd e fd e fde fde fde fde fdefdefdefdefee defdej$fdefdefdefdefgiZy)rzj Lexer for IETF 7405 ABNF. (Updates `5234 `_) grammars. ABNFz#http://www.ietf.org/rfc/rfc7405.txtabnfz*.abnfz text/x-abnfr)ALPHABITCHARCRCRLFCTLDIGITDQUOTEHEXDIGHTABLFLWSPOCTETSPVCHARWSPrz;.*$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]+\*\bsuffixz[a-zA-Z][a-zA-Z0-9-]*\bz(=/|=|/)z[\[\]()]\s+rN)rrrr r!r%r"r#r$r& _core_rulesr Singler rrr r r'rrrr(r)r*r+rrBs D /ChG IIMK  gnn %  )!' * #W -#G , %w // 8 17 ;!( + H % ( # H ;u -w 7( 4( #+ &Z 4LS* ,Fr*rceZdZdZdZdZdgZdgZgdZdZ e de d gd e jd fd e jfd e jfgde jfdefdefdefdej&fdej*dfdej,dfeddej2fdej2dfdeeej8efdedfdefg dej*d fd!ej<fd"ej*fgd#ej,d fd!ej<fd$ej,fgded fdefd%efd&ej>fgd'ed fd(efdefd)eej>eefd*ej@fgd+e jd fd,eee jee jBee"e#d-.fd/ee je jBfd0e jfgd1eee jfe d d2e jfgd3 Z$y4)5rz. For JSpeech Grammar Format grammars. JSGFzhttps://www.w3.org/TR/jsgf/jsgfz*.jsgf)zapplication/jsgfzapplication/x-jsgfz text/jsgfz2.2comments non-commentsz /\*\*(?!/)documentation commentz/\*[\w\W]*?\*/z//.*$z \A#JSGF[^;]*rC;z [=|()\[\]*+]z/[^/]+/"stringz\{tag)importpublicr@rAz 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) rrIrJrNrOrRrTrKrWN)%rrrr r!r%r"r#r$r&rr MultilinerEPreprocrrrr FloatrDoubleOtherrr Reservedrr BuiltinrEscape NamespaceConstantSpecialrrr(r)r*r+rrs D 'ChG IGIM J  N # G--/F G  1 1 2 w~~ & goo . Z ;  h '  & 6==( + FLL% ( ' 68H8H I 7++^ < ! k4<< = ? ; + +T 2 6==& ) V]] #  ' FLL& ) V]] #  & ; ' Z K $.. )  ; ' K Z !8DNND+#N O  &  W&& /2 j'"3"3Z %I">@ A# g'' 9 ;  1 1 2 " Xj'2C2CD E N # 7$$ % u?Fr*rc eZdZdZdZdZdgZdgZdgZdZ dd e jfd e fd e fd efd ee ee fdej"fdejfdej&fdefg iZy)ru 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`). PEGz#https://bford.info/pub/lang/peg.pdfpegz*.pegz text/x-pegz2.6rz#.*$u<-|[←:=/|&!?*+^↑~]z[()]rUz (\[)([^\]]*(?:\\.[^\]\\]*)*)(\])z$[a-z]?"[^"\\]*(?:\\.[^"\\]*)*"[a-z]*z$[a-z]?'[^'\\]*(?:\\.[^'\\]*)*'[a-z]*u#[^\s<←:=/|&!?*+\^↑~()\[\]"\'#]+rN)rrrr r!r%r"r#r$r&r rErrr rrr\r r'rr(r)r*r+rrs" D /CgG IIM  gnn %' 1k "G 1 k6; 7 95fmm D 4fmm D4TZZ @4L3 Fr*rN)r pygments.lexerrrrrrrpygments.tokenr r r r r rrrrr__all__rrrrr)r*r+rjs^ML444 =-z-`? ?DJ JZ5z5r*