Browse Source

concrete and abstract syntax

Peter Thiemann 3 years ago
parent
commit
0b255f2c42
1 changed files with 2 additions and 2 deletions
  1. 2 2
      book.tex

+ 2 - 2
book.tex

@@ -1196,7 +1196,7 @@ def exp(e):
 
 def stmt(s):
   match s:
-    case Call(Name('print'), [e]):
+    case Expr(Call(Name('print'), [e])):
       return exp(e)
     case Expr(e):
       return exp(e)
@@ -1709,7 +1709,7 @@ exhibit several compilation techniques.
 {\if\edition\pythonEd
 \[
 \begin{array}{rcl}
-  \Exp &::=& \Int \MID \key{input\_int}\LP\RP \MID \key{-}\;\Exp \MID \Exp \; \key{+} \; \Exp \MID \Var{} \\
+  \Exp &::=& \Int \MID \key{input\_int}\LP\RP \MID \key{-}\;\Exp \MID \Exp \; \key{+} \; \Exp \MID \LP\Exp\RP \MID \Var{} \\
   \Stmt &::=& \key{print}\LP \Exp \RP \MID \Exp \MID \Var\mathop{\key{=}}\Exp\\
   \LangVarM{} &::=& \Stmt^{*}
 \end{array}