As said, the lexer uses a \Yard{} parser. The parser takes a list of characters
and returns a list of \CI{Token}s. A token is a \CI{TokenValue} accompanied
with a position and the \emph{ADT} used is show in Listing~\ref{lst:lextoken}.
-Parser combinators make it very easy to account for arbitrary whitespace and it
+Parser combinators make it very easy to account for arbitrary white space and it
is much less elegant to do this in a regular way. By choosing to lex with
parser combinators the speed of the phase decreases. However, since the parsers
are very easy this increase is very small.
require a non trivial parser.
\subsection{Parsing}
-%On March 10 you have to give a very brief presentation. In this presentation you tell the other
-%students and us how your parser is constructed and demonstrate your parser and pretty printer.
-%You should mention things like implementation language used, changes to the grammar, and other
-%interesting points of your program.
-%For this demonstration you have to prepare at least 10 test programs in
-%SPL
-%. In your presentation
-%you have to show only the most interesting or challenging example. You can use the program
-%4
-%above as a starting point. Hand in the test programs, and a document containing the transformed
-%grammar as used by your parser. Indicate what parts of the semantic analysis are handled by your
-%scanner
+The parsing phase is the second phase of the parser and is yet again a \Yard{}
+parser that transforms a list of tokens to an Abstract Syntax Tree(\AST). The
+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.