Пример #1
0
    def __init__(self, stream):

        # superclass constructor
        Scanner.__init__(self, stream)

        # define accepting states
        self.accepting_states = [
            "Init", "S2", "S3", "S4", "S5", "S6", "S7", "S8"
        ]
Пример #2
0
 def __init__(self, stream):
     Scanner.__init__(self, stream)
     self.accepting_states = ["S", "E", "E1", "E1E2", "E2", "E2E1"]
     self.laststate = "S"
     self.dead = False
Пример #3
0
 def __init__(self, magicw):
     Scanner.__init__(self, magicw)
     self.song_list = []
     self.answer = [[], []]
Пример #4
0
 def __init__(self, stream):
     Scanner.__init__(self, stream)
     self.accepting_states = ["S", "E3"]
     self.laststate = "S"
     print(stream)