summaryrefslogtreecommitdiffhomepage
path: root/tools/dfagen/dfagen/automaton.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dfagen/dfagen/automaton.py')
-rw-r--r--tools/dfagen/dfagen/automaton.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/dfagen/dfagen/automaton.py b/tools/dfagen/dfagen/automaton.py
index c24fe1e6..63a701f6 100644
--- a/tools/dfagen/dfagen/automaton.py
+++ b/tools/dfagen/dfagen/automaton.py
@@ -1,9 +1,10 @@
class Event:
"""Event definition."""
- def __init__ (self, name, comments = ''):
+ def __init__ (self, name, comments = '', origin = None):
self.name = name
self.comments = comments
+ self.origin = origin
pass
def __str__ (self):
@@ -15,10 +16,11 @@ class Event:
class State:
"""State definition."""
- def __init__ (self, name, comments = '', initial = False):
+ def __init__ (self, name, comments = '', initial = False, origin = None):
self.name = name
self.comments = comments
self.initial = initial
+ self.origin = origin
self.transitions = { }
self.transitions_list = [ ]
self.attributes = None
@@ -73,11 +75,13 @@ class Transition:
class TransitionBranch:
- def __init__ (self, event, name = None, to = None, comments = ''):
+ def __init__ (self, event, name = None, to = None, comments = '',
+ origin = None):
self.event = event
self.name = name
self.to = to
self.comments = comments
+ self.origin = origin
self.attributes = None
def __str__ (self):