Skip to content

Commit 0c22b0f

Browse files
committed
fixing the AI "fix"
1 parent eeea4c2 commit 0c22b0f

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

docs/chap-2/c-b-character-syntax/_c-b-e-character-syntax-types.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
The *Lisp reader* constructs an object from the input text by interpreting each character according to its syntax type. The *Lisp reader* cannot accept as input everything that the *Lisp printer* produces, and the *Lisp reader* has features that are not used by the *Lisp printer*. The *Lisp reader* can be used as a lexical analyzer for a more general user-written parser.
1+
The *Lisp reader* constructs an <GlossaryTerm term={"object"}><i>object</i></GlossaryTerm> from the input text by interpreting each <GlossaryTerm term={"character"}><i>character</i></GlossaryTerm> according to its <GlossaryTerm styled={true} term={"syntax type"}><i>syntax type</i></GlossaryTerm>. The *Lisp reader* cannot accept as input everything that the *Lisp printer* produces, and the *Lisp reader* has features that are not used by the *Lisp printer*. The *Lisp reader* can be used as a lexical analyzer for a more general user-written parser.
22

3-
When the *Lisp reader* is invoked, it reads a single character from the input stream and dispatches according to the syntax type of that character. Every character that can appear in the input stream is of one of the syntax types shown in Figure 2–6.
3+
When the *Lisp reader* is invoked, it reads a single character from the *input stream* and dispatches according to the <GlossaryTerm styled={true} term={"syntax type"}><i>syntax type</i></GlossaryTerm> of that <GlossaryTerm term={"character"}><i>character</i></GlossaryTerm> . Every <GlossaryTerm term={"character"}><i>character</i></GlossaryTerm> that can appear in the *input stream* is of one of the <GlossaryTerm styled={true} term={"syntax type"}><i>syntax types</i></GlossaryTerm> shown in Figure 2–6.
44

5-
<br>
5+
<br />
66

77
**Figure 2–6. Possible Character Syntax Types**
88

9-
<br>
9+
<br />
1010

1111
| Syntax Type |
1212
|---|---|
@@ -17,19 +17,15 @@ When the *Lisp reader* is invoked, it reads a single character from the input st
1717
| whitespace<sub>2</sub> |
1818
| invalid |
1919

20-
<br>
20+
<br />
2121

22-
The syntax type of a character in a readtable determines how that character is interpreted by the *Lisp reader* while that readtable is the current readtable. At any given time, every character has exactly one syntax type.
22+
The <GlossaryTerm styled={true} term={"syntax type"}><i>syntax type</i></GlossaryTerm> of a <GlossaryTerm term={"character"}><i>character</i></GlossaryTerm> in a <GlossaryTerm term={"readtable"}><i>readtable</i></GlossaryTerm> determines how that character is interpreted by the *Lisp reader* while that <GlossaryTerm term={"readtable"}><i>readtable</i></GlossaryTerm> is the <GlossaryTerm styled={true} term={"current readtable"}><i>current readtable</i></GlossaryTerm>. At any given time, every character has exactly one <GlossaryTerm styled={true} term={"syntax type"}><i>syntax type</i></GlossaryTerm>.
2323

24-
<br>
24+
<br />
2525

26-
Figure 2–7 lists the syntax type of each character in standard syntax.
26+
Figure 2–7 lists the <GlossaryTerm styled={true} term={"syntax type"}><i>syntax type</i></GlossaryTerm> of each <GlossaryTerm term={"character"}><i>character</i></GlossaryTerm> in <GlossaryTerm styled={true} term={"standard syntax"}><i>standard syntax</i></GlossaryTerm>.
2727

28-
<br>
29-
30-
**Figure 2–7. Character Syntax Types in Standard Syntax**
31-
32-
<br>
28+
<br />
3329

3430
| Character | Syntax Type |
3531
|---|---|
@@ -72,10 +68,20 @@ Figure 2–7 lists the syntax type of each character in standard syntax.
7268
| Rubout | constituent |
7369
| / | constituent |
7470

