[LISPWORKS][Common Lisp HyperSpec (TM)] [Previous][Up][Next]


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 alphabetic[2], digit, package marker, plus sign, minus sign, dot, decimal point, ratio marker, exponent marker, and invalid. Figure 2-8 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 alphabetic[2]. Any character quoted by a single escape is treated as an alphabetic[2] constituent, regardless of its normal syntax.

                                                                                    
constituent  traits          constituent  traits                                    
character                    character    
----------
                                                                                    
Backspace    invalid         {            alphabetic[2]                             
Tab          invalid*        }            alphabetic[2]                             
Newline      invalid*        +            alphabetic[2], plus sign                  
Linefeed     invalid*        -            alphabetic[2], minus sign                 
Page         invalid*        .            alphabetic[2], dot, decimal point         
Return       invalid*        /            alphabetic[2], ratio marker               
Space        invalid*        A, a         alphadigit                                
!            alphabetic[2]   B, b         alphadigit                                
"            alphabetic[2]*  C, c         alphadigit                                
#            alphabetic[2]*  D, d         alphadigit, double-float exponent marker  
$            alphabetic[2]   E, e         alphadigit, float exponent marker         
%            alphabetic[2]   F, f         alphadigit, single-float exponent marker  
&            alphabetic[2]   G, g         alphadigit                                
'            alphabetic[2]*  H, h         alphadigit                                
(            alphabetic[2]*  I, i         alphadigit                                
)            alphabetic[2]*  J, j         alphadigit                                
*            alphabetic[2]   K, k         alphadigit                                
,            alphabetic[2]*  L, l         alphadigit, long-float exponent marker    
0-9          alphadigit      M, m         alphadigit                                
:            package marker  N, n         alphadigit                                
;            alphabetic[2]*  O, o         alphadigit                                
<            alphabetic[2]   P, p         alphadigit                                
=            alphabetic[2]   Q, q         alphadigit                                
>            alphabetic[2]   R, r         alphadigit                                
?            alphabetic[2]   S, s         alphadigit, short-float exponent marker   
@            alphabetic[2]   T, t         alphadigit                                
[            alphabetic[2]   U, u         alphadigit                                
\            alphabetic[2]*  V, v         alphadigit                                
]            alphabetic[2]   W, w         alphadigit                                
^            alphabetic[2]   X, x         alphadigit                                
_            alphabetic[2]   Y, y         alphadigit                                
`            alphabetic[2]*  Z, z         alphadigit                                
|            alphabetic[2]*  Rubout       invalid                                   
~            alphabetic[2]   
                                                                                    
                             

Figure 2-8. 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 shadowed[2] because the indicated characters are of syntax type whitespace[2], macro character, single escape, or multiple escape; these constituent traits apply to them only if their syntax types are changed to constituent.


[Starting Points][Contents][Index][Symbols][Glossary][Issues]
Copyright 1996-2005, LispWorks Ltd. All rights reserved.