You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/SPECIFICATION.html
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -64,9 +64,9 @@
64
64
65
65
Identifiers MUST be non-empty and case-sensitive. Variables and user-defined functions share a single flat namespace, so one name MUST NOT denote both a variable and a function. A user-defined function name MUST NOT conflict with any built-in operator or function name.
66
66
67
-
Identifiers MUST NOT contain non-ASCII characters or any of the following characters: `{`, `}`, `[`, `]`, `(`, `)`, `=`, `,`, `!`, `~`, or `@`. The first character of an identifier MUST NOT be `0`, and the first two characters of an identifier MUST NOT be `-0`.
67
+
Identifiers MUST NOT contain non-ASCII characters or any of the following characters: `{`, `}`, `[`, `]`, `(`, `)`, `=`, `,`, `!`, `~`, or `@`. The first character of an identifier MUST NOT be a decimal digit (`0`-`9`), and the first two characters of an identifier MUST NOT be `-0`.
68
68
69
-
The first identifier character MAY be a letter `A-Z` or `a-z`, a decimal digit `1-9`, `*`, or one of `/`, `$`, `%`, `&`, `_`, `+`, `|`, `?`,or `-`.Ifthefirstidentifiercharacteris `-`,thesecondcharacterMAYbeanyotherwisevalididentifiercharacterexcept `0`.SubsequentidentifiercharactersMAYadditionallyincludethedigit `0`, `*`,and `-`.Theexactspelling `-INF` isreservedby[4.3.2](#432-special-values).ThispermissiveASCII-onlycharactersetpreservesanunambiguousdistinctionbetweenidentifiersandnumericliterals,whichMUSTbeginwitha`0`-prefixedbasemarker.
69
+
The first identifier character MAY be a letter `A-Z` or `a-z`, `*`, or one of `/`, `$`, `%`, `&`, `_`, `+`, `|`, `?`,or `-`.Ifthefirstidentifiercharacteris `-`,thesecondcharacterMUSTbevalidasanopeningcharacter.SubsequentidentifiercharactersMAYadditionallyincludethedecimaldigits `0-9`, `*`,and `-`.Theexactspelling `-INF` isreservedby[4.3.2](#432-special-values).ThispermissiveASCII-onlycharactersetpreservesanunambiguousdistinctionbetweenidentifiersandnumericliterals,whichMUSTbeginwithadecimaldigit.
70
70
71
71
---
72
72
@@ -268,7 +268,9 @@
268
268
269
269
#### 4.2.1 Integer literals
270
270
271
-
`int` literals MUST include a base prefix. Valid prefixes are `0b`, `0o`, `0d`, `0x`, `0t`, `0c`, `0s`, and `0rNN` where `NN` is two decimal digits and `2<=NN<=64`.
271
+
Non-decimal `int` literals MUST include a base prefix. Valid prefixes are `0b`, `0o`, `0d`, `0x`, `0t`, `0c`, `0s`, and `0rNN` where `NN` is two decimal digits and `2<=NN<=64`.
272
+
273
+
An `int` literal that begins with a decimal digit (`0`-`9`) and does NOT include a base prefix MUST be evaluated as a decimal (base-10) literal. A numeric literal that begins with a decimal digit and includes a base prefix (that is, one or more digits precede the base prefix) MUST raise an error.
272
274
273
275
`int` literals MUST support negative values via prefixing with a `-` before the base prefix, and positive values with no sign. `int` literals MUST NOT support a `+` prefix.
274
276
@@ -290,9 +292,11 @@
290
292
291
293
#### 4.3.1 Floating-point literals
292
294
293
-
`float` literals MUST include a base prefix using the same prefix forms as `int` literals.
295
+
Non-decimal `float` literals MUST include a base prefix using the same prefix forms as `int` literals.
296
+
297
+
A `float` literal that begins with a decimal digit (`0`-`9`) and does NOT include a base prefix MUST be evaluated as a decimal (base-10) literal. A `float` literal that begins with a decimal digit and includes a base prefix (that is, one or more digits precede the base prefix) MUST raise an error.
294
298
295
-
`float` literals MUST consist of a prefixed integer part, a radix point (`.`), and a fractional part. The integer and fractional parts MUST each contain at least one digit in the selected base.
299
+
`float` literals MUST consist of an integer part (preceded by the base prefix, if present), a radix point (`.`), and a fractional part. The integer and fractional parts MUST each contain at least one digit in the selected base.
296
300
297
301
`float` literals MUST support negative values via prefixing with a `-` before the base prefix, and positive values with no sign. `float` literals MUST NOT support a `+` prefix.
0 commit comments