|
2 | 2 |
|
3 | 3 | Tokens are primitive productions in the grammar defined by regular
|
4 | 4 | (non-recursive) languages. "Simple" tokens are given in [string table
|
5 |
| -production](#string-table-productions) form, and occur in the rest of the |
| 5 | +production] form, and occur in the rest of the |
6 | 6 | grammar as double-quoted strings. Other tokens have exact rules given.
|
7 | 7 |
|
| 8 | +[string table production]: string-table-productions.html |
| 9 | + |
8 | 10 | ## Literals
|
9 | 11 |
|
10 | 12 | 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:
|
254 | 256 | ```
|
255 | 257 |
|
256 | 258 | Note that the Rust syntax considers `-1i8` as an application of the [unary minus
|
257 |
| -operator](#unary-operator-expressions) to an integer literal `1i8`, rather than |
| 259 | +operator] to an integer literal `1i8`, rather than |
258 | 260 | a single integer literal.
|
259 | 261 |
|
| 262 | +[unary minus operator]: expressions.html#unary-operator-expressions |
| 263 | + |
260 | 264 | #### Floating-point literals
|
261 | 265 |
|
262 | 266 | A _floating-point literal_ has one of two forms:
|
@@ -298,19 +302,25 @@ syntax with a floating point literal ending in a period. `2.f64` would attempt
|
298 | 302 | to call a method named `f64` on `2`.
|
299 | 303 |
|
300 | 304 | The representation semantics of floating-point numbers are described in
|
301 |
| -["Machine Types"](#machine-types). |
| 305 | +["Machine Types"]. |
| 306 | + |
| 307 | +["Machine Types"]: types.html#machine-types |
302 | 308 |
|
303 | 309 | ### Boolean literals
|
304 | 310 |
|
305 | 311 | The two values of the boolean type are written `true` and `false`.
|
306 | 312 |
|
307 | 313 | ## Symbols
|
308 | 314 |
|
309 |
| -Symbols are a general class of printable [tokens](#tokens) that play structural |
| 315 | +Symbols are a general class of printable [tokens] that play structural |
310 | 316 | roles in a variety of grammar productions. They are a
|
311 | 317 | set of remaining miscellaneous printable tokens that do not
|
312 |
| -otherwise appear as [unary operators](#unary-operator-expressions), [binary |
313 |
| -operators](#binary-operator-expressions), or [keywords][keywords]. |
| 318 | +otherwise appear as [unary operators], [binary |
| 319 | +operators], or [keywords]. |
314 | 320 | They are catalogued in [the Symbols section][symbols] of the Grammar document.
|
315 | 321 |
|
316 |
| -[symbols]: grammar.html#symbols |
| 322 | +[unary operators]: expressions.html#unary-operator-expressions |
| 323 | +[binary operators]: expressions.html#binary-operator-expressions |
| 324 | +[tokens]: #tokens |
| 325 | +[symbols]: ../grammar.html#symbols |
| 326 | +[keywords]: ../grammar.html#keywords |
0 commit comments