aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-08-17 14:13:58 -0700
committerGraydon Hoare <[email protected]>2010-08-17 14:48:00 -0700
commit766b91d88b19aa0c2030e6d96c3fd8f4a7255891 (patch)
tree6a1d33f6a7fe4d4047c1eb25d8e876a713c6557d /doc
parentRe-xfailed tests because Windows is still complaining. (diff)
downloadrust-766b91d88b19aa0c2030e6d96c3fd8f4a7255891.tar.xz
rust-766b91d88b19aa0c2030e6d96c3fd8f4a7255891.zip
Add support for a reserved-words list and reserve the various not-supported-but-plausible IEEE datatypes.
Diffstat (limited to 'doc')
-rw-r--r--doc/rust.texi38
1 files changed, 36 insertions, 2 deletions
diff --git a/doc/rust.texi b/doc/rust.texi
index 63181f88..fcfb6499 100644
--- a/doc/rust.texi
+++ b/doc/rust.texi
@@ -599,6 +599,7 @@ Unicode characters.
* Ref.Lex.Ignore:: Ignored characters.
* Ref.Lex.Ident:: Identifier tokens.
* Ref.Lex.Key:: Keyword tokens.
+* Ref.Lex.Res:: Reserved tokens.
* Ref.Lex.Num:: Numeric tokens.
* Ref.Lex.Text:: String and character tokens.
* Ref.Lex.Syntax:: Syntactic extension tokens.
@@ -636,7 +637,7 @@ token or a syntactic extension token. Multi-line comments may be nested.
Identifiers follow the pattern of C identifiers: they begin with a
@emph{letter} or @emph{underscore}, and continue with any combination of
@emph{letters}, @emph{decimal digits} and underscores, and must not be equal
-to any keyword. @xref{Ref.Lex.Key}.
+to any keyword or reserved token. @xref{Ref.Lex.Key}. @xref{Ref.Lex.Res}.
A @emph{letter} is a Unicode character in the ranges U+0061-U+007A and
U+0041-U+005A (@code{'a'}-@code{'z'} and @code{'A'}-@code{'Z'}).
@@ -728,6 +729,35 @@ The keywords are:
@tab @code{be}
@end multitable
+@node Ref.Lex.Res
+@subsection Ref.Lex.Res
+@c * Ref.Lex.Res:: Reserved tokens.
+
+The reserved tokens are:
+@cindex Reserved
+
+@sp 2
+
+@multitable @columnfractions .15 .15 .15 .15 .15
+@item @code{f16}
+@tab @code{f80}
+@tab @code{f128}
+@item @code{m32}
+@tab @code{m64}
+@tab @code{m128}
+@tab @code{dec}
+@end multitable
+
+@sp 2
+
+At present these tokens have no defined meaning in the Rust language.
+
+These tokens may correspond, in some current or future implementation,
+to additional built-in types for decimal floating-point, extended
+binary and interchange floating-point formats, as defined in the IEEE
+754-1985 and IEEE 754-2008 specifications.
+
+
@node Ref.Lex.Num
@subsection Ref.Lex.Num
@c * Ref.Lex.Num:: Numeric tokens.
@@ -785,6 +815,10 @@ only two floating-point suffixes: @code{f32} and @code{f64}. Each of these
gives the floating point literal the associated type, rather than
@code{float}.
+A set of suffixes are also reserved to accommodate literal support for
+types corresponding to reserved tokens. The reserved suffixes are @code{f16},
+@code{f80}, @code{f128}, @code{m}, @code{m32}, @code{m64} and @code{m128}.
+
@sp 1
A @dfn{hex digit} is either a @emph{decimal digit} or else a character in the
ranges U+0061-U+0066 and U+0041-U+0046 (@code{'a'}-@code{'f'},
@@ -2024,7 +2058,7 @@ The signed two's complement word types @code{i8}, @code{i16}, @code{i32} and
@end ifhtml
respectively.
@item
-The IEEE 754 single-precision and double-precision floating-point types:
+The IEEE 754-2008 @code{binary32} and @code{binary64} floating-point types:
@code{f32} and @code{f64}, respectively.
@end itemize