Lines Matching refs:fsm
30 import FSM
37 def DoEmit (fsm):
39 screen = fsm.memory[0]
40 screen.write_ch(fsm.input_symbol)
42 def DoStartNumber (fsm):
44 fsm.memory.append (fsm.input_symbol)
46 def DoBuildNumber (fsm):
48 ns = fsm.memory.pop()
49 ns = ns + fsm.input_symbol
50 fsm.memory.append (ns)
52 def DoBackOne (fsm):
54 screen = fsm.memory[0]
57 def DoBack (fsm):
59 count = int(fsm.memory.pop())
60 screen = fsm.memory[0]
63 def DoDownOne (fsm):
65 screen = fsm.memory[0]
68 def DoDown (fsm):
70 count = int(fsm.memory.pop())
71 screen = fsm.memory[0]
74 def DoForwardOne (fsm):
76 screen = fsm.memory[0]
79 def DoForward (fsm):
81 count = int(fsm.memory.pop())
82 screen = fsm.memory[0]
85 def DoUpReverse (fsm):
87 screen = fsm.memory[0]
90 def DoUpOne (fsm):
92 screen = fsm.memory[0]
95 def DoUp (fsm):
97 count = int(fsm.memory.pop())
98 screen = fsm.memory[0]
101 def DoHome (fsm):
103 c = int(fsm.memory.pop())
104 r = int(fsm.memory.pop())
105 screen = fsm.memory[0]
108 def DoHomeOrigin (fsm):
112 screen = fsm.memory[0]
115 def DoEraseDown (fsm):
117 screen = fsm.memory[0]
120 def DoErase (fsm):
122 arg = int(fsm.memory.pop())
123 screen = fsm.memory[0]
131 def DoEraseEndOfLine (fsm):
133 screen = fsm.memory[0]
136 def DoEraseLine (fsm):
138 arg = int(fsm.memory.pop())
139 screen = fsm.memory[0]
147 def DoEnableScroll (fsm):
149 screen = fsm.memory[0]
152 def DoCursorSave (fsm):
154 screen = fsm.memory[0]
157 def DoCursorRestore (fsm):
159 screen = fsm.memory[0]
162 def DoScrollRegion (fsm):
164 screen = fsm.memory[0]
165 r2 = int(fsm.memory.pop())
166 r1 = int(fsm.memory.pop())
169 def DoMode (fsm):
171 screen = fsm.memory[0]
172 mode = fsm.memory.pop() # Should be 4
175 def DoLog (fsm):
177 screen = fsm.memory[0]
178 fsm.memory = [screen]
180 fout.write (fsm.input_symbol + ',' + fsm.current_state + '\n')
205 self.state = FSM.FSM ('INIT',[self])