Your IP : 216.73.216.196


Current Path : /opt/alt/python35/lib/python3.5/site-packages/pycparser/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib/python3.5/site-packages/pycparser/__pycache__/plyparser.cpython-35.pyc



I�]:�@sFGdd�de�ZGdd�de�ZGdd�de�ZdS)c@s7eZdZdZdZddd�Zd	d
�ZdS)�Coordz� Coordinates of a syntactic element. Consists of:
            - File name
            - Line number
            - (optional) column number, for the Lexer
    �file�line�column�__weakref__NcCs||_||_||_dS)N)rrr)�selfrrr�r�../pycparser/plyparser.py�__init__s		zCoord.__init__cCs4d|j|jf}|jr0|d|j7}|S)Nz%s:%sz:%s)rrr)r�strrrr�__str__s	z
Coord.__str__)rrrr)�__name__�
__module__�__qualname__�__doc__�	__slots__r	rrrrrrsrc@seZdZdS)�
ParseErrorN)rr
rrrrrrsrc@s7eZdZdd�Zddd�Zdd�ZdS)�	PLYParsercCsP|d}dd�}d||f|_d||_t|j|j|�dS)z� Given a rule name, creates an optional ply.yacc rule
            for it. The name of the optional rule is
            <rulename>_opt
        Z_optcSs|d|d<dS)N��r)r�prrr�optrule)sz+PLYParser._create_opt_rule.<locals>.optrulez%s : empty
| %szp_%sN)rr�setattr�	__class__)rZrulenameZoptnamerrrr�_create_opt_rule"s


zPLYParser._create_opt_ruleNcCstd|jjd|d|�S)Nrrr)r�clex�filename)r�linenorrrr�_coord0szPLYParser._coordcCstd||f��dS)Nz%s: %s)r)r�msg�coordrrr�_parse_error6szPLYParser._parse_error)rr
rrrr rrrrr!srN)�objectr�	Exceptionrrrrrr�<module>s