char* id_state = strdup(id);
char* first_part = strtok(id,"_");
- int type = 0 ; // -1=état initial, 0=état intermédiaire, 1=état final
+ int type = 0 ; // -1=état initial, 0=état intermédiaire, 1=état final, 2=état initial/final
if(strcmp(first_part,"accept")==0){
- type = 1;
+ char* second_part = strtok(NULL,"_");
+ if(strcmp(second_part,"init")==0){
+ type = 2;
+ }else{
+ type = 1;
+ }
+
}else{
char* second_part = strtok(NULL,"_");
if(strcmp(second_part,"init")==0){
state = xbt_automaton_new_state(automaton, type, id_state);
}
- if(type==-1)
+ if(type==-1 || type==2)
automaton->current_state = state;
if(src)