B
    «»ˆdfê  ã               @   s  d Z dZddlZddlZddlZddlZddlZddlm	Z	 ddlm
Z
 ddlmZ ddlmZ dd	d
ddddgZe
 ¡ e
 ¡ e
 ¡ e
 ¡ fZe dej¡Ze dej¡ZedƒZdZG dd„ deƒZG dd„ deƒZG dd„ deƒZdQdd„Z dd„ Z!dd„ Z"dRdd
„Z#dSdd„Z$dTd d„Z%d!d"„ Z&d#Z'd$Z(G d%d&„ d&eƒZ)dUd'd	„Z*dVd(d„Z+dWd)d*„Z,dXd+d,„Z-G d-d.„ d.eƒZ.d/d0„ Z/d1d2„ Z0d3d4„ Z1d5d6„ Z2G d7d8„ d8eƒZ3e3Z4d9d:„ Z5d;d<„ Z6d=d>„ Z7d?d@„ Z8dAdB„ Z9dCdD„ Z:dYdEdF„Z;dZdGdH„Z<dIdJ„ Z=dKdL„ Z>dMdN„ Z?dOdP„ Z@dS )[ac  Contains routines for printing protocol messages in text format.

Simple usage example::

  # Create a proto object and serialize it to a text proto string.
  message = my_proto_pb2.MyMessage(foo='bar')
  text_proto = text_format.MessageToString(message)

  # Parse a text proto string.
  message = text_format.Parse(text_proto, my_proto_pb2.MyMessage())
z kenton@google.com (Kenton Varda)é    N)Údecoder)Útype_checkers)Ú
descriptor)Útext_encodingÚMessageToStringÚParseÚPrintMessageÚ
PrintFieldÚPrintFieldValueÚMergeÚMessageToBytesz-?inf(?:inity)?f?$znanf?$)ú'ú"zgoogle.protobuf.Anyc               @   s   e Zd ZdZdS )ÚErrorz'Top-level module error for text_format.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   úM/var/www/html/venv/lib/python3.7/site-packages/google/protobuf/text_format.pyr   G   s   r   c                   s2   e Zd ZdZd	‡ fdd„	Zdd„ Zdd„ Z‡  ZS )
Ú
ParseErrorz3Thrown in case of text parsing or tokenizing error.Nc                sr   |d k	r:|d k	r:t |ƒ}|d k	r.|d |¡7 }d ||¡}|d k	rTtt| ƒ |¡ ntt| ƒ ¡  || _|| _d S )Nz:{0}z	{0} : {1})ÚstrÚformatÚsuperr   Ú__init__Ú_lineÚ_column)ÚselfÚmessageÚlineÚcolumnÚloc)Ú	__class__r   r   r   N   s    zParseError.__init__c             C   s   | j S )N)r   )r   r   r   r   ÚGetLine[   s    zParseError.GetLinec             C   s   | j S )N)r   )r   r   r   r   Ú	GetColumn^   s    zParseError.GetColumn)NNN)r   r   r   r   r   r#   r$   Ú__classcell__r   r   )r"   r   r   K   s   r   c               @   s,   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	S )
Ú
TextWriterc             C   s   t  ¡ | _d S )N)ÚioÚStringIOÚ_writer)r   Úas_utf8r   r   r   r   d   s    zTextWriter.__init__c             C   s   | j  |¡S )N)r)   Úwrite)r   Úvalr   r   r   r+   g   s    zTextWriter.writec             C   s
   | j  ¡ S )N)r)   Úclose)r   r   r   r   r-   j   s    zTextWriter.closec             C   s
   | j  ¡ S )N)r)   Úgetvalue)r   r   r   r   r.   m   s    zTextWriter.getvalueN)r   r   r   r   r+   r-   r.   r   r   r   r   r&   b   s   r&   Fc             C   sV   t |ƒ}t||
|||||||||	|||d}| | ¡ | ¡ }| ¡  |rR| ¡ S |S )aT	  Convert protobuf message to text format.

  Double values can be formatted compactly with 15 digits of
  precision (which is the most that IEEE 754 "double" can guarantee)
  using double_format='.15g'. To ensure that converting to text and back to a
  proto will result in an identical value, double_format='.17g' should be used.

  Args:
    message: The protocol buffers message.
    as_utf8: Return unescaped Unicode for non-ASCII characters.
        In Python 3 actual Unicode characters may appear as is in strings.
        In Python 2 the return value will be valid UTF-8 rather than only ASCII.
    as_one_line: Don't introduce newlines between fields.
    use_short_repeated_primitives: Use short repeated format for primitives.
    pointy_brackets: If True, use angle brackets instead of curly braces for
      nesting.
    use_index_order: If True, fields of a proto message will be printed using
      the order defined in source code instead of the field number, extensions
      will be printed at the end of the message and their relative order is
      determined by the extension number. By default, use the field number
      order.
    float_format (str): If set, use this to specify float field formatting
      (per the "Format Specification Mini-Language"); otherwise, shortest float
      that has same value in wire will be printed. Also affect double field
      if double_format is not set but float_format is set.
    double_format (str): If set, use this to specify double field formatting
      (per the "Format Specification Mini-Language"); if it is not set but
      float_format is set, use float_format. Otherwise, use ``str()``
    use_field_number: If True, print field numbers instead of names.
    descriptor_pool (DescriptorPool): Descriptor pool used to resolve Any types.
    indent (int): The initial indent level, in terms of spaces, for pretty
      print.
    message_formatter (function(message, indent, as_one_line) -> unicode|None):
      Custom formatter for selected sub-messages (usually based on message
      type). Use to pretty print parts of the protobuf for easier diffing.
    print_unknown_fields: If True, unknown fields will be printed.
    force_colon: If set, a colon will be added after the field name even if the
      field is a proto message.

  Returns:
    str: A string of the text formatted protocol buffer message.
  )Úprint_unknown_fieldsÚforce_colon)r&   Ú_Printerr   r.   r-   Úrstrip)r   r*   Úas_one_lineÚuse_short_repeated_primitivesÚpointy_bracketsÚuse_index_orderÚfloat_formatÚdouble_formatÚuse_field_numberÚdescriptor_poolÚindentÚmessage_formatterr/   r0   ÚoutÚprinterÚresultr   r   r   r   q   s,    :
c             K   s6   t | f|Ž}t|tƒr|S | d¡r(dnd}| |¡S )zFConvert protobuf message to encoded text format.  See MessageToString.r*   zutf-8Úascii)r   Ú
isinstanceÚbytesÚgetÚencode)r   ÚkwargsÚtextÚcodecr   r   r   r   Ã   s
    
