-
Notifications
You must be signed in to change notification settings - Fork 27
/
index.html
131 lines (121 loc) · 5.81 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<meta charset="utf-8">
<meta name="description" content="Finite State Machine simulator for Deterministic Finite Automata, Non-Deterministic Finite Automata, and Push-Down Automata." />
<meta name="author" content="Kyle Dickerson" />
<title>Automaton Simulator</title>
<link rel="stylesheet" type="text/css" href="css/smoothness/jquery-ui-1.10.0.custom.min.css" />
<link rel="stylesheet" type="text/css" href="css/fsm.css" />
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
<div id="tools">
<div style="text-align:center;">
<button id="saveBtn" onclick="fsm.save();" class="image" title="Save"><img src="images/empty.png" /></button>
<button id="loadBtn" onclick="fsm.load();" class="image" title="Load" style="margin-right: 20px;"><img src="images/empty.png" /></button>
<button id="addStateBtn" onclick="fsm.addState();" class="image" title="Add State"><img src="images/empty.png" /></button>
</div>
<label>Test / Debug:</label>
<input id="testString" type="text" value="" /><br />
<div style="text-align:center;">
<button id="testBtn" onclick="fsm.test($('#testString').val());" class="image" title="Test"><img src="images/empty.png" /></button>
<button id="stopBtn" onclick="fsm.debugStop();" disabled="disabled" class="image" title="Stop Debug"><img src="images/empty.png" /></button>
<button id="debugBtn" onclick="fsm.debug($('#testString').val());" class="image" title="Start/Step Debug"><img src="images/empty.png" /></button>
</div>
<div id="testResult"> </div>
<hr />
<h5>
Bulk Testing
<button id="bulkTestBtn" class="image" style="margin-left:15px;" onclick="fsm.test({accept:$('#acceptStrings').val().split('\n'), reject:$('#rejectStrings').val().split('\n')});" title="Run Bulk Tests"><img src="images/empty.png" /></button>
</h5>
<label>Accept (one per line):</label>
<textarea id="acceptStrings" style="margin-bottom:5px;"></textarea>
<br />
<label>Reject (one per line):</label>
<textarea id="rejectStrings"></textarea>
</div>
<div id="mainHolder">
<h1>
Automaton Simulator:
<button class="delegate" disabled="disabled" title="Deterministic Finite Automaton">DFA</button>
<button class="delegate" title="Non-Deterministic Finite Automaton">NFA</button>
<button class="delegate" title="Pushdown Automaton">PDA</button>
<button id="resetBtn" onclick="fsm.reset();" class="image" title="Reset"><img src="images/empty.png" /></button>
<select id="examples">
<option value="">Examples</option>
</select>
</h1>
<div id="machineGraph">
<div id="dfaStatus" style="display:none;"></div>
</div>
<h5 id="bulkResultHeader" style="text-align:left;">
Test Results:
<span id="fsmDebugInputStatus" class="fsmStatus" style="display:none;">
<span class="consumedInput"></span>
<span class="currentInput"></span>
<span class="futureInput"></span>
</span>
</h5>
<div id="resultConsole"></div>
</div>
<div id="footer">
<div>
<a href="http://www.linkedin.com/in/kyledickerson/">Kyle Dickerson</a> --
<a href="//plus.google.com/111960029093387822677?prsrc=3" rel="publisher" style="text-decoration:none;">
<img src="images/gplus-16.png" alt="Google+" style="border:0;width:16px;height:16px;vertical-align:middle;"/>
</a> --
<a href="https://github.com/kdickerson/automatonSimulator">On Github</a>
Tools:
<a href="http://jquery.com/">jQuery</a>
<a href="https://github.com/jsplumb/jsplumb">jsPlumb</a>
Icons:
<a href="http://www.fatcow.com/free-icons">FatCow</a>
</div>
</div>
<div id="saveLoadDialog">
<div id="saveLoadTabs">
<ul>
<li><a href="#browserStorage">Browser Storage</a></li>
<li><a href="#plaintext">Plaintext</a></li>
<li><a href="#shareableURL">Shareable URL</a></li>
</ul>
<div id="browserStorage">
<input id="machineName" type="text" value="Machine Name" title="Machine Name" />
<div>
<ul id="storedMachines"></ul>
</div>
</div>
<div id="plaintext"><textarea></textarea></div>
<div id="shareableURL"><textarea></textarea></div>
</div>
</div>
<script src="js/jquery-1.9.0.min.js"></script>
<script src="js/jquery-ui-1.10.0.custom.min.js"></script>
<script src="js/jquery.jsPlumb-1.3.16-all-min.js"></script>
<script src="js/fsm_examples.js"></script>
<script src="js/DFA.js"></script>
<script src="js/NFA.js"></script>
<script src="js/PDA.js"></script>
<script src="js/fsm_ui.js"></script>
<script src="js/dfa_delegate.js"></script>
<script src="js/nfa_delegate.js"></script>
<script src="js/pda_delegate.js"></script>
<!-- Piwik Analytics -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
(function() {
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://analytics.serindu.com/";
_paq.push(["setTrackerUrl", u+"piwik.php"]);
_paq.push(["setSiteId", "1"]);
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Piwik Code -->
</body>
</html>