summaryrefslogtreecommitdiff
path: root/javascripts
diff options
context:
space:
mode:
Diffstat (limited to 'javascripts')
-rw-r--r--javascripts/Nfa2Dfa.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/javascripts/Nfa2Dfa.js b/javascripts/Nfa2Dfa.js
index f08ee86..cbdd766 100644
--- a/javascripts/Nfa2Dfa.js
+++ b/javascripts/Nfa2Dfa.js
@@ -64,17 +64,15 @@ Nfa2Dfa.prototype.do = function() {
if (!ttable[q]) {
ttable[q] = new Object();
- ttable[q].isFinal = true;
- }
-
- var isFinal = false;
- for (var zz=0; zz < x.length; zz++) {
- if (StateCmp(x.get(zz), this.acceptingState)) {
+ if(q.split('_').indexOf(''+this.getAcceptingState().id) >= 0) {
+ ttable[q].isFinal = true;
+ } else {
ttable[q].isFinal = false;
- break;
- }
+ }
}
+
+
ttable[q][a] = qq;
if (x.length > 0 && !adone) {