--- /dev/null
+LATEX:=pdflatex
+LATEXFLAGS:=
+DOCUMENT:=report
+
+.PHONY: all clean
+
+all: $(DOCUMENT).pdf
+
+%.pdf: %.tex ext.tex gen.tex pars.tex sem.tex
+ $(LATEX) $(LATEXFLAGS) $<
+ $(LATEX) $(LATEXFLAGS) $<
+
+clean:
+ $(RM) -v $(addprefix $(DOCUMENT).,aux log nav out snm toc vrb pdf)
--- /dev/null
+\usepackage{listings}
+
+\lstdefinelanguage{Clean}{%
+ alsoletter={ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_`1234567890},
+ alsoletter={~!@\#$\%^\&*-+=?<>:|\\.},
+ morekeywords={generic,implementation,definition,dynamic,module,import,from,where,in,of,case,let,infix,infixr,infixl,class,instance,with,if,derive},
+ sensitive=true,
+ morecomment=[l]{//},
+ morecomment=[n]{/*}{*/},
+ morestring=[b]",
+ morestring=[b]',
+ emptylines=1,
+ basicstyle=\small,
+ identifierstyle=\small\ttfamily,
+ commentstyle=\itshape,
+ keywordstyle=\bfseries,
+ stringstyle=\ttfamily,
+ numbers=none,
+ showstringspaces=false,
+ basewidth=0.45em,
+ columns=[c]fixed,
+ keepspaces=true,
+ breaklines=false,
+ tabsize=4,
+ texcl=true,
+ escapeinside={(\#}{\#)},
+ literate=%
+ % Basic Clean constructs
+ {\\}{{$\lambda\:$}}1
+ {A.}{{$\forall\;\,$}}1
+ {E.}{{$\exists\;\,$}}1
+ {>}{{$>$}}1
+ {<}{{$<$}}1
+ {<=}{{$\leq$}}1
+ {>=}{{$\geq$}}1
+ {<>}{{$\neq$}}1
+ {->}{{$\rightarrow$}}2
+ {<-}{{$\leftarrow$}}1
+ {=}{{$=$}}1
+ {~}{{$\sim$}}1
+ {\#}{{$\sharp$}}1
+ {\{|}{{$\{\!|\!$}}1
+ {|\}}{{$\!|\!\}$}}1
+ {:=}{{$:=$}}2
+ {==}{{$==$}}2
+ {++}{{$+\!\!+$}}2
+ {+++}{{$+\!\!\!\!+\!\!\!\!+$}}2
+ {:==}{{$:==$}}3
+ {\{|*|\}}{{$\{\!|\!\!\star\!\!|\!\}$}}3
+ %
+ % Basic iTask constructs
+ {>||>}{{$\triangleright\triangleright$}}2
+ {>>=}{{\texttt{>>=}}}3
+ {>>|}{{\texttt{>>|}}}3
+ {?>>}{{\texttt{?>>}}}3
+ {!>>}{{\texttt{!>>}}}3
+ {-||-}{{\texttt{-||-}}}4
+ {.||.}{{\texttt{.||.}}}4
+ {.&&.}{{\texttt{.\&\&.}}}4
+}
+
+\newcommand{\CleanInline}[1]{\lstinline[language=Clean]¦#1¦}
+\newcommand{\CI}[1]{\CleanInline{#1}}
+
+\lstdefinestyle{numbers}{numbers=left, stepnumber=1, numberstyle=\tiny, numbersep=5pt}
+
+\lstnewenvironment{CleanCode}{\lstset{language=Clean,identifierstyle=\ttfamily}}{}
+\lstnewenvironment{CleanCodeN}{\lstset{language=Clean,style=numbers}}{}
+\lstnewenvironment{CleanCodeB}{\lstset{language=Clean,frame=single}}{}
+\lstnewenvironment{CleanCodeNB}{\lstset{language=Clean,style=numbers,frame=single}}{}
--- /dev/null
+\section{Extensions}
+\subsection{Higher order functions}
+
+\subsection{Syntactic sugars}
+Several small syntactic sugars have been added on several levels of processing
+to make writing programs more easy.
+
+\subsubsection{Literal strings}
+While there are no literal strings one can print lists of characters. Entering
+lists of characters can be cumbersome and therefore a shorthand notation is
+added to define literal strings using double quotes. During the lexing phase
+the string is lexed as a single token and during parsing the token is
+transformed to a equal character list representation. The following example
+shows the syntax before transformation and the syntax after. Note that just as
+in characters, literal strings can contain escape characters.
+
+\begin{SPLCode}
+//Before transformation
+var a = "Hello world!";
+//After transformation
+var a = 'H':'e':'l':'l':'o':' ':'w':'o':'r':'l':'d':'!':[]
+\end{SPLCode}
+
+\subsubsection{Anonymous functions}
+%TODO
+
+\subsubsection{Variable arguments printing}
+To ease the programmer we have included a parse-level transformation that
+transforms \SI{print} with multiple arguments to multiple \SI{print} function
+calls with a single argument. The following example shows the syntax before the
+transformation and the syntax after the transformation.
+
+\begin{SPLCode}
+//Before transformation
+print("abc", 42, 'c', "da\n");
+
+//After transformation
+print('a':'b':'c':[]);
+print(42);
+print('c');
+print('d':'a':'\n':[]);
+\end{SPLCode}
--- /dev/null
+\section{Code generation}
--- /dev/null
+\section{Lexing \& parsing}
--- /dev/null
+\documentclass[titlepage]{article}
+
+\usepackage{listings}
+\usepackage{clean}
+\usepackage{spl}
+\usepackage[a4paper]{geometry}
+
+\title{SPLC}
+\author{Pim Jager\and Mart Lubbers}
+\date{\today}
+
+\lstset{%
+ basicstyle=\ttfamily\footnotesize,
+ breaklines
+}
+
+\begin{document}
+\maketitle
+\input{pars.tex}
+
+\input{sem.tex}
+
+\input{gen.tex}
+
+\input{ext.tex}
+
+\end{document}
--- /dev/null
+\section{Semantic analysis}
--- /dev/null
+\usepackage{listings}
+
+\lstdefinelanguage{SPLCode}{%
+ alsoletter={ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_1234567890},
+ morekeywords={print,isEmpty,if,else,while},
+ sensitive=true,
+ morecomment=[l]{//},
+ morecomment=[n]{/*}{*/},
+ morestring=[b]",
+ morestring=[b]',
+ basicstyle=\small,
+ identifierstyle=\small\ttfamily,
+ commentstyle=\itshape,
+ keywordstyle=\bfseries,
+ stringstyle=\ttfamily,
+ showstringspaces=false,
+ basewidth=0.45em,
+ columns=[c]fixed,
+ keepspaces=true,
+ breaklines=true,
+ tabsize=4,
+ texcl=true,
+}
+
+\newcommand{\SPLInline}[1]{\lstinline[language=SPLCode]¦#1¦}
+\newcommand{\SI}[1]{\SPLInline{#1}}
+
+\lstdefinestyle{numbers}{numbers=left, stepnumber=1, numberstyle=\tiny, numbersep=5pt}
+
+\lstnewenvironment{SPLCode}{\lstset{language=SPLCode}}{}