From c6275c4b7601ba7c9db770a0bba33b3b0e264aca Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Mon, 20 Feb 2017 23:10:49 -0500 Subject: Tokens --- src/doc/reference/src/tokens.md | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'src/doc/reference') diff --git a/src/doc/reference/src/tokens.md b/src/doc/reference/src/tokens.md index 5a45a2a150b..ca6cde8bd28 100644 --- a/src/doc/reference/src/tokens.md +++ b/src/doc/reference/src/tokens.md @@ -2,9 +2,11 @@ Tokens are primitive productions in the grammar defined by regular (non-recursive) languages. "Simple" tokens are given in [string table -production](#string-table-productions) form, and occur in the rest of the +production] form, and occur in the rest of the grammar as double-quoted strings. Other tokens have exact rules given. +[string table production]: string-table-productions.html + ## Literals A literal is an expression consisting of a single token, rather than a sequence @@ -254,9 +256,11 @@ Examples of integer literals of various forms: ``` Note that the Rust syntax considers `-1i8` as an application of the [unary minus -operator](#unary-operator-expressions) to an integer literal `1i8`, rather than +operator] to an integer literal `1i8`, rather than a single integer literal. +[unary minus operator]: expressions.html#unary-operator-expressions + #### Floating-point literals A _floating-point literal_ has one of two forms: @@ -298,7 +302,9 @@ syntax with a floating point literal ending in a period. `2.f64` would attempt to call a method named `f64` on `2`. The representation semantics of floating-point numbers are described in -["Machine Types"](#machine-types). +["Machine Types"]. + +["Machine Types"]: types.html#machine-types ### Boolean literals @@ -306,11 +312,15 @@ The two values of the boolean type are written `true` and `false`. ## Symbols -Symbols are a general class of printable [tokens](#tokens) that play structural +Symbols are a general class of printable [tokens] that play structural roles in a variety of grammar productions. They are a set of remaining miscellaneous printable tokens that do not -otherwise appear as [unary operators](#unary-operator-expressions), [binary -operators](#binary-operator-expressions), or [keywords][keywords]. +otherwise appear as [unary operators], [binary +operators], or [keywords]. They are catalogued in [the Symbols section][symbols] of the Grammar document. -[symbols]: grammar.html#symbols +[unary operators]: expressions.html#unary-operator-expressions +[binary operators]: expressions.html#binary-operator-expressions +[tokens]: #tokens +[symbols]: ../grammar.html#symbols +[keywords]: ../grammar.html#keywords \ No newline at end of file -- cgit 1.4.1-3-g733a5