Syntax Summary

The following descriptions of Scala tokens uses literal characters ‘c’ when referring to the ASCII fragment \u0000\u007F.

Unicode escapes are used to represent the Unicode character with the given hexadecimal code:

Lexical Syntax

The lexical syntax of Scala is given by the following grammar in EBNF form:

Context-free Syntax

The context-free syntax of Scala is given by the following EBNF grammar: