blob: 1700271f9a1e7af916f13329226d90f549bd4951 [file] [log] [blame] [edit]
/**
# Notation
This section informally explains the grammar notation used below.
## Symbols and naming
_Terminal symbol_ names start with an uppercase letter, e.g. **SimpleName**.<br>
_Nonterminal symbol_ names start with lowercase letter, e.g. **kotlinFile**.<br>
Each _production_ starts with a colon (**:**).<br>
_Symbol definitions_ may have many productions and are terminated by a semicolon (**;**).<br>
Symbol definitions may be prepended with _attributes_, e.g. `start` attribute denotes a start symbol.
## EBNF expressions
Operator `|` denotes _alternative_.<br>
Operator `*` denotes _iteration_ (zero or more).<br>
Operator `+` denotes _iteration_ (one or more).<br>
Operator `?` denotes _option_ (zero or one).<br>
alpha`{`beta`}` denotes a nonempty _beta_-separated list of _alpha_'s. <br>
Operator ``++'' means that no space or comment allowed between operands.
# Semicolons
Kotlin provides "semicolon inference": syntactically, subsentences (e.g., statements, declarations etc) are separated by
the pseudo-token [SEMI](#SEMI), which stands for "semicolon or newline". In most cases, there's no need for semicolons in
Kotlin code.
*/