class WordList(grammar.Grammar):
class DummyCpp(grammar.Grammar):
class DumCsv(grammar.Grammar):
class GrammarBasic_Test(unittest.TestCase):
            class TestDsl(grammar.Grammar):
            class TestDsl(grammar.Grammar):
            class TestDsl(grammar.Grammar):
            class TestDsl(grammar.Grammar):
            class TestDsl(grammar.Grammar):
            class TestDsl(grammar.Grammar):
            class TestDsl(grammar.Grammar):
            class TestDsl(grammar.Grammar):
            class TestDsl(grammar.Grammar):
            class TestDsl(grammar.Grammar):
        class Exemple(grammar.Grammar):
    def test_01_list_word(self):
        def add_to(self, mylist, word):
    def test_02_csv(self):
        def add_line(self, csv, l):
        def add_col(self, line, c):
        def add_item(self, item, i):
    def test_03_inherit_csv(self):
        def add_col(self, line, c):
    def test_04_parse_error_csv(self):
    def test_05_parse_error_dsl(self):
    def test_06_parse_error_dsl(self):
    def test_07_parse_error_dsl(self):
    def test_08_parse_error_dsl(self):
    def test_09_parse_error_dsl(self):
    def test_10_parse_error_dsl(self):
    def test_11_parse_error_dsl(self):
    def test_12_parse_error_dsl(self):
    def test_13_parse_error_dsl(self):
    def test_14_parse_error_dsl(self):
    def test_15_ignore_cpp(self):
        def add(self, ast, i):
    def test_28_extra_complement(self):
        def cols(self, ast, p):
        def rows(self, ast, p):
    def test_29_parse_file(self):
        def add_to(self, mylist, word):
    def test_30_read_until(self):
        def broken_read_until(self):
        def dump(self, stuff): class IgnoreNull(grammar.Grammar):
class IgnoreBlanks(grammar.Grammar):
class IgnoreCPP(grammar.Grammar):
class GrammarDirective_Test(unittest.TestCase):
    def test_01_ignore_null(self):
        def add_to(self, mylist, item):
    def test_02_ignore_blank(self):
        def add_to(self, mylist, item):
    def test_03_ignore_cpp(self):
        def init(self, mylist):
        def add_to(self, mylist, item):
    def test_04_ignore_cpp(self):
        def init_ignore(self, mylist):
        def add_to2(self, mylist, item):
    def test_05_ignore_cpp(self):
        def init_ignore2(self, mylist):
        def add_to3(self, mylist, item):
    def test_08_ignore_cpp(self):
        def init_ignore4(self, mylist):
        def add_to5(self, mylist, item): class GrammarType_Test(unittest.TestCase):
    def test_01_typeliteral(self):
    def test_02_typerror(self): class Hooks_Test(unittest.TestCase):
        class parserExample(grammar.Grammar):
        class parserExample2(grammar.Grammar):
        class parserExample3(grammar.Grammar):
    def test_01(self): class r:
