@@ -43,17 +43,17 @@ colon ::= ':' -- with side conditions explained above
4343## Identifiers
4444
4545``` 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]
5757escapeSeq ::= UnicodeEscape | charEscapeSeq
5858UnicodeEscape ::= ‘\’ ‘u’ {‘u’} hexDigit hexDigit hexDigit hexDigit
5959hexDigit ::= ‘0’ | ... | ‘9’ | ‘A’ | ... | ‘F’ | ‘a’ | ... | ‘f’
@@ -177,9 +177,8 @@ _ ) ] }
177177The tokens that can begin a statement are all Scala tokens _ except_ the following delimiters and reserved words:
178178
179179```
180- catch else extends finally forSome match
181- with yield , . ; : = => <- <: <%
182- >: # [ ) ] }
180+ catch else extends finally forSome match with yield
181+ , . ; : = => <- <: <% >: # [ ) ] }
183182```
184183
185184A ` case ` token can begin a statement only if followed by a
@@ -334,8 +333,7 @@ Literal ::= [‘-’] integerLiteral
334333### Integer Literals
335334
336335``` ebnf
337- integerLiteral ::= (decimalNumeral | hexNumeral)
338- [‘L’ | ‘l’]
336+ integerLiteral ::= (decimalNumeral | hexNumeral) [‘L’ | ‘l’]
339337decimalNumeral ::= ‘0’ | digit [{digit | ‘_’} digit]
340338hexNumeral ::= ‘0’ (‘x’ | ‘X’) hexDigit [{hexDigit | ‘_’} hexDigit]
341339```
@@ -366,11 +364,10 @@ The digits of a numeric literal may be separated by arbitrarily many underscores
366364### Floating Point Literals
367365
368366```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]
374371```
375372
376373Floating 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