# Path: py3kwarn2to3/pytree.py
# HUGE = 0x7FFFFFFF  # maximum repeat count, default max
# def type_repr(type_num):
#     def __new__(cls, *args, **kwds):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def _eq(self, other):
#     def clone(self):
#     def post_order(self):
#     def pre_order(self):
#     def set_prefix(self, prefix):
#     def get_prefix(self):
#     def replace(self, new):
#     def get_lineno(self):
#     def changed(self):
#     def remove(self):
#     def next_sibling(self):
#     def prev_sibling(self):
#     def leaves(self):
#     def depth(self):
#     def get_suffix(self):
#         def __str__(self):
#     def __init__(self,type, children,
#                  context=None,
#                  prefix=None,
#                  fixers_applied=None):
#     def __repr__(self):
#     def __unicode__(self):
#     def _eq(self, other):
#     def clone(self):
#     def post_order(self):
#     def pre_order(self):
#     def _prefix_getter(self):
#     def _prefix_setter(self, prefix):
#     def set_child(self, i, child):
#     def insert_child(self, i, child):
#     def append_child(self, child):
#     def __init__(self, type, value,
#                  context=None,
#                  prefix=None,
#                  fixers_applied=[]):
#     def __repr__(self):
#     def __unicode__(self):
#     def _eq(self, other):
#     def clone(self):
#     def leaves(self):
#     def post_order(self):
#     def pre_order(self):
#     def _prefix_getter(self):
#     def _prefix_setter(self, prefix):
# def convert(gr, raw_node):
#     def __new__(cls, *args, **kwds):
#     def __repr__(self):
#     def optimize(self):
#     def match(self, node, results=None):
#     def match_seq(self, nodes, results=None):
#     def generate_matches(self, nodes):
#     def __init__(self, type=None, content=None, name=None):
#     def match(self, node, results=None):
#     def _submatch(self, node, results=None):
#     def __init__(self, type=None, content=None, name=None):
#     def _submatch(self, node, results=None):
#     def __init__(self, content=None, min=0, max=HUGE, name=None):
#     def optimize(self):
#     def match(self, node, results=None):
#     def match_seq(self, nodes, results=None):
#     def generate_matches(self, nodes):
#     def _iterative_matches(self, nodes):
#     def _bare_name_matches(self, nodes):
#     def _recursive_matches(self, nodes, count):
#     def __init__(self, content=None):
#     def match(self, node):
#     def match_seq(self, nodes):
#     def generate_matches(self, nodes):
# def generate_matches(patterns, nodes):
# class Base(object):
# class Node(Base):
# class Leaf(Base):
# class BasePattern(object):
# class LeafPattern(BasePattern):
# class NodePattern(BasePattern):
# class WildcardPattern(BasePattern):
# class NegatedPattern(BasePattern):
# 
# Path: py3kwarn2to3/refactor.py
# def refactor(self, items, write=False, doctests_only=False):
#     """Refactor a list of files and directories."""
# 
#     for dir_or_file in items:
#         if os.path.isdir(dir_or_file):
#             self.refactor_dir(dir_or_file, write, doctests_only)
#         else:
#             self.refactor_file(dir_or_file, write, doctests_only)
# 
# Path: py3kwarn2to3/pgen2/driver.py
# class Driver(object):
#     def __init__(self, grammar, convert=None, logger=None):
#     def parse_tokens(self, tokens, debug=False):
#     def parse_stream_raw(self, stream, debug=False):
#     def parse_stream(self, stream, debug=False):
#     def parse_file(self, filename, encoding=None, debug=False):
#     def parse_string(self, text, debug=False):
# def load_grammar(gt="Grammar.txt", gp=None,
#                  save=True, force=False, logger=None):
# def _newer(a, b):


import unittest
import sys
import os
import os.path
import re
from textwrap import dedent
from py3kwarn2to3 import pytree, refactor
from py3kwarn2to3.pgen2 import driver
"""Support code for test_*.py files"""
# Author: Collin Winter

# Python imports

# Local imports

test_dir = os.path.dirname(__file__)
proj_dir = os.path.normpath(os.path.join(test_dir, ".."))
grammar_path = os.path.join(test_dir, "..", "Grammar.txt")
grammar = driver.load_grammar(grammar_path)

