Commit 85057ee4 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Declare start procedure for parallel states

parent eb83e1f0
......@@ -187,8 +187,6 @@ LD_LIBRARY_PATH=. taste-gui -l
# Get list of parallel states to be added to the global list of states,
# and list of their inner substates
aggregates, substates = Helper.state_aggregations(process)
for each in substates:
print '{}{}state'.format(each.encode('utf-8'), UNICODE_SEP.encode('utf-8'))
# End debug
......@@ -243,6 +241,11 @@ LD_LIBRARY_PATH=. taste-gui -l
process_level_decl.append(u'{name} : constant := {val};'
.format(name=name, val=str(val)))
# Declare start procedure for aggregate states XXX add in C generator
for each in aggregates:
process_level_decl.append(u'procedure {}{}START;'.format(each,
# Add the declaration of the runTransition procedure, if needed
if process.transitions:
process_level_decl.append('procedure runTransition(Id: Integer);')
......@@ -1906,7 +1909,7 @@ def _transition(tr, **kwargs):
code.append(u'trId := ' +
unicode(tr.terminator.next_id) + u';')
if tr.terminator.next_id == -1:
if not tr.terminator.substate:
if not tr.terminator.substate: # XXX add to C generator
code.append(u'{ctxt}.state := {nextState};'
Supports Markdown
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