c             C   s"   | j tjjko | jjo | j ¡ jS )N)Útyper   ÚFieldDescriptorÚTYPE_MESSAGEÚmessage_typeZhas_optionsÚ
GetOptionsZ	map_entry)Úfieldr   r   r   Ú_IsMapEntryÍ   s    rN   c             C   s2   t |||||||||	|
||||d}| | ¡ d S )N)r=   r;   r*   r3   r4   r5   r6   r7   r8   r9   r:   r<   r/   r0   )r1   r   )r   r=   r;   r*   r3   r4   r5   r6   r7   r8   r9   r:   r<   r/   r0   r>   r   r   r   r   Ó   s    c             C   s0   t ||||||||	|
|||d}| | |¡ dS )z%Print a single field name/value pair.)r<   r/   r0   N)r1   r	   )rM   Úvaluer=   r;   r*   r3   r4   r5   r6   r7   r8   r<   r/   r0   r>   r   r   r   r	   ò   s    
c             C   s0   t ||||||||	|
|||d}| | |¡ dS )z0Print a single field value (not including name).)r<   r/   r0   N)r1   r
   )rM   rO   r=   r;   r*   r3   r4   r5   r6   r7   r8   r<   r/   r0   r>   r   r   r   r
   
  s    
c             C   sd   |dkrddl m} | ¡ }ddl m} | ¡ }y| | ¡}W n tk
rR   dS X | |¡}|ƒ S )a!  Returns a protobuf message instance.

  Args:
    type_name: Fully-qualified protobuf  message type name string.
    descriptor_pool: DescriptorPool instance.

  Returns:
    A Message instance of type matching type_name, or None if the a Descriptor
    wasn't found matching type_name.
  Nr   )r:   )Úsymbol_database)Úgoogle.protobufr:   ZDefaultrP   ZFindMessageTypeByNameÚKeyErrorZGetPrototype)Ú	type_namer:   Zpool_modrP   ZdatabaseÚmessage_descriptorrK   r   r   r   Ú_BuildMessageFromTypeName"  s    
rU   é   é   c               @   sb   e Zd ZdZddd„Zdd„ Zd	d
„ Zdd„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ ZdS )r1   z)Text format printer for protocol message.r   FNc             C   sh   || _ || _|| _|| _|| _|| _|| _|| _|	dk	r@|	| _n|| _|
| _	|| _
|| _|| _|| _dS )af  Initialize the Printer.

    Double values can be formatted compactly with 15 digits of precision
    (which is the most that IEEE 754 "double" can guarantee) using
    double_format='.15g'. To ensure that converting to text and back to a proto
    will result in an identical value, double_format='.17g' should be used.

    Args:
      out: To record the text format result.
      indent: The initial indent level for pretty print.
      as_utf8: Return unescaped Unicode for non-ASCII characters.
          In Python 3 actual Unicode characters may appear as is in strings.
          In Python 2 the return value will be valid UTF-8 rather than ASCII.
      as_one_line: Don't introduce newlines between fields.
      use_short_repeated_primitives: Use short repeated format for primitives.
      pointy_brackets: If True, use angle brackets instead of curly braces for
        nesting.
      use_index_order: If True, print fields of a proto message using the order
        defined in source code instead of the field number. By default, use the
        field number order.
      float_format: If set, use this to specify float field formatting
        (per the "Format Specification Mini-Language"); otherwise, shortest
        float that has same value in wire will be printed. Also affect double
        field if double_format is not set but float_format is set.
      double_format: If set, use this to specify double field formatting
        (per the "Format Specification Mini-Language"); if it is not set but
        float_format is set, use float_format. Otherwise, str() is used.
      use_field_number: If True, print field numbers instead of names.
      descriptor_pool: A DescriptorPool used to resolve Any types.
      message_formatter: A function(message, indent, as_one_line): unicode|None
        to custom format selected sub-messages (usually based on message type).
        Use to pretty print parts of the protobuf for easier diffing.
      print_unknown_fields: If True, unknown fields will be printed.
      force_colon: If set, a colon will be added after the field name even if
        the field is a proto message.
    N)r=   r;   r*   r3   r4   r5   r6   r7   r8   r9   r:   r<   r/   r0   )r   r=   r;   r*   r3   r4   r5   r6   r7   r8   r9   r:   r<   r/   r0   r   r   r   r   C  s     4z_Printer.__init__c             C   s†   d|j krdS t| ¡ | jƒ}|r~| |j¡ | jr8dnd}| j d| j	d |j |f ¡ |  
|¡ | j | jrtdnd¡ dS dS d	S )
z5Serializes if message is a google.protobuf.Any field.ú/Fú:Ú z	%s[%s]%s ú Ú
TN)Ztype_urlrU   ZTypeNamer:   ZMergeFromStringrO   r0   r=   r+   r;   Ú_PrintMessageFieldValuer3   )r   r   Zpacked_messageÚcolonr   r   r   Ú_TryPrintAsAnyMessage‰  s    

z_Printer._TryPrintAsAnyMessagec             C   sV   |   || j| j¡}|d krdS | j}| d| j ¡ | |¡ | | jrLdnd¡ dS )NFr[   r\   T)r<   r;   r3   r=   r+   )r   r   Ú	formattedr=   r   r   r   Ú_TryCustomFormatMessage™  s    
z _Printer._TryCustomFormatMessagec             C   s  | j r|  |¡rdS |jjtkr.|  |¡r.dS | ¡ }| jrL|jdd„ d x²|D ]ª\}}t	|ƒr–x˜t
|ƒD ]$}| ¡ ||| d}|  ||¡ qlW qR|jtjjkrð| jrÔ|jtjjkrÔ|jtjjkrÔ|  ||¡ qüx&|D ]}|  ||¡ qÚW qR|  ||¡ qRW | jr|  | ¡ ¡ dS )zeConvert protobuf message to text format.

    Args:
      message: The protocol buffers message.
    Nc             S   s   | d j r| d jS | d jS )Nr   )Úis_extensionÚnumberÚindex)Úxr   r   r   Ú<lambda>²  ó    z'_Printer.PrintMessage.<locals>.<lambda>)Úkey)rh   rO   )r<   ra   Ú
