def test_build_parser_extra(self):
        fLOG(__file__,
             self._testMethodName,
             OutputPrint=__name__ == "__main__")
        return

        try:
            clparser, cllexer = get_parser_lexer("language")
            return
        except ImportError:
            pass

        folder = os.path.dirname(source_parser.__file__)

        for lang in ["language"]:
            gr = os.path.join(folder, lang + ".g4")
            assert os.path.exists(gr)
            build_grammar(lang, fLOG=fLOG)
Example #2
0
    def test_build_parser_extra(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")
        return

        try:
            clparser, cllexer = get_parser_lexer("language")
            return
        except ImportError:
            pass

        folder = os.path.dirname(source_parser.__file__)

        for lang in ["language"]:
            gr = os.path.join(folder, lang + ".g4")
            assert os.path.exists(gr)
            build_grammar(lang, fLOG=fLOG)
    def test_build_parser_extra(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")

        try:
            clparser, cllexer = get_parser_lexer("language")
            return
        except ImportError:
            pass

        folder = os.path.dirname(source_parser.__file__)

        for lang in ["language"]:
            gr = os.path.join(folder, lang + ".g4")
            if not os.path.exists(gr):
                warnings.warn("'{0}' does not exists.".format(gr))
                continue
            build_grammar(lang, fLOG=fLOG)
    def test_build_parser_simple_workflow(self):
        fLOG(__file__, self._testMethodName, OutputPrint=__name__ == "__main__")

        langs = ["SimpleWorkflow"]

        try:
            for lang in langs:
                clparser, cllexer = get_parser_lexer(lang)
            return
        except ImportError:
            pass

        folder = os.path.dirname(source_parser.__file__)

        for lang in langs:
            fLOG("generate for LANG", lang)
            gr = os.path.join(folder, lang + ".g4")
            assert os.path.exists(gr)
            final = build_grammar(lang, fLOG=fLOG)
            fLOG(final)
Example #5
0
    def test_build_parser(self):
        fLOG(__file__,
             self._testMethodName,
             OutputPrint=__name__ == "__main__")

        langs = ["DOT", "CSharp4", "SQLite", "R"]  # , "Python3", "Pig"]

        try:
            for lang in langs:
                get_parser_lexer(lang)
            return
        except ImportError:
            pass

        folder = os.path.dirname(source_parser.__file__)

        for lang in langs:
            fLOG("generate for LANG", lang)
            gr = os.path.join(folder, lang + ".g4")
            assert os.path.exists(gr)
            final = build_grammar(lang, fLOG=fLOG)
            fLOG(final)
    def test_build_parser_simple_workflow(self):
        fLOG(__file__,
             self._testMethodName,
             OutputPrint=__name__ == "__main__")

        langs = ["SimpleWorkflow"]

        try:
            for lang in langs:
                clparser, cllexer = get_parser_lexer(lang)
            return
        except ImportError:
            pass

        folder = os.path.dirname(source_parser.__file__)

        for lang in langs:
            fLOG("generate for LANG", lang)
            gr = os.path.join(folder, lang + ".g4")
            assert os.path.exists(gr)
            final = build_grammar(lang, fLOG=fLOG)
            fLOG(final)
    def test_build_parser(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")

        langs = ["DOT", "CSharp4", "SQLite", "R"]  # , "Python3", "Pig"]

        try:
            for lang in langs:
                clparser, cllexer = get_parser_lexer(lang)
            return
        except ImportError as e:
            pass

        folder = os.path.dirname(source_parser.__file__)

        for lang in langs:
            fLOG("generate for LANG", lang)
            gr = os.path.join(folder, lang + ".g4")
            assert os.path.exists(gr)
            final = build_grammar(lang, fLOG=fLOG)
            fLOG(final)