equal
deleted
inserted
replaced
554 |
554 |
555 Functional programming languages are very convenient for |
555 Functional programming languages are very convenient for |
556 implementations of interpreters. A good choice for a |
556 implementations of interpreters. A good choice for a |
557 functional programming language is Scala, a programming |
557 functional programming language is Scala, a programming |
558 language that combines functional and object-oriented |
558 language that combines functional and object-oriented |
559 programming-styles. It has received in the last five years or |
559 pro\-gramming-styles. It has received in the last five years or |
560 so quite a bit of attention. One reason for this attention is |
560 so quite a bit of attention. One reason for this attention is |
561 that, like the Java programming language, Scala compiles to |
561 that, like the Java programming language, Scala compiles to |
562 the Java Virtual Machine (JVM) and therefore Scala programs |
562 the Java Virtual Machine (JVM) and therefore Scala programs |
563 can run under MacOSX, Linux and Windows.\footnote{There are |
563 can run under MacOSX, Linux and Windows.\footnote{There are |
564 also experimental backends for Android and JavaScript.} Unlike |
564 also experimental backends for Android and JavaScript.} Unlike |
572 |
572 |
573 \begin{quote} |
573 \begin{quote} |
574 \url{http://www.scala-lang.org} |
574 \url{http://www.scala-lang.org} |
575 \end{quote} |
575 \end{quote} |
576 |
576 |
|
577 Let us have a look at the Scala code shown in Figure~\ref{code}. |
|
578 It shows the entire code |
577 |
579 |
578 \begin{figure}[t] |
580 \begin{figure}[t] |
579 \small |
581 \small |
580 \lstinputlisting[language=Scala]{../progs/inter.scala} |
582 \lstinputlisting[language=Scala]{../progs/inter.scala} |
581 \caption{Bla} |
583 \caption{The entire code of the interpreter for our |
|
584 idealised programming language.\label{code}} |
582 \end{figure} |
585 \end{figure} |
583 |
586 |
584 |
587 |
585 \subsubsection*{Static Analysis} |
588 \subsubsection*{Static Analysis} |
586 |
589 |