Lots of minor edits -- mainly dropping unnecessary backslashes and
using @litchar with braces. svn: r11451
This commit is contained in:
parent
1cbf54d70a
commit
d26f27e140
|
@ -119,7 +119,7 @@ window to the interactions window (or the search window, if it is open).}
|
||||||
@keybinding["M-("]{wrap selection in parentheses}
|
@keybinding["M-("]{wrap selection in parentheses}
|
||||||
@keybinding["M-["]{wrap selection in square brackets}
|
@keybinding["M-["]{wrap selection in square brackets}
|
||||||
@keybinding["M-{"]{wrap selection in curly brackets}
|
@keybinding["M-{"]{wrap selection in curly brackets}
|
||||||
@keybinding["M-S-L"]{wrap selection in @litchar["(lambda\u20()\u20"]...@litchar{)}
|
@keybinding["M-S-L"]{wrap selection in @litchar{(lambda () }...@litchar{)}
|
||||||
and put the insertion point in the arglist of the lambda}
|
and put the insertion point in the arglist of the lambda}
|
||||||
|
|
||||||
@keybinding["C-c C-o"]{the sexpression following the
|
@keybinding["C-c C-o"]{the sexpression following the
|
||||||
|
|
|
@ -40,7 +40,7 @@ The preferences dialog consists of several panels.
|
||||||
@item{@onscreen{Square bracket}
|
@item{@onscreen{Square bracket}
|
||||||
|
|
||||||
This panel controls which keywords DrScheme uses to determine
|
This panel controls which keywords DrScheme uses to determine
|
||||||
when to rewrite @litchar["["] to @litchar["("]. For
|
when to rewrite @litchar{[} to @litchar{(}. For
|
||||||
@scheme[cond]-like keywords, the number in parenthesis indicates
|
@scheme[cond]-like keywords, the number in parenthesis indicates
|
||||||
how many sub-expressions are skipped before square brackets are
|
how many sub-expressions are skipped before square brackets are
|
||||||
started.
|
started.
|
||||||
|
@ -134,10 +134,10 @@ The preferences dialog consists of several panels.
|
||||||
the blinking caret is next to a parenthesis.}
|
the blinking caret is next to a parenthesis.}
|
||||||
|
|
||||||
@item{@PrefItem{Correct parens} --- If checked, the editor
|
@item{@PrefItem{Correct parens} --- If checked, the editor
|
||||||
automatically converts a typed @litchar[")"] to @litchar["]"] to
|
automatically converts a typed @litchar{)} to @litchar{]} to
|
||||||
match @litchar["["], or it converts a typed @litchar["]"] to
|
match @litchar{[}, or it converts a typed @litchar{]} to
|
||||||
@litchar[")"] to match @litchar["("]. Also, the editor changes
|
@litchar{)} to match @litchar{(}. Also, the editor changes
|
||||||
typed @litchar["["] to match the context (as explained in
|
typed @litchar{[} to match the context (as explained in
|
||||||
@secref["editor"]).}
|
@secref["editor"]).}
|
||||||
|
|
||||||
@item{@PrefItem{Flash paren match} --- If checked, typing a closing
|
@item{@PrefItem{Flash paren match} --- If checked, typing a closing
|
||||||
|
|
|
@ -21,26 +21,26 @@ Whether a programmer or a user, see @scheme[font-name-directory<%>] for
|
||||||
an overview of the font mapping system.
|
an overview of the font mapping system.
|
||||||
|
|
||||||
To find a font name for a family, MrEd looks for a preference name by
|
To find a font name for a family, MrEd looks for a preference name by
|
||||||
concatenating @litchar["MrEd:"], a @nonterm{dest}, a @nonterm{type},
|
concatenating @litchar{MrEd:}, a @nonterm{dest}, a @nonterm{type},
|
||||||
a @nonterm{weight}, and a @nonterm{style}, where
|
a @nonterm{weight}, and a @nonterm{style}, where
|
||||||
|
|
||||||
@itemize{
|
@itemize{
|
||||||
|
|
||||||
@item{@nonterm{dest} is either @litchar["Screen"] or @litchar["PostScript"].}
|
@item{@nonterm{dest} is either @litchar{Screen} or @litchar{PostScript}.}
|
||||||
|
|
||||||
@item{@nonterm{type} is either @litchar["Default"], @litchar["Decorative"], @litchar["Roman"], @litchar["Script"],
|
@item{@nonterm{type} is either @litchar{Default}, @litchar{Decorative}, @litchar{Roman}, @litchar{Script},
|
||||||
@litchar["Swiss"], @litchar["Modern"], @litchar["System"], or @litchar["Symbol"] for a mapping
|
@litchar{Swiss}, @litchar{Modern}, @litchar{System}, or @litchar{Symbol} for a mapping
|
||||||
defining the default font for a family. Otherwise, it is a
|
defining the default font for a family. Otherwise, it is a
|
||||||
face name prefixed with @litchar["@"].}
|
face name prefixed with @litchar["@"].}
|
||||||
|
|
||||||
@item{@nonterm{weight} is either @litchar["Medium"], @litchar["Bold"], or @litchar["Light"].}
|
@item{@nonterm{weight} is either @litchar{Medium}, @litchar{Bold}, or @litchar{Light}.}
|
||||||
|
|
||||||
@item{@nonterm{style} is either @litchar["Straight"], @litchar["Italic"], or @litchar["Slant"].}
|
@item{@nonterm{style} is either @litchar{Straight}, @litchar{Italic}, or @litchar{Slant}.}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Furthermore, any of the latter three parts can be wildcarded with
|
Furthermore, any of the latter three parts can be wildcarded with
|
||||||
@litchar["_"], as described below. The concatenated string is converted
|
@litchar{_}, as described below. The concatenated string is converted
|
||||||
to a symbol (preserving case), and the associated preference value
|
to a symbol (preserving case), and the associated preference value
|
||||||
must be a string.
|
must be a string.
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ Building items names by concatenating @nonterm{dest}, @nonterm{type},
|
||||||
preferences via a wildcarding search.
|
preferences via a wildcarding search.
|
||||||
|
|
||||||
The @nonterm{type}, @nonterm{weight}, and @nonterm{style} parts of a preference name
|
The @nonterm{type}, @nonterm{weight}, and @nonterm{style} parts of a preference name
|
||||||
can be wildcarded by using @litchar["_"]. Thus, to set the default font
|
can be wildcarded by using @litchar{_}. Thus, to set the default font
|
||||||
in X for all types, weights, and styles, use the following preference
|
in X for all types, weights, and styles, use the following preference
|
||||||
entry:
|
entry:
|
||||||
|
|
||||||
|
@ -101,15 +101,15 @@ Suppose we define the mapping for variants of @scheme["Default"], and
|
||||||
|
|
||||||
but the MrEd font-reading system provides a better syntax for
|
but the MrEd font-reading system provides a better syntax for
|
||||||
referencing another preference entry. When a preference value contains
|
referencing another preference entry. When a preference value contains
|
||||||
@litchar["${x}"], then the @litchar["${x}"] fragment is replaced by the
|
@litchar{${x}}, then the @litchar{${x}} fragment is replaced by the
|
||||||
preference value of @litchar["x"]. Thus, the above can be re-written:
|
preference value of @litchar{x}. Thus, the above can be re-written:
|
||||||
|
|
||||||
@schemeblock[
|
@schemeblock[
|
||||||
(|MrEd:ScreenDefault__| "+-*-*-medium-r-normal-*-*-%d-*-*-*-*-*-*")
|
(|MrEd:ScreenDefault__| "+-*-*-medium-r-normal-*-*-%d-*-*-*-*-*-*")
|
||||||
(|MrEd:ScreenRoman__| "${ScreenDefault__}")
|
(|MrEd:ScreenRoman__| "${ScreenDefault__}")
|
||||||
]
|
]
|
||||||
|
|
||||||
A mini-language of @litchar["${x}"] is used within the string (instead
|
A mini-language of @litchar{${x}} is used within the string (instead
|
||||||
of an S-expression format) for historical reasons.
|
of an S-expression format) for historical reasons.
|
||||||
|
|
||||||
@; ------------------------------------------------------------------------
|
@; ------------------------------------------------------------------------
|
||||||
|
@ -118,9 +118,9 @@ A mini-language of @litchar["${x}"] is used within the string (instead
|
||||||
|
|
||||||
Variables can be used with referencing to configure default values
|
Variables can be used with referencing to configure default values
|
||||||
based on the weight and style that is needed. When a preference
|
based on the weight and style that is needed. When a preference
|
||||||
value contains @litchar["$[weight]"], then @litchar["$[weight]"] is
|
value contains @litchar{$[weight]}, then @litchar{$[weight]} is
|
||||||
replaced with a string for the desired font weight. Similarly,
|
replaced with a string for the desired font weight. Similarly,
|
||||||
@litchar["$[style]"] is replaced with the desired style. Variable
|
@litchar{$[style]} is replaced with the desired style. Variable
|
||||||
expressions can be embedded within referencing expressions, as in the
|
expressions can be embedded within referencing expressions, as in the
|
||||||
following example:
|
following example:
|
||||||
|
|
||||||
|
@ -134,10 +134,10 @@ Variables can be used with referencing to configure default values
|
||||||
|
|
||||||
Now, when the @Resource{ScreenDefault__} value is used for different
|
Now, when the @Resource{ScreenDefault__} value is used for different
|
||||||
weights, it will return different values; the
|
weights, it will return different values; the
|
||||||
@litchar["${Def$[weight]}"] expression will turn into
|
@litchar{${Def$[weight]}} expression will turn into
|
||||||
@litchar["${DefMedium}"] for a medium-weight lookup, or
|
@litchar{${DefMedium}} for a medium-weight lookup, or
|
||||||
@litchar["${DefBold}"] for a bold-weight lookup. These references
|
@litchar{${DefBold}} for a bold-weight lookup. These references
|
||||||
will in turn give either @litchar["medium"] or @litchar["bold"].
|
will in turn give either @litchar{medium} or @litchar{bold}.
|
||||||
|
|
||||||
@; ------------------------------------------------------------------------
|
@; ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -163,11 +163,11 @@ The effect of this statement is probably not what was intended; when a
|
||||||
(|MrEd:ScreenRoman__| "${ScreenDefault$[weight]_}")
|
(|MrEd:ScreenRoman__| "${ScreenDefault$[weight]_}")
|
||||||
]
|
]
|
||||||
|
|
||||||
but this does not work either. It works fine for bold @litchar["Roman"],
|
but this does not work either. It works fine for bold @litchar{Roman},
|
||||||
now, but medium @litchar["Roman"] will cause a reference to the
|
now, but medium @litchar{Roman} will cause a reference to the
|
||||||
@Resource{ScreenDefaultMedium_}, which doesn't exist. The problem is
|
@Resource{ScreenDefaultMedium_}, which doesn't exist. The problem is
|
||||||
that our reference does not use wildcarding like the original medium
|
that our reference does not use wildcarding like the original medium
|
||||||
@litchar["Roman"] lookup did.
|
@litchar{Roman} lookup did.
|
||||||
|
|
||||||
Wildcarding can be specified in a reference by separating each
|
Wildcarding can be specified in a reference by separating each
|
||||||
wildcardable field with a comma. The following preference specification
|
wildcardable field with a comma. The following preference specification
|
||||||
|
@ -179,9 +179,9 @@ Wildcarding can be specified in a reference by separating each
|
||||||
(|MrEd:ScreenRoman__| "${ScreenDefault,$[weight],_}")
|
(|MrEd:ScreenRoman__| "${ScreenDefault,$[weight],_}")
|
||||||
]
|
]
|
||||||
|
|
||||||
Since @litchar["$[weight]"] is between commas, it can be wildcarded if
|
Since @litchar{$[weight]} is between commas, it can be wildcarded if
|
||||||
no name exactly matching @litchar["SchemeDefault$[weight]_"] is
|
no name exactly matching @litchar{SchemeDefault$[weight]_} is
|
||||||
found. In this case @litchar["SchemeDefault"] and @litchar["_"] can
|
found. In this case @litchar{SchemeDefault} and @litchar{_} can
|
||||||
also be wildcarded, but this will have no effect.
|
also be wildcarded, but this will have no effect.
|
||||||
|
|
||||||
The wildcarding used in references need not reflect the wildcarding
|
The wildcarding used in references need not reflect the wildcarding
|
||||||
|
|
|
@ -60,30 +60,30 @@ Under Windows and Mac OS X, a face name is interpreted simply as a
|
||||||
first available font is used to draw text, and later fonts are
|
first available font is used to draw text, and later fonts are
|
||||||
substituted for missing characters in earlier fonts.}
|
substituted for missing characters in earlier fonts.}
|
||||||
|
|
||||||
@item{If the string begins with @litchar["+"], then the remainder of the
|
@item{If the string begins with @litchar{+}, then the remainder of the
|
||||||
string is interpreted as an X font name. These names are
|
string is interpreted as an X font name. These names are
|
||||||
usually long, such as
|
usually long, such as
|
||||||
@litchar["+-b&h-lucidatypewriter-medium-r-normal-sans-24-240-75-75-m-140-iso8859-1"].
|
@litchar{+-b&h-lucidatypewriter-medium-r-normal-sans-24-240-75-75-m-140-iso8859-1}.
|
||||||
As usual for X font names, asterisks may appear in the string
|
As usual for X font names, asterisks may appear in the string
|
||||||
as wildcards. Furthermore, the size of the font can be
|
as wildcards. Furthermore, the size of the font can be
|
||||||
parameterized by using @litchar["%d"] in the place of a specific
|
parameterized by using @litchar{%d} in the place of a specific
|
||||||
point size; if an asterisk appears in place of the pixel size,
|
point size; if an asterisk appears in place of the pixel size,
|
||||||
the asterisk and @litchar["%d"] are swapped when the font size is
|
the asterisk and @litchar{%d} are swapped when the font size is
|
||||||
specified in pixels (otherwise the size is always interpreted
|
specified in pixels (otherwise the size is always interpreted
|
||||||
as points). For rotated text, @litchar["%d"] will be replaced by
|
as points). For rotated text, @litchar{%d} will be replaced by
|
||||||
a transformation matrix.}
|
a transformation matrix.}
|
||||||
|
|
||||||
@item{A string of the form
|
@item{A string of the form
|
||||||
@litchar["-"]@nonterm{provider}@litchar{-}@nonterm{font} is
|
@litchar{-}@nonterm{provider}@litchar{-}@nonterm{font} is
|
||||||
equivalent to
|
equivalent to
|
||||||
@litchar["+-"]@nonterm{provider}@litchar{-}@nonterm{font}@litchar{-}@nonterm{weight}@litchar{-}@nonterm{style}@litchar{-normal-*-*-%d-*-*-*-*-*-*},
|
@litchar{+-}@nonterm{provider}@litchar{-}@nonterm{font}@litchar{-}@nonterm{weight}@litchar{-}@nonterm{style}@litchar{-normal-*-*-%d-*-*-*-*-*-*},
|
||||||
where @nonterm{weight} is either @litchar{medium},
|
where @nonterm{weight} is either @litchar{medium},
|
||||||
@litchar{light}, or @litchar{bold} (depending on the requested
|
@litchar{light}, or @litchar{bold} (depending on the requested
|
||||||
weight mapping) and @nonterm{style} is either @litchar{r},
|
weight mapping) and @nonterm{style} is either @litchar{r},
|
||||||
@litchar{i}, or @litchar{i} (depending on the requested style
|
@litchar{i}, or @litchar{i} (depending on the requested style
|
||||||
mapping).}
|
mapping).}
|
||||||
|
|
||||||
@item{A string of the form @litchar["-"]@nonterm{font} is
|
@item{A string of the form @litchar{-}@nonterm{font} is
|
||||||
equivalent to @litchar{-*-}@nonterm{font}.}
|
equivalent to @litchar{-*-}@nonterm{font}.}
|
||||||
|
|
||||||
@item{A string of any other format is interpreted as an X font name,
|
@item{A string of any other format is interpreted as an X font name,
|
||||||
|
|
|
@ -192,93 +192,93 @@ If a particular modifier is not mentioned in a state string, it
|
||||||
pressed.
|
pressed.
|
||||||
|
|
||||||
A key identifier can be either a character on the keyboard (e.g.,
|
A key identifier can be either a character on the keyboard (e.g.,
|
||||||
@litchar["a"], @litchar["2"], @litchar["?"]) or a special name. The
|
@litchar{a}, @litchar{2}, @litchar{?}) or a special name. The
|
||||||
special names are as follows:
|
special names are as follows:
|
||||||
|
|
||||||
@itemize{
|
@itemize{
|
||||||
@item{@litchar["leftbutton"] (button down)}
|
@item{@litchar{leftbutton} (button down)}
|
||||||
@item{@litchar["rightbutton"]}
|
@item{@litchar{rightbutton}}
|
||||||
@item{@litchar["middlebutton"]}
|
@item{@litchar{middlebutton}}
|
||||||
@item{@litchar["leftbuttondouble"] (button down for double-click)}
|
@item{@litchar{leftbuttondouble} (button down for double-click)}
|
||||||
@item{@litchar["rightbuttondouble"]}
|
@item{@litchar{rightbuttondouble}}
|
||||||
@item{@litchar["middlebuttondouble"]}
|
@item{@litchar{middlebuttondouble}}
|
||||||
@item{@litchar["leftbuttontriple"] (button down for triple-click)}
|
@item{@litchar{leftbuttontriple} (button down for triple-click)}
|
||||||
@item{@litchar["rightbuttontriple"]}
|
@item{@litchar{rightbuttontriple}}
|
||||||
@item{@litchar["middlebuttontriple"]}
|
@item{@litchar{middlebuttontriple}}
|
||||||
@item{@litchar["leftbuttonseq"] (all events from button down through button up)}
|
@item{@litchar{leftbuttonseq} (all events from button down through button up)}
|
||||||
@item{@litchar["rightbuttonseq"]}
|
@item{@litchar{rightbuttonseq}}
|
||||||
@item{@litchar["middlebuttonseq"]}
|
@item{@litchar{middlebuttonseq}}
|
||||||
@item{@litchar["wheelup"]}
|
@item{@litchar{wheelup}}
|
||||||
@item{@litchar["wheeldown"]}
|
@item{@litchar{wheeldown}}
|
||||||
@item{@litchar["esc"]}
|
@item{@litchar{esc}}
|
||||||
@item{@litchar["delete"]}
|
@item{@litchar{delete}}
|
||||||
@item{@litchar["del"] (same as @litchar["delete"])}
|
@item{@litchar{del} (same as @litchar{delete})}
|
||||||
@item{@litchar["insert"]}
|
@item{@litchar{insert}}
|
||||||
@item{@litchar["ins"] (same as @litchar["insert"])}
|
@item{@litchar{ins} (same as @litchar{insert})}
|
||||||
@item{@litchar["add"]}
|
@item{@litchar{add}}
|
||||||
@item{@litchar["subtract"]}
|
@item{@litchar{subtract}}
|
||||||
@item{@litchar["multiply"]}
|
@item{@litchar{multiply}}
|
||||||
@item{@litchar["divide"]}
|
@item{@litchar{divide}}
|
||||||
@item{@litchar["backspace"]}
|
@item{@litchar{backspace}}
|
||||||
@item{@litchar["back"]}
|
@item{@litchar{back}}
|
||||||
@item{@litchar["return"]}
|
@item{@litchar{return}}
|
||||||
@item{@litchar["enter"] (same as @litchar["return"])}
|
@item{@litchar{enter} (same as @litchar{return})}
|
||||||
@item{@litchar["tab"]}
|
@item{@litchar{tab}}
|
||||||
@item{@litchar["space"]}
|
@item{@litchar{space}}
|
||||||
@item{@litchar["right"]}
|
@item{@litchar{right}}
|
||||||
@item{@litchar["left"]}
|
@item{@litchar{left}}
|
||||||
@item{@litchar["up"]}
|
@item{@litchar{up}}
|
||||||
@item{@litchar["down"]}
|
@item{@litchar{down}}
|
||||||
@item{@litchar["home"]}
|
@item{@litchar{home}}
|
||||||
@item{@litchar["end"]}
|
@item{@litchar{end}}
|
||||||
@item{@litchar["pageup"]}
|
@item{@litchar{pageup}}
|
||||||
@item{@litchar["pagedown"]}
|
@item{@litchar{pagedown}}
|
||||||
@item{@litchar["semicolon"] (since @litchar{;} separates sequence steps)}
|
@item{@litchar{semicolon} (since @litchar{;} separates sequence steps)}
|
||||||
@item{@litchar["colon"] (since @litchar{:} separates modifiers)}
|
@item{@litchar{colon} (since @litchar{:} separates modifiers)}
|
||||||
@item{@litchar["numpad0"]}
|
@item{@litchar{numpad0}}
|
||||||
@item{@litchar["numpad1"]}
|
@item{@litchar{numpad1}}
|
||||||
@item{@litchar["numpad2"]}
|
@item{@litchar{numpad2}}
|
||||||
@item{@litchar["numpad3"]}
|
@item{@litchar{numpad3}}
|
||||||
@item{@litchar["numpad4"]}
|
@item{@litchar{numpad4}}
|
||||||
@item{@litchar["numpad5"]}
|
@item{@litchar{numpad5}}
|
||||||
@item{@litchar["numpad6"]}
|
@item{@litchar{numpad6}}
|
||||||
@item{@litchar["numpad7"]}
|
@item{@litchar{numpad7}}
|
||||||
@item{@litchar["numpad8"]}
|
@item{@litchar{numpad8}}
|
||||||
@item{@litchar["numpad9"]}
|
@item{@litchar{numpad9}}
|
||||||
@item{@litchar["numpadenter"]}
|
@item{@litchar{numpadenter}}
|
||||||
@item{@litchar["f1"]}
|
@item{@litchar{f1}}
|
||||||
@item{@litchar["f2"]}
|
@item{@litchar{f2}}
|
||||||
@item{@litchar["f3"]}
|
@item{@litchar{f3}}
|
||||||
@item{@litchar["f4"]}
|
@item{@litchar{f4}}
|
||||||
@item{@litchar["f5"]}
|
@item{@litchar{f5}}
|
||||||
@item{@litchar["f6"]}
|
@item{@litchar{f6}}
|
||||||
@item{@litchar["f7"]}
|
@item{@litchar{f7}}
|
||||||
@item{@litchar["f8"]}
|
@item{@litchar{f8}}
|
||||||
@item{@litchar["f9"]}
|
@item{@litchar{f9}}
|
||||||
@item{@litchar["f10"]}
|
@item{@litchar{f10}}
|
||||||
@item{@litchar["f11"]}
|
@item{@litchar{f11}}
|
||||||
@item{@litchar["f12"]}
|
@item{@litchar{f12}}
|
||||||
@item{@litchar["f13"]}
|
@item{@litchar{f13}}
|
||||||
@item{@litchar["f14"]}
|
@item{@litchar{f14}}
|
||||||
@item{@litchar["f15"]}
|
@item{@litchar{f15}}
|
||||||
@item{@litchar["f16"]}
|
@item{@litchar{f16}}
|
||||||
@item{@litchar["f17"]}
|
@item{@litchar{f17}}
|
||||||
@item{@litchar["f18"]}
|
@item{@litchar{f18}}
|
||||||
@item{@litchar["f19"]}
|
@item{@litchar{f19}}
|
||||||
@item{@litchar["f20"]}
|
@item{@litchar{f20}}
|
||||||
@item{@litchar["f21"]}
|
@item{@litchar{f21}}
|
||||||
@item{@litchar["f22"]}
|
@item{@litchar{f22}}
|
||||||
@item{@litchar["f23"]}
|
@item{@litchar{f23}}
|
||||||
@item{@litchar["f24"]}
|
@item{@litchar{f24}}
|
||||||
}
|
}
|
||||||
|
|
||||||
For a special keyword, the capitalization does not matter. However,
|
For a special keyword, the capitalization does not matter. However,
|
||||||
capitalization is important for single-letter keynames. Furthermore,
|
capitalization is important for single-letter keynames. Furthermore,
|
||||||
single-letter ASCII keynames are treated specially: @litchar["A"] and
|
single-letter ASCII keynames are treated specially: @litchar{A} and
|
||||||
@litchar["s:a"] are both treated as @litchar["s:A"]. However, when
|
@litchar{s:a} are both treated as @litchar{s:A}. However, when
|
||||||
@litchar["c:"] is included under Windows without @litchar["m:"], or when
|
@litchar{c:} is included under Windows without @litchar{m:}, or when
|
||||||
@litchar["d:"] is included under Mac OS X, then ASCII letters are not
|
@litchar{d:} is included under Mac OS X, then ASCII letters are not
|
||||||
upcased with @litchar["s:"], since the upcasing behavior of the Shift key
|
upcased with @litchar{s:}, since the upcasing behavior of the Shift key
|
||||||
is cancelled by Control without Alt (under Windows) or by Command
|
is cancelled by Control without Alt (under Windows) or by Command
|
||||||
(under Mac OS X).
|
(under Mac OS X).
|
||||||
|
|
||||||
|
|
|
@ -9,11 +9,11 @@ A @deftech{string} is a fixed-length array of
|
||||||
@seclink["characters"]{characters}. It prints using doublequotes,
|
@seclink["characters"]{characters}. It prints using doublequotes,
|
||||||
where doublequote and backslash characters within the string are
|
where doublequote and backslash characters within the string are
|
||||||
escaped with backslashes. Other common string escapes are supported,
|
escaped with backslashes. Other common string escapes are supported,
|
||||||
including @litchar["\\n"] for a linefeed, @litchar["\\r"] for a
|
including @litchar{\n} for a linefeed, @litchar{\r} for a
|
||||||
carriage return, octal escapes using @litchar["\\"] followed by up
|
carriage return, octal escapes using @litchar{\} followed by up
|
||||||
to three octal digits, and hexadecimal escapes with @litchar["\\u"]
|
to three octal digits, and hexadecimal escapes with @litchar{\u}
|
||||||
(up to four digits). Unprintable characters in a string are normally
|
(up to four digits). Unprintable characters in a string are normally
|
||||||
shown with @litchar["\\u"] when the string is printed.
|
shown with @litchar{\u} when the string is printed.
|
||||||
|
|
||||||
@refdetails/gory["parse-string"]{the syntax of strings}
|
@refdetails/gory["parse-string"]{the syntax of strings}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ character datatype is separate from numbers. The
|
||||||
@scheme[char->integer] and @scheme[integer->char] procedures convert
|
@scheme[char->integer] and @scheme[integer->char] procedures convert
|
||||||
between scalar-value numbers and the corresponding character.
|
between scalar-value numbers and the corresponding character.
|
||||||
|
|
||||||
A printable character normally prints as @litchar["#\\"] followed
|
A printable character normally prints as @litchar{#\} followed
|
||||||
by the represented character. An unprintable character normally prints
|
by the represented character. An unprintable character normally prints
|
||||||
as @litchar{#\u} followed by the scalar value as hexadecimal
|
as @litchar{#\u} followed by the scalar value as hexadecimal
|
||||||
number. A few characters are printed specially; for example, the space
|
number. A few characters are printed specially; for example, the space
|
||||||
|
|
|
@ -276,9 +276,9 @@ The @tech{metacharacter} @litchar{.} matches @emph{any} character
|
||||||
(regexp-match #rx"p.t" "pet")
|
(regexp-match #rx"p.t" "pet")
|
||||||
]
|
]
|
||||||
|
|
||||||
The above pattern also matches @litchar["pat"], @litchar["pit"],
|
The above pattern also matches @litchar{pat}, @litchar{pit},
|
||||||
@litchar["pot"], @litchar["put"], and @litchar["p8t"], but not
|
@litchar{pot}, @litchar{put}, and @litchar{p8t}, but not
|
||||||
@litchar["peat"] or @litchar["pfffft"].
|
@litchar{peat} or @litchar{pfffft}.
|
||||||
|
|
||||||
A @deftech{character class} matches any one character from a set of
|
A @deftech{character class} matches any one character from a set of
|
||||||
characters. A typical format for this is the @deftech{bracketed
|
characters. A typical format for this is the @deftech{bracketed
|
||||||
|
@ -450,8 +450,8 @@ finer-tuned quantification than is possible with @litchar{*},
|
||||||
]
|
]
|
||||||
|
|
||||||
It is evident that @litchar{+} and @litchar{?} are abbreviations for
|
It is evident that @litchar{+} and @litchar{?} are abbreviations for
|
||||||
@litchar["{1,}"] and @litchar["{0,1}"] respectively, and @litchar{*}
|
@litchar{{1,}} and @litchar{{0,1}} respectively, and @litchar{*}
|
||||||
abbreviates @litchar["{,}"], which is the same as @litchar["{0,}"].
|
abbreviates @litchar{{,}}, which is the same as @litchar{{0,}}.
|
||||||
|
|
||||||
@interaction[
|
@interaction[
|
||||||
(regexp-match #px"[aeiou]{3}" "vacuous")
|
(regexp-match #px"[aeiou]{3}" "vacuous")
|
||||||
|
|
|
@ -181,7 +181,7 @@ special characters
|
||||||
@hspace[2] @litchar{(} @litchar{)} @litchar{[} @litchar{]}
|
@hspace[2] @litchar{(} @litchar{)} @litchar{[} @litchar{]}
|
||||||
@litchar["{"] @litchar["}"]
|
@litchar["{"] @litchar["}"]
|
||||||
@litchar{"} @litchar{,} @litchar{'} @litchar{`}
|
@litchar{"} @litchar{,} @litchar{'} @litchar{`}
|
||||||
@litchar{;} @litchar{#} @litchar["|"] @litchar["\\"]
|
@litchar{;} @litchar{#} @litchar{|} @litchar{\}
|
||||||
}
|
}
|
||||||
|
|
||||||
and except for the sequences of characters that make number constants,
|
and except for the sequences of characters that make number constants,
|
||||||
|
|
|
@ -42,7 +42,7 @@ whitespace and the following special characters:
|
||||||
@hspace[2] @litchar{(} @litchar{)} @litchar{[} @litchar{]}
|
@hspace[2] @litchar{(} @litchar{)} @litchar{[} @litchar{]}
|
||||||
@litchar["{"] @litchar["}"]
|
@litchar["{"] @litchar["}"]
|
||||||
@litchar{"} @litchar{,} @litchar{'} @litchar{`}
|
@litchar{"} @litchar{,} @litchar{'} @litchar{`}
|
||||||
@litchar{;} @litchar{#} @litchar["|"] @litchar["\\"]
|
@litchar{;} @litchar{#} @litchar{|} @litchar{\}
|
||||||
}
|
}
|
||||||
|
|
||||||
Actually, @litchar{#} is disallowed only at the beginning of a symbol,
|
Actually, @litchar{#} is disallowed only at the beginning of a symbol,
|
||||||
|
@ -50,7 +50,7 @@ and then only if not followed by @litchar{%}; otherwise, @litchar{#} is
|
||||||
allowed, too. Also, @litchar{.} by itself is not a symbol.
|
allowed, too. Also, @litchar{.} by itself is not a symbol.
|
||||||
|
|
||||||
Whitespace or special characters can be included in an identifier by
|
Whitespace or special characters can be included in an identifier by
|
||||||
quoting them with @litchar["|"] or @litchar["\\"]. These quoting
|
quoting them with @litchar{|} or @litchar{\}. These quoting
|
||||||
mechanisms are used in the printed form of identifiers that contain
|
mechanisms are used in the printed form of identifiers that contain
|
||||||
special characters or that might otherwise look like numbers.
|
special characters or that might otherwise look like numbers.
|
||||||
|
|
||||||
|
|
|
@ -130,11 +130,11 @@ obvious Scheme character.
|
||||||
|
|
||||||
@subsection[#:tag "honu:parens"]{Parentheses, Brackets, and Braces}
|
@subsection[#:tag "honu:parens"]{Parentheses, Brackets, and Braces}
|
||||||
|
|
||||||
A H-expression between @litchar{(} and @litchar{)}, @litchar["["] and
|
A H-expression between @litchar{(} and @litchar{)}, @litchar{[} and
|
||||||
@litchar["]"], or @litchar["{"] and @litchar["}"] is represented by a
|
@litchar{]}, or @litchar["{"] and @litchar["}"] is represented by a
|
||||||
Scheme list. The first element of the list is @scheme['#%parens] for a
|
Scheme list. The first element of the list is @scheme['#%parens] for a
|
||||||
@litchar{(}...@litchar{)} sequence, @scheme['#%brackets] for a
|
@litchar{(}...@litchar{)} sequence, @scheme['#%brackets] for a
|
||||||
@litchar["["]...@litchar["]"] sequence, or @scheme['#%braces] for a
|
@litchar{[}...@litchar{]} sequence, or @scheme['#%braces] for a
|
||||||
@litchar["{"]...@litchar["}"] sequence. The remaining elements are the
|
@litchar["{"]...@litchar["}"] sequence. The remaining elements are the
|
||||||
Scheme representations for the grouped H-expressions in order.
|
Scheme representations for the grouped H-expressions in order.
|
||||||
|
|
||||||
|
|
|
@ -365,7 +365,7 @@ by @scheme[path]. If @scheme[path] is omitted, a list of files and
|
||||||
directories in the current directory is returned. Under @|AllUnix|, an
|
directories in the current directory is returned. Under @|AllUnix|, an
|
||||||
element of the list can start with @litchar{./~} if it would otherwise
|
element of the list can start with @litchar{./~} if it would otherwise
|
||||||
start with @litchar{~}. Under Windows, an element of the list may
|
start with @litchar{~}. Under Windows, an element of the list may
|
||||||
start with @litchar["\\\\?\\REL\\\\"].}
|
start with @litchar{\\?\REL\\}.}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(filesystem-root-list) (listof path?)]{
|
@defproc[(filesystem-root-list) (listof path?)]{
|
||||||
|
|
|
@ -360,7 +360,7 @@ of the current user.}
|
||||||
Eliminates redundant path separators (except for a single trailing
|
Eliminates redundant path separators (except for a single trailing
|
||||||
separator), up-directory @litchar{..}, and same-directory @litchar{.}
|
separator), up-directory @litchar{..}, and same-directory @litchar{.}
|
||||||
indicators in @scheme[path], and changes @litchar{/} separators to
|
indicators in @scheme[path], and changes @litchar{/} separators to
|
||||||
@litchar["\\"] separators in Windows paths, such that the result
|
@litchar{\} separators in Windows paths, such that the result
|
||||||
accesses the same file or directory (if it exists) as @scheme[path].
|
accesses the same file or directory (if it exists) as @scheme[path].
|
||||||
|
|
||||||
In general, the pathname is normalized as much as possible --- without
|
In general, the pathname is normalized as much as possible --- without
|
||||||
|
@ -405,11 +405,11 @@ information on simplifying Windows paths.}
|
||||||
Returns @scheme[path] with ``normalized'' case letters. For @|AllUnix|
|
Returns @scheme[path] with ``normalized'' case letters. For @|AllUnix|
|
||||||
paths, this procedure always returns the input path, because
|
paths, this procedure always returns the input path, because
|
||||||
filesystems for these platforms can be case-sensitive. For Windows
|
filesystems for these platforms can be case-sensitive. For Windows
|
||||||
paths, if @scheme[path] does not start @litchar["\\\\?\\"], the
|
paths, if @scheme[path] does not start @litchar{\\?\}, the
|
||||||
resulting string uses only lowercase letters, based on the current
|
resulting string uses only lowercase letters, based on the current
|
||||||
locale. In addition, for Windows paths when the path does not start
|
locale. In addition, for Windows paths when the path does not start
|
||||||
@litchar["\\\\?\\"], all @litchar{/}s are converted to
|
@litchar{\\?\}, all @litchar{/}s are converted to
|
||||||
@litchar["\\"]s, and trailing spaces and @litchar{.}s are removed.
|
@litchar{\}s, and trailing spaces and @litchar{.}s are removed.
|
||||||
|
|
||||||
The @scheme[path] argument can be a path for any platform, but beware
|
The @scheme[path] argument can be a path for any platform, but beware
|
||||||
that local-sensitive decoding and conversion of the path may be
|
that local-sensitive decoding and conversion of the path may be
|
||||||
|
|
|
@ -31,18 +31,18 @@ stream.
|
||||||
@section[#:tag "print-symbol"]{Printing Symbols}
|
@section[#:tag "print-symbol"]{Printing Symbols}
|
||||||
|
|
||||||
Symbols containing spaces or special characters @scheme[write] using
|
Symbols containing spaces or special characters @scheme[write] using
|
||||||
escaping @litchar["\\"] and quoting @litchar{|}s. When the
|
escaping @litchar{\} and quoting @litchar{|}s. When the
|
||||||
@scheme[read-case-sensitive] parameter is set to @scheme[#f], then
|
@scheme[read-case-sensitive] parameter is set to @scheme[#f], then
|
||||||
symbols containing uppercase characters also use escaping escaping
|
symbols containing uppercase characters also use escaping escaping
|
||||||
@litchar["\\"] and quoting @litchar{|}s. In addition, symbols are
|
@litchar{\} and quoting @litchar{|}s. In addition, symbols are
|
||||||
quoted with @litchar{|}s or leading @litchar["\\"] when they would
|
quoted with @litchar{|}s or leading @litchar{\} when they would
|
||||||
otherwise print the same as a numerical constant or as a delimited
|
otherwise print the same as a numerical constant or as a delimited
|
||||||
@scheme{.} (when @scheme[read-accept-dot] is @scheme[#t]).
|
@scheme{.} (when @scheme[read-accept-dot] is @scheme[#t]).
|
||||||
|
|
||||||
When @scheme[read-accept-bar-quote] is @scheme[#t], @litchar{|}s are
|
When @scheme[read-accept-bar-quote] is @scheme[#t], @litchar{|}s are
|
||||||
used in printing when one @litchar{|} at the beginning and one
|
used in printing when one @litchar{|} at the beginning and one
|
||||||
@litchar{|} at the end suffices to correctly print the
|
@litchar{|} at the end suffices to correctly print the
|
||||||
symbol. Otherwise, @litchar["\\"]s are always used to escape special
|
symbol. Otherwise, @litchar{\}s are always used to escape special
|
||||||
characters, instead of quoting them with @litchar{|}s.
|
characters, instead of quoting them with @litchar{|}s.
|
||||||
|
|
||||||
When @scheme[read-accept-bar-quote] is @scheme[#f], then @litchar{|}
|
When @scheme[read-accept-bar-quote] is @scheme[#f], then @litchar{|}
|
||||||
|
@ -51,7 +51,7 @@ special characters:
|
||||||
|
|
||||||
@t{
|
@t{
|
||||||
@hspace[2] @litchar{(} @litchar{)} @litchar{[} @litchar{]}
|
@hspace[2] @litchar{(} @litchar{)} @litchar{[} @litchar{]}
|
||||||
@litchar["["] @litchar["]"]
|
@litchar{[} @litchar{]}
|
||||||
@litchar{"} @litchar{,} @litchar{'} @litchar{`}
|
@litchar{"} @litchar{,} @litchar{'} @litchar{`}
|
||||||
@litchar{;} @litchar{\}
|
@litchar{;} @litchar{\}
|
||||||
}
|
}
|
||||||
|
@ -122,15 +122,15 @@ The printed form of a pair is the same in both @scheme[write] and
|
||||||
|
|
||||||
By default, mutable pairs (as created with @scheme[mcons]) print the
|
By default, mutable pairs (as created with @scheme[mcons]) print the
|
||||||
same as pairs, except that @litchar["{"] and @litchar["}"] are used
|
same as pairs, except that @litchar["{"] and @litchar["}"] are used
|
||||||
instead of @litchar["("] and @litchar[")"]. Note that the reader
|
instead of @litchar{(} and @litchar{)}. Note that the reader
|
||||||
treats @litchar["{"]...@litchar["}"] and @litchar["("]...@litchar[")"]
|
treats @litchar["{"]...@litchar["}"] and @litchar{(}...@litchar{)}
|
||||||
equivalently on input, creating immutable pairs in both cases.
|
equivalently on input, creating immutable pairs in both cases.
|
||||||
|
|
||||||
If the @scheme[print-pair-curly-braces] parameter is set to
|
If the @scheme[print-pair-curly-braces] parameter is set to
|
||||||
@scheme[#t], then immutable pairs print using @litchar["{"] and
|
@scheme[#t], then immutable pairs print using @litchar["{"] and
|
||||||
@litchar["}"]. If the @scheme[print-mpair-curly-braces] parameter is
|
@litchar["}"]. If the @scheme[print-mpair-curly-braces] parameter is
|
||||||
set to @scheme[#f], then mutable pairs print using @litchar["("] and
|
set to @scheme[#f], then mutable pairs print using @litchar{(} and
|
||||||
@litchar[")"].
|
@litchar{)}.
|
||||||
|
|
||||||
@section{Printing Strings}
|
@section{Printing Strings}
|
||||||
|
|
||||||
|
|
|
@ -114,8 +114,8 @@ producing @scheme['hi] when the input is any one of \litchar{hi},
|
||||||
affects the way that @scheme[write] prints symbols containing
|
affects the way that @scheme[write] prints symbols containing
|
||||||
uppercase characters; if the parameter's value is @scheme[#f], then
|
uppercase characters; if the parameter's value is @scheme[#f], then
|
||||||
symbols are printed with uppercase characters quoted by a
|
symbols are printed with uppercase characters quoted by a
|
||||||
@litchar["\\"] or @litchar["|"]. The parameter's value is overridden by
|
@litchar{\} or @litchar{|}. The parameter's value is overridden by
|
||||||
quoting @litchar["\\"] or @litchar["|"] vertical-bar quotes and the
|
quoting @litchar{\} or @litchar{|} vertical-bar quotes and the
|
||||||
@litchar{#cs} and @litchar{#ci} prefixes; see
|
@litchar{#cs} and @litchar{#ci} prefixes; see
|
||||||
@secref["parse-symbol"] for more information. While a module is
|
@secref["parse-symbol"] for more information. While a module is
|
||||||
loaded, the parameter is set to @scheme[#t] (see
|
loaded, the parameter is set to @scheme[#t] (see
|
||||||
|
@ -123,7 +123,7 @@ loaded, the parameter is set to @scheme[#t] (see
|
||||||
|
|
||||||
@defboolparam[read-square-bracket-as-paren on?]{
|
@defboolparam[read-square-bracket-as-paren on?]{
|
||||||
|
|
||||||
A parameter that controls whether @litchar["["] and @litchar["]"]
|
A parameter that controls whether @litchar{[} and @litchar{]}
|
||||||
are treated as parentheses. See @secref["parse-pair"] for more
|
are treated as parentheses. See @secref["parse-pair"] for more
|
||||||
information.}
|
information.}
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ information.}
|
||||||
|
|
||||||
@defboolparam[read-accept-bar-quote on?]{
|
@defboolparam[read-accept-bar-quote on?]{
|
||||||
|
|
||||||
A parameter that controls parsing and printing of @litchar["|"] in
|
A parameter that controls parsing and printing of @litchar{|} in
|
||||||
symbols. See @secref["parse-symbol"] and @secref["printing"] for
|
symbols. See @secref["parse-symbol"] and @secref["printing"] for
|
||||||
more information.}
|
more information.}
|
||||||
|
|
||||||
|
|
|
@ -63,14 +63,14 @@ characters play special roles:
|
||||||
delimited sequence; its meaning depends on the characters that
|
delimited sequence; its meaning depends on the characters that
|
||||||
follow; see below.}
|
follow; see below.}
|
||||||
|
|
||||||
@item{@as-index{@litchar["|"]} starts a subsequence of characters to
|
@item{@as-index{@litchar{|}} starts a subsequence of characters to
|
||||||
be included verbatim in the delimited sequence (i.e,. they are
|
be included verbatim in the delimited sequence (i.e,. they are
|
||||||
never treated as delimiters, and they are not case-folded when
|
never treated as delimiters, and they are not case-folded when
|
||||||
case-insensitivity is enabled); the subsequence is terminated
|
case-insensitivity is enabled); the subsequence is terminated
|
||||||
by another @litchar["|"], and neither the initial nor
|
by another @litchar{|}, and neither the initial nor
|
||||||
terminating @litchar["|"] is part of the subsequence.}
|
terminating @litchar{|} is part of the subsequence.}
|
||||||
|
|
||||||
@item{@as-index{@litchar["\\"]} outside of a @litchar["|"] pair causes
|
@item{@as-index{@litchar{\}} outside of a @litchar{|} pair causes
|
||||||
the folowing character to be included verbatim in a delimited
|
the folowing character to be included verbatim in a delimited
|
||||||
sequence.}
|
sequence.}
|
||||||
|
|
||||||
|
@ -103,26 +103,26 @@ on the next character or characters in the input stream as follows:
|
||||||
@dispatch[@litchar{#[}]{starts a vector; see @secref["parse-vector"]}
|
@dispatch[@litchar{#[}]{starts a vector; see @secref["parse-vector"]}
|
||||||
@dispatch[@litchar["#{"]]{starts a vector; see @secref["parse-vector"]}
|
@dispatch[@litchar["#{"]]{starts a vector; see @secref["parse-vector"]}
|
||||||
|
|
||||||
@dispatch[@litchar["#s("]]{starts a structure literal; see @secref["parse-structure"]}
|
@dispatch[@litchar{#s(}]{starts a structure literal; see @secref["parse-structure"]}
|
||||||
@dispatch[@litchar["#s["]]{starts a structure literal; see @secref["parse-structure"]}
|
@dispatch[@litchar{#s[}]{starts a structure literal; see @secref["parse-structure"]}
|
||||||
@dispatch[@litchar["#s{"]]{starts a structure literal; see @secref["parse-structure"]}
|
@dispatch[@litchar["#s{"]]{starts a structure literal; see @secref["parse-structure"]}
|
||||||
|
|
||||||
@dispatch[@litchar["#\\"]]{starts a character; see @secref["parse-character"]}
|
@dispatch[@litchar{#\}]{starts a character; see @secref["parse-character"]}
|
||||||
|
|
||||||
@dispatch[@litchar{#"}]{starts a byte string; see @secref["parse-string"]}
|
@dispatch[@litchar{#"}]{starts a byte string; see @secref["parse-string"]}
|
||||||
@dispatch[@litchar{#%}]{starts a symbol; see @secref["parse-symbol"]}
|
@dispatch[@litchar{#%}]{starts a symbol; see @secref["parse-symbol"]}
|
||||||
@dispatch[@litchar{#:}]{starts a keyword; see @secref["parse-keyword"]}
|
@dispatch[@litchar{#:}]{starts a keyword; see @secref["parse-keyword"]}
|
||||||
@dispatch[@litchar{#&}]{starts a box; see @secref["parse-box"]}
|
@dispatch[@litchar{#&}]{starts a box; see @secref["parse-box"]}
|
||||||
|
|
||||||
@dispatch[@litchar["#|"]]{starts a block comment; see @secref["parse-comment"]}
|
@dispatch[@litchar{#|}]{starts a block comment; see @secref["parse-comment"]}
|
||||||
@dispatch[@litchar["#;"]]{starts an S-expression comment; see @secref["parse-comment"]}
|
@dispatch[@litchar{#;}]{starts an S-expression comment; see @secref["parse-comment"]}
|
||||||
@dispatch[@litchar{#,}]{starts a syntax quote; see @secref["parse-quote"]}
|
@dispatch[@litchar{#,}]{starts a syntax quote; see @secref["parse-quote"]}
|
||||||
@dispatch[@litchar["#! "]]{starts a line comment; see @secref["parse-comment"]}
|
@dispatch[@litchar{#! }]{starts a line comment; see @secref["parse-comment"]}
|
||||||
@dispatch[@litchar["#!/"]]{starts a line comment; see @secref["parse-comment"]}
|
@dispatch[@litchar{#!/}]{starts a line comment; see @secref["parse-comment"]}
|
||||||
@dispatch[@litchar["#!"]]{may start a reader extension; see @secref["parse-reader"]}
|
@dispatch[@litchar{#!}]{may start a reader extension; see @secref["parse-reader"]}
|
||||||
@dispatch[@litchar{#`}]{starts a syntax quasiquote; see @secref["parse-quote"]}
|
@dispatch[@litchar{#`}]{starts a syntax quasiquote; see @secref["parse-quote"]}
|
||||||
@dispatch[@litchar{#,}]{starts an syntax [splicing] unquote; see @secref["parse-quote"]}
|
@dispatch[@litchar{#,}]{starts an syntax [splicing] unquote; see @secref["parse-quote"]}
|
||||||
@dispatch[@litchar["#~"]]{starts compiled code; see @scheme[current-compile]}
|
@dispatch[@litchar{#~}]{starts compiled code; see @scheme[current-compile]}
|
||||||
|
|
||||||
@dispatch[@cilitchar{#i}]{starts a number; see @secref["parse-number"]}
|
@dispatch[@cilitchar{#i}]{starts a number; see @secref["parse-number"]}
|
||||||
@dispatch[@cilitchar{#e}]{starts a number; see @secref["parse-number"]}
|
@dispatch[@cilitchar{#e}]{starts a number; see @secref["parse-number"]}
|
||||||
|
@ -141,12 +141,12 @@ on the next character or characters in the input stream as follows:
|
||||||
|
|
||||||
@dispatch[@cilitchar["#sx"]]{starts a Scheme expression; see @secref["parse-honu"]}
|
@dispatch[@cilitchar["#sx"]]{starts a Scheme expression; see @secref["parse-honu"]}
|
||||||
|
|
||||||
@dispatch[@litchar["#hx"]]{starts a Honu expression; see @secref["parse-honu"]}
|
@dispatch[@litchar{#hx}]{starts a Honu expression; see @secref["parse-honu"]}
|
||||||
|
|
||||||
@dispatch[@litchar["#hash"]]{starts a hash table; see @secref["parse-hashtable"]}
|
@dispatch[@litchar{#hash}]{starts a hash table; see @secref["parse-hashtable"]}
|
||||||
|
|
||||||
@dispatch[@litchar["#reader"]]{starts a reader extension use; see @secref["parse-reader"]}
|
@dispatch[@litchar{#reader}]{starts a reader extension use; see @secref["parse-reader"]}
|
||||||
@dispatch[@litchar["#lang"]]{starts a reader extension use; see @secref["parse-reader"]}
|
@dispatch[@litchar{#lang}]{starts a reader extension use; see @secref["parse-reader"]}
|
||||||
|
|
||||||
@dispatch[@elem{@litchar{#}@kleeneplus{@nonterm{digit@sub{10}}}@litchar{(}}]{starts a vector; see @secref["parse-vector"]}
|
@dispatch[@elem{@litchar{#}@kleeneplus{@nonterm{digit@sub{10}}}@litchar{(}}]{starts a vector; see @secref["parse-vector"]}
|
||||||
@dispatch[@elem{@litchar{#}@kleeneplus{@nonterm{digit@sub{10}}}@litchar{[}}]{starts a vector; see @secref["parse-vector"]}
|
@dispatch[@elem{@litchar{#}@kleeneplus{@nonterm{digit@sub{10}}}@litchar{[}}]{starts a vector; see @secref["parse-vector"]}
|
||||||
|
@ -173,7 +173,7 @@ parse takes precedence over a symbol parse.
|
||||||
|
|
||||||
@index["case-sensitivity"]{@index["case-insensitive"]{When}} the
|
@index["case-sensitivity"]{@index["case-insensitive"]{When}} the
|
||||||
@scheme[read-case-sensitive] @tech{parameter} is set to @scheme[#f],
|
@scheme[read-case-sensitive] @tech{parameter} is set to @scheme[#f],
|
||||||
characters in the sequence that are not quoted by @litchar["|"] or
|
characters in the sequence that are not quoted by @litchar{|} or
|
||||||
@litchar{\} are first case-normalized. If the reader encounters
|
@litchar{\} are first case-normalized. If the reader encounters
|
||||||
@as-index{@litchar{#ci}}, @litchar{#CI}, @litchar{#Ci}, or
|
@as-index{@litchar{#ci}}, @litchar{#CI}, @litchar{#Ci}, or
|
||||||
@litchar{#cI}, then it recursively reads the following datum in
|
@litchar{#cI}, then it recursively reads the following datum in
|
||||||
|
@ -298,7 +298,7 @@ input syntax for the boolean constant false.
|
||||||
@section[#:tag "parse-pair"]{Reading Pairs and Lists}
|
@section[#:tag "parse-pair"]{Reading Pairs and Lists}
|
||||||
|
|
||||||
When the reader encounters a @as-index{@litchar{(}},
|
When the reader encounters a @as-index{@litchar{(}},
|
||||||
@as-index{@litchar["["]}, or @as-index{@litchar["{"]}, it starts
|
@as-index{@litchar{[}}, or @as-index{@litchar["{"]}, it starts
|
||||||
parsing a pair or list; see @secref["pairs"] for information on pairs
|
parsing a pair or list; see @secref["pairs"] for information on pairs
|
||||||
and lists.
|
and lists.
|
||||||
|
|
||||||
|
@ -306,7 +306,7 @@ To parse the pair or list, the reader recursively reads data
|
||||||
until a matching @as-index{@litchar{)}}, @as-index{@litchar{]}}, or
|
until a matching @as-index{@litchar{)}}, @as-index{@litchar{]}}, or
|
||||||
@as-index{@litchar["}"]} (respectively) is found, and it specially handles
|
@as-index{@litchar["}"]} (respectively) is found, and it specially handles
|
||||||
a delimited @litchar{.}. Pairs @litchar{()}, @litchar{[]}, and
|
a delimited @litchar{.}. Pairs @litchar{()}, @litchar{[]}, and
|
||||||
@litchar["{}"] are treated the same way, so the remainder of this
|
@litchar{{}} are treated the same way, so the remainder of this
|
||||||
section simply uses ``parentheses'' to mean any of these pair.
|
section simply uses ``parentheses'' to mean any of these pair.
|
||||||
|
|
||||||
If the reader finds no delimited @as-index{@litchar{.}} among the elements
|
If the reader finds no delimited @as-index{@litchar{.}} among the elements
|
||||||
|
@ -342,7 +342,7 @@ value @scheme[#\{].
|
||||||
|
|
||||||
If a delimited @litchar{.} appears in any other configuration, then
|
If a delimited @litchar{.} appears in any other configuration, then
|
||||||
the @exnraise[exn:fail:read]. Similarly, if the reader encounters a
|
the @exnraise[exn:fail:read]. Similarly, if the reader encounters a
|
||||||
@litchar{)}, @litchar["]"], or @litchar["}"] that does not end a list
|
@litchar{)}, @litchar{]}, or @litchar["}"] that does not end a list
|
||||||
being parsed, then the @exnraise[exn:fail:read].
|
being parsed, then the @exnraise[exn:fail:read].
|
||||||
|
|
||||||
@reader-examples[
|
@reader-examples[
|
||||||
|
@ -379,7 +379,7 @@ exception, instead of the infix conversion.
|
||||||
When the reader encounters @as-index{@litchar{"}}, it begins parsing
|
When the reader encounters @as-index{@litchar{"}}, it begins parsing
|
||||||
characters to form a string. The string continues until it is
|
characters to form a string. The string continues until it is
|
||||||
terminated by another @litchar{"} (that is not escaped by
|
terminated by another @litchar{"} (that is not escaped by
|
||||||
@litchar["\\"]).
|
@litchar{\}).
|
||||||
|
|
||||||
Within a string sequence, the following escape sequences are
|
Within a string sequence, the following escape sequences are
|
||||||
recognized:
|
recognized:
|
||||||
|
@ -395,11 +395,11 @@ Within a string sequence, the following escape sequences are
|
||||||
@item{@as-index{@litchar{\r}}: return (ASCII 13)}
|
@item{@as-index{@litchar{\r}}: return (ASCII 13)}
|
||||||
@item{@as-index{@litchar{\e}}: escape (ASCII 27)}
|
@item{@as-index{@litchar{\e}}: escape (ASCII 27)}
|
||||||
|
|
||||||
@item{@as-index{@litchar["\\\""]}: double-quotes (without terminating the string)}
|
@item{@as-index{@litchar{\"}}: double-quotes (without terminating the string)}
|
||||||
@item{@as-index{@litchar["\\'"]}: quote (i.e., the backslash has no effect)}
|
@item{@as-index{@litchar{\'}}: quote (i.e., the backslash has no effect)}
|
||||||
@item{@as-index{@litchar["\\\\"]}: backslash (i.e., the second is not an escaping backslash)}
|
@item{@as-index{@litchar{\\}}: backslash (i.e., the second is not an escaping backslash)}
|
||||||
|
|
||||||
@item{@as-index{@litchar["\\"]@kleenerange[1 3]{@nonterm{digit@sub{8}}}}:
|
@item{@as-index{@litchar{\}@kleenerange[1 3]{@nonterm{digit@sub{8}}}}:
|
||||||
Unicode for the octal number specified by @kleenerange[1
|
Unicode for the octal number specified by @kleenerange[1
|
||||||
3]{digit@sub{8}} (i.e., 1 to 3 @nonterm{digit@sub{8}}s) where
|
3]{digit@sub{8}} (i.e., 1 to 3 @nonterm{digit@sub{8}}s) where
|
||||||
each @nonterm{digit@sub{8}} is @litchar{0}, @litchar{1},
|
each @nonterm{digit@sub{8}} is @litchar{0}, @litchar{1},
|
||||||
|
@ -409,7 +409,7 @@ Within a string sequence, the following escape sequences are
|
||||||
between 0 and 255 decimal, otherwise the
|
between 0 and 255 decimal, otherwise the
|
||||||
@exnraise[exn:fail:read].}
|
@exnraise[exn:fail:read].}
|
||||||
|
|
||||||
@item{@as-index{@litchar["\\x"]@kleenerange[1
|
@item{@as-index{@litchar{\x}@kleenerange[1
|
||||||
2]{@nonterm{digit@sub{16}}}}: Unicode for the hexadecimal
|
2]{@nonterm{digit@sub{16}}}}: Unicode for the hexadecimal
|
||||||
number specified by @kleenerange[1 2]{@nonterm{digit@sub{16}}},
|
number specified by @kleenerange[1 2]{@nonterm{digit@sub{16}}},
|
||||||
where each @nonterm{digit@sub{16}} is @litchar{0}, @litchar{1},
|
where each @nonterm{digit@sub{16}} is @litchar{0}, @litchar{1},
|
||||||
|
@ -419,21 +419,21 @@ Within a string sequence, the following escape sequences are
|
||||||
@litchar{e}, or @litchar{f} (case-insensitive). The longer form
|
@litchar{e}, or @litchar{f} (case-insensitive). The longer form
|
||||||
takes precedence over the shorter form.}
|
takes precedence over the shorter form.}
|
||||||
|
|
||||||
@item{@as-index{@litchar["\\u"]@kleenerange[1
|
@item{@as-index{@litchar{\u}@kleenerange[1
|
||||||
4]{@nonterm{digit@sub{16}}}}: like @litchar["\\x"], but with up
|
4]{@nonterm{digit@sub{16}}}}: like @litchar{\x}, but with up
|
||||||
to four hexadecimal digits (longer sequences take precedence).
|
to four hexadecimal digits (longer sequences take precedence).
|
||||||
The resulting hexadecimal number must be a valid argument to
|
The resulting hexadecimal number must be a valid argument to
|
||||||
@scheme[integer->char], otherwise the
|
@scheme[integer->char], otherwise the
|
||||||
@exnraise[exn:fail:read].}
|
@exnraise[exn:fail:read].}
|
||||||
|
|
||||||
@item{@as-index{@litchar["\\U"]@kleenerange[1
|
@item{@as-index{@litchar{\U}@kleenerange[1
|
||||||
8]{@nonterm{digit@sub{16}}}}: like @litchar["\\x"], but with up
|
8]{@nonterm{digit@sub{16}}}}: like @litchar{\x}, but with up
|
||||||
to eight hexadecimal digits (longer sequences take precedence).
|
to eight hexadecimal digits (longer sequences take precedence).
|
||||||
The resulting hexadecimal number must be a valid argument to
|
The resulting hexadecimal number must be a valid argument to
|
||||||
@scheme[integer->char], otherwise the
|
@scheme[integer->char], otherwise the
|
||||||
@exnraise[exn:fail:read].}
|
@exnraise[exn:fail:read].}
|
||||||
|
|
||||||
@item{@as-index{@litchar["\\"]@nonterm{newline}}: elided, where
|
@item{@as-index{@litchar{\}@nonterm{newline}}: elided, where
|
||||||
@nonterm{newline} is either a linefeed, carriage return, or
|
@nonterm{newline} is either a linefeed, carriage return, or
|
||||||
carriage return--linefeed combination. This convetion allows
|
carriage return--linefeed combination. This convetion allows
|
||||||
single-line strings to span multiple lines in the source.}
|
single-line strings to span multiple lines in the source.}
|
||||||
|
@ -451,7 +451,7 @@ A string constant preceded by @litchar{#} is parsed as a
|
||||||
byte-string. (That is, @as-index{@litchar{#"}} starts a byte-string
|
byte-string. (That is, @as-index{@litchar{#"}} starts a byte-string
|
||||||
literal.) See @secref["bytestrings"] for information on byte
|
literal.) See @secref["bytestrings"] for information on byte
|
||||||
strings. Byte string constants support the same escape sequences as
|
strings. Byte string constants support the same escape sequences as
|
||||||
character strings, except @litchar["\\u"] and @litchar["\\U"].
|
character strings, except @litchar{\u} and @litchar{\U}.
|
||||||
|
|
||||||
When the reader encounters @as-index{@litchar{#<<}}, it starts parsing a
|
When the reader encounters @as-index{@litchar{#<<}}, it starts parsing a
|
||||||
@pidefterm{here string}. The characters following @litchar{#<<} until
|
@pidefterm{here string}. The characters following @litchar{#<<} until
|
||||||
|
@ -513,10 +513,10 @@ next linefeed (ASCII 10), carriage return (ASCII 13), next-line
|
||||||
(Unicode @scheme[#x0085]), line-separator (Unicode @scheme[#x2028]),
|
(Unicode @scheme[#x0085]), line-separator (Unicode @scheme[#x2028]),
|
||||||
or line-separator (Uunicode @scheme[#x2028]) character.
|
or line-separator (Uunicode @scheme[#x2028]) character.
|
||||||
|
|
||||||
A @as-index{@litchar["#|"]} starts a nestable block comment. When the
|
A @as-index{@litchar{#|}} starts a nestable block comment. When the
|
||||||
reader encounters @litchar["#|"], then it skips past all characters
|
reader encounters @litchar{#|}, then it skips past all characters
|
||||||
until a closing @litchar["|#"]. Pairs of matching @litchar["#|"] and
|
until a closing @litchar{|#}. Pairs of matching @litchar{#|} and
|
||||||
@litchar["|#"] can be nested.
|
@litchar{|#} can be nested.
|
||||||
|
|
||||||
A @as-index{@litchar{#;}} starts an S-expression comment. Then the
|
A @as-index{@litchar{#;}} starts an S-expression comment. Then the
|
||||||
reader encounters @litchar{#;}, it recursively reads one datum, and
|
reader encounters @litchar{#;}, it recursively reads one datum, and
|
||||||
|
@ -525,7 +525,7 @@ result).
|
||||||
|
|
||||||
A @as-index{@litchar{#! }} (which is @litchar{#!} followed by a space)
|
A @as-index{@litchar{#! }} (which is @litchar{#!} followed by a space)
|
||||||
or @as-index{@litchar{#!/}} starts a line comment that can be
|
or @as-index{@litchar{#!/}} starts a line comment that can be
|
||||||
continued to the next line by ending a line with @litchar["\\"]. This
|
continued to the next line by ending a line with @litchar{\}. This
|
||||||
form of comment normally appears at the beginning of a Unix script
|
form of comment normally appears at the beginning of a Unix script
|
||||||
file.
|
file.
|
||||||
|
|
||||||
|
@ -552,7 +552,7 @@ lists (see @secref["parse-pair"]). A delimited @litchar{.} is not
|
||||||
allowed among the vector elements.
|
allowed among the vector elements.
|
||||||
|
|
||||||
An optional vector length can be specified between the @litchar{#} and
|
An optional vector length can be specified between the @litchar{#} and
|
||||||
@litchar["("], @litchar["["], or @litchar["{"]. The size is specified
|
@litchar{(}, @litchar{[}, or @litchar["{"]. The size is specified
|
||||||
using a sequence of decimal digits, and the number of elements
|
using a sequence of decimal digits, and the number of elements
|
||||||
provided for the vector must be no more than the specified size. If
|
provided for the vector must be no more than the specified size. If
|
||||||
fewer elements are provided, the last provided element is used for the
|
fewer elements are provided, the last provided element is used for the
|
||||||
|
@ -648,39 +648,39 @@ content is also wraped as a syntax object, and the box is immutable.
|
||||||
|
|
||||||
@guideintro["characters"]{the syntax of characters}
|
@guideintro["characters"]{the syntax of characters}
|
||||||
|
|
||||||
A @as-index{@litchar["#\\"]} starts a character constant, which has
|
A @as-index{@litchar{#\}} starts a character constant, which has
|
||||||
one of the following forms:
|
one of the following forms:
|
||||||
|
|
||||||
@itemize{
|
@itemize{
|
||||||
|
|
||||||
@item{ @litchar["#\\nul"] or @litchar["#\\null"]: NUL (ASCII 0)@nonalpha[]}
|
@item{ @litchar{#\nul} or @litchar{#\null}: NUL (ASCII 0)@nonalpha[]}
|
||||||
@item{ @litchar["#\\backspace"]: backspace (ASCII 8)@nonalpha[]}
|
@item{ @litchar{#\backspace}: backspace (ASCII 8)@nonalpha[]}
|
||||||
@item{ @litchar["#\\tab"]: tab (ASCII 9)@nonalpha[]}
|
@item{ @litchar{#\tab}: tab (ASCII 9)@nonalpha[]}
|
||||||
@item{ @litchar["#\\newline"] or @litchar["#\\linefeed"]: linefeed (ASCII 10)@nonalpha[]}
|
@item{ @litchar{#\newline} or @litchar{#\linefeed}: linefeed (ASCII 10)@nonalpha[]}
|
||||||
@item{ @litchar["#\\vtab"]: vertical tab (ASCII 11)@nonalpha[]}
|
@item{ @litchar{#\vtab}: vertical tab (ASCII 11)@nonalpha[]}
|
||||||
@item{ @litchar["#\\page"]: page break (ASCII 12)@nonalpha[]}
|
@item{ @litchar{#\page}: page break (ASCII 12)@nonalpha[]}
|
||||||
@item{ @litchar["#\\return"]: carriage return (ASCII 13)@nonalpha[]}
|
@item{ @litchar{#\return}: carriage return (ASCII 13)@nonalpha[]}
|
||||||
@item{ @litchar["#\\space"]: space (ASCII 32)@nonalpha[]}
|
@item{ @litchar{#\space}: space (ASCII 32)@nonalpha[]}
|
||||||
@item{ @litchar["#\\rubout"]: delete (ASCII 127)@nonalpha[]}
|
@item{ @litchar{#\rubout}: delete (ASCII 127)@nonalpha[]}
|
||||||
|
|
||||||
@item{@litchar["#\\"]@kleenerange[1 3]{@nonterm{digit@sub{8}}}:
|
@item{@litchar{#\}@kleenerange[1 3]{@nonterm{digit@sub{8}}}:
|
||||||
Unicode for the octal number specified by @kleenerange[1
|
Unicode for the octal number specified by @kleenerange[1
|
||||||
3]{@nonterm{digit@sub{8}}}, as in string escapes (see
|
3]{@nonterm{digit@sub{8}}}, as in string escapes (see
|
||||||
@secref["parse-string"]).}
|
@secref["parse-string"]).}
|
||||||
|
|
||||||
@item{@litchar["#\\x"]@kleenerange[1 2]{@nonterm{digit@sub{16}}}:
|
@item{@litchar{#\x}@kleenerange[1 2]{@nonterm{digit@sub{16}}}:
|
||||||
Unicode for the hexadecimal number specified by @kleenerange[1
|
Unicode for the hexadecimal number specified by @kleenerange[1
|
||||||
2]{@nonterm{digit@sub{16}}}, as in string escapes (see
|
2]{@nonterm{digit@sub{16}}}, as in string escapes (see
|
||||||
@secref["parse-string"]).}
|
@secref["parse-string"]).}
|
||||||
|
|
||||||
@item{@litchar["#\\u"]@kleenerange[1 4]{@nonterm{digit@sub{16}}}:
|
@item{@litchar{#\u}@kleenerange[1 4]{@nonterm{digit@sub{16}}}:
|
||||||
like @litchar["#\\x"], but with up to four hexadecimal digits.}
|
like @litchar{#\x}, but with up to four hexadecimal digits.}
|
||||||
|
|
||||||
@item{@litchar["#\\U"]@kleenerange[1 6]{@nonterm{digit@sub{16}}}:
|
@item{@litchar{#\U}@kleenerange[1 6]{@nonterm{digit@sub{16}}}:
|
||||||
like @litchar["#\\x"], but with up to six hexadecimal digits.}
|
like @litchar{#\x}, but with up to six hexadecimal digits.}
|
||||||
|
|
||||||
@item{@litchar["#\\"]@nonterm{c}: the character @nonterm{c}, as long
|
@item{@litchar{#\}@nonterm{c}: the character @nonterm{c}, as long
|
||||||
as @litchar["#\\"]@nonterm{c} and the characters following it
|
as @litchar{#\}@nonterm{c} and the characters following it
|
||||||
do not match any of the previous cases, and as long as the
|
do not match any of the previous cases, and as long as the
|
||||||
character after @nonterm{c} is not
|
character after @nonterm{c} is not
|
||||||
@schemelink[char-alphabetic?]{alphabetic}.}
|
@schemelink[char-alphabetic?]{alphabetic}.}
|
||||||
|
@ -804,8 +804,8 @@ of alphanumeric ASCII, @litchar{+}, @litchar{-}, @litchar{_}, and/or
|
||||||
@litchar{/} characters terminated by
|
@litchar{/} characters terminated by
|
||||||
@schemelink[char-whitespace?]{whitespace} or an end-of-file. The
|
@schemelink[char-whitespace?]{whitespace} or an end-of-file. The
|
||||||
sequence must not start or end with @litchar{/}. A sequence
|
sequence must not start or end with @litchar{/}. A sequence
|
||||||
@litchar["#lang\u20"]@nonterm{name} is equivalent to
|
@litchar{#lang }@nonterm{name} is equivalent to
|
||||||
@litchar["#reader\u20"]@nonterm{name}@litchar{/lang/reader}, except
|
@litchar{#reader }@nonterm{name}@litchar{/lang/reader}, except
|
||||||
that the terminating whitespace (if any) is consumed before the
|
that the terminating whitespace (if any) is consumed before the
|
||||||
external reading procedure is called.
|
external reading procedure is called.
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,9 @@ characters or 5,000 operators.
|
||||||
The following syntax specifications describe the content of a string
|
The following syntax specifications describe the content of a string
|
||||||
that represents a regular expression. The syntax of the corresponding
|
that represents a regular expression. The syntax of the corresponding
|
||||||
string may involve extra escape characters. For example, the regular
|
string may involve extra escape characters. For example, the regular
|
||||||
expression @litchar["(.*)\\1"] can be represented with the string
|
expression @litchar{(.*)\1} can be represented with the string
|
||||||
@scheme["(.*)\\1"] or the regexp constant @scheme[#rx"(.*)\\1"]; the
|
@scheme["(.*)\\1"] or the regexp constant @scheme[#rx"(.*)\\1"]; the
|
||||||
@litchar["\\"] in the regular expression must be escaped to include it
|
@litchar{\} in the regular expression must be escaped to include it
|
||||||
in a string or regexp constant.
|
in a string or regexp constant.
|
||||||
|
|
||||||
The @scheme[regexp] and @scheme[pregexp] syntaxes share a common core:
|
The @scheme[regexp] and @scheme[pregexp] syntaxes share a common core:
|
||||||
|
@ -54,15 +54,15 @@ The @scheme[regexp] and @scheme[pregexp] syntaxes share a common core:
|
||||||
@common-table
|
@common-table
|
||||||
|
|
||||||
The following completes the grammar for @scheme[regexp], which treats
|
The following completes the grammar for @scheme[regexp], which treats
|
||||||
@litchar["{"] and @litchar["}"] as literals, @litchar["\\"] as a
|
@litchar["{"] and @litchar["}"] as literals, @litchar{\} as a
|
||||||
literal within ranges, and @litchar["\\"] as a literal producer
|
literal within ranges, and @litchar{\} as a literal producer
|
||||||
outside of ranges.
|
outside of ranges.
|
||||||
|
|
||||||
@rx-table
|
@rx-table
|
||||||
|
|
||||||
The following completes the grammar for @scheme[pregexp], which uses
|
The following completes the grammar for @scheme[pregexp], which uses
|
||||||
@litchar["{"] and @litchar["}"] bounded repetition and uses
|
@litchar["{"] and @litchar["}"] bounded repetition and uses
|
||||||
@litchar["\\"] for meta-characters both inside and outside of ranges.
|
@litchar{\} for meta-characters both inside and outside of ranges.
|
||||||
|
|
||||||
@px-table
|
@px-table
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ matches between @math{n} and @math{m} characters. In the rule for
|
||||||
@litchar{(}@nonterm{Regexp}@litchar{)}, @math{N} means the number such
|
@litchar{(}@nonterm{Regexp}@litchar{)}, @math{N} means the number such
|
||||||
that the opening parenthesis is the @math{N}th opening parenthesis for
|
that the opening parenthesis is the @math{N}th opening parenthesis for
|
||||||
collecting match reports. Non-emptiness is inferred for a
|
collecting match reports. Non-emptiness is inferred for a
|
||||||
backreference pattern, @litchar["\\"]@nonterm{N}, so that a
|
backreference pattern, @litchar{\}@nonterm{N}, so that a
|
||||||
backreference can be used for repetition patterns; in the case of
|
backreference can be used for repetition patterns; in the case of
|
||||||
mutual dependencies among backreferences, the inference chooses the
|
mutual dependencies among backreferences, the inference chooses the
|
||||||
fixpoint that maximizes non-emptiness. Finiteness is not inferred for
|
fixpoint that maximizes non-emptiness. Finiteness is not inferred for
|
||||||
|
@ -251,7 +251,7 @@ contains parenthesized sub-expressions (but not when the open
|
||||||
parenthesis is followed by @litchar{?:}). Matches for the
|
parenthesis is followed by @litchar{?:}). Matches for the
|
||||||
sub-expressions are provided in the order of the opening parentheses
|
sub-expressions are provided in the order of the opening parentheses
|
||||||
in @scheme[pattern]. When sub-expressions occur in branches of an
|
in @scheme[pattern]. When sub-expressions occur in branches of an
|
||||||
@litchar["|"] ``or'' pattern, in a @litchar{*} ``zero or more''
|
@litchar{|} ``or'' pattern, in a @litchar{*} ``zero or more''
|
||||||
pattern, or other places where the overall pattern can succeed without
|
pattern, or other places where the overall pattern can succeed without
|
||||||
a match for the sub-expression, then a @scheme[#f] is returned for the
|
a match for the sub-expression, then a @scheme[#f] is returned for the
|
||||||
sub-expression if it did not contribute to the final match. When a
|
sub-expression if it did not contribute to the final match. When a
|
||||||
|
@ -578,31 +578,31 @@ then @scheme[insert] as a string is converted to a byte string,
|
||||||
@scheme[insert] as a procedure is called with a byte string, and the
|
@scheme[insert] as a procedure is called with a byte string, and the
|
||||||
result is a byte string.
|
result is a byte string.
|
||||||
|
|
||||||
If @scheme[insert] contains @litchar["&"], then @litchar["&"]
|
If @scheme[insert] contains @litchar{&}, then @litchar{&}
|
||||||
is replaced with the matching portion of @scheme[input] before it is
|
is replaced with the matching portion of @scheme[input] before it is
|
||||||
substituted into the match's place. If @scheme[insert] contains
|
substituted into the match's place. If @scheme[insert] contains
|
||||||
@litchar["\\"]@nonterm{n} for some integer @nonterm{n}, then it is
|
@litchar{\}@nonterm{n} for some integer @nonterm{n}, then it is
|
||||||
replaced with the @nonterm{n}th matching sub-expression from
|
replaced with the @nonterm{n}th matching sub-expression from
|
||||||
@scheme[input]. A @litchar{&} and @litchar["\\0"] are synonymous. If
|
@scheme[input]. A @litchar{&} and @litchar{\0} are synonymous. If
|
||||||
the @nonterm{n}th sub-expression was not used in the match, or if
|
the @nonterm{n}th sub-expression was not used in the match, or if
|
||||||
@nonterm{n} is greater than the number of sub-expressions in
|
@nonterm{n} is greater than the number of sub-expressions in
|
||||||
@scheme[pattern], then @litchar["\\"]@nonterm{n} is replaced with the
|
@scheme[pattern], then @litchar{\}@nonterm{n} is replaced with the
|
||||||
empty string.
|
empty string.
|
||||||
|
|
||||||
To substitute a literal @litchar{&} or @litchar["\\"], use
|
To substitute a literal @litchar{&} or @litchar{\}, use
|
||||||
@litchar["\\&"] and @litchar["\\\\"], respectively, in
|
@litchar{\&} and @litchar{\\}, respectively, in
|
||||||
@scheme[insert]. A @litchar["\\$"] in @scheme[insert] is
|
@scheme[insert]. A @litchar{\$} in @scheme[insert] is
|
||||||
equivalent to an empty sequence; this can be used to terminate a
|
equivalent to an empty sequence; this can be used to terminate a
|
||||||
number @nonterm{n} following @litchar["\\"]. If a @litchar["\\"] in
|
number @nonterm{n} following @litchar{\}. If a @litchar{\} in
|
||||||
@scheme[insert] is followed by anything other than a digit,
|
@scheme[insert] is followed by anything other than a digit,
|
||||||
@litchar{&}, @litchar["\\"], or @litchar{$}, then the @litchar["\\"]
|
@litchar{&}, @litchar{\}, or @litchar{$}, then the @litchar{\}
|
||||||
by itself is treated as @litchar["\\0"].
|
by itself is treated as @litchar{\0}.
|
||||||
|
|
||||||
Note that the @litchar["\\"] described in the previous paragraphs is a
|
Note that the @litchar{\} described in the previous paragraphs is a
|
||||||
character or byte of @scheme[input]. To write such an @scheme[input]
|
character or byte of @scheme[input]. To write such an @scheme[input]
|
||||||
as a Scheme string literal, an escaping @litchar["\\"] is needed
|
as a Scheme string literal, an escaping @litchar{\} is needed
|
||||||
before the @litchar["\\"]. For example, the Scheme constant
|
before the @litchar{\}. For example, the Scheme constant
|
||||||
@scheme["\\1"] is @litchar["\\1"].
|
@scheme["\\1"] is @litchar{\1}.
|
||||||
|
|
||||||
@examples[
|
@examples[
|
||||||
(regexp-replace "mi" "mi casa" "su")
|
(regexp-replace "mi" "mi casa" "su")
|
||||||
|
@ -645,8 +645,8 @@ recursively. Zero-length matches are treated the same as in
|
||||||
Produces a string suitable for use as the third argument to
|
Produces a string suitable for use as the third argument to
|
||||||
@scheme[regexp-replace] to insert the literal sequence of characters
|
@scheme[regexp-replace] to insert the literal sequence of characters
|
||||||
in @scheme[str] or bytes in @scheme[bstr] as a replacement.
|
in @scheme[str] or bytes in @scheme[bstr] as a replacement.
|
||||||
Concretely, every @litchar["\\"] and @litchar{&} in @scheme[str] or
|
Concretely, every @litchar{\} and @litchar{&} in @scheme[str] or
|
||||||
@scheme[bstr] is protected by a quoting @litchar["\\"].
|
@scheme[bstr] is protected by a quoting @litchar{\}.
|
||||||
|
|
||||||
@examples[
|
@examples[
|
||||||
(regexp-replace "UT" "Go UT!" "A&M")
|
(regexp-replace "UT" "Go UT!" "A&M")
|
||||||
|
|
|
@ -11,7 +11,7 @@ marshaled to a byte string.
|
||||||
|
|
||||||
In @scheme[read-syntax], the reader attaches a @scheme['paren-shape]
|
In @scheme[read-syntax], the reader attaches a @scheme['paren-shape]
|
||||||
property to any pair or vector syntax object generated from parsing a
|
property to any pair or vector syntax object generated from parsing a
|
||||||
pair @litchar["["] and @litchar["]"] or @litchar["{"] and
|
pair @litchar{[} and @litchar{]} or @litchar["{"] and
|
||||||
@litchar["}"]; the property value is @scheme[#\[] in the former case,
|
@litchar["}"]; the property value is @scheme[#\[] in the former case,
|
||||||
and @scheme[#\{] in the latter case. The @scheme[syntax] form copies
|
and @scheme[#\{] in the latter case. The @scheme[syntax] form copies
|
||||||
any @scheme['paren-shape] property from the source of a template to
|
any @scheme['paren-shape] property from the source of a template to
|
||||||
|
|
|
@ -9,16 +9,16 @@
|
||||||
In general, a Windows pathname consists of an optional drive specifier
|
In general, a Windows pathname consists of an optional drive specifier
|
||||||
and a drive-specific path. A Windows path can be @defterm{absolute}
|
and a drive-specific path. A Windows path can be @defterm{absolute}
|
||||||
but still relative to the current drive; such paths start with a
|
but still relative to the current drive; such paths start with a
|
||||||
@litchar{/} or @litchar["\\"] separator and are not UNC paths or paths
|
@litchar{/} or @litchar{\} separator and are not UNC paths or paths
|
||||||
that start with @litchar["\\\\?\\"].
|
that start with @litchar{\\?\}.
|
||||||
|
|
||||||
A path that starts with a drive specification is @defterm{complete}.
|
A path that starts with a drive specification is @defterm{complete}.
|
||||||
Roughly, a drive specification is either a Roman letter followed by a
|
Roughly, a drive specification is either a Roman letter followed by a
|
||||||
colon, a UNC path of the form
|
colon, a UNC path of the form
|
||||||
@litchar["\\\\"]@nonterm{machine}@litchar["\\"]@nonterm{volume}, or a
|
@litchar{\\}@nonterm{machine}@litchar{\}@nonterm{volume}, or a
|
||||||
@litchar["\\\\?\\"] form followed by something other than
|
@litchar{\\?\} form followed by something other than
|
||||||
@litchar["REL\\"]@nonterm{element}, or
|
@litchar{REL\}@nonterm{element}, or
|
||||||
@litchar["RED\\"]@nonterm{element}. (Variants of @litchar["\\\\?\\"]
|
@litchar{RED\}@nonterm{element}. (Variants of @litchar{\\?\}
|
||||||
paths are described further below.)
|
paths are described further below.)
|
||||||
|
|
||||||
Scheme fails to implement the usual Windows path syntax in one
|
Scheme fails to implement the usual Windows path syntax in one
|
||||||
|
@ -35,36 +35,36 @@ parameter). Consequently, Scheme implicitly converts a path like
|
||||||
|
|
||||||
@item{@|MzAdd| Whenever a path starts with a drive specifier
|
@item{@|MzAdd| Whenever a path starts with a drive specifier
|
||||||
@nonterm{letter}@litchar{:} that is not followed by a
|
@nonterm{letter}@litchar{:} that is not followed by a
|
||||||
@litchar{/} or @litchar["\\"], a @litchar["\\"] is inserted as
|
@litchar{/} or @litchar{\}, a @litchar{\} is inserted as
|
||||||
the path is @tech{cleanse}d.}
|
the path is @tech{cleanse}d.}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Otherwise, Scheme follows standard Windows path conventions, but also
|
Otherwise, Scheme follows standard Windows path conventions, but also
|
||||||
adds @litchar["\\\\?\\REL"] and @litchar["\\\\?\\RED"] conventions to
|
adds @litchar{\\?\REL} and @litchar{\\?\RED} conventions to
|
||||||
deal with paths inexpressible in the standard conventsion, plus
|
deal with paths inexpressible in the standard conventsion, plus
|
||||||
conventions to deal with excessive @litchar["\\"]s in @litchar["\\\\?\\"]
|
conventions to deal with excessive @litchar{\}s in @litchar{\\?\}
|
||||||
paths.
|
paths.
|
||||||
|
|
||||||
In the following, @nonterm{letter} stands for a Roman letter (case
|
In the following, @nonterm{letter} stands for a Roman letter (case
|
||||||
does not matter), @nonterm{machine} stands for any sequence of
|
does not matter), @nonterm{machine} stands for any sequence of
|
||||||
characters that does not include @litchar["\\"] or @litchar{/} and is
|
characters that does not include @litchar{\} or @litchar{/} and is
|
||||||
not @litchar{?}, @nonterm{volume} stands for any sequence of
|
not @litchar{?}, @nonterm{volume} stands for any sequence of
|
||||||
characters that does not include @litchar["\\"] or @litchar{/} , and
|
characters that does not include @litchar{\} or @litchar{/} , and
|
||||||
@nonterm{element} stands for any sequence of characters that does not
|
@nonterm{element} stands for any sequence of characters that does not
|
||||||
include @litchar["\\"].
|
include @litchar{\}.
|
||||||
|
|
||||||
@itemize{
|
@itemize{
|
||||||
|
|
||||||
@item{Trailing spaces and @litchar{.} in a path element are ignored
|
@item{Trailing spaces and @litchar{.} in a path element are ignored
|
||||||
when the element is the last one in the path, unless the path
|
when the element is the last one in the path, unless the path
|
||||||
starts with @litchar["\\\\?\\"] or the element consists of only
|
starts with @litchar{\\?\} or the element consists of only
|
||||||
spaces and @litchar{.}s.}
|
spaces and @litchar{.}s.}
|
||||||
|
|
||||||
@item{The following special ``files'', which access devices, exist in
|
@item{The following special ``files'', which access devices, exist in
|
||||||
all directories, case-insensitively, and with all possible
|
all directories, case-insensitively, and with all possible
|
||||||
endings after a period or colon, except in pathnames that start
|
endings after a period or colon, except in pathnames that start
|
||||||
with @litchar["\\\\?\\"]: @indexed-file{NUL}, @indexed-file{CON},
|
with @litchar{\\?\}: @indexed-file{NUL}, @indexed-file{CON},
|
||||||
@indexed-file{PRN}, @indexed-file{AUX}, @indexed-file{COM1},
|
@indexed-file{PRN}, @indexed-file{AUX}, @indexed-file{COM1},
|
||||||
@indexed-file{COM2}, @indexed-file{COM3}, @indexed-file{COM4},
|
@indexed-file{COM2}, @indexed-file{COM3}, @indexed-file{COM4},
|
||||||
@indexed-file{COM5}, @indexed-file{COM6}, @indexed-file{COM7},
|
@indexed-file{COM5}, @indexed-file{COM6}, @indexed-file{COM7},
|
||||||
|
@ -73,116 +73,116 @@ include @litchar["\\"].
|
||||||
@indexed-file{LPT5}, @indexed-file{LPT6}, @indexed-file{LPT7},
|
@indexed-file{LPT5}, @indexed-file{LPT6}, @indexed-file{LPT7},
|
||||||
@indexed-file{LPT8}, @indexed-file{LPT9}.}
|
@indexed-file{LPT8}, @indexed-file{LPT9}.}
|
||||||
|
|
||||||
@item{Except for @litchar["\\\\?\\"] paths, @litchar{/}s are
|
@item{Except for @litchar{\\?\} paths, @litchar{/}s are
|
||||||
equivalent to @litchar["\\"]s. Except for @litchar["\\\\?\\"]
|
equivalent to @litchar{\}s. Except for @litchar{\\?\}
|
||||||
paths and the start of UNC paths, multiple adjacent
|
paths and the start of UNC paths, multiple adjacent
|
||||||
@litchar{/}s and @litchar["\\"]s count as a single
|
@litchar{/}s and @litchar{\}s count as a single
|
||||||
@litchar["\\"]. In a path that starts @litchar["\\\\?\\"]
|
@litchar{\}. In a path that starts @litchar{\\?\}
|
||||||
paths, elements can be separated by either a single or double
|
paths, elements can be separated by either a single or double
|
||||||
@litchar["\\"].}
|
@litchar{\}.}
|
||||||
|
|
||||||
@item{A directory can be accessed with or without a trailing
|
@item{A directory can be accessed with or without a trailing
|
||||||
separator. In the case of a non-@litchar["\\\\?\\"] path, the
|
separator. In the case of a non-@litchar{\\?\} path, the
|
||||||
trailing separator can be any number of @litchar{/}s and
|
trailing separator can be any number of @litchar{/}s and
|
||||||
@litchar["\\"]s; in the case of a @litchar["\\\\?\\"] path, a
|
@litchar{\}s; in the case of a @litchar{\\?\} path, a
|
||||||
trailing separator must be a single @litchar["\\"], except that
|
trailing separator must be a single @litchar{\}, except that
|
||||||
two @litchar["\\"]s can follow
|
two @litchar{\}s can follow
|
||||||
@litchar["\\\\?\\"]@nonterm{letter}@litchar{:}.}
|
@litchar{\\?\}@nonterm{letter}@litchar{:}.}
|
||||||
|
|
||||||
@item{Except for @litchar["\\\\?\\"] paths, a single @litchar{.} as a
|
@item{Except for @litchar{\\?\} paths, a single @litchar{.} as a
|
||||||
path element means ``the current directory,'' and a
|
path element means ``the current directory,'' and a
|
||||||
@litchar{..} as a path element means ``the parent directory.''
|
@litchar{..} as a path element means ``the parent directory.''
|
||||||
Up-directory path elements (i.e., @litchar{..}) immediately
|
Up-directory path elements (i.e., @litchar{..}) immediately
|
||||||
after a drive are ignored.}
|
after a drive are ignored.}
|
||||||
|
|
||||||
@item{A pathname that starts
|
@item{A pathname that starts
|
||||||
@litchar["\\\\"]@nonterm{machine}@litchar["\\"]@nonterm{volume}
|
@litchar{\\}@nonterm{machine}@litchar{\}@nonterm{volume}
|
||||||
(where a @litchar{/} can replace any @litchar["\\"]) is a UNC
|
(where a @litchar{/} can replace any @litchar{\}) is a UNC
|
||||||
path, and the starting
|
path, and the starting
|
||||||
@litchar["\\\\"]@nonterm{machine}@litchar["\\"]@nonterm{volume}
|
@litchar{\\}@nonterm{machine}@litchar{\}@nonterm{volume}
|
||||||
counts as the drive specifier.}
|
counts as the drive specifier.}
|
||||||
|
|
||||||
@item{Normally, a path element cannot contain any of the following
|
@item{Normally, a path element cannot contain any of the following
|
||||||
characters:
|
characters:
|
||||||
|
|
||||||
@centerline{@litchar{<} @litchar{>} @litchar{:} @litchar{"} @litchar{/} @litchar["\\"] @litchar["|"]}
|
@centerline{@litchar{<} @litchar{>} @litchar{:} @litchar{"} @litchar{/} @litchar{\} @litchar{|}}
|
||||||
|
|
||||||
Except for @litchar["\\"], path elements containing these
|
Except for @litchar{\}, path elements containing these
|
||||||
characters can be accessed using a @litchar["\\\\?\\"] path
|
characters can be accessed using a @litchar{\\?\} path
|
||||||
(assuming that the underlying filesystem allows the
|
(assuming that the underlying filesystem allows the
|
||||||
characters).}
|
characters).}
|
||||||
|
|
||||||
@item{In a pathname that starts
|
@item{In a pathname that starts
|
||||||
@litchar["\\\\?\\"]@nonterm{letter}@litchar[":\\"], the
|
@litchar{\\?\}@nonterm{letter}@litchar{:\}, the
|
||||||
@litchar["\\\\?\\"]@nonterm{letter}@litchar[":\\"] prefix
|
@litchar{\\?\}@nonterm{letter}@litchar{:\} prefix
|
||||||
counts as the path's drive, as long as the path does not both
|
counts as the path's drive, as long as the path does not both
|
||||||
contain non-drive elements and end with two consecutive
|
contain non-drive elements and end with two consecutive
|
||||||
@litchar["\\"]s, and as long as the path contains no sequence
|
@litchar{\}s, and as long as the path contains no sequence
|
||||||
of three or more @litchar["\\"]s. Two @litchar["\\"]s can
|
of three or more @litchar{\}s. Two @litchar{\}s can
|
||||||
appear in place of the @litchar["\\"] before
|
appear in place of the @litchar{\} before
|
||||||
@nonterm{letter}. A @litchar{/} cannot be used in place of a
|
@nonterm{letter}. A @litchar{/} cannot be used in place of a
|
||||||
@litchar["\\"] (but @litchar{/}s can be used in element names,
|
@litchar{\} (but @litchar{/}s can be used in element names,
|
||||||
though the result typically does not name an actual directory
|
though the result typically does not name an actual directory
|
||||||
or file).}
|
or file).}
|
||||||
|
|
||||||
@item{In a pathname that starts
|
@item{In a pathname that starts
|
||||||
@litchar["\\\\?\\UNC\\"]@nonterm{machine}@litchar["\\"]@nonterm{volume},
|
@litchar{\\?\UNC\}@nonterm{machine}@litchar{\}@nonterm{volume},
|
||||||
the
|
the
|
||||||
@litchar["\\\\?\\UNC\\"]@nonterm{machine}@litchar["\\"]@nonterm{volume}
|
@litchar{\\?\UNC\}@nonterm{machine}@litchar{\}@nonterm{volume}
|
||||||
prefix counts as the path's drive, as long as the path does
|
prefix counts as the path's drive, as long as the path does
|
||||||
not end with two consecutive @litchar["\\"]s, and as long as
|
not end with two consecutive @litchar{\}s, and as long as
|
||||||
the path contains no sequence of three or more
|
the path contains no sequence of three or more
|
||||||
@litchar["\\"]s. Two @litchar["\\"]s can appear in place of
|
@litchar{\}s. Two @litchar{\}s can appear in place of
|
||||||
the @litchar["\\"] before @litchar{UNC}, the @litchar["\\"]s
|
the @litchar{\} before @litchar{UNC}, the @litchar{\}s
|
||||||
after @litchar{UNC}, and/or the @litchar["\\"]s
|
after @litchar{UNC}, and/or the @litchar{\}s
|
||||||
after@nonterm{machine}. The letters in the @litchar{UNC} part
|
after@nonterm{machine}. The letters in the @litchar{UNC} part
|
||||||
can be uppercase or lowercase, and @litchar{/} cannot be used
|
can be uppercase or lowercase, and @litchar{/} cannot be used
|
||||||
in place of @litchar["\\"]s (but @litchar{/} can be used in
|
in place of @litchar{\}s (but @litchar{/} can be used in
|
||||||
element names).}
|
element names).}
|
||||||
|
|
||||||
@item{@|MzAdd| A pathname that starts
|
@item{@|MzAdd| A pathname that starts
|
||||||
@litchar["\\\\?\\REL\\"]@nonterm{element} or
|
@litchar{\\?\REL\}@nonterm{element} or
|
||||||
@litchar["\\\\?\\REL\\\\"]@nonterm{element} is a relative
|
@litchar{\\?\REL\\}@nonterm{element} is a relative
|
||||||
path, as long as the path does not end with two consecutive
|
path, as long as the path does not end with two consecutive
|
||||||
@litchar["\\"]s, and as long as the path contains no sequence of
|
@litchar{\}s, and as long as the path contains no sequence of
|
||||||
three or more @litchar["\\"]s. This Scheme-specific path form
|
three or more @litchar{\}s. This Scheme-specific path form
|
||||||
supports relative paths with elements that are not normally
|
supports relative paths with elements that are not normally
|
||||||
expressible in Windows paths (e.g., a final element that ends
|
expressible in Windows paths (e.g., a final element that ends
|
||||||
in a space). The @litchar{REL} part must be exactly the three
|
in a space). The @litchar{REL} part must be exactly the three
|
||||||
uppercase letters, and @litchar{/}s cannot be used in place
|
uppercase letters, and @litchar{/}s cannot be used in place
|
||||||
of @litchar["\\"]s. If the path starts
|
of @litchar{\}s. If the path starts
|
||||||
@litchar["\\\\?\\REL\\.."] then for as long as the
|
@litchar{\\?\REL\..} then for as long as the
|
||||||
path continues with repetitions of @litchar["\\.."],
|
path continues with repetitions of @litchar{\..},
|
||||||
each element counts as an up-directory element; a single
|
each element counts as an up-directory element; a single
|
||||||
@litchar["\\"] must be used to separate the up-directory
|
@litchar{\} must be used to separate the up-directory
|
||||||
elements. As soon as a second @litchar["\\"] is used to separate
|
elements. As soon as a second @litchar{\} is used to separate
|
||||||
the elements, or as soon as a non-@litchar{..} element is
|
the elements, or as soon as a non-@litchar{..} element is
|
||||||
encountered, the remaining elements are all literals (never
|
encountered, the remaining elements are all literals (never
|
||||||
up-directory elements). When a @litchar["\\\\?\\REL"] path
|
up-directory elements). When a @litchar{\\?\REL} path
|
||||||
value is converted to a string (or when the path value is
|
value is converted to a string (or when the path value is
|
||||||
written or displayed), the string does not contain the
|
written or displayed), the string does not contain the
|
||||||
starting @litchar["\\\\?\\REL"] or the immediately following
|
starting @litchar{\\?\REL} or the immediately following
|
||||||
@litchar["\\"]s; converting a path value to a byte string
|
@litchar{\}s; converting a path value to a byte string
|
||||||
preserves the @litchar["\\\\?\\REL"] prefix.}
|
preserves the @litchar{\\?\REL} prefix.}
|
||||||
|
|
||||||
@item{@|MzAdd| A pathname that starts
|
@item{@|MzAdd| A pathname that starts
|
||||||
@litchar["\\\\?\\RED\\"]@nonterm{element} or
|
@litchar{\\?\RED\}@nonterm{element} or
|
||||||
@litchar["\\\\?\\RED\\\\"]@nonterm{element} is a
|
@litchar{\\?\RED\\}@nonterm{element} is a
|
||||||
drive-relative path, as long as the path does not end with two
|
drive-relative path, as long as the path does not end with two
|
||||||
consecutive @litchar["\\"]s, and as long as the path contains
|
consecutive @litchar{\}s, and as long as the path contains
|
||||||
no sequence of three or more @litchar["\\"]s. This
|
no sequence of three or more @litchar{\}s. This
|
||||||
Scheme-specific path form supports drive-relative paths (i.e.,
|
Scheme-specific path form supports drive-relative paths (i.e.,
|
||||||
absolute given a drive) with elements that are not normally
|
absolute given a drive) with elements that are not normally
|
||||||
expressible in Windows paths. The @litchar{RED} part must be
|
expressible in Windows paths. The @litchar{RED} part must be
|
||||||
exactly the three uppercase letters, and @litchar{/}s cannot
|
exactly the three uppercase letters, and @litchar{/}s cannot
|
||||||
be used in place of @litchar["\\"]s. Unlike
|
be used in place of @litchar{\}s. Unlike
|
||||||
@litchar["\\\\?\\REL"] paths, a @litchar{..} element is always
|
@litchar{\\?\REL} paths, a @litchar{..} element is always
|
||||||
a literal path element. When a @litchar["\\\\?\\RED"] path
|
a literal path element. When a @litchar{\\?\RED} path
|
||||||
value is converted to a string (or when the path value is
|
value is converted to a string (or when the path value is
|
||||||
written or displayed), the string does not contain the
|
written or displayed), the string does not contain the
|
||||||
starting @litchar["\\\\?\\RED"] and it contains a single
|
starting @litchar{\\?\RED} and it contains a single
|
||||||
starting @litchar["\\"]; converting a path value to a byte
|
starting @litchar{\}; converting a path value to a byte
|
||||||
string preserves the @litchar["\\\\?\\RED"] prefix.}
|
string preserves the @litchar{\\?\RED} prefix.}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,33 +192,33 @@ sequences that are otherwise ill-formed as Windows paths:
|
||||||
@itemize{
|
@itemize{
|
||||||
|
|
||||||
@item{@|MzAdd| In a pathname of the form
|
@item{@|MzAdd| In a pathname of the form
|
||||||
@litchar["\\\\?\\"]@nonterm{any}@litchar["\\\\"] where
|
@litchar{\\?\}@nonterm{any}@litchar{\\} where
|
||||||
@nonterm{any} is any non-empty sequence of characters other
|
@nonterm{any} is any non-empty sequence of characters other
|
||||||
than @nonterm{letter}@litchar{:} or
|
than @nonterm{letter}@litchar{:} or
|
||||||
@litchar["\\"]@nonterm{letter}@litchar{:}, the entire path
|
@litchar{\}@nonterm{letter}@litchar{:}, the entire path
|
||||||
counts as the path's (non-existent) drive.}
|
counts as the path's (non-existent) drive.}
|
||||||
|
|
||||||
@item{@|MzAdd| In a pathname of the form
|
@item{@|MzAdd| In a pathname of the form
|
||||||
@litchar["\\\\?\\"]@nonterm{any}@litchar["\\\\\\"]@nonterm{elements},
|
@litchar{\\?\}@nonterm{any}@litchar{\\\}@nonterm{elements},
|
||||||
where @nonterm{any} is any non-empty sequence of characters
|
where @nonterm{any} is any non-empty sequence of characters
|
||||||
and @nonterm{elements} is any sequence that does not start
|
and @nonterm{elements} is any sequence that does not start
|
||||||
with a @litchar["\\"], does not end with two @litchar["\\"]s,
|
with a @litchar{\}, does not end with two @litchar{\}s,
|
||||||
and does not contain a sequence of three @litchar["\\"]s, then
|
and does not contain a sequence of three @litchar{\}s, then
|
||||||
@litchar["\\\\?\\"]@nonterm{any}@litchar["\\\\"] counts as the
|
@litchar{\\?\}@nonterm{any}@litchar{\\} counts as the
|
||||||
path's (non-existent) drive.}
|
path's (non-existent) drive.}
|
||||||
|
|
||||||
@item{@|MzAdd| In a pathname that starts @litchar["\\\\?\\"] and
|
@item{@|MzAdd| In a pathname that starts @litchar{\\?\} and
|
||||||
does not match any of the patterns from the preceding bullets,
|
does not match any of the patterns from the preceding bullets,
|
||||||
@litchar["\\\\?\\"] counts as the path's (non-existent)
|
@litchar{\\?\} counts as the path's (non-existent)
|
||||||
drive.}
|
drive.}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Outside of Scheme, except for @litchar["\\\\?\\"] paths, pathnames are
|
Outside of Scheme, except for @litchar{\\?\} paths, pathnames are
|
||||||
typically limited to 259 characters. Scheme internally converts
|
typically limited to 259 characters. Scheme internally converts
|
||||||
pathnames to @litchar["\\\\?\\"] form as needed to avoid this
|
pathnames to @litchar{\\?\} form as needed to avoid this
|
||||||
limit. The operating system cannot access files through
|
limit. The operating system cannot access files through
|
||||||
@litchar["\\\\?\\"] paths that are longer than 32,000 characters or
|
@litchar{\\?\} paths that are longer than 32,000 characters or
|
||||||
so.
|
so.
|
||||||
|
|
||||||
Where the above descriptions says ``character,'' substitute ``byte''
|
Where the above descriptions says ``character,'' substitute ``byte''
|
||||||
|
@ -226,22 +226,22 @@ for interpreting byte strings as paths. The encoding of Windows paths
|
||||||
into bytes preserves ASCII characters, and all special characters
|
into bytes preserves ASCII characters, and all special characters
|
||||||
mentioned above are ASCII, so all of the rules are the same.
|
mentioned above are ASCII, so all of the rules are the same.
|
||||||
|
|
||||||
Beware that the @litchar["\\"] path separator is an escape character
|
Beware that the @litchar{\} path separator is an escape character
|
||||||
in Scheme strings. Thus, the path @litchar["\\\\?\\REL\\..\\\\.."] as
|
in Scheme strings. Thus, the path @litchar{\\?\REL\..\\..} as
|
||||||
a string must be written @scheme["\\\\?\\REL\\..\\\\.."].
|
a string must be written @scheme["\\\\?\\REL\\..\\\\.."].
|
||||||
|
|
||||||
A path that ends with a directory separator syntactically refers to a
|
A path that ends with a directory separator syntactically refers to a
|
||||||
directory. In addition, a path syntactcially refers to a directory if
|
directory. In addition, a path syntactcially refers to a directory if
|
||||||
its last element is a same-directory or up-directory indicator (not
|
its last element is a same-directory or up-directory indicator (not
|
||||||
quoted by a @litchar["\\\\?\\"] form), or if it refers to a root.
|
quoted by a @litchar{\\?\} form), or if it refers to a root.
|
||||||
|
|
||||||
Windows paths are @techlink{cleanse}d as follows: In paths that start
|
Windows paths are @techlink{cleanse}d as follows: In paths that start
|
||||||
@litchar["\\\\?\\"], redundant @litchar["\\"]s are removed, an extra
|
@litchar{\\?\}, redundant @litchar{\}s are removed, an extra
|
||||||
@litchar["\\"] is added in a @litchar["\\\\?\\REL"] if an extra one is
|
@litchar{\} is added in a @litchar{\\?\REL} if an extra one is
|
||||||
not already present to separate up-directory indicators from literal
|
not already present to separate up-directory indicators from literal
|
||||||
path elements, and an extra @litchar["\\"] is similarly added after
|
path elements, and an extra @litchar{\} is similarly added after
|
||||||
@litchar["\\\\?\\RED"] if an extra one is not already present. When
|
@litchar{\\?\RED} if an extra one is not already present. When
|
||||||
@litchar["\\\\?\\"] acts as the root and the path contains, to
|
@litchar{\\?\} acts as the root and the path contains, to
|
||||||
additional @litchar{/}s (which might otherwise be redundant) are
|
additional @litchar{/}s (which might otherwise be redundant) are
|
||||||
included after the root. For other paths, multiple @litchar{/}s are
|
included after the root. For other paths, multiple @litchar{/}s are
|
||||||
converted to single @litchar{/}s (except at the beginning of a shared
|
converted to single @litchar{/}s (except at the beginning of a shared
|
||||||
|
@ -251,35 +251,35 @@ specification if it is missing.
|
||||||
For @scheme[(bytes->path-element _bstr)], @litchar{/}s, colons,
|
For @scheme[(bytes->path-element _bstr)], @litchar{/}s, colons,
|
||||||
trailing dots, trailing whitespace, and special device names (e.g.,
|
trailing dots, trailing whitespace, and special device names (e.g.,
|
||||||
``aux'') in @scheme[_bstr] are encoded as a literal part of the path
|
``aux'') in @scheme[_bstr] are encoded as a literal part of the path
|
||||||
element by using a @litchar["\\\\?\\REL"] prefix. The @scheme[bstr]
|
element by using a @litchar{\\?\REL} prefix. The @scheme[bstr]
|
||||||
argument must not contain a @litchar["\\"], otherwise the
|
argument must not contain a @litchar{\}, otherwise the
|
||||||
@exnraise[exn:fail:contract].
|
@exnraise[exn:fail:contract].
|
||||||
|
|
||||||
For @scheme[(path-element->bytes _path)] or
|
For @scheme[(path-element->bytes _path)] or
|
||||||
@scheme[(path-element->string _path)], if the byte-string form of
|
@scheme[(path-element->string _path)], if the byte-string form of
|
||||||
@scheme[_path] starts with a @litchar["\\\\?\\REL"], the prefix is not
|
@scheme[_path] starts with a @litchar{\\?\REL}, the prefix is not
|
||||||
included in the result.
|
included in the result.
|
||||||
|
|
||||||
For @scheme[(build-path _base-path _sub-path ...)], trailing spaces
|
For @scheme[(build-path _base-path _sub-path ...)], trailing spaces
|
||||||
and periods are removed from the last element of @scheme[_base-path]
|
and periods are removed from the last element of @scheme[_base-path]
|
||||||
and all but the last @scheme[_sub-path] (unless the element consists of
|
and all but the last @scheme[_sub-path] (unless the element consists of
|
||||||
only spaces and peroids), except for those that start with
|
only spaces and peroids), except for those that start with
|
||||||
@litchar["\\\\?\\"]. If @scheme[_base-path] starts @litchar["\\\\?\\"],
|
@litchar{\\?\}. If @scheme[_base-path] starts @litchar{\\?\},
|
||||||
then after each non-@litchar["\\\\?\\REL\\"] and
|
then after each non-@litchar{\\?\REL\} and
|
||||||
non-@litchar["\\\\?\\RED\\"] @scheme[_sub-path] is added, all
|
non-@litchar{\\?\RED\} @scheme[_sub-path] is added, all
|
||||||
@litchar{/}s in the addition are converted to @litchar["\\"]s,
|
@litchar{/}s in the addition are converted to @litchar{\}s,
|
||||||
multiple consecutive @litchar["\\"]s are converted to a single
|
multiple consecutive @litchar{\}s are converted to a single
|
||||||
@litchar["\\"], added @litchar{.} elements are removed, and added
|
@litchar{\}, added @litchar{.} elements are removed, and added
|
||||||
@litchar{..} elements are removed along with the preceding element;
|
@litchar{..} elements are removed along with the preceding element;
|
||||||
these conversions are not performed on the original @scheme[_base-path]
|
these conversions are not performed on the original @scheme[_base-path]
|
||||||
part of the result or on any @litchar["\\\\?\\REL\\"] or
|
part of the result or on any @litchar{\\?\REL\} or
|
||||||
@litchar["\\\\?\\RED\\"] or @scheme[_sub-path]. If a
|
@litchar{\\?\RED\} or @scheme[_sub-path]. If a
|
||||||
@litchar["\\\\?\\REL\\"] or @litchar["\\\\?\\RED\\"]
|
@litchar{\\?\REL\} or @litchar{\\?\RED\}
|
||||||
@scheme[_sub-path] is added to a non-@litchar["\\\\?\\"]
|
@scheme[_sub-path] is added to a non-@litchar{\\?\}
|
||||||
@scheme[_base-path], the the @scheme[_base-path] (with any additions up
|
@scheme[_base-path], the the @scheme[_base-path] (with any additions up
|
||||||
to the @litchar["\\\\?\\REL\\"] or @litchar["\\\\?\\RED\\"]
|
to the @litchar{\\?\REL\} or @litchar{\\?\RED\}
|
||||||
@scheme[_sub-path]) is simplified and converted to a
|
@scheme[_sub-path]) is simplified and converted to a
|
||||||
@litchar["\\\\?\\"] path. In other cases, a @litchar["\\"] may be
|
@litchar{\\?\} path. In other cases, a @litchar{\} may be
|
||||||
added or removed before combining paths to avoid changing the root
|
added or removed before combining paths to avoid changing the root
|
||||||
meaning of the path (e.g., combining @litchar{//x} and @litchar{y}
|
meaning of the path (e.g., combining @litchar{//x} and @litchar{y}
|
||||||
produces @litchar{/x/y}, because @litchar{//x/y} would be a UNC path
|
produces @litchar{/x/y}, because @litchar{//x/y} would be a UNC path
|
||||||
|
@ -287,18 +287,18 @@ instead of a drive-relative path).
|
||||||
|
|
||||||
For @scheme[(simplify-path _path _use-filesystem?)], @scheme[_path] is
|
For @scheme[(simplify-path _path _use-filesystem?)], @scheme[_path] is
|
||||||
expanded, and if @scheme[_path] does not start with
|
expanded, and if @scheme[_path] does not start with
|
||||||
@litchar["\\\\?\\"], trailing spaces and periods are removed, a
|
@litchar{\\?\}, trailing spaces and periods are removed, a
|
||||||
@litchar{/} is inserted after the colon in a drive specification if it
|
@litchar{/} is inserted after the colon in a drive specification if it
|
||||||
is missing, and a @litchar["\\"] is inserted after @litchar["\\\\?\\"]
|
is missing, and a @litchar{\} is inserted after @litchar{\\?\}
|
||||||
as a root if there are elements and no extra @litchar["\\"]
|
as a root if there are elements and no extra @litchar{\}
|
||||||
already. Otherwise, if no indicators or redundant separators are in
|
already. Otherwise, if no indicators or redundant separators are in
|
||||||
@scheme[_path], then @scheme[_path] is returned.
|
@scheme[_path], then @scheme[_path] is returned.
|
||||||
|
|
||||||
For @scheme[(split-path _path)] producing @scheme[_base],
|
For @scheme[(split-path _path)] producing @scheme[_base],
|
||||||
@scheme[_name], and @scheme[_must-be-dir?], splitting a path that does
|
@scheme[_name], and @scheme[_must-be-dir?], splitting a path that does
|
||||||
not start with @litchar["\\\\?\\"] can produce parts that start with
|
not start with @litchar{\\?\} can produce parts that start with
|
||||||
@litchar["\\\\?\\"]. For example, splitting @litchar{C:/x~/aux/}
|
@litchar{\\?\}. For example, splitting @litchar{C:/x~/aux/}
|
||||||
produces @litchar["\\\\?\\C:\\x~\\"] and @litchar["\\\\?\\REL\\\\aux"];
|
produces @litchar{\\?\C:\x~\} and @litchar{\\?\REL\\aux};
|
||||||
the @litchar["\\\\?\\"] is needed in these cases to preserve a
|
the @litchar{\\?\} is needed in these cases to preserve a
|
||||||
trailing space after @litchar{x} and to avoid referring to the AUX
|
trailing space after @litchar{x} and to avoid referring to the AUX
|
||||||
device instead of an @filepath{aux} file.
|
device instead of an @filepath{aux} file.
|
||||||
|
|
|
@ -137,14 +137,14 @@ Formats to a string. The result is the same as
|
||||||
|
|
||||||
A parameter that control pair printing. If the value is true, then
|
A parameter that control pair printing. If the value is true, then
|
||||||
pairs print using @litchar["{"] and @litchar["}"] instead of
|
pairs print using @litchar["{"] and @litchar["}"] instead of
|
||||||
@litchar["("] and @litchar[")"]. The default is @scheme[#f].}
|
@litchar{(} and @litchar{)}. The default is @scheme[#f].}
|
||||||
|
|
||||||
|
|
||||||
@defboolparam[print-mpair-curly-braces on?]{
|
@defboolparam[print-mpair-curly-braces on?]{
|
||||||
|
|
||||||
A parameter that control pair printing. If the value is true, then
|
A parameter that control pair printing. If the value is true, then
|
||||||
mutable pairs print using @litchar["{"] and @litchar["}"] instead of
|
mutable pairs print using @litchar["{"] and @litchar["}"] instead of
|
||||||
@litchar["("] and @litchar[")"]. The default is @scheme[#t].}
|
@litchar{(} and @litchar{)}. The default is @scheme[#t].}
|
||||||
|
|
||||||
@defboolparam[print-unreadable on?]{
|
@defboolparam[print-unreadable on?]{
|
||||||
|
|
||||||
|
|
|
@ -96,11 +96,11 @@ one must be present. No spaces are allowed between
|
||||||
|
|
||||||
@itemize{
|
@itemize{
|
||||||
|
|
||||||
@item{@litchar["@"] and @nonterm{cmd}, @litchar["["], or @litchar["{"]}
|
@item{@litchar["@"] and @nonterm{cmd}, @litchar{[}, or @litchar["{"]}
|
||||||
|
|
||||||
@item{@nonterm{cmd} and @litchar["["] or @litchar["{"]; or}
|
@item{@nonterm{cmd} and @litchar{[} or @litchar["{"]; or}
|
||||||
|
|
||||||
@item{@litchar["]"] and @litchar["{"].}
|
@item{@litchar{]} and @litchar["{"].}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ The expansion of @litchar["@"]@nonterm{cmd} into Scheme code is
|
||||||
#, @nonterm{cmd}
|
#, @nonterm{cmd}
|
||||||
]
|
]
|
||||||
|
|
||||||
When either @litchar["["] @litchar["]"] or @litchar["{"] @litchar["}"]
|
When either @litchar{[} @litchar{]} or @litchar["{"] @litchar["}"]
|
||||||
are used, the expansion is
|
are used, the expansion is
|
||||||
|
|
||||||
@schemeblock[
|
@schemeblock[
|
||||||
|
@ -128,8 +128,8 @@ In practice, the @nonterm{cmd} is normally a Scheme identifier that is
|
||||||
bound to a procedure or syntactic form. If the procedure or form
|
bound to a procedure or syntactic form. If the procedure or form
|
||||||
expects further text to typeset, then @litchar["{"] @litchar["}"]
|
expects further text to typeset, then @litchar["{"] @litchar["}"]
|
||||||
supplies the text. If the form expects other data, typically
|
supplies the text. If the form expects other data, typically
|
||||||
@litchar["["] @litchar["]"] is used to surround Scheme arguments,
|
@litchar{[} @litchar{]} is used to surround Scheme arguments,
|
||||||
instead. Sometimes, both @litchar["["] @litchar["]"] and @litchar["{"]
|
instead. Sometimes, both @litchar{[} @litchar{]} and @litchar["{"]
|
||||||
@litchar["}"] are used, where the former surround Scheme arguments
|
@litchar["}"] are used, where the former surround Scheme arguments
|
||||||
that precede text to typeset.
|
that precede text to typeset.
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ to @scheme["\n"] expressions.
|
||||||
blah}
|
blah}
|
||||||
}===|
|
}===|
|
||||||
|
|
||||||
Note that spaces are not allowed before a @litchar["["] or a
|
Note that spaces are not allowed before a @litchar{[} or a
|
||||||
@litchar["{"], or they will be part of the following text (or Scheme
|
@litchar["{"], or they will be part of the following text (or Scheme
|
||||||
code). (More on using braces in body texts below.)
|
code). (More on using braces in body texts below.)
|
||||||
|
|
||||||
|
@ -150,9 +150,9 @@ wrapping the @italic{whole} expression.
|
||||||
@`',@foo{blah}
|
@`',@foo{blah}
|
||||||
}===|
|
}===|
|
||||||
|
|
||||||
When writing Scheme code, this means that @litchar["@`',@foo{blah}"]
|
When writing Scheme code, this means that @litchar|{@`',@foo{blah}}|
|
||||||
is exactly the same as @litchar["`@',@foo{blah}"] and
|
is exactly the same as @litchar|{`@',@foo{blah}}| and
|
||||||
@litchar["`',@@foo{blah}"], but unlike the latter two, the first
|
@litchar|{`',@@foo{blah}}|, but unlike the latter two, the first
|
||||||
construct can appear in body texts with the same meaning, whereas the
|
construct can appear in body texts with the same meaning, whereas the
|
||||||
other two would not work (see below).
|
other two would not work (see below).
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ In the first form, the commented body must still parse correctly; see
|
||||||
the description of the body syntax below. In the second form, all
|
the description of the body syntax below. In the second form, all
|
||||||
text from the @litchar["@;"] to the end of the line @italic{and} all
|
text from the @litchar["@;"] to the end of the line @italic{and} all
|
||||||
following spaces (or tabs) are part of the comment (similar to
|
following spaces (or tabs) are part of the comment (similar to
|
||||||
@litchar["%"] comments in TeX).
|
@litchar{%} comments in TeX).
|
||||||
|
|
||||||
@scribble-examples|==={
|
@scribble-examples|==={
|
||||||
@foo{bar @; comment
|
@foo{bar @; comment
|
||||||
|
@ -345,7 +345,7 @@ the opening marker to have the text terminated by a @litchar["}|"].
|
||||||
}===|
|
}===|
|
||||||
|
|
||||||
This applies to sub-@"@"-forms too---the @litchar["@"] must be
|
This applies to sub-@"@"-forms too---the @litchar["@"] must be
|
||||||
prefixed with a @litchar["|"]:
|
prefixed with a @litchar{|}:
|
||||||
|
|
||||||
@scribble-examples|==={
|
@scribble-examples|==={
|
||||||
@foo|{Maze
|
@foo|{Maze
|
||||||
|
@ -354,18 +354,18 @@ prefixed with a @litchar["|"]:
|
||||||
@t|{In |@i|{sub|@"@"s}| too}|
|
@t|{In |@i|{sub|@"@"s}| too}|
|
||||||
}===|
|
}===|
|
||||||
|
|
||||||
Note that the subform uses its own delimiters, @litchar["{...}"] or
|
Note that the subform uses its own delimiters, @litchar{{...}} or
|
||||||
@litchar["|{...}|"]. This means that you can copy and paste Scribble
|
@litchar{|{...}|}. This means that you can copy and paste Scribble
|
||||||
text with @"@"-forms freely, just prefix the @litchar["@"] if the
|
text with @"@"-forms freely, just prefix the @litchar["@"] if the
|
||||||
immediate surrounding text has a prefix.
|
immediate surrounding text has a prefix.
|
||||||
|
|
||||||
For even better control, you can add characters in the opening
|
For even better control, you can add characters in the opening
|
||||||
delimiter, between the @litchar["|"] and the @litchar["{"].
|
delimiter, between the @litchar{|} and the @litchar["{"].
|
||||||
Characters that are put there (non alphanumeric ASCII characters only,
|
Characters that are put there (non alphanumeric ASCII characters only,
|
||||||
excluding @litchar["{"] and @litchar["@"]) should also be used for
|
excluding @litchar["{"] and @litchar["@"]) should also be used for
|
||||||
sub-@"@"-forms, and the end-of-body marker should have these characters
|
sub-@"@"-forms, and the end-of-body marker should have these characters
|
||||||
in reverse order with paren-like characters (@litchar["("],
|
in reverse order with paren-like characters (@litchar{(},
|
||||||
@litchar["["], @litchar["<"]) mirrored.
|
@litchar{[}, @litchar{<}) mirrored.
|
||||||
|
|
||||||
@scribble-examples|==={
|
@scribble-examples|==={
|
||||||
@foo|<<<{@x{foo} |@{bar}|.}>>>|
|
@foo|<<<{@x{foo} |@{bar}|.}>>>|
|
||||||
|
@ -383,7 +383,7 @@ multi-line body texts.
|
||||||
In some cases, you may want to use a Scheme identifier (or a number or
|
In some cases, you may want to use a Scheme identifier (or a number or
|
||||||
a boolean etc.) in a position that touches the following text; in
|
a boolean etc.) in a position that touches the following text; in
|
||||||
these situations you should surround the escaped Scheme expression by
|
these situations you should surround the escaped Scheme expression by
|
||||||
a pair of @litchar["|"] characters. The text inside the bars is
|
a pair of @litchar{|} characters. The text inside the bars is
|
||||||
parsed as a Scheme expression.
|
parsed as a Scheme expression.
|
||||||
|
|
||||||
@scribble-examples|==={
|
@scribble-examples|==={
|
||||||
|
@ -437,9 +437,9 @@ as the Scheme command part of a @"@"-form. The latter is used in this case
|
||||||
@;--------------------------------------------------------------------
|
@;--------------------------------------------------------------------
|
||||||
@subsubsub*section{Comments}
|
@subsubsub*section{Comments}
|
||||||
|
|
||||||
As noted above, there are two kinds of Scribble comments: @litchar["@;{...}"] is
|
As noted above, there are two kinds of Scribble comments: @litchar|{@;{...}}| is
|
||||||
a (nestable) comment for a whole body of text (following the same
|
a (nestable) comment for a whole body of text (following the same
|
||||||
rules for @"@"-forms), and @litchar["@;..."] is a line-comment.
|
rules for @"@"-forms), and @litchar|{@;...}| is a line-comment.
|
||||||
|
|
||||||
@scribble-examples|==={
|
@scribble-examples|==={
|
||||||
@foo{First line@;{there is still a
|
@foo{First line@;{there is still a
|
||||||
|
@ -534,7 +534,7 @@ indentation strings are added so the result has the same indentation.
|
||||||
A indentation string is added to each line according to its distance
|
A indentation string is added to each line according to its distance
|
||||||
from the leftmost syntax object (except for empty lines). (Note: if
|
from the leftmost syntax object (except for empty lines). (Note: if
|
||||||
you try these examples on a mzscheme REPL, you should be aware that
|
you try these examples on a mzscheme REPL, you should be aware that
|
||||||
the reader does not know about the "@litchar["> "]" prompt.)
|
the reader does not know about the ``@litchar{> }'' prompt.)
|
||||||
|
|
||||||
@scribble-examples|==={
|
@scribble-examples|==={
|
||||||
@foo{
|
@foo{
|
||||||
|
@ -791,7 +791,7 @@ resulting reader in several ways:
|
||||||
readtable-to-readtable function that will construct one from the
|
readtable-to-readtable function that will construct one from the
|
||||||
@"@"-readtable. The idea is that you may want to have completely
|
@"@"-readtable. The idea is that you may want to have completely
|
||||||
different uses for the datum part, for example, introducing a
|
different uses for the datum part, for example, introducing a
|
||||||
convenient @litchar["key=val"] syntax for attributes.}
|
convenient @litchar{key=val} syntax for attributes.}
|
||||||
|
|
||||||
@item{@scheme[syntax-post-proc] --- function that is applied on
|
@item{@scheme[syntax-post-proc] --- function that is applied on
|
||||||
each resulting syntax value after it has been parsed (but before it
|
each resulting syntax value after it has been parsed (but before it
|
||||||
|
|
|
@ -117,9 +117,9 @@ widest line.
|
||||||
Each list within @scheme[element]s is spliced into the sequence of
|
Each list within @scheme[element]s is spliced into the sequence of
|
||||||
string and pict elements. If @scheme[decode?] is true, then strings
|
string and pict elements. If @scheme[decode?] is true, then strings
|
||||||
among the @scheme[element]s are decoded by performing the following
|
among the @scheme[element]s are decoded by performing the following
|
||||||
substitutions: @litchar["---"] @d=> @litchar["\u2014"], @litchar["--"]
|
substitutions: @litchar{---} @d=> @litchar["\u2014"], @litchar{--}
|
||||||
@d=> @litchar["\u2013"], @litchar["``"] @d=> @litchar["\u201C"],
|
@d=> @litchar["\u2013"], @litchar{``} @d=> @litchar["\u201C"],
|
||||||
@litchar["''"] @d=> @litchar["\u201D"], @litchar["'"] @d=>
|
@litchar{''} @d=> @litchar["\u201D"], @litchar{'} @d=>
|
||||||
@litchar["\u2019"].
|
@litchar["\u2019"].
|
||||||
|
|
||||||
Strings are split at spaces for word-wrapping to fit the page, and a
|
Strings are split at spaces for word-wrapping to fit the page, and a
|
||||||
|
|
|
@ -166,8 +166,8 @@ provides the unit that actually implements a dispatching server.
|
||||||
|
|
||||||
@; XXX Talk about how threads and custodians are used.
|
@; XXX Talk about how threads and custodians are used.
|
||||||
|
|
||||||
@defthing[dispatch-server\@ (unit/c (tcp^ dispatch-server-config^)
|
@defthing[dispatch-server@ (unit/c (tcp^ dispatch-server-config^)
|
||||||
(dispatch-server^))]{
|
(dispatch-server^))]{
|
||||||
Runs the dispatching server config in a very basic way, except that it uses
|
Runs the dispatching server config in a very basic way, except that it uses
|
||||||
@secref["connection-manager.ss"] to manage connections.
|
@secref["connection-manager.ss"] to manage connections.
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ of the @web-server in other applications, or loading a custom
|
||||||
dispatcher. See @filepath{run.ss} for an example of such a script.
|
dispatcher. See @filepath{run.ss} for an example of such a script.
|
||||||
|
|
||||||
@defproc[(serve [#:dispatch dispatch dispatcher?]
|
@defproc[(serve [#:dispatch dispatch dispatcher?]
|
||||||
[#:tcp\@ tcp\@ tcp-unit^ raw:tcp\@]
|
[#:tcp@ tcp@ tcp-unit^ raw:tcp@]
|
||||||
[#:port port integer? 80]
|
[#:port port integer? 80]
|
||||||
[#:listen-ip listen-ip (or/c string? false/c) #f]
|
[#:listen-ip listen-ip (or/c string? false/c) #f]
|
||||||
[#:max-waiting max-waiting integer? 40]
|
[#:max-waiting max-waiting integer? 40]
|
||||||
|
@ -106,7 +106,7 @@ from a given path:
|
||||||
|
|
||||||
@schemeblock[
|
@schemeblock[
|
||||||
(define (start-file-server base)
|
(define (start-file-server base)
|
||||||
(serve
|
(serve
|
||||||
#:dispatch
|
#:dispatch
|
||||||
(files:make
|
(files:make
|
||||||
#:url->path (make-url->path base)
|
#:url->path (make-url->path base)
|
||||||
|
@ -114,10 +114,10 @@ from a given path:
|
||||||
(lambda (path)
|
(lambda (path)
|
||||||
#"application/octet-stream"))
|
#"application/octet-stream"))
|
||||||
#:port 8080))
|
#:port 8080))
|
||||||
]
|
]
|
||||||
|
|
||||||
@defproc[(serve/ports [#:dispatch dispatch dispatcher?]
|
@defproc[(serve/ports [#:dispatch dispatch dispatcher?]
|
||||||
[#:tcp\@ tcp\@ tcp-unit^ raw:tcp\@]
|
[#:tcp@ tcp@ tcp-unit^ raw:tcp@]
|
||||||
[#:ports ports (listof integer?) (list 80)]
|
[#:ports ports (listof integer?) (list 80)]
|
||||||
[#:listen-ip listen-ip (or/c string? false/c) #f]
|
[#:listen-ip listen-ip (or/c string? false/c) #f]
|
||||||
[#:max-waiting max-waiting integer? 40]
|
[#:max-waiting max-waiting integer? 40]
|
||||||
|
@ -128,7 +128,7 @@ from a given path:
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(serve/ips+ports [#:dispatch dispatch dispatcher?]
|
@defproc[(serve/ips+ports [#:dispatch dispatch dispatcher?]
|
||||||
[#:tcp\@ tcp\@ tcp-unit^ raw:tcp\@]
|
[#:tcp@ tcp@ tcp-unit^ raw:tcp@]
|
||||||
[#:ips+ports ips+ports (listof (cons/c (or/c string? false/c) (listof integer?))) (list (cons #f (list 80)))]
|
[#:ips+ports ips+ports (listof (cons/c (or/c string? false/c) (listof integer?))) (list (cons #f (list 80)))]
|
||||||
[#:max-waiting max-waiting integer? 40]
|
[#:max-waiting max-waiting integer? 40]
|
||||||
[#:initial-connection-timeout initial-connection-timeout integer? 60])
|
[#:initial-connection-timeout initial-connection-timeout integer? 60])
|
||||||
|
|
|
@ -50,7 +50,7 @@ Provides contains the following identifiers.
|
||||||
|
|
||||||
@defmodule[web-server/web-config-unit]
|
@defmodule[web-server/web-config-unit]
|
||||||
|
|
||||||
@defproc[(configuration-table->web-config\@ [path path?]
|
@defproc[(configuration-table->web-config@ [path path?]
|
||||||
[#:port port (or/c false/c port-number?) #f]
|
[#:port port (or/c false/c port-number?) #f]
|
||||||
[#:listen-ip listen-ip (or/c false/c string?) #f]
|
[#:listen-ip listen-ip (or/c false/c string?) #f]
|
||||||
[#:make-servlet-namespace make-servlet-namespace make-servlet-namespace? (make-make-servlet-namespace)])
|
[#:make-servlet-namespace make-servlet-namespace make-servlet-namespace? (make-make-servlet-namespace)])
|
||||||
|
@ -59,7 +59,7 @@ Provides contains the following identifiers.
|
||||||
@scheme[configuration-table-sexpr->web-config@] appropriately.
|
@scheme[configuration-table-sexpr->web-config@] appropriately.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(configuration-table-sexpr->web-config\@ [sexpr list?]
|
@defproc[(configuration-table-sexpr->web-config@ [sexpr list?]
|
||||||
[#:web-server-root web-server-root path? (directory-part default-configuration-table-path)]
|
[#:web-server-root web-server-root path? (directory-part default-configuration-table-path)]
|
||||||
[#:port port (or/c false/c port-number?) #f]
|
[#:port port (or/c false/c port-number?) #f]
|
||||||
[#:listen-ip listen-ip (or/c false/c string?) #f]
|
[#:listen-ip listen-ip (or/c false/c string?) #f]
|
||||||
|
|
|
@ -29,8 +29,8 @@ The @web-server offers a unit-based approach to running the server.
|
||||||
|
|
||||||
@defmodule[web-server/web-server-unit]
|
@defmodule[web-server/web-server-unit]
|
||||||
|
|
||||||
@defthing[web-server\@ (unit/c (web-config^ tcp^)
|
@defthing[web-server@ (unit/c (web-config^ tcp^)
|
||||||
(web-server^))]{
|
(web-server^))]{
|
||||||
|
|
||||||
Uses the @scheme[web-config^] to construct a @scheme[dispatcher?]
|
Uses the @scheme[web-config^] to construct a @scheme[dispatcher?]
|
||||||
function that sets up one virtual host dispatcher, for each virtual
|
function that sets up one virtual host dispatcher, for each virtual
|
||||||
|
|
Loading…
Reference in New Issue
Block a user