Skip to content

Commit fd99233

Browse files
authored
Add missing prefix operators to Categorization of Symbolic Operators (#71)
1 parent b2b888f commit fd99233

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/basic-grammar-elements.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,23 +195,23 @@ elsewhere in the table.
195195

196196
```fsgrammar
197197
infix-or-prefix-op :=
198-
+, -, +., -., %, &, &&
198+
+, -, +., -., %, %%, &, &&, ?+, ?-
199199
prefix-op :=
200200
infix-or-prefix-op
201201
~ ~~ ~~~ (and any repetitions of ~)
202202
!OP (except !=)
203203
infix-op :=
204204
infix-or-prefix-op
205-
- OP +OP || <OP >OP = |OP &OP ^OP *OP /OP %OP @OP !=
206-
(or any of these preceded by one or more ‘.’)
205+
-OP +OP |OP <OP >OP =OP &OP ^OP *OP /OP %OP @OP !=OP
206+
(or any of these preceded by one or more '.' or '?')
207207
:=
208208
::
209209
$
210210
or
211211
?
212212
```
213213

214-
The operators `+`, `-`, `+.`, `-.`, `%`, `%%`, `&`, `&&` can be used as both prefix and infix operators. When these
214+
The operators `+`, `-`, `+.`, `-.`, `%`, `%%`, `&`, `&&`, `?+`, `?-` can be used as both prefix and infix operators. When these
215215
operators are used as prefix operators, the tilde character is prepended internally to generate the
216216
operator name so that the parser can distinguish such usage from an infix use of the operator. For
217217
example, `-x` is parsed as an application of the operator `~-` to the identifier `x`. This generated name is

0 commit comments

Comments
 (0)