3 Kl�fd � @ s d dl Z d dlZd dlZd dlZd dlZd dlZdZdZdZ dZ dZdZdZ d Zd Zd Zejd dk rleZneZejZG dd� de�ZG d d� de�ZG dd� de�Zdd� Zdd� Zdadada dZ!dd� Z"dd� Z#dd� Z$dd� Z%G dd� d�Z&G d d!� d!�Z'G d"d#� d#�Z(e j)d$�Z*G d%d&� d&e�Z+G d'd(� d(e�Z,G d)d*� d*e�Z-d+d,� Z.G d-d.� d.e�Z/G d/d0� d0e�Z0G d1d2� d2e�Z1G d3d4� d4e�Z2d5d6� Z3d7d8� Z4G d9d:� d:e�Z5G d;d<� d<e2�Z6d=d>� Z7d?d@� Z8G dAdB� dBe�Z9de deddd de ddddf dCdD�Z:dS )E� Nz3.11z3.10Tz parser.out�parsetab�LALR� F�( c @ s4 e Zd Zdd� Zdd� ZeZdd� Zdd� ZeZd S ) � PlyLoggerc C s || _ d S )N)�f)�selfr � r �/usr/lib/python3.6/yacc.py�__init__m s zPlyLogger.__init__c O s | j j|| d � d S )N� )r �write)r �msg�args�kwargsr r r �debugp s zPlyLogger.debugc O s | j jd|| d � d S )Nz WARNING: r )r r )r r r r r r r �warningu s zPlyLogger.warningc O s | j jd|| d � d S )NzERROR: r )r r )r r r r r r r �errorx s zPlyLogger.errorN) �__name__� __module__�__qualname__r r �infor r Zcriticalr r r r r l s r c @ s e Zd Zdd� Zdd� ZdS )� NullLoggerc C s | S )Nr )r �namer r r �__getattribute__ s zNullLogger.__getattribute__c O s | S )Nr )r r r r r r �__call__� s zNullLogger.__call__N)r r r r r r r r r r ~ s r c @ s e Zd ZdS )� YaccErrorN)r r r r r r r r � s r c C sP t | �}d|krt |�}t|�tkr4|d t� d }dt| �jt| �|f }|S )Nr z ...z<%s @ 0x%x> (%s))�repr�len�resultlimit�typer �id)�r�repr_str�resultr r r � format_result� s r% c C sB t | �}d|krt |�}t|�dk r(|S dt| �jt| �f S d S )Nr � z<%s @ 0x%x>)r r r r r! )r"