|
ANSI Common Lisp 2 Syntax 2.1 Character Syntax 2.1.4 Character Syntax Types
2.1.4.2 Constituent Traits
Every character has one or more constituent traits
that define how the character is to be interpreted by the Lisp reader
when the character is a constituent character.
These constituent traits are
alphabetic2,
digit,
package marker,
plus sign,
minus sign,
dot,
decimal point,
ratio marker,
exponent marker,
and invalid.
Figure 2.1.4.2 Constituent Traits shows the constituent traits
of the standard characters
and of certain semi-standard characters;
no mechanism is provided for changing the constituent trait of a character.
Any character with the alphadigit constituent trait
in that figure is a digit if the current input base is greater
than that character's digit value,
otherwise the character is alphabetic2.
Any character quoted by a single escape
is treated as an alphabetic2 constituent, regardless of its normal syntax.
constituent character | traits | constituent character | traits |
Backspace | invalid | { | alphabetic2 |
Tab | invalid* | } | alphabetic2 |
Newline | invalid* | + | alphabetic2, plus sign |
Linefeed | invalid* | - | alphabetic2, minus sign |
Page | invalid* | . | alphabetic2, dot, decimal point |
Return | invalid* | / | alphabetic2, ratio marker |
Space | invalid* | A, a | alphadigit |
! | alphabetic2 | B, b | alphadigit |
" | alphabetic2* | C, c | alphadigit |
# | alphabetic2* | D, d | alphadigit, double-float exponent marker |
$ | alphabetic2 | E, e | alphadigit, float exponent marker |
% | alphabetic2 | F, f | alphadigit, single-float exponent marker |
& | alphabetic2 | G, g | alphadigit |
' | alphabetic2* | H, h | alphadigit |
( | alphabetic2* | I, i | alphadigit |
) | alphabetic2* | J, j | alphadigit |
* | alphabetic2 | K, k | alphadigit |
, | alphabetic2* | L, l | alphadigit, long-float exponent marker |
0-9 | alphadigit | M, m | alphadigit |
: | package marker | N, n | alphadigit |
; | alphabetic2* | O, o | alphadigit |
< | alphabetic2 | P, p | alphadigit |
= | alphabetic2 | Q, q | alphadigit |
> | alphabetic2 | R, r | alphadigit |
? | alphabetic2 | S, s | alphadigit, short-float exponent marker |
@ | alphabetic2 | T, t | alphadigit |
] | alphabetic2 | U, u | alphadigit |
\ | alphabetic2* | V, v | alphadigit |
[ | alphabetic2 | W, w | alphadigit |
^ | alphabetic2 | X, x | alphadigit |
_ | alphabetic2 | Y, y | alphadigit |
` | alphabetic2* | Z, z | alphadigit |
| | alphabetic2* | Rubout | invalid |
~ | alphabetic2 | | |
Constituent Traits of Standard Characters and Semi-Standard Characters
The interpretations in this table apply only to characters
whose syntax type is constituent.
Entries marked with an asterisk (*) are normally shadowed2
because the indicated characters are of syntax type
whitespace2,
macro character,
single escape,
or multiple escape;
these constituent traits apply to them only if their syntax types
are changed to constituent.
|