\section{Code generation}\label{sec:gen}
-%our full names and student numbers.
-%{
-%The chapters from the previous exercise.
-%{
-%A chapter describing the chosen semantics of
-%SPL
-%, like call-by-reference or
-%call-by-value.
-%5
-%{
-%The compilation schemes used in your compiler. A concise informal or semi-
-%formal description suces. A complete formal description of the compilation
-%scheme is welcome, but not required. Typical things to explain here are call-
-%ing conventions, stack management, stack layout, heap layout, and heap
-%management.
-%{
-%A short description of the purpose of the example programs and the
-%test
-%results.
-%{
-%A concise but precise description of how the work was divided amongst the
-%members of the tea
+\subsection{ABR}
+%Heap en stack layout
+
+\subsection{Generation}
+%gewoon hoe het werkt
+
+\subsection{Higher order functions}
The existing \SPL{} grammar was not suitable for parsing and lexing. The
grammar listed in Listing~\ref{lst:grammar} shows the current and final
grammar. We have added several clauses that are explained in
-Section~\ref{sec:ext} such as string literals and higher order functions. The
-transformation of the grammar include eliminating left recursion, fixing
-operator priority and associativity.
+Section~\ref{sec:ext} such as string literals and higher order functions.
+Moreover we have applied transformation on the grammar including eliminating
+left recursion, fixing operator priority and associativity.
To make the parsing more easy we first lex the character input into tokens. In
this way the parser can be simplified a lot and some more complex constructs
full abstract syntax tree is listed in Listing~\ref{lst:ast} which closely
resembles the grammar.
-The parser uses the standard \Yard{} combinators. For clarity and easy the
-parser closely resembles the grammar. Due to the modularity of combinators it
-was and is very easy to add functionality to the parser. The parser also
-handles some syntactic sugar(Section~\ref{ssec:synsugar}). For example the
-parser expands the literal lists and literal strings to the according list or
-string representation. Moreover the parser transforms the let expressions to
-real functions representing constant values.
+The parser uses the standard \Yard{} combinators. Due to the modularity of
+combinators it was and is very easy to add functionality to the parser. The
+parser also handles some syntactic sugar(Section~\ref{ssec:synsugar}). For
+example the parser expands the literal lists and literal strings to the
+according list or string representation. Moreover the parser transforms the let
+expressions to real functions representing constant values.
As an example we show the parsing of a \CI{FunDecl} in
Listing~\ref{lst:fundecl}. The \CI{FunDecl} is one of the most complex parsers
--- /dev/null
+mart parse: Uitleggen over tokens lexen dat dat eigenlijk ook whitespace is.
+mart parse: tikfouten
+pim parse: Uitleggen over YARD
+pim sem: sem opschonen appendix, die pagina landscape(package: lscape, \begin{lscape})
+mart ext: plaats extensions in desbetreffende section en maak intro paragraaf
+pim gen: abi en generation
+mart gen: higher order functions
+pim eval: doen