diff --git a/doc/spec-mini.md b/doc/spec-mini.md index 614486455..949a4a3da 100644 --- a/doc/spec-mini.md +++ b/doc/spec-mini.md @@ -64,7 +64,9 @@ octal_digit = "0" … "7" . hex_digit = "0" … "9" | "A" … "F" | "a" … "f" . ``` -## Comments +## Lexical elements + +### Comments Comments serve as program documentation. There are three forms: @@ -80,7 +82,14 @@ A _general comment_ containing no newlines acts like a space. Any other comment /* this is a general comment */ ``` -## Literals +### Tokens + +Tokens form the vocabulary of the Go+ language. There are four classes: _identifiers_, _keywords_, _operators_ and _punctuation_, and _literals_. White space, formed from spaces (U+0020), horizontal tabs (U+0009), carriage returns (U+000D), and newlines (U+000A), is ignored except as it separates tokens that would otherwise combine into a single token. Also, a newline or end of file may trigger the insertion of a [semicolon](). While breaking the input into tokens, the next token is the longest sequence of characters that form a valid token. + + +### Semicolons + +TODO ### Integer literals