-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
61 lines (56 loc) · 1.86 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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>BU CS320</title>
</head>
<body>
<h1>BU CS320 Stack Language Web Interpreter</h1>
<table style="height:100%; width:100%" summary="">
<tr>
<td style="text-align: left; height: 100%; width:50%;">
<button id="button" type="button">run</button><br>
<textarea id="input" style="height: 80%; width: 80%;">
</textarea><br>
<textarea id="output" style="height: 20%; width: 80%;"
readonly>
</textarea></td>
<td style="vertical-align: top;">
<h3>Stack Language Syntax</h3><tt>digit ::= 0 | 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9<br>
<br>
letter ::= a ... z | A ... Z<br>
<br>
int ::= [-] digit { digit }<br>
<br>
bool ::= True | False<br>
<br>
name ::= letter { letter | digit | _ | ' }<br>
<br>
const ::= int | bool | name | ()<br>
<br>
prog ::= coms<br>
<br>
com ::= Push const | Pop int | Trace int<br>
      | Add int | Sub int | Mul int | Div
int<br>
      | And | Or | Not<br>
      | Equal | Lte<br>
      | Local | Global | Lookup<br>
      | Begin coms End<br>
      | If coms Else coms End<br>
      | Fun name name coms End | Call<br>
      | Try coms End<br>
      | Switch { Case int coms } End<br>
<br>
coms ::= com { com }</tt><br>
<br>
<i style="font-size: smaller;">Some examples may fail to
run in certain browsers due to Javascript recursion depth
limitations.</i>
</td>
<td></td>
</tr>
</table><script src="./web.bc.js" type="text/javascript">
</script>
</body>
</html>