%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/reportlab/lib/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/reportlab/lib/__pycache__/yaml.cpython-312.pyc

�

��dU����dZdZddlZdZdZdZGd�d�ZGd	�d
e�Zd�Zd�Z	e
d
k(rJeej�dk7r	e	e�Z
neejd�Z
ddlZeje
�yy)a�
.h1 Welcome to YAML!
YAML is "Yet Another Markup Language" - a markup language
which is easier to type in than XML, yet gives us a
reasonable selection of formats.

The general rule is that if a line begins with a '.',
it requires special processing. Otherwise lines
are concatenated to paragraphs, and blank lines
separate paragraphs.

If the line ".foo bar bletch" is encountered,
it immediately ends and writes out any current
paragraph.

It then looks for a parser method called 'foo';
if found, it is called with arguments (bar, bletch).

If this is not found, it assumes that 'foo' is a
paragraph style, and the text for the first line
of the paragraph is 'bar bletch'.  It would be
up to the formatter to decide whether on not 'foo'
was a valid paragraph.

Special commands understood at present are:
dot image filename
- adds the image to the document
dot beginPre Code
- begins a Preformatted object in style 'Code'
dot endPre
- ends a preformatted object.
z3.3.0�N���·c�F�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zy)�
BaseParserz�"Simplest possible parser with only the most basic options.

    This defines the line-handling abilities and basic mechanism.
    The class YAMLParser includes capabilities for a fairly rich
    story.c�$�|j�y�N)�reset��selfs �4/usr/lib/python3/dist-packages/reportlab/lib/yaml.py�__init__zBaseParser.__init__9s���
�
��c�R�d|_d|_g|_g|_t|_y)Nr�Normal)�_lineNo�_style�_results�_buf�PLAIN�_moders r
r
zBaseParser.reset<s%����������
���	���
rc��t|d�j�}|D]}|j|dd��|j�|jS)N�r���)�open�	readlines�readLine�endParar)r�filename�data�lines    r
�	parseFilezBaseParser.parseFileCsM���H�c�"�,�,�.���	%�D��M�M�$�s��)�$�	%�	
�����}�}�rc��|jd�}|D]}|j|��|j�|jS)z+Parses the a possible multi-line text block�
)�splitrrr)r�	textBlock�linesr!s    r
�	parseTextzBaseParser.parseTextMs>������%���	 �D��M�M�$��	 ������}�}�rc�B�|jdz|_|j�}t|�dk(r@|jtk(r|j�y|jj|�y|ddk(r�|j�|ddj�}|d|dd}}t|j|�r	t||�|�y|j�|jdd�}t|�dk(sJd|d|jfz��|\}}|dd|_|jj|�y|jj|�y#t$r6}tjjd||||jfz��d}~wwxYw)Nrr�.z%Parser method: %s(*%s) %s at line %d
� rzStyle %s but no data at line %d)r�lstrip�lenrrrr�appendr%�hasattr�	__class__�getattr�	TypeError�sys�stderr�writer)	rr!�stripped�words�cmd�args�err�styletagr s	         r
rzBaseParser.readLineUsu���|�|�a�'����;�;�=���x�=�A���z�z�U�"������	�	� � ��&�
�!�W�c�\��L�L�N��Q�R�L�&�&�(�E��a��%���)��C��t�~�~�s�+��%�G�D��%�t�,����� ���s�A�.���5�z�1�}�b�&G�5�QR�8�UY�Ua�Ua�Jb�&b�b�}�#(� ��4�&�q�r�l����	�	� � ��&�
�I�I���T�"��!���J�J�$�$�%M�QT�VZ�\_�ae�am�am�Pn�%n�o����s�?E�	F�(1F�Fc�T�dj|j�}|r}|jtk(rB|jjd|jdj|j�f�n(|jjd|j|f�g|_d|_y)Nr+�PREFORMATTEDr$�	PARAGRAPHr)�joinrrr=rr.r)r�texts  r
rzBaseParser.endParazs����x�x��	�	�"����z�z�\�)��
�
�$�$�n�d�k�k�!%���4�9�9�!5�&7�8��
�
�$�$�k�4�;�;��%E�F���	���rc�(�t|_||_yr	)r=rr)r�	stylenames  r
�beginPrezBaseParser.beginPre�s��!��
���rc�:�|j�t|_yr	)rrrrs r
�endPrezBaseParser.endPre�s��������
rc�^�|j�|jjd|f�y)N�IMAGE�rrr.)rrs  r
�imagezBaseParser.image�s"�������
�
���g�x�0�1rN)
�__name__�
__module__�__qualname__�__doc__rr
r"r(rrrCrErI�rr
rr2s5�������##�J� ��2rrc�(�eZdZdZd�Zd�Zd�Zd�Zy)�Parserz[This adds a basic set of "story" components compatible with HTML & PDF.

    Images, spacesc�>�|jjd|f�y)zInserts a vertical spacer�VSpaceN�rr.)r�pointss  r
�vSpacez
Parser.vSpace�s���
�
���h��/�0rc�:�|jjd�y)zInserts a frame break)�	PageBreak�blahNrSrs r
�	pageBreakzParser.pageBreak�s���
�
���1�2rc�`�|j�|jjd||f�y)z8Goes and gets the Python object and adds it to the story�CustomNrH)r�
moduleName�funcNames   r
�customz
Parser.custom�s$�������
�
���h�z�8�<�=rc�>�|jjd|f�y)N�NextPageTemplaterS)r�templateNames  r
�nextPageTemplatezParser.nextPageTemplate�s���
�
���0��>�?rN)rJrKrLrMrUrYr^rbrNrr
rPrP�s���1�3�>�
@rrPc�8�t�}|j|�Sr	)rPr")r�ps  r
r"r"�s����A��;�;�x� � rc�8�t�}|j|�Sr	)rPr()r&rds  r
r(r(�s����A��;�;�y�!�!r�__main__)rM�__version__r3rr=�
BULLETCHARrrPr"r(rJr-�argv�results�pprintrNrr
�<module>rls����@
��
�	
����
�
�`2�`2�F@�Z�@�*!�"�
�Z��
�3�8�8�}����G�$���C�H�H�Q�K�(����F�M�M�'��
r

Zerion Mini Shell 1.0