diff --git a/document/core/binary/conventions.rst b/document/core/binary/conventions.rst index 7b606e1e48..6c1d610e4f 100644 --- a/document/core/binary/conventions.rst +++ b/document/core/binary/conventions.rst @@ -58,6 +58,8 @@ In order to distinguish symbols of the binary syntax from symbols of the abstrac * Productions are written :math:`\B{sym} ::= B_1 \Rightarrow A_1 ~|~ \dots ~|~ B_n \Rightarrow A_n`, where each :math:`A_i` is the attribute that is synthesized for :math:`\B{sym}` in the given case, usually from attribute variables bound in :math:`B_i`. +* Large productions may be split into multiple definitions, indicated by ending the first one with explicit ellipses, :math:`\B{sym} ::= B_1 \Rightarrow A_1 ~|~ \dots`, and starting continuations with ellipses, :math:`\B{sym} ::= \dots ~|~ B_2 \Rightarrow A_2`. + * Some productions are augmented by side conditions in parentheses, which restrict the applicability of the production. They provide a shorthand for a combinatorial expansion of the production into many separate cases. * If the same meta variable or non-terminal symbol appears multiple times in a production (in the syntax or in an attribute), then all those occurrences must have the same instantiation. diff --git a/document/core/binary/instructions.rst b/document/core/binary/instructions.rst index 2d7e2cd6c5..ef4c5e5d55 100644 --- a/document/core/binary/instructions.rst +++ b/document/core/binary/instructions.rst @@ -97,7 +97,8 @@ Control Instructions 0{:}\Bu8 &\Rightarrow& (\epsilon, \epsilon) \\ &&|& 1{:}\Bu8 &\Rightarrow& (\NULL, \epsilon) \\ &&|& 2{:}\Bu8 &\Rightarrow& (\epsilon, \NULL) \\ &&|& - 3{:}\Bu8 &\Rightarrow& (\NULL, \NULL) \\ + 3{:}\Bu8 &\Rightarrow& (\NULL, \NULL) \\ &&|& + \dots \end{array} .. note:: diff --git a/document/core/text/conventions.rst b/document/core/text/conventions.rst index ff3720638f..9c562d5a1a 100644 --- a/document/core/text/conventions.rst +++ b/document/core/text/conventions.rst @@ -53,6 +53,8 @@ In order to distinguish symbols of the textual syntax from symbols of the abstra * Productions are written :math:`\T{sym} ::= T_1 \Rightarrow A_1 ~|~ \dots ~|~ T_n \Rightarrow A_n`, where each :math:`A_i` is the attribute that is synthesized for :math:`\T{sym}` in the given case, usually from attribute variables bound in :math:`T_i`. +* Large productions may be split into multiple definitions, indicated by ending the first one with explicit ellipses, :math:`\T{sym} ::= T_1 \Rightarrow A_1 ~|~ \dots`, and starting continuations with ellipses, :math:`\T{sym} ::= \dots ~|~ T_2 \Rightarrow A_2`. + * Some productions are augmented by side conditions in parentheses, which restrict the applicability of the production. They provide a shorthand for a combinatorial expansion of the production into many separate cases. * If the same meta variable or non-terminal symbol appears multiple times in a production (in the syntax or in an attribute), then all those occurrences must have the same instantiation. diff --git a/document/core/text/instructions.rst b/document/core/text/instructions.rst index b5436780c4..f489a6e87a 100644 --- a/document/core/text/instructions.rst +++ b/document/core/text/instructions.rst @@ -156,7 +156,8 @@ All other control instruction are represented verbatim. \text{return\_call\_indirect}~~x{:}\Ttableidx~~y,I'{:}\Ttypeuse_I &\Rightarrow& \RETURNCALLINDIRECT~x~y & (\iff I' = \{\ILOCALS~(\epsilon)^\ast\}) \\ &&|& \text{throw}~~x{:}\Ttagidx_I &\Rightarrow& \THROW~x \\ &&|& - \text{throw\_ref} &\Rightarrow& \THROWREF \\ + \text{throw\_ref} &\Rightarrow& \THROWREF \\ &&|& + \dots \end{array} .. note:: diff --git a/test/core/binary.wast b/test/core/binary.wast index 34ccca3ab2..e328be3603 100644 --- a/test/core/binary.wast +++ b/test/core/binary.wast @@ -669,7 +669,7 @@ (module binary "\00asm" "\01\00\00\00" "\05\03\01" ;; memory section with one entry - "\08" ;; malformed memory limits flag + "\10" ;; malformed memory limits flag "\00" ;; dummy byte ) "malformed limits flags" diff --git a/test/core/global.wast b/test/core/global.wast index 370d755864..fec03743c2 100644 --- a/test/core/global.wast +++ b/test/core/global.wast @@ -390,7 +390,7 @@ "\0a\67\6c\6f\62\61\6c\5f\69\33\32" ;; "global_i32" "\03" ;; GlobalImport "\7f" ;; i32 - "\02" ;; malformed mutability + "\04" ;; malformed mutability ) "malformed mutability" ) @@ -417,7 +417,7 @@ "\06\86\80\80\80\00" ;; global section "\01" ;; length 1 "\7f" ;; i32 - "\02" ;; malformed mutability + "\04" ;; malformed mutability "\41\00" ;; i32.const 0 "\0b" ;; end )