# HG changeset patch # User mjsousa # Date 1485261884 0 # Node ID 7c8709ce6b8f8517ab2dce4c963abd6a68321202 # Parent 675ee2eeb3ff879fbeb69317ca84b91f88ee6abb Correcty determine the datatype (TIME) of the parameters of SFC actions with timed qualifiers diff -r 675ee2eeb3ff -r 7c8709ce6b8f stage3/narrow_candidate_datatypes.cc --- a/stage3/narrow_candidate_datatypes.cc Mon Jan 23 12:50:07 2017 +0000 +++ b/stage3/narrow_candidate_datatypes.cc Tue Jan 24 12:44:44 2017 +0000 @@ -930,6 +930,18 @@ return NULL; } + +void *narrow_candidate_datatypes_c::visit(action_qualifier_c *symbol) { + for(unsigned int i = 0; i < symbol->action_time->candidate_datatypes.size(); i++) { + if (get_datatype_info_c::is_TIME_compatible(symbol->action_time->candidate_datatypes[i])) + symbol->action_time->datatype = symbol->action_time->candidate_datatypes[i]; + } + symbol->action_time->accept(*this); + symbol->action_qualifier->accept(*this); // Not really necessary for now... + return NULL; +} + + /********************************/ /* B 1.7 Configuration elements */ /********************************/ diff -r 675ee2eeb3ff -r 7c8709ce6b8f stage3/narrow_candidate_datatypes.hh --- a/stage3/narrow_candidate_datatypes.hh Mon Jan 23 12:50:07 2017 +0000 +++ b/stage3/narrow_candidate_datatypes.hh Tue Jan 24 12:44:44 2017 +0000 @@ -249,6 +249,7 @@ /* B 1.6 Sequential function chart elements */ /********************************************/ void *visit(transition_condition_c *symbol); + void *visit(action_qualifier_c *symbol); /********************************/ /* B 1.7 Configuration elements */