-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
62 lines (57 loc) · 2.39 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Parse Tree</title>
<style>
#body {
display: flex;
justify-content: space-around;
}
</style>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<script src="https://unpkg.com/gojs/release/go-debug.js"></script>
</head>
<body>
<div class="card">
<div class="card-header">
<h1>Parse Tree</h1>
</div>
</div>
<div id="body">
<div>
<h2>Language</h2>
<div class="card" style="width: 18rem;">
<ul class="list-group list-group-flush">
<li class="list-group-item">E -> EAT | T</li>
<li class="list-group-item">A -> + | -</li>
<li class="list-group-item">B -> * | /</li>
<li class="list-group-item">T -> TBF | F</li>
<li class="list-group-item">F -> (E) | id | -F | num</li>
</ul>
</div>
<br><br>
<h3>Check out Grammer</h3>
<p>toggle to see the next parse tree</p>
<div class="form-check">
<input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios1" value="1" checked onclick="checkParseTree(this.value)">
<label class="form-check-label" for="exampleRadios1">
id * num + id - num / id
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios2" value="2" onclick="checkParseTree(this.value)">
<label class="form-check-label" for="exampleRadios2">
-id * ( num + num ) / id
</label>
</div>
</div>
<!-- The DIV for a Diagram needs an explicit size or else we will not see anything.
In this case we also add a background color so we can see that area. -->
<div id="myDiagramDiv" style="width:600px; height:500px; background-color: #DAE4E4;"></div>
</div>
<script src="app.js"></script>
</body>
</html>