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