class Test(r):
class A(r):
class L(list):
class H(dict):
class InternalAst_Test(unittest.TestCase):
        class A: pass
        class ChildTest(Test): pass
        class A(Node): pass
    def __repr__(self) -> str:
    def __repr__(self) -> str:
    def __repr__(self) -> str:
    def test_000(self):
    def test_00(self):
        def dummy(nodes, user_data):
    def test_01(self):
    def test_03(self):
        def checkMatch(tree: Node, user_data) -> Node:
    def test_04(self):
        def checkMatch(tree: Node, user_data) -> Node:
        def otherHook(tree: Node, user_data) -> Node:
    def test_05(self):
        def checkMatch1(tree: Node, user_data) -> Node:
        def checkMatch2(tree: Node, user_data) -> Node:
        def checkMatch3(tree: Node, user_data) -> Node:
        def checkMatch4(tree: Node, user_data) -> Node:
        def checkMatch5(tree: Node, user_data) -> Node:
        def checkMatch(tree: Node, user_data) -> Node:
        def checkNoMatch(tree: Node, user_data) -> Node:
    def test_06(self):
        def checkMatch1(tree: Node, user_data):
        def checkMatch2(tree: Node, user_data):
        def checkMatch3(tree: Node, user_data):
        def checkMatch4(tree: Node, user_data):
    def test_07(self):
        def checkMatch1(tree: Node, user_data):
        def checkMatch2(tree: Node, user_data):
        def checkMatch3(tree: Node, user_data):
        def checkMatch4(tree: Node, user_data):
    def test_08(self):
    def test_09(self): class InternalDsl_Test(unittest.TestCase):
        class dummyDir(parsing.DirectiveWrapper):
        class dummyList(parsing.Node):
    def test_01_one_rule(self):
    def test_02_two_rules(self):
    def test_03_more_rules(self):
    def test_04_one_alt(self):
    def test_05_two_alt(self):
    def test_06_char(self):
    def test_07_string(self):
    def test_08_range(self):
    def test_09_complexe(self):
    def test_10_repoption(self):
    def test_11_rep0N(self):
    def test_12_rep1N(self):
    def test_13_complementedRepeatedRule(self):
    def test_14_negatedRule(self):
    def test_15_negatedRepeatedRule(self):
    def test_16_lookaheadRule(self):
    def test_17_lookaheadRepeatedRule(self):
    def test_18_hookNoParam(self):
        def my_hook(self):
    def test_19_hookOneParamStr(self):
        def my_hook_txt(self, txt):
    def test_20_hookOneParamChar(self):
        def my_hook_char(self, txt):
    def test_21_hookOneParamNum(self):
        def my_hook_num(self, num):
    def test_22_hookOneParamId(self):
        def my_hook_id(self, n):
    def test_23_hookParams(self):
        def my_hook_params(self, n, num, txt):
    def test_24_hookAndCapture(self):
        def my_hook_multi(self, n1, n2, n3, n4, n5):
    def test_25_directive(self):
            def begin(self, parser, a: int, b: int, c: int):
            def end(self, parser, a: int, b: int, c: int):
        def my_hook(self):
    def test_25_list_id(self):
        def in_list(self, ls, ident):
    def test_26_set(self):
            def __init__(self):
            def append(self, x):
            def __getitem__(self, n):
        def in_list(self, ls, ident):
    def test_27_nodescope(self):
        def put(self, ast):
        def check1(self):
        def check2(self):
        def check3(self):
        def toto(self):
        def check4(self):
    def test_28_errors(self):
            def check5(self):
            def check6(self):
            def check7(self): class InternalError_Test(unittest.TestCase):
        class Exemple(Grammar):
    def test_locationinfo_01(self):
        def intern_func():
    def test_notify_02(self):
    def test_diagnostic_03(self):
    def test_end_file_03(self): class InternalFmt_Test(unittest.TestCase):
    def test_00(self): class InternalParse_Test(unittest.TestCase):
        class DummyDirective(parsing.DirectiveWrapper):
        class FakeBasic(metaclass=parsing.MetaBasicParser):
        class A(FakeBasic):
        class B(FakeBasic):
        class FakeGrammar(metaclass=grammar.MetaGrammar):
        class SubGrammar(parsing.Parser, FakeGrammar):
    def test_000_Node(self):
    def test_00_Directive(self):
            def begin(self, test, a: int, b: int):
            def end(self, test, a: int, b: int):
        def dummyParser(p):
    def test_01_readIdentifier(self):
    def test_02_readInteger(self):
    def test_04_readCChar(self):
    def test_05_readCString(self):
    def test_06_CallAndSeq(self):
    def test_07_RepXN(self):
    def test_08_RepAlt(self):
    def test_09_RepRules(self):
        def check_word(parser, test, tutu):
        def check_int(parser, test, toto):
    def test_10_contextVariables(self):
    def test_11_namespaceRules(self):
        def dummy(self):
    def test_12_Metabasicparser(self):
    def test_13_defaultRules(self):
    def test_14_MetaGrammar(self):
    def test_15_error_index(self):
    def test_16_Negation(self):
    def test_17_Lookahead(self):
    def test_18_Complement(self):
    def test_19_Until(self): class InternalType_Test(unittest.TestCase):
        class MySymbol(Symbol):
        class MyFun(MySymbol, Fun):
    def test_type_expr_00(self):
    def test_symbol_01_symbolpatch(self):
            def show_name(self):
            def internal_name(self):
            def internal_name(self):
    def test_scope_01_pp(self):
    def test_scope_02_setop(self):
    def test_scope_03_overload(self):
    def test_scope_04_links_embedded(self):
    def test_scope_05_save_restore(self):
    def test_val_01_pp(self):
    def test_poly_01_var(self):
    def test_variadic_01(self):
    def test_type_name_01_pp(self):
    def test_tuple_01_pp(self):
    def test_eval_ctx_01(self):
    def test_translator_01(self):
    def test_translator_02(self): def unify(self, oth_type_def: TypeExprComponent, blhs, brhs) -> TypeExprComponent:
    """
    unify a definition with a correspondant type_def
    """
    print("DEFINE TRY TO TYPE %s ?? %s" % (type(self.type_def), type(oth_type_def)))
    print("TRY TO unify %s ?? %s" % (self.type_def, oth_type_def))
    return self.type_def.unify(oth_type_def, blhs, brhs)
import os
import sys
import unittest
from os import path
from tests import gen_dsl
from tests import grammar_basic
from tests import grammar_decorator
from tests import grammar_directive
from tests import grammar_file
from tests import grammar_type
from tests import hooks
from tests import internal_ast
from tests import internal_dsl
from tests import internal_error
from tests import internal_fmt
from tests import internal_parse
from tests import internal_type
from tests import unify

# Add parent directory in front of path to import pyrser and tests from sources
parent_dir = path.join(path.dirname(__file__), os.pardir)
if parent_dir not in sys.path:
    sys.path.insert(0, parent_dir)



# Test cases in order
test_cases = (
    #gen_dsl.GenDsl_Test,
    grammar_basic.GrammarBasic_Test, #OK
    grammar_decorator.GrammarDecorator_Test, #OK

    grammar_directive.GrammarDirective_Test, #OK