Пример #1
0
    def init_reader(self, s):
        from onyx.util.stream import Stream
        from onyx.reader import Reader, ReadError

        stream = Stream.from_sequence(s)
        self.reader = Reader(stream)
        self.ReadError = ReadError
Пример #2
0
    def setUp(self):
        from onyx.util.stream import Stream
        from onyx.parser import Parser
        from onyx.reader import Reader

        stream = Stream.from_sequence(self.read_string)
        reader = Reader(stream)
        self.parser = Parser(reader)
Пример #3
0
    def setUp(self):
        from onyx.util.stream import Stream
        from onyx.parser import Parser
        from onyx.reader import Reader

        stream = Stream.from_sequence(self.read_string)
        reader = Reader(stream)
        self.parser = Parser(reader)
        parse_method = getattr(self.parser, 'parse_' + self.parse_method)
        self.term = parse_method()
Пример #4
0
 def setUp(self):
     from onyx.util.stream import Stream
     self.stream = Stream.from_sequence(range(10))
Пример #5
0
    def setUp(self):
        from onyx.util.stream import Stream
        from onyx.reader import Reader

        self.reader = Reader(Stream.from_sequence([]))