DESCRIPTORÚ	full_nameÚ_ANY_FULL_TYPE_NAMEr_   Z
ListFieldsr6   ÚsortrN   ÚsortedÚGetEntryClassr	   Úlabelr   rI   ÚLABEL_REPEATEDr4   Úcpp_typeÚCPPTYPE_MESSAGEÚCPPTYPE_STRINGÚ"_PrintShortRepeatedPrimitivesValuer/   Ú_PrintUnknownFieldsZUnknownFields)r   r   ÚfieldsrM   rO   rh   Zentry_submsgÚelementr   r   r   r   ¤  s0    

z_Printer.PrintMessagec          	   C   sÞ  | j }xÐ|D ]Æ}| d| j ¡ | t|jƒ¡ |jtkrª| jrP| d¡ n| d¡ |  jd7  _|  |j	¡ | jr†| d¡ n"|  jd8  _| d| j d ¡ q|jt
kr¦y"t t|j	ƒdt|j	ƒ¡\}}W n tk
rð   d}Y nX |t|j	ƒkrp| jr| d¡ n| d¡ |  jd7  _|  |¡ | jrL| d¡ n"|  jd8  _| d| j d ¡ n4| d¡ | t |j	d	¡¡ | | jržd
nd¡ q| d¡ | t|j	ƒ¡ | | jrÐdnd¡ qW dS )zPrint unknown fields.r[   z { z {
rV   z} z}
r   z: "Fz" z"
z: r\   N)r=   r+   r;   r   Zfield_numberZ	wire_typeÚWIRETYPE_START_GROUPr3   ru   ÚdataÚWIRETYPE_LENGTH_DELIMITEDr   Z_DecodeUnknownFieldSetÚ
memoryviewÚlenÚ	Exceptionr   ÚCEscape)r   Zunknown_fieldsr=   rM   Zembedded_unknown_messageÚposr   r   r   ru   Ë  sH    






z_Printer._PrintUnknownFieldsc             C   sÚ   | j }| d| j ¡ | jr.| t|jƒ¡ nŠ|jrŽ| d¡ |j ¡ j	rv|j
tjjkrv|jtjjkrv| |jj¡ n| |j¡ | d¡ n*|j
tjjkr¬| |jj¡ n| |j¡ | jsÌ|jtjjkrÖ| d¡ dS )zPrint field name.r[   ú[ú]rY   N)r=   r+   r;   r9   r   rc   rb   Úcontaining_typerL   Zmessage_set_wire_formatrH   r   rI   rJ   ro   ZLABEL_OPTIONALrK   rj   Ú
TYPE_GROUPÚnamer0   rq   rr   )r   rM   r=   r   r   r   Ú_PrintFieldName  s$    
z_Printer._PrintFieldNamec             C   s<   |   |¡ | j d¡ |  ||¡ | j | jr2dnd¡ dS )z%Print a single field name/value pair.r[   r\   N)r…   r=   r+   r
   r3   )r   rM   rO   r   r   r   r	     s    
z_Printer.PrintFieldc             C   s‚   |   |¡ | j d¡ x4tt|ƒd ƒD ] }|  ||| ¡ | j d¡ q(W |  ||d ¡ | j d¡ | j | jrxdnd¡ dS )	z("Prints short repeated primitives value.z [é   z, éÿÿÿÿr   r[   r\   N)r…   r=   r+   Úranger|   r
   r3   )r   rM   rO   Úir   r   r   rt   &  s    
z+_Printer._PrintShortRepeatedPrimitivesValuec             C   s–   | j rd}d}nd}d}| jrF| j d| ¡ |  |¡ | j |¡ nL| j d| ¡ |  jd7  _|  |¡ |  jd8  _| j d| j | ¡ d S )	Nú<ú>Ú{Ú}z%s z%s
rV   r[   )r5   r3   r=   r+   r   r;   )r   rO   ZopenbZclosebr   r   r   r]   2  s    

z _Printer._PrintMessageFieldValuec             C   s¬  | j }|jtjjkr"|  |¡ n†|jtjjkrh|jj 	|d¡}|dk	rV| 
|j¡ n| 
t|ƒ¡ n@|jtjjkrØ| 
d¡ t|tƒrœ| jsœ| d¡}n|}|jtjjkr´d}n| j}| 
t ||¡¡ | 
d¡ nÐ|jtjjkr|rø| 
d¡ n
| 
d¡ n¤|jtjjkrh| jdk	r6| 
d | j|¡¡ n0t |¡rR| 
t|ƒ¡ n| 
tt |¡ƒ¡ n@|jtjjkrš| jdk	rš| 
d | j|¡¡ n| 
t|ƒ¡ dS )zÝPrint a single field value (not including name).

    For repeated fields, the value should be a single element.

    Args:
      field: The descriptor of the field to be printed.
      value: The value of the field.
    Nr   zutf-8FÚtrueÚfalsez{1:{0}})r=   rq   r   rI   rr   r]   ZCPPTYPE_ENUMÚ	enum_typeÚvalues_by_numberrC   r+   r„   r   rs   rA   r*   rD   rH   Ú
TYPE_BYTESr   r~   ZCPPTYPE_BOOLZCPPTYPE_FLOATr7   r   ÚmathÚisnanr   ZToShortestFloatZCPPTYPE_DOUBLEr8   )r   rM   rO   r=   Ú
enum_valueZ	out_valueZout_as_utf8r   r   r   r
   E  s@    	
z_Printer.PrintFieldValue)r   FFFFFNNFNNFF)r   r   r   r   r   r_   ra   r   ru   r…   r	   rt   r]   r
   r   r   r   r   r1   @  s.               
7'7r1   c             C   s(   t |  t| tƒrdnd¡|||||dS )a  Parses a text representation of a protocol message into a message.

  NOTE: for historical reasons this function does not clear the input
  message. This is different from what the binary msg.ParseFrom(...) does.
  If text contains a field already set in message, the value is appended if the
  field is repeated. Otherwise, an error is raised.

  Example::

    a = MyProto()
    a.repeated_field.append('test')
    b = MyProto()

    # Repeated fields are combined
    text_format.Parse(repr(a), b)
    text_format.Parse(repr(a), b) # repeated_field contains ["test", "test"]

    # Non-repeated fields cannot be overwritten
    a.singular_field = 1
    b.singular_field = 2
    text_format.Parse(repr(a), b) # ParseError

    # Binary version:
    b.ParseFromString(a.SerializeToString()) # repeated_field is now "test"

  Caller is responsible for clearing the message as needed.

  Args:
    text (str): Message text representation.
    message (Message): A protocol buffer message to merge into.
    allow_unknown_extension: if True, skip over missing extensions and keep
      parsing
    allow_field_number: if True, both field number and field name are allowed.
    descriptor_pool (DescriptorPool): Descriptor pool used to resolve Any types.
    allow_unknown_field: if True, skip over unknown field and keep
      parsing. Avoid to use this option if possible. It may hide some
      errors (e.g. spelling error on field name)

  Returns:
    Message: The same message passed as argument.

  Raises:
    ParseError: On text parsing problems.
  ó   
