cws/cw04.tex
changeset 910 b655ce68983f
parent 905 15973df32613
child 920 7af2eea19646
equal deleted inserted replaced
909:a04efdd5e7a3 910:b655ce68983f
   230 \noindent 
   230 \noindent 
   231 Note that in this program the variable \pcode{i} is used
   231 Note that in this program the variable \pcode{i} is used
   232 twice. You need to make a decision how it should be compiled?
   232 twice. You need to make a decision how it should be compiled?
   233 Explain your decision and indicate what this program would
   233 Explain your decision and indicate what this program would
   234 print out.
   234 print out.
       
   235 
       
   236 \subsection*{Question 4 (Advanced)}
       
   237 
       
   238 Extend the lexer and parser in order to add a \texttt{break} keyword.
       
   239 Modify the compiler such that when a \texttt{break} is encountered the
       
   240 code should jump out of the ``enclosing'' while loop, or in case it
       
   241 is not inside a while loop to the end of the
       
   242 program.
       
   243 
       
   244 \bigskip\noindent
       
   245 \textcolor{red}{ADD EXAMPLE PROGRAMS}
   235 
   246 
   236 \subsection*{Further Information}
   247 \subsection*{Further Information}
   237 
   248 
   238 The Java infrastructure unfortunately does not contain an
   249 The Java infrastructure unfortunately does not contain an
   239 assembler out-of-the-box (therefore you need to download the
   250 assembler out-of-the-box (therefore you need to download the