ó
g¨wUc           @   sF   d  e  f d „  ƒ  YZ d e f d „  ƒ  YZ d e  f d „  ƒ  YZ d S(   t   Coordc           B   s)   e  Z d  Z d Z d d „ Z d „  Z RS(	   sž    Coordinates of a syntactic element. Consists of:
            - File name
            - Line number
            - (optional) column number, for the Lexer
    t   filet   linet   columnt   __weakref__c         C   s   | |  _  | |  _ | |  _ d  S(   N(   R   R   R   (   t   selfR   R   R   (    (    s7   /usr/lib/python2.7/site-packages/pycparser/plyparser.pyt   __init__   s    		c         C   s7   d |  j  |  j f } |  j r3 | d |  j 7} n  | S(   Ns   %s:%ss   :%s(   R   R   R   (   R   t   str(    (    s7   /usr/lib/python2.7/site-packages/pycparser/plyparser.pyt   __str__   s    	 (   s   files   lines   columns   __weakref__N(   t   __name__t
   __module__t   __doc__t	   __slots__t   NoneR   R   (    (    (    s7   /usr/lib/python2.7/site-packages/pycparser/plyparser.pyR       s   t
   ParseErrorc           B   s   e  Z RS(    (   R	   R
   (    (    (    s7   /usr/lib/python2.7/site-packages/pycparser/plyparser.pyR      s    t	   PLYParserc           B   s&   e  Z d  „  Z d d „ Z d „  Z RS(   c         C   sM   | d } d „  } d | | f | _  d | | _ t |  j | j | ƒ d S(   sŽ    Given a rule name, creates an optional ply.yacc rule
            for it. The name of the optional rule is
            <rulename>_opt
        t   _optc         S   s   | d | d <d  S(   Ni   i    (    (   R   t   p(    (    s7   /usr/lib/python2.7/site-packages/pycparser/plyparser.pyt   optrule)   s    s   %s : empty
| %ss   p_%sN(   R   R	   t   setattrt	   __class__(   R   t   rulenamet   optnameR   (    (    s7   /usr/lib/python2.7/site-packages/pycparser/plyparser.pyt   _create_opt_rule"   s
    
	c         C   s   t  d |  j j d | d | ƒ S(   NR   R   R   (   R    t   clext   filename(   R   t   linenoR   (    (    s7   /usr/lib/python2.7/site-packages/pycparser/plyparser.pyt   _coord0   s    c         C   s   t  d | | f ƒ ‚ d  S(   Ns   %s: %s(   R   (   R   t   msgt   coord(    (    s7   /usr/lib/python2.7/site-packages/pycparser/plyparser.pyt   _parse_error6   s    N(   R	   R
   R   R   R   R   (    (    (    s7   /usr/lib/python2.7/site-packages/pycparser/plyparser.pyR   !   s   	N(   t   objectR    t	   ExceptionR   R   (    (    (    s7   /usr/lib/python2.7/site-packages/pycparser/plyparser.pyt   <module>   s   