r\   )r:   Úallow_unknown_field)Ú
ParseLinesÚsplitrA   rB   )rF   r   Úallow_unknown_extensionÚallow_field_numberr:   r—   r   r   r   r   x  s    2c             C   s(   t |  t| tƒrdnd¡|||||dS )a¡  Parses a text representation of a protocol message into a message.

  Like Parse(), but allows repeated values for a non-repeated field, and uses
  the last one. This means any non-repeated, top-level fields specified in text
  replace those in the message.

  Args:
    text (str): Message text representation.
    message (Message): A protocol buffer message to merge into.
    allow_unknown_extension: if True, skip over missing extensions and keep
      parsing
    allow_field_number: if True, both field number and field name are allowed.
    descriptor_pool (DescriptorPool): Descriptor pool used to resolve Any types.
    allow_unknown_field: if True, skip over unknown field and keep
      parsing. Avoid to use this option if possible. It may hide some
      errors (e.g. spelling error on field name)

  Returns:
    Message: The same message passed as argument.

  Raises:
    ParseError: On text parsing problems.
  r–   r\   )r:   r—   )Ú
MergeLinesr™   rA   rB   )rF   r   rš   r›   r:   r—   r   r   r   r   ²  s    c             C   s   t ||||d}| | |¡S )aò  Parses a text representation of a protocol message into a message.

  See Parse() for caveats.

  Args:
    lines: An iterable of lines of a message's text representation.
    message: A protocol buffer message to merge into.
    allow_unknown_extension: if True, skip over missing extensions and keep
      parsing
    allow_field_number: if True, both field number and field name are allowed.
    descriptor_pool: A DescriptorPool used to resolve Any types.
    allow_unknown_field: if True, skip over unknown field and keep
      parsing. Avoid to use this option if possible. It may hide some
      errors (e.g. spelling error on field name)

  Returns:
    The same message passed as argument.

  Raises:
    ParseError: On text parsing problems.
  )r:   r—   )Ú_Parserr˜   )Úlinesr   rš   r›   r:   r—   Úparserr   r   r   r˜   Ø  s
    r˜   c             C   s   t ||||d}| | |¡S )a÷  Parses a text representation of a protocol message into a message.

  See Merge() for more details.

  Args:
    lines: An iterable of lines of a message's text representation.
    message: A protocol buffer message to merge into.
    allow_unknown_extension: if True, skip over missing extensions and keep
      parsing
    allow_field_number: if True, both field number and field name are allowed.
    descriptor_pool: A DescriptorPool used to resolve Any types.
    allow_unknown_field: if True, skip over unknown field and keep
      parsing. Avoid to use this option if possible. It may hide some
      errors (e.g. spelling error on field name)

  Returns:
    The same message passed as argument.

  Raises:
    ParseError: On text parsing problems.
  )r:   r—   )r   rœ   )rž   r   rš   r›   r:   r—   rŸ   r   r   r   rœ   ú  s
    rœ   c               @   s^   e Zd ZdZddd„Zdd„ Zdd	„ Zd
d„ Zdd„ Zdd„ Z	dd„ Z
edd„ ƒZdd„ ZdS )r   z(Text format parser for protocol message.FNc             C   s   || _ || _|| _|| _d S )N)rš   r›   r:   r—   )r   rš   r›   r:   r—   r   r   r   r     s    z_Parser.__init__c             C   s   d| _ |  ||¡ |S )zBParses a text representation of a protocol message into a message.F)Ú_allow_multiple_scalarsÚ_ParseOrMerge)r   rž   r   r   r   r   r˜   )  s    z_Parser.ParseLinesc             C   s   d| _ |  ||¡ |S )zBMerges a text representation of a protocol message into a message.T)r    r¡   )r   rž   r   r   r   r   rœ   /  s    z_Parser.MergeLinesc             C   s4   dd„ |D ƒ}t |ƒ}x| ¡ s.|  ||¡ qW dS )züConverts a text representation of a protocol message into a message.

    Args:
      lines: Lines of a message's text representation.
      message: A protocol buffer message to merge into.

    Raises:
      ParseError: On text parsing problems.
    c             s   s&   | ]}t |tƒr|n| d ¡V  qdS )zutf-8N)rA   r   Údecode)Ú.0r   r   r   r   ú	<genexpr>A  s   z(_Parser._ParseOrMerge.<locals>.<genexpr>N)Ú	TokenizerÚAtEndÚ_MergeField)r   rž   r   Z	str_linesÚ	tokenizerr   r   r   r¡   5  s
    
z_Parser._ParseOrMergec             C   sr  |j }|jtkrÂ| d¡rÂ|  |¡\}}| d¡ | d¡ | d¡rLd}n| d¡ d}t|| jƒ}|svtd| ƒ‚x2| |¡s¨| 	¡ rš| 
d	|f ¡‚|  ||¡ qxW d
}|j|||d dS | d¡rt| ¡ g}	x| d¡rô|	 | ¡ ¡ qÚW d |	¡}	|js| 
d|j ¡‚|j |	¡}
|
sH| jr8d}
n| 
d|	 ¡‚n ||
jkrh| 
d|	|jf ¡‚| d¡ nÚ| ¡ }	| jrÄ|	 ¡ rÄt|	ddƒ}|j |d¡}
|
s,|jr,|j |¡}
nh|j |	d¡}
|
s|j |	 ¡ d¡}
|
r|
jtj j!krd}
|
r,|
jtj j!kr,|
j"j#|	kr,d}
|
sN| j$sN| 
d|j|	f ¡‚|
r<| j%s¦|
j&r¦| '|
j&j#¡}|dk	r¦||
j#kr¦| 
d|
j#||
j&j#|jf ¡‚|
j(tj j)krÈ| d¡ | j*}n| d¡ | j+}|
j,tj j-kr.| d¡r.| d¡s:x8||||
ƒ | d¡rP | d¡ qW n||||
ƒ n| jsP| j$sPt.‚t/|ƒ | d¡sn| d¡ dS )zþMerges a single protocol message field into a message.

    Args:
      tokenizer: A tokenizer to parse the field name and values.
      message: A protocol message to record the data.

    Raises:
      ParseError: In case of text parsing problems.
    r€   r   rY   rŠ   r‹   rŒ   r   z$Type %s not found in descriptor poolzExpected "%s".F)Útype_url_prefixÚdeterministicNÚ.z+Message type "%s" does not have extensions.zþExtension "%s" not registered. Did you import the _pb2 module which defines it? If you are trying to place the extension in the MessageSet field of another message that is in an Any or MessageSet field, that message's _pb2 module must be imported as wellz1Extension "%s" does not extend message type "%s".Tz*Message type "%s" has no field named "%s".zbField "%s" is specified along with field "%s", another member of oneof "%s" for message type "%s".ú,ú;)0ri   rj   rk   Ú