# Path: py3kwarn2to3/pytree.py
# HUGE = 0x7FFFFFFF  # maximum repeat count, default max
# def type_repr(type_num):
#     def __new__(cls, *args, **kwds):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def _eq(self, other):
#     def clone(self):
#     def post_order(self):
#     def pre_order(self):
#     def set_prefix(self, prefix):
#     def get_prefix(self):
#     def replace(self, new):
#     def get_lineno(self):
#     def changed(self):
#     def remove(self):
#     def next_sibling(self):
#     def prev_sibling(self):
#     def leaves(self):
#     def depth(self):
#     def get_suffix(self):
#         def __str__(self):
#     def __init__(self,type, children,
#                  context=None,
#                  prefix=None,
#                  fixers_applied=None):
#     def __repr__(self):
#     def __unicode__(self):
#     def _eq(self, other):
#     def clone(self):
#     def post_order(self):
#     def pre_order(self):
#     def _prefix_getter(self):
#     def _prefix_setter(self, prefix):
#     def set_child(self, i, child):
#     def insert_child(self, i, child):
#     def append_child(self, child):
#     def __init__(self, type, value,
#                  context=None,
#                  prefix=None,
#                  fixers_applied=[]):
#     def __repr__(self):
#     def __unicode__(self):
#     def _eq(self, other):
#     def clone(self):
#     def leaves(self):
#     def post_order(self):
#     def pre_order(self):
#     def _prefix_getter(self):
#     def _prefix_setter(self, prefix):
# def convert(gr, raw_node):
#     def __new__(cls, *args, **kwds):
#     def __repr__(self):
#     def optimize(self):
#     def match(self, node, results=None):
#     def match_seq(self, nodes, results=None):
#     def generate_matches(self, nodes):
#     def __init__(self, type=None, content=None, name=None):
#     def match(self, node, results=None):
#     def _submatch(self, node, results=None):
#     def __init__(self, type=None, content=None, name=None):
#     def _submatch(self, node, results=None):
#     def __init__(self, content=None, min=0, max=HUGE, name=None):
#     def optimize(self):
#     def match(self, node, results=None):
#     def match_seq(self, nodes, results=None):
#     def generate_matches(self, nodes):
#     def _iterative_matches(self, nodes):
#     def _bare_name_matches(self, nodes):
#     def _recursive_matches(self, nodes, count):
#     def __init__(self, content=None):
#     def match(self, node):
#     def match_seq(self, nodes):
#     def generate_matches(self, nodes):
# def generate_matches(patterns, nodes):
# class Base(object):
# class Node(Base):
# class Leaf(Base):
# class BasePattern(object):
# class LeafPattern(BasePattern):
# class NodePattern(BasePattern):
# class WildcardPattern(BasePattern):
# class NegatedPattern(BasePattern):
# 
# Path: py3kwarn2to3/refactor.py
# def refactor(self, items, write=False, doctests_only=False):
#     """Refactor a list of files and directories."""
# 
#     for dir_or_file in items:
#         if os.path.isdir(dir_or_file):
#             self.refactor_dir(dir_or_file, write, doctests_only)
#         else:
#             self.refactor_file(dir_or_file, write, doctests_only)
# 
# Path: py3kwarn2to3/pgen2/driver.py
# class Driver(object):
#     def __init__(self, grammar, convert=None, logger=None):
#     def parse_tokens(self, tokens, debug=False):
#     def parse_stream_raw(self, stream, debug=False):
#     def parse_stream(self, stream, debug=False):
#     def parse_file(self, filename, encoding=None, debug=False):
#     def parse_string(self, text, debug=False):
# def load_grammar(gt="Grammar.txt", gp=None,
#                  save=True, force=False, logger=None):
# def _newer(a, b):


# Path: py3kwarn2to3/tests/support.py
import unittest
import sys
import os
import os.path
import re
from textwrap import dedent
from py3kwarn2to3 import pytree, refactor
from py3kwarn2to3.pgen2 import driver

"""Support code for test_*.py files"""
# Author: Collin Winter

# Python imports

# Local imports

test_dir = os.path.dirname(__file__)
proj_dir = os.path.normpath(os.path.join(test_dir, ".."))
grammar_path = os.path.join(test_dir, "..", "Grammar.txt")
grammar = driver.load_grammar(grammar_path)

driver = driver.Driver(grammar, convert=pytree.convert)