diff options
author | Patrick Simianer <p@simianer.de> | 2010-05-22 01:13:22 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2010-05-22 01:13:22 +0200 |
commit | 8f7153eb3867048ab90d35cbc075071bced993f0 (patch) | |
tree | 1419e54848129aa2c766ade1028b6dc3a00734e9 /javascripts/main.js | |
parent | 8c183055faf4d79c3c704170bd0d22fffe2795b3 (diff) |
almost done
Diffstat (limited to 'javascripts/main.js')
-rw-r--r-- | javascripts/main.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/javascripts/main.js b/javascripts/main.js deleted file mode 100644 index dc3c98b..0000000 --- a/javascripts/main.js +++ /dev/null @@ -1,28 +0,0 @@ -// globals -var EPSILON = '~'; -var NEXTSTATE = 0; -var EMPTYSYMBOL = '%'; -var ALPHABET = 'abc'+EMPTYSYMBOL; -var REDELIMITER = '$'; -var regex = 'a*b|b*a' //(a|b)*'//'a(a|b)*a'); -var word = 'ba'; //'abba'; - - -function main() { - // parse regular expression - var parser = new RegexParser(); - var nfa = parser.parse(regex); - document.write('Parsing: '+parser.getErrorMessage()+'<br />'); - - // simulate - var simulator = new NfaSimulator(nfa); - document.write('\''+word+'\' in <em>L</em>: '+simulator.simulate(word)+'<br />'); - - // nfa -> dfa - document.write('<pre>'); - var dfa = new Nfa2Dfa(nfa); - var ttable = dfa.do(); - document.write('</pre>'); - - //drawGraph() -} |