equal
deleted
inserted
replaced
38 \item single statements (that is \pcode{skip}, assignments, \pcode{if}s, |
38 \item single statements (that is \pcode{skip}, assignments, \pcode{if}s, |
39 \pcode{while}-loops, \pcode{read} and \pcode{write}) |
39 \pcode{while}-loops, \pcode{read} and \pcode{write}) |
40 \item compound statements separated by semicolons |
40 \item compound statements separated by semicolons |
41 \item blocks which are enclosed in curly parentheses |
41 \item blocks which are enclosed in curly parentheses |
42 \end{itemize} |
42 \end{itemize} |
|
43 |
|
44 \noindent |
|
45 Make sure the grammar is not left-recursive. |
43 |
46 |
44 \subsection*{Question 2} |
47 \subsection*{Question 2} |
45 |
48 |
46 You should implement a parser for the WHILE language using |
49 You should implement a parser for the WHILE language using |
47 parser combinators. Be careful that the parser takes as input |
50 parser combinators. Be careful that the parser takes as input |