TryConsumeÚ_ConsumeAnyTypeUrlÚConsumerU   r:   r   r¦   ÚParseErrorPreviousTokenr§   ZPackÚConsumeIdentifierÚappendÚjoinZis_extendableÚ
ExtensionsZ_FindExtensionByNamerš   r‚   ÚConsumeIdentifierOrNumberr›   ÚisdigitÚParseIntegerZfields_by_numberrC   Z_FindExtensionByNumberÚfields_by_nameÚlowerrH   r   rI   rƒ   rK   r„   r—   r    Zcontaining_oneofZ
WhichOneofrq   rr   Ú_MergeMessageFieldÚ_MergeScalarFieldro   rp   ÚAssertionErrorÚ_SkipFieldContents)r   r¨   r   rT   r©   Zpacked_type_nameZexpanded_any_end_tokenZexpanded_any_sub_messagerª   r„   rM   rc   Zwhich_oneofZmergerr   r   r   r§   G  s´    













z_Parser._MergeFieldc             C   s€   |  ¡ g}| d¡ | |  ¡ ¡ | d¡ | |  ¡ ¡ | d¡ |  ¡ g}x| d¡rj| |  ¡ ¡ qPW d |¡d |¡fS )zBConsumes a google.protobuf.Any type URL and returns the type name.r«   rX   )r²   r°   r³   r®   r´   )r   r¨   Úprefixr„   r   r   r   r¯   Ó  s    




z_Parser._ConsumeAnyTypeUrlc       	      C   s~  t |ƒ}| d¡rd}n| d¡ d}|jtjjkrt|jrJ|j|  	¡ }qì|rbt
||jƒ ¡ ƒ }qìt
||jƒ 	¡ }nx|jr®| js¢| |¡r¢| d|jj|jf ¡‚|j| }n6| jsØ| |j¡rØ| d|jj|jf ¡‚t
||jƒ}| ¡  x6| |¡s"| ¡ r| d|f ¡‚|  ||¡ qîW |rz|jjd j}|tjjkrft
||jƒ|j }| |j¡ n|jt
||jƒ|j< d	S )
a"  Merges a single scalar field into a message.

    Args:
      tokenizer: A tokenizer to parse the field value.
      message: The message of which field is a member.
      field: The descriptor of the field to be merged.

    Raises:
      ParseError: In case of text parsing problems.
    rŠ   r‹   rŒ   r   z;Message type "%s" should not have multiple "%s" extensions.z7Message type "%s" should not have multiple "%s" fields.zExpected "%s".rO   N)rN   r®   r°   ro   r   rI   rp   rb   rµ   ÚaddÚgetattrr„   rn   r    ÚHasExtensionr±   ri   rj   ÚHasFieldZSetInParentr¦   r§   rK   r¹   rq   rr   rh   ZCopyFromrO   )	r   r¨   r   rM   Zis_map_entryZ	end_tokenZsub_messageZvalue_cpptyperO   r   r   r   r»   â  sF    



z_Parser._MergeMessageFieldc             C   s   | j }t|dƒo|jdkS )NÚsyntaxÚproto3)ri   ÚhasattrrÄ   )r   rT   r   r   r   Ú_IsProto3Syntax  s    
z_Parser._IsProto3Syntaxc             C   s  | j }d}|jtjjtjjtjjfkr0t|ƒ}nø|jtjjtjj	tjj
fkrVt|ƒ}nÒ|jtjjtjjfkrvt|ƒ}n²|jtjjtjjfkr–t|ƒ}n’|jtjjtjjfkr¶| ¡ }nr|jtjjkrÎ| ¡ }nZ|jtjjkræ| ¡ }nB|jtjjkrþ| ¡ }n*|jtjjkr| |¡}ntd|j ƒ‚|jtjjkrf|j rR|j!|  "|¡ nt#||j$ƒ "|¡ n²|j r´| j%s¨|  &|¡s¨| '|¡r¨| (d|j)j*|j*f ¡‚n
||j!|< ndd}| j%sê|  &|¡rÞt+t#||j$ƒƒ}n| ,|j$¡}|r
| (d|j)j*|j$f ¡‚nt-||j$|ƒ dS )aH  Merges a single scalar field into a message.

    Args:
      tokenizer: A tokenizer to parse the field value.
      message: A protocol message to record the data.
      field: The descriptor of the field to be merged.

    Raises:
      ParseError: In case of text parsing problems.
      RuntimeError: On runtime errors.
    NzUnknown field type %dz;Message type "%s" should not have multiple "%s" extensions.Fz7Message type "%s" should not have multiple "%s" fields.).rš   rH   r   rI   Z
TYPE_INT32ZTYPE_SINT32ZTYPE_SFIXED32Ú_ConsumeInt32Z
TYPE_INT64ZTYPE_SINT64ZTYPE_SFIXED64Ú_ConsumeInt64ZTYPE_UINT32ZTYPE_FIXED32Ú_ConsumeUint32ZTYPE_UINT64ZTYPE_FIXED64Ú_ConsumeUint64Z
TYPE_FLOATZTYPE_DOUBLEÚConsumeFloatZ	TYPE_BOOLÚConsumeBoolZTYPE_STRINGÚConsumeStringr’   ÚConsumeByteStringZ	TYPE_ENUMÚConsumeEnumÚRuntimeErrorro   rp   rb   rµ   r³   rÁ   r„   r    rÇ   rÂ   r±   ri   rj   ÚboolrÃ   Úsetattr)r   r¨   r   rM   Ú_rO   Zduplicate_errorr   r   r   r¼   "  sd    












