equal
deleted
inserted
replaced
19 \begin{tabular}{lcl} |
19 \begin{tabular}{lcl} |
20 $Stmt$ & $\rightarrow$ & $\text{skip}$\\ |
20 $Stmt$ & $\rightarrow$ & $\text{skip}$\\ |
21 & $|$ & $Id := AExp$\\ |
21 & $|$ & $Id := AExp$\\ |
22 & $|$ & $\text{if}\; B\!Exp \;\text{then}\; Block \;\text{else}\; Block$\\ |
22 & $|$ & $\text{if}\; B\!Exp \;\text{then}\; Block \;\text{else}\; Block$\\ |
23 & $|$ & $\text{while}\; B\!Exp \;\text{do}\; Block$\medskip\\ |
23 & $|$ & $\text{while}\; B\!Exp \;\text{do}\; Block$\medskip\\ |
24 $Stmt$ & $\rightarrow$ & $Stmt \;\text{;}\; Stmts$\\ |
24 $Stmts$ & $\rightarrow$ & $Stmt \;\text{;}\; Stmts$\\ |
25 & $|$ & $Stmt$\medskip\\ |
25 & $|$ & $Stmt$\medskip\\ |
26 $Block$ & $\rightarrow$ & $\{ Stmts \}$\\ |
26 $Block$ & $\rightarrow$ & $\{ Stmts \}$\\ |
27 & $|$ & $Stmt$\medskip\\ |
27 & $|$ & $Stmt$\medskip\\ |
28 $AExp$ & $\rightarrow$ & $AExp + AExp$\\ |
28 $AExp$ & $\rightarrow$ & $AExp + AExp$\\ |
29 & $|$ & $AExp * AExp$\\ |
29 & $|$ & $AExp * AExp$\\ |
38 \end{tabular} |
38 \end{tabular} |
39 \end{center} |
39 \end{center} |
40 |
40 |
41 Transform this grammar into Chomsky normalform. |
41 Transform this grammar into Chomsky normalform. |
42 |
42 |
|
43 \item Write a program in the WHILE-language that calculates the factorial function. |
|
44 |
43 \end{enumerate} |
45 \end{enumerate} |
44 |
46 |
45 \end{document} |
47 \end{document} |
46 |
48 |
47 %%% Local Variables: |
49 %%% Local Variables: |