diff --git a/mg/mglib01.cpp b/mg/mglib01.cpp index 5d0383d5b..936272a40 100755 --- a/mg/mglib01.cpp +++ b/mg/mglib01.cpp @@ -339,9 +339,9 @@ int TR_automa::trans_to(int statenum, unsigned char symbol) return (st[statenum-1]._transaction[symbol]); } -// costruttore che crea un automa non deterministico +// costruttore "di copi": crea un automa non deterministico // (transazioni Epsilon ma nessuna transazione multipla) -// eventualmente duplica un automa (e lo rende deterministico) +// o ne crea l'equivalente automa deterministico TR_automa::TR_automa(TR_automa * aa,bool makedet) { TStateset arrival; @@ -377,7 +377,7 @@ TR_automa::TR_automa(TR_automa * aa,bool makedet) int new_next,old_next; int old_state=newstateset.get_first() ; do { - if (old_next=aa->trans_to(old_state,symbol)) + if (old_next=aa->trans_to(old_state,(unsigned char)symbol)) arrival.enclose(old_next); } while ((old_state=newstateset.get_next())>0); if (!arrival.is_empty()) { @@ -386,9 +386,9 @@ TR_automa::TR_automa(TR_automa * aa,bool makedet) if (!(new_next=label2state(tmplabel))) { new_next=add_state(tmplabel); } - add_tran(curr_new_state,symbol,new_next); + add_tran(curr_new_state,(unsigned char)symbol,new_next); } - } + } // loop symbol curr_new_state++; } _isdeterministic=TRUE;