-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
173 lines (153 loc) · 9.29 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html" charset="utf-8" />
<title>Embedded Minigrace</title>
<link type="text/css" rel="stylesheet" href="global.css" />
<script src="http://web.cecs.pdx.edu/~grace/ide/js/minigrace.js" type="text/javascript"></script>
<script src="characterEquivalencies.js" type="text/javascript"></script>
<script src="tabs-simple.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/gracelib.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/dom.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/gtk.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/debugger.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/collectionsPrelude.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/standardGrace.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/importStandardGrace.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/timer.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/sys.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/io.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/unicode.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/shasum.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/mirror.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/regularExpression.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/compiler.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/lexer.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/identifierKinds.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/ast.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/parser.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/genjs.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/buildinfo.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/identifierresolution.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/fastDict.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/unixFilePath.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/xmodule.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/unicodedata.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/beginningStudent.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/minispec.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/errormessages.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/gUnit.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/requireTypes.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/staticTypes.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/objectdraw.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/random.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/rtobjectdraw.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/animation.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/minitest.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/typeComparison.js" type="text/javascript"></script>
<script src="ace/ace.js" type="text/javascript"></script>
<script src="ace/mode-grace.js" type="text/javascript" charset="utf-8"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/turtle.js" type="text/javascript"></script>
<script src="http://web.cecs.pdx.edu/~grace/ide/js/logo.js" type="text/javascript"></script>
</head>
<body onload="startup();">
<input type="button" class="button" style="font-size: 20px" id="compilerun_but" value="Go" onclick="go()" />
<div id="text_areas">
<!-- Begin Ace box -->
<div id="code_area">
<div style="position: relative; clear: left; float: none;">
<div id="code_txt_real">print "Hello, world!"</div>
<textarea id="code_txt" rows="20" cols="60"></textarea>
</div>
</div>
<!-- End Ace box -->
<input hidden type="checkbox" id="debugtoggle" onchange="toggleDebugger()" />
<!-- Begin output boxes -->
<div id="output">
<div class="tabbox">
<div id="stdout_options">
<input hidden type="checkbox" id="autoscroll" checked></input>
<button class="button" onclick="clearstdout()">Clear output</button>
</div>
<span id="extra"></span>
<div class="tab selected" onclick="outputTabManager(this, 'stdout_tab');" id="tab_stdout">Output</div>
<div class="tab" onclick="outputTabManager(this, 'canvas_tab')" id="tab_canvas">Canvas</div>
<div class="tabbox" style="border: 1px solid transparent;"><br /></div>
</div>
<div id="js_tab" style="display: none;">
<textarea id="js_txt" rows="20" cols="60"></textarea>
</div>
<div id="canvas_tab" style="display: none;">
<canvas id="graphics" width="500" height="250"></canvas>
</div>
<div id="stdout_tab">
<textarea id="stdout_txt" rows="20" cols="60"></textarea>
</div>
</div>
<!-- End output Boxes -->
<div style="clear: both;"></div>
<textarea id="stderr_txt" rows="9" cols="60"></textarea>
<div id="debugger">
<table style="width: 100%;"><tr><td class="debugger_td_border">
<div id="debugger_buttons">
<button onclick="GraceDebugger['backStep']();go();">Back-step</button>
<button onclick="GraceDebugger['restart']();go()">Restart</button>
<button onclick="GraceDebugger['continue']();go();">Continue</button>
<button onclick="GraceDebugger['step']();go()">Step</button>
</div>
<div class="breakpoints">
Breakpoints
<div id="breakpoints">
<span style="color: #aaa;">(No breakpoints added yet)</span>
</div>
<button onclick="GraceDebugger.breakpoints.add();" id="bpadd">Add a breakpoint</button> <input id="add_break" />
</div>
</td><td class="debugger_td_border">
<div id="debugger_vars_display">
Variables:
<div></div>
</div>
</td></tr></table>
</div>
</div>
<div style="clear: both;"></div>
<select hidden id="mode" onchange="modeswitch()">
<option value="js">JavaScript</option>
<option value="c">C</option>
<option value="lex">Tokens</option>
<option value="parse">AST</option>
<option value="grace">Grace</option>
<option value="testall">All tests (slow)</option>
</select>
<input hidden type="text" value="main" id="modname" size="16"
onchange='this.selected.changeName(this.value);'/>
<select hidden id="defaultVisibility" onchange="selectvisibility();">
<option value="public">All accessible</option>
<option value="standard">Standard</option>
</select>
<br />
<input hidden type="button" value="Load test case:" onclick="loadtest(document.getElementById('testcases').value)" />
<input hidden type="button" value="Load sample:" onclick="loadsample(document.getElementById('sample').value)" />
<select hidden id="sample"><option></option><!--Will be populated dynamically//--></select>
<br />
<hr />
<div hidden id="files"></div>
<button hidden onclick="addFileLine();">Add a file</button>
<button hidden onclick="saveCurrentTab();">Save current tab</button>
</body>
<script>
var starter_file = window.location.search;
if (starter_file != null && starter_file.length != 0){
var req = new XMLHttpRequest();
req.open("GET", "./examples/" + starter_file.substring(1) + ".grace", false);
req.send(null);
if (req.status == 200) {
/*if (ace)
editor.setValue(req.responseText, -1);
document.getElementById("code_txt").value = req.responseText;
document.getElementById('modname').value = k;*/
document.getElementById("code_txt_real").innerHTML = req.responseText;
}
}
</script>
</html>