Fix a few typos
This commit is contained in:
parent
6b664e0308
commit
418b05b8ff
|
@ -1,6 +1,6 @@
|
||||||
#lang racket
|
#lang racket
|
||||||
(list "O-Ren Ishii"
|
(list "O-Ren Ishii"
|
||||||
"Vernita Green"
|
"Vernita Green"
|
||||||
"Elle Driver"
|
|
||||||
"Budd"
|
"Budd"
|
||||||
|
"Elle Driver"
|
||||||
"Bill")
|
"Bill")
|
||||||
|
|
|
@ -36,7 +36,8 @@ languages and as module paths.
|
||||||
|
|
||||||
At the same time, the syntax of @racket[_language] is far more
|
At the same time, the syntax of @racket[_language] is far more
|
||||||
restricted than a module path, because only @litchar{a}-@litchar{z},
|
restricted than a module path, because only @litchar{a}-@litchar{z},
|
||||||
@litchar{A}-@litchar{Z}, @litchar{/} (not at the start or end),
|
@litchar{A}-@litchar{Z}, @litchar{0}-@litchar{9},
|
||||||
|
@litchar{/} (not at the start or end),
|
||||||
@litchar{_}, @litchar{-}, and @litchar{+} are allowed in a
|
@litchar{_}, @litchar{-}, and @litchar{+} are allowed in a
|
||||||
@racket[_language] name. These restrictions keep the syntax of
|
@racket[_language] name. These restrictions keep the syntax of
|
||||||
@hash-lang[] as simple as possible. Keeping the syntax of @hash-lang[]
|
@hash-lang[] as simple as possible. Keeping the syntax of @hash-lang[]
|
||||||
|
@ -374,7 +375,7 @@ directly with @exec{racket}, @filepath{kiddo.rkt} causes
|
||||||
format, without the leading quote:
|
format, without the leading quote:
|
||||||
|
|
||||||
@racketblock[
|
@racketblock[
|
||||||
@#,racketoutput{("O-Ren Ishii" "Vernita Green" "Elle Driver" "Budd" "Bill")}
|
@#,racketoutput{("O-Ren Ishii" "Vernita Green" "Budd" "Elle Driver" "Bill")}
|
||||||
]
|
]
|
||||||
|
|
||||||
The @filepath{kiddo.rkt} example illustrates how the format for
|
The @filepath{kiddo.rkt} example illustrates how the format for
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
Alan Perlis famously quipped ``Lisp programmers know the value of
|
Alan Perlis famously quipped ``Lisp programmers know the value of
|
||||||
everything and the cost of nothing.'' A Racket programmer knows, for
|
everything and the cost of nothing.'' A Racket programmer knows, for
|
||||||
example, that a @racket[lambda] anywhere in a program produces a value
|
example, that a @racket[lambda] anywhere in a program produces a value
|
||||||
that is closed over it lexical environment---but how much does
|
that is closed over its lexical environment---but how much does
|
||||||
allocating that value cost? While most programmers have a reasonable
|
allocating that value cost? While most programmers have a reasonable
|
||||||
grasp of the cost of various operations and data structures at the
|
grasp of the cost of various operations and data structures at the
|
||||||
machine level, the gap between the Racket language model and the
|
machine level, the gap between the Racket language model and the
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
The @tech{reader} layer of the Racket language can be extended through
|
The @tech{reader} layer of the Racket language can be extended through
|
||||||
the @racketmetafont{#reader} form. A reader extension is implemented
|
the @racketmetafont{#reader} form. A reader extension is implemented
|
||||||
as a module that is named after @racketmetafont{#rader}. The module
|
as a module that is named after @racketmetafont{#reader}. The module
|
||||||
exports functions that parse raw characters into a form to be consumed
|
exports functions that parse raw characters into a form to be consumed
|
||||||
by the @tech{expander} layer.
|
by the @tech{expander} layer.
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ to produce @tech{syntax objects}, and then @racketidfont{read} can use
|
||||||
@racketidfont{read-syntax} and strip away @tech{syntax object}
|
@racketidfont{read-syntax} and strip away @tech{syntax object}
|
||||||
wrappers to produce a raw result.
|
wrappers to produce a raw result.
|
||||||
|
|
||||||
The following @filepath{arith.rkt} module implements that reader to
|
The following @filepath{arith.rkt} module implements a reader to
|
||||||
parse simple infix arithmetic expressions into Racket forms. For
|
parse simple infix arithmetic expressions into Racket forms. For
|
||||||
example, @litchar{1*2+3} parses into the Racket form @racket[(+ (* 1
|
example, @litchar{1*2+3} parses into the Racket form @racket[(+ (* 1
|
||||||
2) 3)]. The supported operators are @litchar{+}, @litchar{-},
|
2) 3)]. The supported operators are @litchar{+}, @litchar{-},
|
||||||
|
|
|
@ -6198,7 +6198,7 @@ static Scheme_Object *read_lang(Scheme_Object *port,
|
||||||
buf[len++] = ch;
|
buf[len++] = ch;
|
||||||
} else {
|
} else {
|
||||||
scheme_read_err(port, stxsrc, line, col, pos, SPAN(port, pos), ch, indentation,
|
scheme_read_err(port, stxsrc, line, col, pos, SPAN(port, pos), ch, indentation,
|
||||||
"read: expected only alphanumberic, `-', `+', `_', or `/'"
|
"read: expected only alphanumeric, `-', `+', `_', or `/'"
|
||||||
" characters for `#%s', found %c",
|
" characters for `#%s', found %c",
|
||||||
init_ch ? "!" : "lang",
|
init_ch ? "!" : "lang",
|
||||||
ch);
|
ch);
|
||||||
|
@ -6212,7 +6212,7 @@ static Scheme_Object *read_lang(Scheme_Object *port,
|
||||||
scheme_read_err(port, stxsrc, line, col, pos, SPAN(port, pos), ch, indentation,
|
scheme_read_err(port, stxsrc, line, col, pos, SPAN(port, pos), ch, indentation,
|
||||||
(((ch == ' ') && !init_ch)
|
(((ch == ' ') && !init_ch)
|
||||||
? "read: expected a single space after `#lang'"
|
? "read: expected a single space after `#lang'"
|
||||||
: "read: expected a non-empty sequence of alphanumberic, `-', `+', `_', or `/' after `#%s'"),
|
: "read: expected a non-empty sequence of alphanumeric, `-', `+', `_', or `/' after `#%s'"),
|
||||||
init_ch ? "!" : "lang ");
|
init_ch ? "!" : "lang ");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user