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
Consistency improvements in fsgrammar listings (#86)
Improves the consistency of `fsgrammar` listings. The following changes
were applied in general:
- Replaced `opt` or `~opt` suffixes with `?`
- Enclosed symbolic keywords and operators with single quotes
- Used parentheses to group optional terms in `attribute := (
attribute-target ':' )? object-construction`
Copy file name to clipboardExpand all lines: spec/introduction.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ val vowels: char list = ['e'; 'i'; 'o'; 'u']
64
64
65
65
> ['a'] @ vowels;;
66
66
val it: char list = ['a'; 'e'; 'i'; 'o'; 'u']
67
-
67
+
68
68
> vowels @ ['y'];;
69
69
val it: char list = ['e'; 'i'; 'o'; 'u'; 'y']
70
70
```
@@ -451,4 +451,4 @@ Regular expressions are typically used to specify tokens.
451
451
token token-name = regexp
452
452
```
453
453
454
-
In the grammar rules, the notation `element-name?` indicates an optional element. The notation `...` indicates repetition of the preceding non-terminal construct and the separator token. For example, `expr ',' ... ',' expr` means a sequence of one or more `expr` elements separated by commas.
454
+
In the grammar rules, the notation `element-name?` indicates an optional element. Where the optional element requires multiple tokens, it is enclosed in parentheses `(e1 e2)?`. The notation `...` indicates repetition of the preceding non-terminal construct and the separator token. For example, `expr ',' ... ',' expr` means a sequence of one or more `expr` elements separated by commas. Literal symbols like `,` that appear in the grammer are enclosed in single quotes i.e. `','`, except the single quote character itself which is enclosed in double quotes `"'"`. Comments may be placed at the end of a line, prefixed with `--`.
0 commit comments