Any token that is not a potential number, does not contain a package marker, and does not consist entirely of dots will always be interpreted as a symbol. Any token that is a potential number but does not fit the number syntax is a reserved token and has an implementation-dependent interpretation. In all other cases, the token is construed to be the name of a symbol.
Examples of the printed representation of symbols are in Figure 2–15.
For presentational simplicity,
these examples assume that
the readtable case of the current readtable is :upcase.
FROBBOZThe symbol whose name isFROBBOZ.frobbozAnother way to notate the same symbol.fRObBozYet another way to notate it.unwind-protectA symbol with a hyphen in its name.+$The symbol named+$.1+The symbol named1+.+1This is the integer1, not a symbol.pascal_styleThis symbol has an underscore in its name.file.rel.43This symbol has periods in its name.\(The symbol whose name is(.\+1The symbol whose name is+1.+\1Also the symbol whose name is+1.\frobbozThe symbol whose name isfROBBOZ.3.14159265\s0The symbol whose name is3.14159265s0.3.14159265\S0A different symbol, whose name is3.14159265S0.3.14159265s0A possible short float approximation to \pi. Figure 2–15: Examples of the printed representation of symbols (Part 1 of 2)
APL\\360The symbol whose name isAPL\360.apl\\360Also the symbol whose name isAPL\360.\(bThe name is^2\)\ -\ 4*a*c(B. Parentheses and two spaces in it.^2) - 4*A*C\(\bThe name is^2\)\ -\4*\a*\c(b. Letters explicitly lowercase.^2) - 4*a*c|"|The same as writing\".|(bThe name is^2) - 4*a*c|(b.^2) - 4*a*c|frobboz|The name isfrobboz, notFROBBOZ.|APL\360|The name isAPL360.|APL\\360|The name isAPL\360.|apl\\360|The name isapl\360.|\|\||Same as\|\|—the name is||.|(BThe name is^2) - 4*A*C|(B. Parentheses and two spaces in it.^2) - 4*A*C|(bThe name is^2) - 4*a*c|(b. Figure 2–16: Examples of the printed representation of symbols (Part 2 of 2)^2) - 4*a*c
In the process of parsing a symbol, it is implementation-dependent which implementation-defined attributes are removed from the characters forming a token that represents a symbol.
When parsing the syntax for a symbol, the Lisp reader looks up the name of that symbol in the current package. This lookup may involve looking in other packages whose external symbols are inherited by the current package. If the name is found, the corresponding symbol is returned. If the name is not found (that is, there is no symbol of that name accessible in the current package), a new symbol is created and is placed in the current package as an internal symbol. The current package becomes the owner (home package) of the symbol, and the symbol becomes interned in the current package. If the name is later read again while this same package is current, the same symbol will be found and returned.