@@ -43,17 +43,17 @@ colon ::= ':' -- with side conditions explained above
43
43
## Identifiers
44
44
45
45
``` ebnf
46
- op ::= opchar {opchar}
47
- varid ::= lower idrest
48
- boundvarid ::= varid
49
- | ‘`’ varid ‘`’
50
- alphaid ::= upper idrest
51
- | varid
52
- plainid ::= alphaid
53
- | op
54
- id ::= plainid
55
- | ‘`’ { charNoBackQuoteOrNewline | escapeSeq } ‘`’
56
- idrest ::= {letter | digit} [‘_’ op]
46
+ op ::= opchar {opchar}
47
+ varid ::= lower idrest
48
+ boundvarid ::= varid
49
+ | ‘`’ varid ‘`’
50
+ alphaid ::= upper idrest
51
+ | varid
52
+ plainid ::= alphaid
53
+ | op
54
+ id ::= plainid
55
+ | ‘`’ { charNoBackQuoteOrNewline | escapeSeq } ‘`’
56
+ idrest ::= {letter | digit} [‘_’ op]
57
57
escapeSeq ::= UnicodeEscape | charEscapeSeq
58
58
UnicodeEscape ::= ‘\’ ‘u’ {‘u’} hexDigit hexDigit hexDigit hexDigit
59
59
hexDigit ::= ‘0’ | ... | ‘9’ | ‘A’ | ... | ‘F’ | ‘a’ | ... | ‘f’
@@ -177,9 +177,8 @@ _ ) ] }
177
177
The tokens that can begin a statement are all Scala tokens _ except_ the following delimiters and reserved words:
178
178
179
179
```
180
- catch else extends finally forSome match
181
- with yield , . ; : = => <- <: <%
182
- >: # [ ) ] }
180
+ catch else extends finally forSome match with yield
181
+ , . ; : = => <- <: <% >: # [ ) ] }
183
182
```
184
183
185
184
A ` case ` token can begin a statement only if followed by a
@@ -334,8 +333,7 @@ Literal ::= [‘-’] integerLiteral
334
333
### Integer Literals
335
334
336
335
``` ebnf
337
- integerLiteral ::= (decimalNumeral | hexNumeral)
338
- [‘L’ | ‘l’]
336
+ integerLiteral ::= (decimalNumeral | hexNumeral) [‘L’ | ‘l’]
339
337
decimalNumeral ::= ‘0’ | digit [{digit | ‘_’} digit]
340
338
hexNumeral ::= ‘0’ (‘x’ | ‘X’) hexDigit [{hexDigit | ‘_’} hexDigit]
341
339
```
@@ -366,11 +364,10 @@ The digits of a numeric literal may be separated by arbitrarily many underscores
366
364
### Floating Point Literals
367
365
368
366
```ebnf
369
- floatingPointLiteral
370
- ::= [decimalNumeral] ‘.’ digit [{digit | ‘_’} digit] [exponentPart] [floatType]
371
- | decimalNumeral exponentPart [floatType]
372
- | decimalNumeral floatType
373
- exponentPart ::= (‘E ’ | ‘e’) [‘+ ’ | ‘- ’] digit [{digit | ‘_’} digit]
367
+ floatingPointLiteral ::= [decimalNumeral] ‘.’ digit [{digit | ‘_’} digit] [exponentPart] [floatType]
368
+ | decimalNumeral exponentPart [floatType]
369
+ | decimalNumeral floatType
370
+ exponentPart ::= (‘E ’ | ‘e’) [‘+ ’ | ‘- ’] digit [{digit | ‘_’} digit]
374
371
```
375
372
376
373
Floating point literals are of type ` Float ` when followed by a floating point type suffix ` F ` or ` f ` , and are of type ` Double ` otherwise.
0 commit comments