Skip to content

Commit b2b888f

Browse files
authored
Add the @ operator to Categorization of Symbolic Operators (#72)
PR also adds the `?` to the precedence table
1 parent a3b1d61 commit b2b888f

1 file changed

Lines changed: 26 additions & 26 deletions

File tree

spec/basic-grammar-elements.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ prefix-op :=
202202
!OP (except !=)
203203
infix-op :=
204204
infix-or-prefix-op
205-
- OP +OP || <OP >OP = |OP &OP ^OP *OP /OP %OP !=
205+
- OP +OP || <OP >OP = |OP &OP ^OP *OP /OP %OP @OP !=
206206
(or any of these preceded by one or more ‘.’)
207207
:=
208208
::
@@ -256,32 +256,32 @@ elsewhere in the table.
256256

257257
| Operator or expression | Associativity | Comments |
258258
| --- | --- | --- |
259-
| f<types> | Left | High-precedence type application; see [§](lexical-filtering.md#lexical-analysis-of-type-applications) |
260-
| f(x) | Left | High-precedence application; see [§](lexical-filtering.md#high-precedence-application) |
261-
| . | Left | |
259+
| `f<types>` | Left | High-precedence type application; see [§](lexical-filtering.md#lexical-analysis-of-type-applications) |
260+
| `f(x)` | Left | High-precedence application; see [§](lexical-filtering.md#high-precedence-application) |
261+
| `.` `?` | Left | |
262262
| _prefix-op_ | Left | Applies to prefix uses of these symbols |
263-
| "| rule" | Right Pattern matching rules |
264-
| "f x" <br> "lazy x" <br> "assert x" | Left | |
265-
| **OP | Right | |
266-
| *OP /OP %OP | Left | |
267-
| - OP +OP | Left | Applies to infix uses of these symbols |
268-
| :? | Not associative | |
269-
| :: | Right | |
270-
| ^OP | Right | |
271-
| !=OP \<OP \>OP = \|OP &OP $ | Left | |
272-
| :> :?> | Right | |
273-
| & && | Left | |
274-
| or \|\| | Left | |
275-
| , | Not associative | |
276-
| := | Right | |
277-
| -> | Right | |
278-
| if | Not associative | |
279-
| function, fun, match, try | Not associative | |
280-
| let | Not associative | |
281-
| ; | Right | |
282-
| \| | Left | |
283-
| when | Right | |
284-
| as | Right | |
263+
| `\| rule` | Right | Pattern matching rules |
264+
| `f x` `lazy x` `assert x` | Left | |
265+
| `**OP` | Right | |
266+
| `*OP` `/OP` `%OP` | Left | |
267+
| `-OP` `+OP` | Left | Applies to infix uses of these symbols |
268+
| `:?` | Not associative | |
269+
| `::` | Right | |
270+
| `^OP` `@OP` | Right | |
271+
| `!=OP` `<OP` `>OP` `=OP` `\|OP` `&OP` `$` | Left | |
272+
| `:>` `:?>` | Right | |
273+
| `&` `&&` | Left | |
274+
| `or` `\|\|` | Left | |
275+
| `,` | Not associative | |
276+
| `:=` | Right | |
277+
| `->` | Right | |
278+
| `if` | Not associative | |
279+
| `function`, `fun`, `match`, `try` | Not associative | |
280+
| `let` | Not associative | |
281+
| `;` | Right | |
282+
| `\|` | Left | |
283+
| `when` | Right | |
284+
| `as` | Right | |
285285

286286
If ambiguous grammar rules (such as the rules from §6) involve tokens in the table, a construct that
287287
appears earlier in the table has higher precedence than a construct that appears later in the table.

0 commit comments

Comments
 (0)