Browse Source

tweaks to block & blocks

Jeremy Siek 3 năm trước cách đây
mục cha
commit
c9c54a386d
1 tập tin đã thay đổi với 7 bổ sung6 xóa
  1. 7 6
      book.tex

+ 7 - 6
book.tex

@@ -12057,7 +12057,7 @@ available for use by the register allocator.
 \begin{array}{lcl}
   \Arg &::=& \gray{ \key{\$}\Int \MID \key{\%}\Reg \MID \Int\key{(}\key{\%}\Reg\key{)} \MID \key{\%}\itm{bytereg} } \MID \Var \key{(\%rip)} \\
 \LangXGlobalM{} &::= & \gray{ \key{.globl main} }\\
-      &    & \gray{ \key{main:} \; \Instr\ldots }
+      &    & \gray{ \key{main:} \; \Instr^{*} }
 \end{array}
 \]
 \end{minipage}
@@ -13963,8 +13963,8 @@ appropriate explicate functions for the various contexts.
 \Exp &::= & \FUNREF{\itm{label}} \MID \CALL{\Atm}{\Atm^{*}} \\
 \Stmt &::= & \TAILCALL{\Atm}{\Atm^{*}} \\
 \Params &::=& \LS\LP\Var\key{,}\Type\RP\code{,}\ldots\RS \\
-\Block &::=& \Stmt^{*} \\
-\Blocks &::=& \LC\itm{label}\key{:}\Block\code{,}\ldots\RC \\
+\Block &::=& \itm{label}\key{:} \Stmt^{*} \\
+\Blocks &::=& \LC\Block\code{,}\ldots\RC \\
 \Def &::=& \DEF{\itm{label}}{\Params}{\Blocks}{\key{None}}{\Type}{\key{None}} 
 \end{array}
 }
@@ -14026,8 +14026,7 @@ language, whose syntax is defined in Figure~\ref{fig:x86-3}.
      \MID \key{callq}\;\key{*}\Arg \MID \key{tailjmp}\;\Arg 
      \MID \key{leaq}\;\Arg\key{,}\;\key{\%}\Reg \\
 \Block &::= & \itm{label}\key{:}\, \Instr^{*} \\
-\Blocks &::=& \Block^* \\
-\Def &::= & \key{.globl}\,\itm{label}\; \Blocks \\ % \LP\key{define} \; \LP\itm{label} \RP \; \Blocks \RP\\
+\Def &::= & \key{.globl}\,\itm{label}\; \Block^{*} \\
 \LangXIndCallM{} &::= & \Def\ldots
 \end{array}
 \]
@@ -14065,7 +14064,9 @@ language, whose syntax is defined in Figure~\ref{fig:x86-3}.
   \Instr &::=& \ldots \MID \INDCALLQ{\Arg}{\itm{int}}
     \MID \TAILJMP{\Arg}{\itm{int}}\\
     &\MID& \BININSTR{\scode{leaq}}{\Arg}{\REG{\Reg}}\\
-  \Def &::= & \DEF{\itm{label}}{\LS\RS}{\LC\itm{label}\key{:}\,\Instr^{*}\code{,}\ldots\RC}{\_}{\Type}{\_} \\
+  \Block &::=&\itm{label}\key{:}\,\Instr^{*} \\
+  \Blocks &::= & \LC\Block\code{,}\ldots\RC\\
+  \Def &::= & \DEF{\itm{label}}{\LS\RS}{\Blocks}{\_}{\Type}{\_} \\
 \LangXIndCallM{} &::= & \XPROGRAMDEFS{\LS\Def\code{,}\ldots\RS}
 \end{array}
 \]