z_Parser._MergeScalarField)FFNF)r   r   r   r   r   r˜   rœ   r¡   r§   r¯   r»   ÚstaticmethodrÇ   r¼   r   r   r   r   r     s      
 :r   c             C   s4   |   d¡r(|  d¡s(|  d¡s(t| ƒ nt| ƒ dS )z}Skips over contents (value or message) of a field.

  Args:
    tokenizer: A tokenizer to parse the field name and values.
  rY   rŒ   rŠ   N)r®   Ú	LookingAtÚ_SkipFieldValueÚ_SkipFieldMessage)r¨   r   r   r   r¾   n  s    
r¾   c             C   s^   |   d¡r6|  ¡  x|   d¡r(|  ¡  qW |  d¡ n|  ¡  t| ƒ |   d¡sZ|   d¡ dS )z€Skips over a complete field (name and value/message).

  Args:
    tokenizer: A tokenizer to parse the field name and values.
  r€   r«   r   r¬   r­   N)r®   r²   r°   r¶   r¾   )r¨   r   r   r   Ú
_SkipField  s    

rÙ   c             C   sN   |   d¡rd}n|  d¡ d}x |  d¡s>|  d¡s>t| ƒ q W |  |¡ dS )zfSkips over a field message.

  Args:
    tokenizer: A tokenizer to parse the field name and values.
  rŠ   r‹   rŒ   r   N)r®   r°   rÖ   rÙ   )r¨   Ú	delimiterr   r   r   rØ   ˜  s    

rØ   c             C   sL   |   ¡ rx|   ¡ rq
W dS |  ¡ sHt| ƒsHt| ƒsH|  ¡ sHtd| j ƒ‚dS )z¨Skips over a field value.

  Args:
    tokenizer: A tokenizer to parse the field name and values.

  Raises:
    ParseError: In case an invalid field value is found.
  NzInvalid field value: )ÚTryConsumeByteStringÚTryConsumeIdentifierÚ_TryConsumeInt64Ú_TryConsumeUint64ÚTryConsumeFloatr   Útoken)r¨   r   r   r   r×   «  s    
r×   c               @   sF  e Zd ZdZe d¡Ze dej¡Ze dej¡Z	e d 
ddgdd	„ eD ƒ ¡¡Ze d
¡Ze d¡ZdDdd„Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd „ Zd!d"„ Zd#d$„ Zd%d&„ Zd'd(„ Zd)d*„ Zd+d,„ Zd-d.„ Zd/d0„ Z d1d2„ Z!d3d4„ Z"d5d6„ Z#d7d8„ Z$d9d:„ Z%d;d<„ Z&d=d>„ Z'd?d@„ Z(dAdB„ Z)dCS )Er¥   zÍProtocol buffer text representation tokenizer.

  This class handles the lower level string parsing by splitting it into
  meaningful tokens.

  It was directly ported from the Java protocol buffer API.
  z\s+z	(\s*#.*$)z(\s|(#.*$))+ú|z[a-zA-Z_][0-9a-zA-Z_+-]*z#([0-9+-]|(\.[0-9]))[0-9a-zA-Z_.+-]*c             C   s   g | ]}d j |d‘qS )z0{qt}[^{qt}\n\\]*((\\.)+[^{qt}\n\\]*)*({qt}|\\?$))Zqt)r   )r£   Úmarkr   r   r   ú
<listcomp>Ò  s   zTokenizer.<listcomp>z
[^\d\W]\w*z\w+Tc             C   sl   d| _ d| _d| _d | _d| _t|ƒ| _d| _d| _d| _	d| _
|| _|rP| jpT| j| _|  ¡  |  ¡  d S )Nr   r‡   rZ   T)Z	_positionr   r   Z_token_startrà   ÚiterÚ_linesÚ_current_lineÚ_previous_lineÚ_previous_columnÚ_more_linesÚ_skip_commentsÚ_WHITESPACE_OR_COMMENTÚ_WHITESPACEÚ_whitespace_patternÚ_SkipWhitespaceÚ	NextToken)r   rž   Zskip_commentsr   r   r   r   Ù  s    

