U ifQ@sdZdZddgZddlZddlZddlZddlZddlZddlm Z m Z m Z m Z m Z GdddeZd d ZdddZddZddZddZedkreee dS)zZParser driver. This provides a high-level interface to parse a file into a syntax tree. z#Guido van Rossum Driver load_grammarN)grammarparsetokentokenizepgenc@sHeZdZdddZdddZdddZdd d Zdd d Zdd dZdS)rNcCs&||_|dkrt}||_||_dS)N)rlogging getLoggerloggerconvert)selfrr r r9/opt/alt/python38/lib64/python3.8/lib2to3/pgen2/driver.py__init__s zDriver.__init__FcCstt|j|j}|d}d}d}}}} } d} |D]} | \}}}} } |||fkr|\} }|| kr| d| |7} | }d}||kr| | ||7} |}|tjtjfkr| |7} | \}}|dr<|d7}d}q<|t j krtj |}|r |j dt j||| |||| |fr6|r0|j dqnd} | \}}|dr<|d7}d}qs(M