-
Notifications
You must be signed in to change notification settings - Fork 14
/
documentation.html
415 lines (401 loc) · 17.6 KB
/
documentation.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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
<!DOCTYPE html>
<html lang="en">
<head>
<title>EXPL | Documentation</title>
<meta charset="UTF-8" />
<link rel="stylesheet" href="css/style_new.css" />
<script src="js/jquery-1.12.1.min.js" charset="utf-8"></script>
<script src="js/bootstrap.min.js" charset="utf-8"></script>
<script src="js/sticky_sidebar.js" charset="utf-8"></script>
<!--[if lt IE 9
]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script
><![endif]-->
</head>
<body>
<div class="container">
<header id="navtop">
<a href="index.html" class="logo fleft"
><img src="img/logo.png" alt=""
/></a>
<nav class="fright">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<!-- <li><a href="help.html">Help</a></li> -->
<li><a href="roadmap.html">Roadmap</a></li>
<li>
<a href="documentation.html" class="navactive">Documentation</a>
</li>
</ul>
</nav>
</header>
<div class="Services-page main grid-wrap">
<header class="grid col-full">
<hr />
<p class="fleft">DOCUMENTATION</p>
<br />
<br />
</header>
<aside
class="grid col-one-quarter mq2-col-full sticky_sidebar"
style="position: static"
>
<menu>
<ul>
<li><a class="sec" href="#nav-using-lex">Using LEX</a></li>
<li><a class="sec" href="#nav-using-yacc">Using YACC</a></li>
<li>
<a class="sec" href="#nav-using-lex-yacc"
>Using YACC with LEX</a
>
</li>
<li>
<a class="sec" href="#nav-expl-specification"
>ExpL Specification</a
>
</li>
<li>
<a class="sec" href="#nav-expl-grammar-outline"
>ExpL Grammar Outline</a
>
</li>
<li>
<a class="sec" href="#nav-oexpl-specification"
>OExpL Specification</a
>
</li>
<li>
<a class="sec" href="#nav-oexpl-grammar-outline"
>OExpL Grammar Outline</a
>
</li>
<li>
<a class="sec" href="#nav-compiletime-datastructures"
>Compile Time Data Structures for ExpL</a
>
</li>
<li>
<a class="sec" href="#nav-compiletime-datastructures-OExpl"
>Compile Time Data Structures for OExpL</a
>
</li>
<li>
<a class="sec" href="#nav-runtime-datastructures"
>Run Time Data Structures for ExpL</a
>
</li>
<li>
<a class="sec" href="#nav-runtime-datastructures-OExpl"
>Run Time Data Structures for OExpL</a
>
</li>
<li><a class="sec" href="#nav-codegen">Code Generation</a></li>
<li>
<a class="sec" href="#nav-label-translation"
>Label Translation</a
>
</li>
<li>
<a class="sec" href="#nav-abi">Application Binary Interface</a>
</li>
<li>
<a class="sec" href="#nav-library-implementation"
>Library Implementation</a
>
</li>
<li>
<a class="sec" href="#nav-install"
>XSM simulator Installation</a
>
</li>
<li>
<a class="sec" href="#nav-xsm-machine-simulator-instructions"
>XSM Simulator Instructions</a
>
</li>
<li>
<a class="sec" href="#nav-xsm-env-tut"
>XSM Environment Tutorial</a
>
</li>
<li>
<a class="sec" href="#nav-test-progs">ExpL Test Programs</a>
</li>
<li>
<a class="sec" href="#nav-oexpl-test-progs"
>OExpL Test Programs</a
>
</li>
</ul>
</menu>
</aside>
<section class="grid col-three-quarters mq2-col-full">
<article class="grid col-full" id="nav-using-lex">
<h2>Using LEX</h2>
<p>
LEX is a tool used to generate a lexical analyzer.This document is
a tutorial for the use of LEX for SIL Compiler
development.Technically, LEX translates a set of regular
expression specifications (given as input in input_file.l) into a
C implementation of a corresponding finite state machine
(lex.yy.c). This C program, when compiled, yields an executable
lexical analyzer.....
<a href="lex.html" target="_blank"> read more</a>
</p>
</article>
<article class="grid col-full" id="nav-using-yacc">
<h2>Using YACC</h2>
<p>
YACC (Yet Another Compiler Compiler) is a tool used to generate a
parser.This document is a tutorial for the use of YACC to generate
a parser for SIL.YACC translates a given Context Free Grammar
(CFG) specifications (input in input_file.y) into a C
implementation (y.tab.c) of a corresponding push down automaton
(i.e., a finite state machine with a stack).This C program when
compiled, yields an executable parser....<a
href="yacc.html"
target="_blank"
>
read more</a
>
</p>
</article>
<article class="grid col-full" id="nav-using-lex-yacc">
<h2>Using YACC with LEX</h2>
<p>
In the previous documents, we have noted that YACC is used to
generate a parser (<a href="yacc.html">YACC documentation</a>) and
LEX is used to generate a lexical analayzer (<a href="lex.html"
>LEX documentation</a
>). YACC generates the definition for yyparse() in y.tab.c and LEX
generates the definition for yylex() in lex.yy.c. We have also
noted that yyparse() repetitively calls yylex() to read tokens
from the input stream....<a href="ywl.html" target="_blank"
>read more</a
>
</p>
</article>
<article class="grid col-full" id="nav-expl-specification">
<h2>ExpL Specification</h2>
<p>
This section of the document walks through the specification of
compiler for Experimental Language(ExpL). The syntax and semantics
are explained with general program structure and sample
programs.The Data Types....
<a href="expl.html" target="_blank">read more</a>
</p>
</article>
<article class="grid col-full" id="nav-expl-grammar-outline">
<h2>ExpL Grammar Outline</h2>
<p>
An outline for the ExpL grammer is given. Calls to functions that
update the symbol table, type table and the abstract syntax tree
data structures are indicated as semantic actions at certain
places....
<a href="grammar-outline.html" target="_blank">read more</a>
</p>
</article>
<article class="grid col-full" id="nav-oexpl-specification">
<h2>OExpL Specification</h2>
<p>
This section of the document walks through the specification of
compiler for Object Experimental Language(OExpL). The syntax and
semantics are explained with general program structure and sample
programs.
<a href="oexpl-specification.html" target="_blank">read more</a>
</p>
</article>
<article class="grid col-full" id="nav-oexpl-grammar-outline">
<h2>OExpL Grammar Outline</h2>
<p>
An outline for the OExpL grammer is given. Calls to functions that
update the symbol table, type table and the abstract syntax tree
data structures are indicated as semantic actions at certain
places....
<a href="oexpl-grammar-outline.html" target="_blank">read more</a>
</p>
</article>
<article class="grid col-full" id="nav-compiletime-datastructures">
<h2>Compile Time Data Structures for ExpL</h2>
<p>
The compilation of an ExpL program involves two phases. In the
first phase (called the analysis phase), the source ExpL program
is analyzed (lexical, syntax and semantic analysis are completed
in this phase) and if the program is free of syntax and semantic
errors, an intermediate representation of ...
<a href="data-structures.html" target="_blank">read more</a>
</p>
</article>
<article
class="grid col-full"
id="nav-compiletime-datastructures-OExpl"
>
<h2>Compile Time Data Structures for OExpL</h2>
<p>
The compilation of an OExpL program involves two phases. In the
first phase (called the analysis phase), the source OExpL program
is analyzed (lexical, syntax and semantic analysis are completed
in this phase) and if the program is free of syntax and semantic
errors, an intermediate representation of ...
<a href="oexpl-data-structures.html" target="_blank">read more</a>
</p>
</article>
<article class="grid col-full" id="nav-runtime-datastructures">
<h2>Run Time Data Structures for ExpL</h2>
<p>
Before explaining the data structures used for the execution
phase, it is necessary to understand the requirements and the
underlying theoretical concepts in some detail.
<a href="run-data-structures.html" target="_blank">read more</a>
</p>
</article>
<article class="grid col-full" id="nav-runtime-datastructures-OExpl">
<h2>Run Time Data Structures for OExpL</h2>
<p>
Before explaining the data structures used for the execution
phase, it is necessary to understand the requirements and the
underlying theoretical concepts in some detail.
<a href="oexpl-run-data-structures.html" target="_blank"
>read more</a
>
</p>
</article>
<article class="grid col-full" id="nav-codegen">
<h2>Code Generation</h2>
<p>
ExpL compiler converts the intermediate representation(the
abstract syntax tree) of the ExpL program to a machine code that
can be readily executed by the XSM machine. The codeGen() function
takes as input a pointer to the root of an abstract syntax tree
and a pointer to a file to which the target code has to be
written. The codeGen() function generates assembly code
corresponding to the program represented by the AST. The codeGen()
function essentially invokes itself <b>recursively</b> to generate
... <a href="codegen.html" target="_blank">read more</a>
</p>
</article>
<article class="grid col-full" id="nav-label-translation">
<h2>Label Translation (Linking)</h2>
<p>
Labels are generated while translating the high level program
constructs such as if-then-else, while-do and function calls into
target machine code as an intermediate step in code generation.
Labels are needed because the target address of a JUMP instruction
may not be known at the time of generating code. However these
labels must be replaced .....<a
href="label-translation.html"
target="_blank"
>read more</a
>
</p>
</article>
<article class="grid col-full" id="nav-abi">
<h2>Application Binary Interface</h2>
<p>
The ExpL compiler needs to translate a given source program and
generate the target machine code into an executable file in a
format which is recognized by the load module of the target
operating system. Thus, in order to generate the executable, the
following information needs to be made available to the compiler
...<a href="abi.html" target="_blank">read more</a>
</p>
</article>
<article class="grid col-full" id="nav-library-implementation">
<h2>Library Implementation</h2>
<p>
The ABI stipulates that the code for a
<b>common shared library</b> must be linked to the address space
of every program. The library code must be linked to logical page
0 and logical page 1 of each program. When an ExpL source program
is compiled by an ExpL compiler, the compiler generates code
containing calls to the library assuming the library functions
will be "there" in the address space when the program is
eventually loaded for execution. It is the responsibility of the
OS loader to ...<a
href="library-implementation.html"
target="_blank"
>read more</a
>
</p>
</article>
<article class="grid col-full" id="nav-install">
<h2>XSM Simulator Installation</h2>
<p>
The installation instructions for the simulator can be found
<a href="install.html">here</a>.
</p>
</article>
<article
class="grid col-full"
id="nav-xsm-machine-simulator-instructions"
>
<h2>XSM Simulator Usage Instructions</h2>
<p>
The XSM (eXperimental String Machine) Simulator is used to
simulate the hardware and OS abstractions specified in the ExpOS
Application Binary Interface. Within your XSM directory, use the
following command to run the simulator ...
<a href="xsmusagespec.html" target="_blank">read more</a>.
</p>
</article>
<article class="grid col-full" id="nav-xsm-env-tut">
<h2>XSM Execution Environment Tutorial</h2>
<p>
This tutorial helps you to gain a basic understanding of the
execution environment provided by the XSM simulator. The compiler
you design for the ExpL language is supposed to generate target
XSM machine code that runs on the XSM Simulator provided to you.
However, the bare machine cannot directly run the target code. The
operating system (OS) that runs on top of the machine is the
actual software that sets up an execution enviornment necessary
for ... <a href="xsm-environment-tut.html">read more</a>.
</p>
</article>
<article class="grid col-full" id="nav-test-progs">
<h2>ExpL Test Programs</h2>
<p>
The programs can be found
<a href="testprograms.html" target="_blank">here</a>.
</p>
</article>
<article class="grid col-full" id="nav-oexpl-test-progs">
<h2>OExpL Test Programs</h2>
<p>
The programs can be found
<a href="oexpl-testprograms.html" target="_blank">here</a>.
</p>
</article>
</section>
</div>
<div class="divide-top">
<footer class="">
<ul class="grid col-one-third social">
<li><a href="https://github.com/silcnitc">Github</a></li>
</ul>
<div class="up grid col-one-third">
<a href="#navtop" title="Go back up">↑</a>
</div>
<nav class="grid col-one-third">
<ul>
<li>
<a
rel="license"
href="http://creativecommons.org/licenses/by-nc/4.0/"
>
<img
alt="Creative Commons License"
style="border-width: 0"
src="img/creativecommons.png"
/></a>
</li>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<!-- <li><a href="uc.html">Contact</a></li> -->
</ul>
</nav>
</footer>
</div>
</div>
</body>
<script src="js/inject.js"></script>
</html>