-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathSexp.html
65 lines (51 loc) · 1.42 KB
/
Sexp.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
<!Doctype HTML>
<html>
<head>
<meta charset="UTF-8">
<style>
#sexp {
margin: 10px;
background-color: palegreen;
}
</style>
</head>
<body>
<b>Input:</b><br>
<textarea id="input" name="input" rows="8" cols="100">
(10^3)
((4*9)/(35-29))
(45*(absolute (18-31))*6)
(max (6*4) (57) (()/3))
((not Button1.Enabled) or ((length "cat") >= num))
{set Label1.Text to (3*(TextBox1.Text + score))}
{if (num > 3)
then {set Button1.Text to "Greater"}
{set num to (num-1)}
else if (num <3)
then {set Button1.Text to "Less"}
else {set Button1.Text to "Equal"}}
[when Switch1.Changed
do {if ((length TextBox1.Text) < 0)
then {if Switch1.On
then {set Switch1.On to false}}
}
]
[to SizeUpButton scale do
{set Button1.Height to (Button1.Height * scale)}
{set Button1.Width to (Button1.Width * scale)}]
[to ConcatString s1 s2
result (join s1 s2)]
</textarea>
<!-- ( (not Button1.enabled) or ( (length "cat") >= num ) ) -->
<br><button id="submit" onClick="getAndDisplaySexp();">Display s-expression tree for above VenbraceForging blocks</button>
</textarea>
<br><b>String for fixed parser tokens:</b><br>
<textarea id="sexp" name="Sexp" rows="20" cols="120">
</textarea>
</body>
<script src='lib/require.js'></script>
<script type="text/javascript">
inBrowser = true; // Flag that tells following JavaScript to run browser-specific code.
</script>
<script src='Sexp.js'></script>
</html>