\documentclass{article}

\usepackage{listings,clean,spl}  %Sourcecode
\usepackage[hidelinks]{hyperref} %Clickable references
\usepackage[a4paper]{geometry}   %Paper size
\usepackage{proof}               %Prooftrees
\usepackage{lscape}              %Landscap pages

\title{Compiler Construction: SPL Compiler}
\author{Pim Jager\and Mart Lubbers}
\date{\today}

\lstset{%
	basicstyle=\footnotesize\ttfamily,
	breaklines,
	captionpos=b,
	frame=L
}

\newcommand{\SPLC}{\texttt{SPLC}}
\newcommand{\SPL}{\texttt{SPL}}
\newcommand{\SSM}{\texttt{SSM}}
\newcommand{\Yard}{\textsc{Yard}}
\newcommand{\AST}{\emph{AST}}
\newcommand{\ADT}{\emph{ADT}}
\newcommand{\Clean}{\emph{Clean}}
\newcommand{\unif}{{\scriptscriptstyle\cup}}

\let\tt\texttt

\begin{document}
\maketitle
\tableofcontents
\newpage

\input{intro.tex}

\input{pars.tex}

\input{sem.tex}

\input{gen.tex}

\input{eval.tex}

\newpage
\section{Appendices}
\subsection{Grammar}
\lstinputlisting[label={lst:grammar}]{../../grammar/grammar.txt}

\newpage
\subsection{Abstract Syntax Tree}
\lstinputlisting[
	label={lst:ast},
	language=Clean,
	firstline=6,
	lastline=42]{../../AST.dcl}

\newpage
\begin{landscape}
\subsection{Inference rules}\label{sec:infRules}
\input{infRules.tex}
\end{landscape}

\end{document}
