-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
163 lines (160 loc) · 8.09 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
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>Analisador Sintático</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
<script src="analisador.js"></script>
</head>
<body>
<nav class="navbar navbar-dark bg-dark">
<a class="navbar-brand" href="https://github.com/vdufloth/URI-CC-analisador-sintatico">Vinicius Dufloth - Analisador Sintático</a>
</nav>
<div class="container-fluid">
<br>
<div class="row">
<div class="col-sm-6">
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-header">Verificar Sentenças</div>
<div class="card-body">
<div>Exemplos: dbdadbd ✓ dadadad ✓ cccccdadad ✓ ccdccdccd ✕
dbadadcbd ✕</div>
<div class="form-group form-group-sm">
<div class="input-group">
<div class="input-group-prepend">
<button class="btn bg-cor-botao" type="button" title = "Insere uma sentença válida aleatória" id="b-gerar-sentenca">🎲</button>
</div>
<input type="text" class="form-control"
placeholder="Digite a sentença a ser verificada ..."
id="i-entrada-sentenca">
<div class="input-group-append">
<button class="btn bg-cor-botao" type="button" id="b-verifica-tudo">Verificar Toda Sentença</button>
<button class="btn btn-danger" type="button" id="b-limpar-tudo" title="Limpar Tudo">×</button>
</div>
</div>
<small id="input-tip" class="text-muted" style="margin-left: 50px;"></small>
</div>
<table class="table table-sm table-bordered tabela-passos">
<thead>
<tr class="d-flex">
<th class="col-2">Iteração</th>
<th class="col-2">Pilha</th>
<th class="col-6">Entrada</th>
<th class="col-2">Ação</th>
</tr>
</thead>
<tbody></tbody>
</table>
<div>
<button class="btn bg-cor-botao" type="button" id="b-passo-a-passo">Apenas Próximo Passo</button>
</div>
<div>
<small class="text-muted">Após pressionar o botão pela primeira vez,
é possível apertar espaço para continuar executando</small>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="card mb-3">
<div class="card-header">Gramática
</div>
<div class="card-body">
<div class="row mb-3">
<div class="col-sm-4" style="font-family: monospace">
<div>GLC</div>
S ::= BA <br>
A ::= aBA | ε <br>
B ::= DC <br>
C ::= bDC | ε <br>
D ::= cD | d
</div>
<div class="col-sm-4" style="font-family: monospace">
<div>First</div>
S = {c, d} <br>
A = {a, ε} <br>
B = {c, d} <br>
C = {b, ε} <br>
D = {c, d}
</div>
<div class="col-sm-4" style="font-family: monospace">
<div>Follow</div>
S = {$} <br>
A = {$} <br>
B = {a, $} <br>
C = {a, $} <br>
D = {b, a, $}
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header">Tabela de Parsing</div>
<div class="card-body">
<table class="table table-bordered table-sm">
<thead class="bg-style-table">
<tr>
<th></th>
<th>a</th>
<th>b</th>
<th>c</th>
<th>d</th>
<th>$</th>
</tr>
</thead>
<tbody>
<tr>
<th class="bg-style-table">S</th>
<td></td>
<td></td>
<td>S → BA</td>
<td>S → BA</td>
<td></td>
</tr>
<tr>
<th class="bg-style-table">A</th>
<td>A → aBA</td>
<td></td>
<td></td>
<td></td>
<td>S → ε</td>
</tr>
<tr>
<th class="bg-style-table">B</th>
<td></td>
<td></td>
<td>B → DC</td>
<td>B → DC</td>
<td></td>
</tr>
<tr>
<th class="bg-style-table">C</th>
<td>C → ε</td>
<td>C → bDC</td>
<td></td>
<td></td>
<td>C → ε</td>
</tr>
<tr>
<th class="bg-style-table">D</th>
<td></td>
<td></td>
<td>D → cD</td>
<td>D → d</td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</body>
</html>