Skip to content

Commit

Permalink
Remove duplication in NFA2DFA.py
Browse files Browse the repository at this point in the history
  • Loading branch information
XbzOnGit committed Mar 7, 2024
1 parent 1ce19b2 commit 9af10a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NFA2DFA/NFA2DFA.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ def nfa2dfa(nfa_dict:dict, st_qname:str, ed_qnames:list)->dict:
if stage in acceped_in_nfa:
theno = closure_to_id[clo]
dfa_dict["accepted_q"].append(f"q{theno}")
# Duplication.
dfa_dict['accepted_q'] = list(set(dfa_dict['accepted_q']))
return dfa_dict


Expand Down

0 comments on commit 9af10a2

Please sign in to comment.