Commit 87cd30c9 authored by Andreas Fischer's avatar Andreas Fischer

Changes to the code

parent 1e2c2d9f
......@@ -7,7 +7,7 @@ class State():
Class for modeling a state in a finite state automaton.
"""
def __init__(self, name):
self.name = name
self.state = name
self.successors = {}
def set_successor(self, entry, successor):
......@@ -20,7 +20,7 @@ class State():
return self.successors.get(entry, self)
def __repr__(self):
return "State(name=%r)" % self.name
return "State(state=%r)" % self.state
class Automaton():
......@@ -52,7 +52,7 @@ class Automaton():
self._enter_state(entry)
def __get_state(self):
return self.__curr_state.name
return self.__curr_state.state
def __set_state(self, new_state):
self.__curr_state = self.states[new_state]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment