# HG changeset patch # User Christian Urban # Date 1685717937 -3600 # Node ID 926d73d76989a54d9555c946dadb29b3165ebf5f # Parent a29d74fb8697d548ad097b9291c255ada6ba48df added break diff -r a29d74fb8697 -r 926d73d76989 cws/cw04.pdf Binary file cws/cw04.pdf has changed diff -r a29d74fb8697 -r 926d73d76989 cws/cw04.tex --- a/cws/cw04.tex Tue May 30 16:58:06 2023 +0100 +++ b/cws/cw04.tex Fri Jun 02 15:58:57 2023 +0100 @@ -233,6 +233,17 @@ Explain your decision and indicate what this program would print out. +\subsection*{Question 4 (Advanced)} + +Extend the lexer and parser in order to add a \texttt{break} keyword. +Modify the compiler such that when a \texttt{break} is encountered the +code should jump out of the ``enclosing'' while loop, or in case it +is not inside a while loop to the end of the +program. + +\bigskip\noindent +\textcolor{red}{ADD EXAMPLE PROGRAMS} + \subsection*{Further Information} The Java infrastructure unfortunately does not contain an