+
    ij  c                   s    R t . ROt^ RIHtHt ^ RIHtHt ^ RIH	t	  ! R R4      t
 ! R	 R]
4      t ! R
 R4      t ! R R]4      tR# )z-A parser of RFC 5322 and MIME email messages.ParserHeaderParserBytesParserBytesHeaderParser)StringIOTextIOWrapper)
FeedParserBytesFeedParser)compat32c                   sF   a  ] tR t^t o RR]/R lltRR ltRR ltRtV t	R# )	r    Npolicyc               s    Wn         W n        R# )a  Parser of RFC 5322 and MIME email messages.

Creates an in-memory object tree representing the email message, which
can then be manipulated and turned over to a Generator to return the
textual representation of the message.

The string must be formatted as a block of RFC 5322 headers and header
continuation lines, optionally preceded by a 'Unix-from' header.  The
header block is terminated either by the end of the string or by a
blank line.

_class is the class to instantiate for new message objects when they
must be created.  This class must have a constructor that can take
zero arguments.  Default is Message.Message.

The policy keyword specifies a policy object that controls a number of
aspects of the parser's operation.  The default policy maintains
backward compatibility.

N_classr	   )selfr   r	   s   &&$%/usr/lib64/python3.14/email/parser.py__init__ZParser.__init__   s    *     c                s    \        V P                  V P                  R7      pV'       d   VP                  4        VP	                  R4      ;p'       d   VP                  V4       K,  VP                  4       # )a4  Create a message structure from the data in a file.

Reads all the data from the file and returns the root of the message
structure.  Optional headersonly is a flag specifying whether to stop
parsing after reading the headers or not.  The default is False,
meaning it parses the entire contents of the file.
)r	   i    )r   r   r	   Z_set_headersonlyZreadZfeedZclose)r   fpheadersonlyZ
feedparserZdatas   &&&  r   parseZParser.parse)   sU      DKK@
'')ggdm#d#OOD!!!r   c                s:    V P                  \        V4      VR7      # )a  Create a message structure from a string.

Returns the root of the message structure.  Optional headersonly is a
flag specifying whether to stop parsing after reading the headers or
not.  The default is False, meaning it parses the entire contents of
the file.
r   )r   r   r   Ztextr      &&&r   parsestrZParser.parsestr8   s     zz(4.kzBBr   r
   )NF)
__name__
__module____qualname____firstlineno__r   r   r   r   __static_attributes____classdictcell__Z__classdict__   @r   r    r       s"     h 0"C Cr   c                   s4   a  ] tR t^Ct o RR ltRR ltRtV tR# )r   c                .    \         P                  WR 4      # T)r    r   r   r   r   r   r   r   ZHeaderParser.parseD   s    ||Dd++r   c                r    r!   )r    r   r   r   r   r   ZHeaderParser.parsestrG   s    t400r    Nr!   )r   r   r   r   r   r   r   r   r   r   r   r   r   C   s     ,1 1r   c                   s:   a  ] tR t^Kt o R tRR ltRR ltRtV tR# )r   c                s&    \        V/ VB V n        R# )ax  Parser of binary RFC 5322 and MIME email messages.

Creates an in-memory object tree representing the email message, which
can then be manipulated and turned over to a Generator to return the
textual representation of the message.

The input must be formatted as a block of RFC 5322 headers and header
continuation lines, optionally preceded by a 'Unix-from' header.  The
header block is terminated either by the end of the input or by a
blank line.

_class is the class to instantiate for new message objects when they
must be created.  This class must have a constructor that can take
zero arguments.  Default is Message.Message.
N)r    parser)r   ZargsZkws   &*,r   r   ZBytesParser.__init__M   s      d)b)r   c                s    \        VRRR7      p V P                  P                  W4      VP                  4        #   TP                  4        i ; i)a;  Create a message structure from the data in a binary file.

Reads all the data from the file and returns the root of the message
structure.  Optional headersonly is a flag specifying whether to stop
parsing after reading the headers or not.  The default is False,
meaning it parses the entire contents of the file.
Zasciisurrogateescape)Zencodingerrors)r   r$   r   Zdetachr"   r   r   r   ZBytesParser.parse_   s=     28IJ	;;$$R5IIKBIIKs	   ; Ac                s^    VP                  RRR7      pV P                  P                  W4      # )a
  Create a message structure from a byte string.

Returns the root of the message structure.  Optional headersonly is a
flag specifying whether to stop parsing after reading the headers or
not.  The default is False, meaning it parses the entire contents of
the file.
ZASCIIr%   )r&   )Zdecoder$   r   r   r   r   
parsebytesZBytesParser.parsebytesn   s,     {{7+<{={{##D66r   )r$   Nr   )	r   r   r   r   r   r   r'   r   r   r   r   r   r   r   K   s     *$	7 	7r   c                   s4   a  ] tR t^zt o RR ltRR ltRtV tR# )r   c                0    \         P                  WR R7      # Tr   )r   r   r"   r   r   r   ZBytesHeaderParser.parse{   s      t <<r   c                r(   r)   )r   r'   r   r   r   r'   ZBytesHeaderParser.parsebytes~   s    %%dd%CCr   r#   Nr!   )r   r   r   r   r   r'   r   r   r   r   r   r   r   z   s     =D Dr   N)r    r   r   r   r   r   )Z__doc__Z__all__Zior   r   Zemail.feedparserr   r   Zemail._policybaser   r    r   r   r   r#   r   r   <module>r*      sN   
 4, ' 8 &0C 0Cf16 1,7 ,7^D Dr   