75-
<br>
71+
|**character syntax type character syntax type**|
72+
| :- |
73+
|Backspace <i>constituent</i> 0–9 <i>constituent</i> Tab <i>whitespace</i><sub>2</sub> : <i>constituent</i> Newline <i>whitespace</i><sub>2</sub> ; <i>terminating macro char</i> Linefeed <i>whitespace</i><sub>2</sub> &lt; <i>constituent</i> Page <i>whitespace</i><sub>2</sub> = <i>constituent</i> Return <i>whitespace</i><sub>2</sub> &gt; <i>constituent</i> Space <i>whitespace</i><sub>2</sub> ? <i>constituent</i>* ! <i>constituent</i>* @ <i>constituent</i> " <i>terminating macro char</i> A–Z <i>constituent</i> # <i>non-terminating macro char</i> [ <i>constituent</i>* $ <i>constituent</i> \ <i>single escape</i> % <i>constituent</i> ] <i>constituent</i>* &amp; <i>constituent <sup>∧</sup> constituent</i> ’ <i>terminating macro char constituent</i> ( <i>terminating macro char</i> ‘ <i>terminating macro char</i> ) <i>terminating macro char</i> a–z <i>constituent</i> * <i>constituent</i> \{ <i>constituent</i>* + <i>constituent</i> | <i>multiple escape</i> , <i>terminating macro char</i> \} <i>constituent</i>* - <i>constituent</i> &#126; <i>constituent</i> . <i>constituent</i> Rubout <i>constituent</i> / <i>constituent</i>|
74+
75+
<br />
76+
77+
**Figure 2–7. Character Syntax Types in Standard Syntax**
78+
79+
<br />
80+
81+
The characters marked with an asterisk (\*) are initially <GlossaryTerm term={"constituent"}><i>constituents</i></GlossaryTerm>, but they are not used in any standard Common Lisp notations. These characters are explicitly reserved to the <GlossaryTerm term={"programmer"}><i>programmer</i></GlossaryTerm> . `~` is not used in Common Lisp, and reserved to implementors. `$` and `%` are <GlossaryTerm term={"alphabetic"}><i>alphabetic</i></GlossaryTerm><sub>2</sub> <GlossaryTerm term={"character"}><i>characters</i></GlossaryTerm>, but are not used in the names of any standard Common Lisp <GlossaryTerm styled={true} term={"defined name"}><i>defined names</i></GlossaryTerm>.
82+
7683

77-
The characters marked with an asterisk (*) are initially constituents, but they are not used in any standard Common Lisp notations. These characters are explicitly reserved to the programmer. `~` is not used in Common Lisp, and reserved to implementors. `$` and `%` are alphabetic<sub>2</sub> characters, but are not used in the names of any standard Common Lisp defined names.
7884

79-
Whitespace characters serve as separators but are otherwise ignored. Constituent and escape characters are accumulated to make a token, which is then interpreted as a number or symbol. Macro characters trigger the invocation of functions (possibly user-supplied) that can perform arbitrary parsing actions. Macro characters are divided into two kinds, terminating and non-terminating, depending on whether or not they terminate a token. The following are descriptions of each kind of syntax type.
85+
<GlossaryTerm term={"whitespace"}><i>Whitespace</i></GlossaryTerm><sub>2</sub> characters serve as separators but are otherwise ignored. <GlossaryTerm term={"constituent"}><i>Constituent</i></GlossaryTerm> and *escape characters* are accumulated to make a <GlossaryTerm term={"token"}><i>token</i></GlossaryTerm>, which is then interpreted as a <GlossaryTerm term={"number"}><i>number</i></GlossaryTerm> or <GlossaryTerm term={"symbol"}><i>symbol</i></GlossaryTerm>. <GlossaryTerm styled={true} term={"macro character"}><i>Macro characters</i></GlossaryTerm> trigger the invocation of <GlossaryTerm term={"function"}><i>functions</i></GlossaryTerm> (possibly user-supplied) that can perform arbitrary parsing actions. <GlossaryTerm styled={true} term={"macro character"}><i>Macro characters</i></GlossaryTerm> are divided into two kinds, <GlossaryTerm term={"terminating"}><i>terminating</i></GlossaryTerm> and *non* <GlossaryTerm term={"terminating"}><i>terminating</i></GlossaryTerm>, depending on whether or not they terminate a <GlossaryTerm term={"token"}><i>token</i></GlossaryTerm>. The following are descriptions of each kind of <GlossaryTerm styled={true} term={"syntax type"}><i>syntax type</i></GlossaryTerm>.
8086

81-
<br>
87+
<br />

0 commit comments

Comments
 (0)