-
Notifications
You must be signed in to change notification settings - Fork 0
/
grammar.html
177 lines (173 loc) · 4.09 KB
/
grammar.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
174
175
176
177
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style type="text/css">
svg.railroad-diagram {
background-color: hsl(30,20%,95%);
}
svg.railroad-diagram path {
stroke-width: 3;
stroke: black;
fill: rgba(0,0,0,0);
}
svg.railroad-diagram text {
font: bold 14px monospace;
text-anchor: middle;
}
svg.railroad-diagram text.label {
text-anchor: start;
}
svg.railroad-diagram text.comment {
font: italic 12px monospace;
}
svg.railroad-diagram rect {
stroke-width: 3;
stroke: black;
fill: hsl(120,100%,90%);
}
</style>
</head>
<body>
<h1><code>main</code></h1>
<div>
<svg class="railroad-diagram" width="297" height="100" viewBox="0 0 297 100">
<g transform="translate(.5 .5)">
<path d="M 20 21 v 20 m 10 -20 v 20 m -10 -10 h 20.5"></path>
<g>
<path d="M40 31h0"></path>
<path d="M256 31h0"></path>
<path d="M40 31h20"></path>
<g>
<path d="M60 31h0"></path>
<path d="M236 31h0"></path>
<path d="M60 31h10"></path>
<g>
<path d="M70 31h0"></path>
<path d="M226 31h0"></path>
<path d="M70 31h10"></path>
<g>
<path d="M80 31h0"></path>
<path d="M216 31h0"></path>
<path d="M80 31h20"></path>
<g>
<path d="M100 31h0"></path>
<path d="M196 31h0"></path>
<path d="M100 31h10"></path>
<g>
<path d="M110 31h0"></path>
<path d="M186 31h0"></path>
<rect x="110" y="20" width="76" height="22"></rect>
<text x="148" y="35">NUMBERS</text>
</g>
<path d="M186 31h10"></path>
</g>
<path d="M196 31h20"></path>
<path d="M80 31a10 10 0 0 1 10 10v10a10 10 0 0 0 10 10"></path>
<g>
<path d="M100 61h0"></path>
<path d="M196 61h0"></path>
<path d="M100 61h10"></path>
<g>
<path d="M110 61h0"></path>
<path d="M186 61h0"></path>
<rect x="110" y="50" width="76" height="22"></rect>
<text x="148" y="65">LETTERS</text>
</g>
<path d="M186 61h10"></path>
</g>
<path d="M196 61a10 10 0 0 0 10 -10v-10a10 10 0 0 1 10 -10"></path>
</g>
<path d="M216 31h10"></path>
<path d="M80 31a10 10 0 0 0 -10 10v29a10 10 0 0 0 10 10"></path>
<g>
<path d="M80 80h136"></path>
</g>
<path d="M216 80a10 10 0 0 0 10 -10v-29a10 10 0 0 0 -10 -10"></path>
</g>
<path d="M226 31h10"></path>
</g>
<path d="M236 31h20"></path>
</g>
<path d="M 256 31 h 20 m -10 -10 v 20 m 10 -20 v 20"></path>
</g>
</svg>
</div>
<h1><code>LETTERS</code></h1>
<div>
<svg class="railroad-diagram" width="261" height="71" viewBox="0 0 261 71">
<g transform="translate(.5 .5)">
<path d="M 20 21 v 20 m 10 -20 v 20 m -10 -10 h 20.5"></path>
<g>
<path d="M40 31h0"></path>
<path d="M220 31h0"></path>
<path d="M40 31h20"></path>
<g>
<path d="M60 31h0"></path>
<path d="M200 31h0"></path>
<path d="M60 31h10"></path>
<g>
<path d="M70 31h0"></path>
<path d="M190 31h0"></path>
<path d="M70 31h10"></path>
<g>
<path d="M80 31h0"></path>
<path d="M180 31h0"></path>
<rect x="80" y="20" width="100" height="22" rx="10" ry="10"></rect>
<text x="130" y="35">/[a-zA-Z]/</text>
</g>
<path d="M180 31h10"></path>
<path d="M80 31a10 10 0 0 0 -10 10v0a10 10 0 0 0 10 10"></path>
<g>
<path d="M80 51h100"></path>
</g>
<path d="M180 51a10 10 0 0 0 10 -10v0a10 10 0 0 0 -10 -10"></path>
</g>
<path d="M190 31h10"></path>
</g>
<path d="M200 31h20"></path>
</g>
<path d="M 220 31 h 20 m -10 -10 v 20 m 10 -20 v 20"></path>
</g>
</svg>
</div>
<h1><code>NUMBERS</code></h1>
<div>
<svg class="railroad-diagram" width="205" height="71" viewBox="0 0 205 71">
<g transform="translate(.5 .5)">
<path d="M 20 21 v 20 m 10 -20 v 20 m -10 -10 h 20.5"></path>
<g>
<path d="M40 31h0"></path>
<path d="M164 31h0"></path>
<path d="M40 31h20"></path>
<g>
<path d="M60 31h0"></path>
<path d="M144 31h0"></path>
<path d="M60 31h10"></path>
<g>
<path d="M70 31h0"></path>
<path d="M134 31h0"></path>
<path d="M70 31h10"></path>
<g>
<path d="M80 31h0"></path>
<path d="M124 31h0"></path>
<rect x="80" y="20" width="44" height="22"></rect>
<text x="102" y="35">int</text>
</g>
<path d="M124 31h10"></path>
<path d="M80 31a10 10 0 0 0 -10 10v0a10 10 0 0 0 10 10"></path>
<g>
<path d="M80 51h44"></path>
</g>
<path d="M124 51a10 10 0 0 0 10 -10v0a10 10 0 0 0 -10 -10"></path>
</g>
<path d="M134 31h10"></path>
</g>
<path d="M144 31h20"></path>
</g>
<path d="M 164 31 h 20 m -10 -10 v 20 m 10 -20 v 20"></path>
</g>
</svg>
</div>
</body>
</html>