Error in solution to exercise

33 views
Skip to first unread message

Johannes Jansson

unread,
Mar 12, 2014, 7:30:42 AM3/12/14
to proglang-c...@googlegroups.com
Hi, there seems to be an error in the solution to question 3 of the exercises (http://www1.digitalgrammars.com/ipl-book/course-exercises/sol.html).
As the second param to an EAss constructor is of type Exp and not Stm the following
SWhile (EGt (EIdent (Ident "x")) (EIdent (Ident "y")))
    (SExp (EAss (Ident "y") (SExp (EAss (Ident "x") (EInt 3)))))
should be
SWhile (EGt (EIdent (Ident "x")) (EIdent (Ident "y")))
    (SExp (EAss (Ident "y") (EAss (Ident "x") (EInt 3))))

/Johannes
Reply all
Reply to author
Forward
0 new messages