zTokenizer.__init__c             C   s
   | j |kS )N)rà   )r   rà   r   r   r   rÖ   ê  s    zTokenizer.LookingAtc             C   s   | j  S )z^Checks the end of the text was reached.

    Returns:
      True iff the end was reached.
    )rà   )r   r   r   r   r¦   í  s    zTokenizer.AtEndc             C   s`   xZt | jƒ| jkrZyt| jƒ| _W n  tk
rB   d| _d| _d S X |  jd7  _d| _qW d S )NrZ   Fr†   r   )r|   ræ   r   Únextrå   ÚStopIterationré   r   )r   r   r   r   Ú_PopLineõ  s    zTokenizer._PopLinec             C   sF   x@|   ¡  | j | j| j¡}|s"P t| d¡ƒ}|  j|7  _qW d S )Nr   )rò   rí   Úmatchræ   r   r|   Úgroup)r   ró   Úlengthr   r   r   rî     s    zTokenizer._SkipWhitespacec             C   s   | j |kr|  ¡  dS dS )z‰Tries to consume a given piece of text.

    Args:
      token: Text to consume.

    Returns:
      True iff the text was consumed.
    TF)rà   rï   )r   rà   r   r   r   r®   
  s    	
zTokenizer.TryConsumec             C   s   |   |¡s|  d| ¡‚dS )zˆConsumes a piece of text.

    Args:
      token: Text to consume.

    Raises:
      ParseError: If the text couldn't be consumed.
    zExpected "%s".N)r®   r   )r   rà   r   r   r   r°     s    	
zTokenizer.Consumec             C   s(   | j }| j |¡s|  d¡‚|  ¡  |S )NzExpected comment.)rà   Ú_COMMENTró   r   rï   )r   r?   r   r   r   ÚConsumeComment$  s
    
zTokenizer.ConsumeCommentc             C   s:   | j dko| jdk}| j}|  ¡ }| j|ko0| }||fS )zCConsumes a comment, returns a 2-tuple (trailing bool, comment str).r   )r   r   rç   r÷   )r   Zjust_startedZbefore_parsingÚcommentZtrailingr   r   r   ÚConsumeCommentOrTrailingComment+  s    
z)Tokenizer.ConsumeCommentOrTrailingCommentc             C   s&   y|   ¡  dS  tk
r    dS X d S )NTF)r²   r   )r   r   r   r   rÜ   ;  s
    zTokenizer.TryConsumeIdentifierc             C   s(   | j }| j |¡s|  d¡‚|  ¡  |S )zConsumes protocol message field identifier.

    Returns:
      Identifier string.

    Raises:
      ParseError: If an identifier couldn't be consumed.
    zExpected identifier.)rà   Ú_IDENTIFIERró   r   rï   )r   r?   r   r   r   r²   B  s
    	
zTokenizer.ConsumeIdentifierc             C   s&   y|   ¡  dS  tk
r    dS X d S )NTF)r¶   r   )r   r   r   r   ÚTryConsumeIdentifierOrNumberQ  s
    z&Tokenizer.TryConsumeIdentifierOrNumberc             C   s,   | j }| j |¡s |  d| ¡‚|  ¡  |S )zConsumes protocol message field identifier.

    Returns:
      Identifier string.

    Raises:
      ParseError: If an identifier couldn't be consumed.
    z&Expected identifier or number, got %s.)rà   Ú_IDENTIFIER_OR_NUMBERró   r   rï   )r   r?   r   r   r   r¶   X  s
    	z#Tokenizer.ConsumeIdentifierOrNumberc             C   s&   y|   ¡  dS  tk
r    dS X d S )NTF)ÚConsumeIntegerr   )r   r   r   r   ÚTryConsumeIntegerg  s
    zTokenizer.TryConsumeIntegerc          
   C   sL   yt | jƒ}W n0 tk
r> } z|  t|ƒ¡‚W dd}~X Y nX |  ¡  |S )z‹Consumes an integer number.

    Returns:
      The integer parsed.

    Raises:
      ParseError: If an integer couldn't be consumed.
    N)Ú_ParseAbstractIntegerrà   Ú
ValueErrorr   r   rï   )r   r?   Úer   r   r   rý   n  s    	 zTokenizer.ConsumeIntegerc             C   s&   y|   ¡  dS  tk
r    dS X d S )NTF)rÌ   r   )r   r   r   r   rß   ~  s
    zTokenizer.TryConsumeFloatc          
   C   sL   yt | jƒ}W n0 tk
r> } z|  t|ƒ¡‚W dd}~X Y nX |  ¡  |S )zžConsumes an floating point number.

    Returns:
      The number parsed.

    Raises:
      ParseError: If a floating point number couldn't be consumed.
    N)Ú
ParseFloatrà   r   r   r   rï   )r   r?   r  r   r   r   rÌ   …  s    	 zTokenizer.ConsumeFloatc          
   C   sL   yt | jƒ}W n0 tk
r> } z|  t|ƒ¡‚W dd}~X Y nX |  ¡  |S )z‹Consumes a boolean value.

    Returns:
      The bool parsed.

    Raises:
      ParseError: If a boolean value couldn't be consumed.
    N)Ú	ParseBoolrà   r   r   r   rï   )r   r?   r  r   r   r   rÍ   •  s    	 zTokenizer.ConsumeBoolc             C   s&   y|   ¡  dS  tk
r    dS X d S )NTF)rÏ   r   )r   r   r   r   rÛ   ¥  s
    zTokenizer.TryConsumeByteStringc          
   C   sD   |   ¡ }y
t|dƒS  tk
r> } z|  |¡‚W dd}~X Y nX dS )z‹Consumes a string value.

    Returns:
      The string parsed.

    Raises:
      ParseError: If a string value couldn't be consumed.
    zutf-8N)rÏ   r   ÚUnicodeDecodeErrorÚ_StringParseError)r   Z	the_bytesr  r   r   r   rÎ   ¬  s
    	
zTokenizer.ConsumeStringc             C   s<   |   ¡ g}x&| jr0| jd tkr0| |   ¡ ¡ qW d |¡S )z Consumes a byte array value.

    Returns:
      The array parsed (as a string).

    Raises:
      ParseError: If a byte array value couldn't be consumed.
    r   rg   )Ú_ConsumeSingleByteStringrà   Ú_QUOTESr³   r´   )r   Zthe_listr   r   r   rÏ   »  s    	
zTokenizer.ConsumeByteStringc          
   C   s®   | j }t|ƒdk s|d tkr.|  d|f ¡‚t|ƒdk sJ|d |d krZ|  d|f ¡‚yt |dd… ¡}W n0 tk
r  } z|  t|ƒ¡‚W dd}~X Y nX |  ¡  |S )aO  Consume one token of a string literal.

    String literals (whether bytes or text) can come in multiple adjacent
    tokens which are automatically concatenated, like in C or Python.  This
    method only consumes one token.

    Returns:
      The token parsed.
    Raises:
      ParseError: When the wrong format data is found.
    r†   r   zExpected string but found: %rrV   r‡   zString missing ending quote: %rN)	rà   r|   r  r   r   Z	CUnescaper   r   rï   )r   rF   r?   r  r   r   r   r  É  s     z"Tokenizer._ConsumeSingleByteStringc          
   C   sN   yt || jƒ}W n0 tk
r@ } z|  t|ƒ¡‚W d d }~X Y nX |  ¡  |S )N)Ú	ParseEnumrà   r   r   r   rï   )r   rM   r?   r  r   r   r   rÐ   ã  s     zTokenizer.ConsumeEnumc             C   s   t || jd | jd ƒS )z¯Creates and *returns* a ParseError for the previously read token.

    Args:
      message: A message to set for the exception.

    Returns:
      A ParseError instance.
    r†   )r   rç   rè   )r   r   r   r   r   r±   ë  s    	z!Tokenizer.ParseErrorPreviousTokenc             C   s&   t d| j d | | jd | jd ƒS )z9Creates and *returns* a ParseError for the current token.r   z': r†   )r   ræ   r   r   )r   r   r   r   r   r   ÷  s    zTokenizer.ParseErrorc             C   s   |   dt|ƒ ¡S )NzCouldn't parse string: )r   r   )r   r  r   r   r   r  ü  s    zTokenizer._StringParseErrorc             C   s’   | j | _| j| _|  jt| jƒ7  _|  ¡  | js<d| _dS | j 	| j
| j¡}|sj| jsj| j 	| j
| j¡}|r€| d¡}|| _n| j
| j | _dS )z Reads the next meaningful token.rZ   Nr   )r   rç   r   rè   r|   rà   rî   ré   Ú_TOKENró   ræ   rê   rö   rô   )r   ró   rà   r   r   r   rï   ÿ  s    

zTokenizer.NextTokenN)T)*r   r   r   r   ÚreÚcompilerì   Ú	MULTILINErö   rë   r´   r  r	  rú   rü   r   rÖ   r¦   rò   rî   r®   r°   r÷   rù   rÜ   r²   rû   r¶   rþ   rý   rß   rÌ   rÍ   rÛ   rÎ   rÏ   r  rÐ   r±   r   r  rï   r   r   r   r   r¥   Á  sL   



	r¥   c             C   s   t | dddS )zæConsumes a signed 32bit integer number from tokenizer.

  Args:
    tokenizer: A tokenizer used to parse the number.

  Returns:
    The integer parsed.

  Raises:
    ParseError: If a signed 32bit integer couldn't be consumed.
  TF)Ú	is_signedÚis_long)Ú_ConsumeInteger)r¨   r   r   r   rÈ     s    rÈ   c             C   s   t | dddS )zìConsumes an unsigned 32bit integer number from tokenizer.

  Args:
    tokenizer: A tokenizer used to parse the number.

  Returns:
    The integer parsed.

  Raises:
    ParseError: If an unsigned 32bit integer couldn't be consumed.
  F)r  r  )r  )r¨   r   r   r   rÊ   (  s    rÊ   c             C   s&   yt | ƒ dS  tk
r    dS X d S )NTF)rÉ   r   )r¨   r   r   r   rÝ   7  s
    rÝ   c             C   s   t | dddS )zæConsumes a signed 32bit integer number from tokenizer.

  Args:
    tokenizer: A tokenizer used to parse the number.

  Returns:
    The integer parsed.

  Raises:
    ParseError: If a signed 32bit integer couldn't be consumed.
  T)r  r  )r  )r¨   r   r   r   rÉ   ?  s    rÉ   c             C   s&   yt | ƒ dS  tk
r    dS X d S )NTF)rË   r   )r¨   r   r   r   rÞ   N  s
    rÞ   c             C   s   t | dddS )zìConsumes an unsigned 64bit integer number from tokenizer.

  Args:
    tokenizer: A tokenizer used to parse the number.

  Returns:
    The integer parsed.

  Raises:
    ParseError: If an unsigned 64bit integer couldn't be consumed.
  FT)r  r  )r  )r¨   r   r   r   rË   V  s    rË   c          
   C   sR   yt | j||d}W n0 tk
rD } z|  t|ƒ¡‚W dd}~X Y nX |  ¡  |S )aU  Consumes an integer number from tokenizer.

  Args:
    tokenizer: A tokenizer used to parse the number.
    is_signed: True if a signed integer must be parsed.
    is_long: True if a long integer must be parsed.

  Returns:
    The integer parsed.

  Raises:
    ParseError: If an integer with given characteristics couldn't be consumed.
  )r  r  N)r¸   rà   r   r   r   rï   )r¨   r  r  r?   r  r   r   r   r  e  s     r  c             C   s.   t | ƒ}tdt|ƒ t|ƒ  }| |¡ |S )a  Parses an integer.

  Args:
    text: The text to parse.
    is_signed: True if a signed integer must be parsed.
    is_long: True if a long integer must be parsed.

  Returns:
    The integer value.

  Raises:
    ValueError: Thrown Iff the text is not a valid integer.
  rV   )rÿ   Ú_INTEGER_CHECKERSÚintZ
CheckValue)rF   r  r  r?   Úcheckerr   r   r   r¸   {  s    
r¸   c             C   s\   | }t  d| ¡}|r,| d¡d | d¡ } y
t| dƒS  tk
rV   td| ƒ‚Y nX dS )zÆParses an integer without checking size/signedness.

  Args:
    text: The text to parse.

  Returns:
    The integer value.

  Raises:
    ValueError: Thrown Iff the text is not a valid integer.
  z(-?)0(\d+)$r†   Z0orV   r   zCouldn't parse integer: %sN)r
  ró   rô   r  r   )rF   Ú	orig_textZc_octal_matchr   r   r   rÿ   ’  s    
rÿ   c             C   sŒ   yt | ƒS  tk
r†   t | ¡r@| d dkr6t dƒS t dƒS nBt | ¡rRt dƒS yt |  d¡ƒS  tk
r€   td|  ƒ‚Y nX Y nX dS )	z°Parse a floating point number.

  Args:
    text: Text to parse.

  Returns:
    The number parsed.

  Raises:
    ValueError: If a floating point number couldn't be parsed.
  r   ú-z-infÚinfÚnanÚfzCouldn't parse float: %sN)Úfloatr   Ú_FLOAT_INFINITYró   Ú
_FLOAT_NANr2   )rF   r   r   r   r  «  s    


r  c             C   s$   | dkrdS | dkrdS t dƒ‚dS )zœParse a boolean value.

  Args:
    text: Text to parse.

  Returns:
    Boolean values parsed

  Raises:
    ValueError: If text is not a valid boolean.
  )rŽ   ÚtÚ1ÚTrueT)r   r  Ú0ÚFalseFzExpected "true" or "false".N)r   )rF   r   r   r   r  Ë  s
    r  c             C   sœ   | j }yt|dƒ}W n< tk
rP   |j |d¡}|dkrLtd|j|f ƒ‚Y nFX t| jdƒrn| jjdkrn|S |j	 |d¡}|dkr–td|j|f ƒ‚|j
S )a&  Parse an enum value.

  The value can be specified by a number (the enum value), or by
  a string literal (the enum name).

  Args:
    field: Enum field descriptor.
    value: String value.

  Returns:
    Enum value number.

  Raises:
    ValueError: If the enum value could not be parsed.
  r   Nz%Enum type "%s" has no value named %s.rÄ   rÅ   z+Enum type "%s" has no value with number %d.)r   r  r   Zvalues_by_namerC   rj   rÆ   ÚfilerÄ   r‘   rc   )rM   rO   Zenum_descriptorrc   r•   r   r   r   r  ß  s     r  )FFFFFNNFNr   NFF)r   FFFFFNNFNNFF)r   FFFFFNNNFF)r   FFFFFNNNFF)FFNF)FFNF)FFNF)FFNF)FF)FF)Ar   Ú
__author__Zencodings.raw_unicode_escapeÚ	encodingsZencodings.unicode_escaper'   r“   r
  Zgoogle.protobuf.internalr   r   rQ   r   r   Ú__all__ZUint32ValueCheckerZInt32ValueCheckerZUint64ValueCheckerZInt64ValueCheckerr  r  Ú
IGNORECASEr  r  Ú	frozensetr  rk   r}   r   r   Úobjectr&   r   r   rN   r   r	   r
   rU   rz   rx   r1   r   r   r˜   rœ   r   r¾   rÙ   rØ   r×   r¥   Z
_TokenizerrÈ   rÊ   rÝ   rÉ   rÞ   rË   r  r¸   rÿ   r  r  r  r   r   r   r   Ú<module>)   sì   

            
D
            
          
          
  <   
7   
#   
   
  T  W

 