Пример #1
0
    def setUp(self):
        super(TestStage4, self).setUp()
        r = Reader()
        s1 = Parse1(r)
        s2 = Parse2(s1)
        s3 = Parse3(s2)
        self.parser = Parse4(s3)
        self.forward_parser = Parse4(s3, True)

        r = CPP()
        s1 = Parse1(r)
        s2 = Parse2(s1)
        s3 = Parse3(s2)
        self.cpp_parser = Parse4(s3)
Пример #2
0
 def setUp(self):
     super(TestStage5, self).setUp()
     r = Reader()
     s1 = Parse1(r)
     s2 = Parse2(s1)
     s3 = Parse3(s2, debug=True)
     s4 = Parse4(s3)
     self.parser = Parse5(s4)
Пример #3
0
 def setUp(self):
     super(TestStage8, self).setUp()
     r = Reader()
     s1 = Parse1(r)
     s2 = Parse2(s1)
     s3 = Parse3(s2, debug=True)
     s4 = Parse4(s3)
     s5 = Parse5(s4)
     s6 = Parse6(s5)
     s7 = Parse7(s6)
     self.parser = Parse8(s7)
Пример #4
0
 def setUp(self):
     super(TestExamples, self).setUp()
     self.reader = Reader()
     self.cpp = CPP()
     self.s1 = Parse1(self.cpp)
     self.s2 = Parse2(self.s1)
     self.s3 = Parse3(self.s2)
     self.s4 = Parse4(self.s3)
     self.s5 = Parse5(self.s4)
     self.s6 = Parse6(self.s5)
     self.s7 = Parse7(self.s6)
     self.s8 = Parse8(self.s7)
     self.s9 = Parse9(self.s8)
     self.s10 = Parse10(self.s9)
     assert all([hasattr(self, p) for p in PARSERS])
    def setUp(self):
        super(TestExamples, self).setUp()
        self.reader = Reader()
        self.cpp = CPP()
        self.s1 = Parse1(self.cpp)
        self.s2 = Parse2(self.s1)
        self.s3 = Parse3(self.s2)
        self.s4 = Parse4(self.s3)
        self.s5 = Parse5(self.s4)
        self.s6 = Parse6(self.s5)
        self.s7 = Parse7(self.s6)

        # initialise a dtb query parser
        dtbQuery = DtbMatchQuery()
        dtbQuery.parse_args(
            ['--dtb', os.path.join(os.path.dirname(ME), "test.dtb")])
        dtbQuery.check_options()

        self.s71 = QueryParseStage(self.s7,
                                   {dtbQuery.get_query_name(): dtbQuery})
        self.s8 = Parse8(self.s71)
        self.s9 = Parse9(self.s8)
        self.s10 = Parse10(self.s9)
        assert all([hasattr(self, p) for p in PARSERS])