Skip to content

Commit 767f23a

Browse files
committed
[spec] Remark about the convention of using a pattern for attribute variable
1 parent d1d1686 commit 767f23a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

document/core/binary/conventions.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ In order to distinguish symbols of the binary syntax from symbols of the abstrac
5454
(This is a shorthand for :math:`B^n` where :math:`n \leq 1`.)
5555

5656
* :math:`x{:}B` denotes the same language as the nonterminal :math:`B`, but also binds the variable :math:`x` to the attribute synthesized for :math:`B`.
57+
A pattern may also be used instead of a variable, e.g., :math:`7{:}B`.
5758

5859
* 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`.
5960

document/core/text/conventions.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ In order to distinguish symbols of the textual syntax from symbols of the abstra
4949
(This is a shorthand for :math:`T^n` where :math:`n \leq 1`.)
5050

5151
* :math:`x{:}T` denotes the same language as the nonterminal :math:`T`, but also binds the variable :math:`x` to the attribute synthesized for :math:`T`.
52+
A pattern may also be used instead of a variable, e.g., :math:`(x,y){:}T`.
5253

5354
* 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`.
5455

0 commit comments

Comments
 (0)