You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 3, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: document/core/binary/conventions.rst
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,9 @@ In order to distinguish symbols of the binary syntax from symbols of the abstrac
59
59
60
60
* 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.
61
61
62
+
* 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.
63
+
(This is a shorthand for a side condition requiring multiple different variables to be equal.)
64
+
62
65
.. note::
63
66
For example, the :ref:`binary grammar <binary-valtype>` for :ref:`value types <syntax-valtype>` is given as follows:
Copy file name to clipboardExpand all lines: document/core/syntax/conventions.rst
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,9 @@ The following conventions are adopted in defining grammar rules for abstract syn
41
41
42
42
* Some productions are augmented with side conditions in parentheses, ":math:`(\iff\X{condition})`", that provide a shorthand for a combinatorial expansion of the production into many separate cases.
43
43
44
+
* If the same meta variable or non-terminal symbol appears multiple times in a production, then all those occurrences must have the same instantiation.
45
+
(This is a shorthand for a side condition requiring multiple different variables to be equal.)
46
+
44
47
45
48
.. _notation-epsilon:
46
49
.. _notation-length:
@@ -82,6 +85,7 @@ Moreover, the following conventions are employed:
82
85
(similarly for :math:`x^\ast`, :math:`x^+`, :math:`x^?`).
83
86
This implicitly expresses a form of mapping syntactic constructions over a sequence.
84
87
88
+
85
89
Productions of the following form are interpreted as *records* that map a fixed set of fields :math:`\K{field}_i` to "values" :math:`A_i`, respectively:
Copy file name to clipboardExpand all lines: document/core/syntax/modules.rst
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,22 +81,36 @@ Each class of definition has its own *index space*, as distinguished by the foll
81
81
The index space for :ref:`functions <syntax-func>`, :ref:`tables <syntax-table>`, :ref:`memories <syntax-mem>` and :ref:`globals <syntax-global>` includes respective :ref:`imports <syntax-import>` declared in the same module.
82
82
The indices of these imports precede the indices of other definitions in the same index space.
83
83
84
-
Element indices reference :ref:`element segments <syntax-elem>`.
85
-
86
-
Data indices reference :ref:`data segments <syntax-data>`.
84
+
Element indices reference :ref:`element segments <syntax-elem>` and data indices reference :ref:`data segments <syntax-data>`.
87
85
88
86
The index space for :ref:`locals <syntax-local>` is only accessible inside a :ref:`function <syntax-func>` and includes the parameters of that function, which precede the local variables.
89
87
90
88
Label indices reference :ref:`structured control instructions <syntax-instr-control>` inside an instruction sequence.
91
89
92
90
91
+
.. _free-typeidx:
92
+
.. _free-funcidx:
93
+
.. _free-tableidx:
94
+
.. _free-memidx:
95
+
.. _free-globalidx:
96
+
.. _free-elemidx:
97
+
.. _free-dataidx:
98
+
.. _free-localidx:
99
+
.. _free-labelidx:
100
+
.. _free-index:
101
+
93
102
Conventions
94
103
...........
95
104
96
105
* The meta variable :math:`l` ranges over label indices.
97
106
98
107
* The meta variables :math:`x, y` range over indices in any of the other index spaces.
99
108
109
+
* The notation :math:`\F{idx}(A)` denotes the set of indices from index space :math:`\X{idx}` occurring free in :math:`A`.
110
+
111
+
.. note::
112
+
For example, if :math:`\instr^\ast` is :math:`(\DATADROP~x) (\MEMORYINIT~y)`, then :math:`\freedataidx(\instr^\ast) = \{x, y\}`.
113
+
100
114
101
115
.. index:: ! type definition, type index, function type
Copy file name to clipboardExpand all lines: document/core/text/conventions.rst
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,8 @@ In order to distinguish symbols of the textual syntax from symbols of the abstra
54
54
55
55
* 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.
56
56
57
+
* 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.
58
+
57
59
.. _text-syntactic:
58
60
59
61
* A distinction is made between *lexical* and *syntactic* productions. For the latter, arbitrary :ref:`white space <text-space>` is allowed in any place where the grammar contains spaces. The productions defining :ref:`lexical syntax <text-lexical>` and the syntax of :Ref:`values <text-value>` are considered lexical, all others are syntactic.
0 commit comments