author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
Fri, 02 Oct 2015 08:48:46 +0100 | |
changeset 342 | c235e0aeb8df |
parent 292 | 7ed2a25dd115 |
child 359 | db106e5b7c4d |
permissions | -rw-r--r-- |
59 | 1 |
\documentclass{article} |
292
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
2 |
\usepackage{../style} |
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
3 |
\usepackage{../graphics} |
59 | 4 |
|
5 |
\begin{document} |
|
6 |
||
75
898c25a4e399
tuned
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
60
diff
changeset
|
7 |
\section*{Homework 8} |
59 | 8 |
|
9 |
\begin{enumerate} |
|
292
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
10 |
\item Write a program in the WHILE-language that calculates |
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
11 |
the factorial function. |
77
49c0beef79a1
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
76
diff
changeset
|
12 |
|
292
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
13 |
\item What optimisations could a compiler perform when |
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
14 |
compiling a WHILE-program? |
206
85b961f1eee9
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
102
diff
changeset
|
15 |
|
292
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
16 |
\item What is the main difference between the Java assembler |
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
17 |
(as processed by Jasmin) and Java Byte Code? |
206
85b961f1eee9
added
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
102
diff
changeset
|
18 |
|
292
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
19 |
\item Parser combinators can directly be given a string as |
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
20 |
input, without the need of a lexer. What are the |
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
21 |
advantages to first lex a string and then feed a |
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
22 |
sequence of tokens as input to the parser? |
7ed2a25dd115
updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
206
diff
changeset
|
23 |
|
59 | 24 |
\end{enumerate} |
25 |
||
26 |
\end{document} |
|
27 |
||
28 |
%%% Local Variables: |
|
29 |
%%% mode: latex |
|
30 |
%%% TeX-master: t |
|
31 |
%%% End: |