1085-1085.html
来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 169 行
HTML
169 行
<HTML>
<HEAD>
<TITLE>Linux Complete Command Reference:Special Files:EarthWeb Inc.-</TITLE>
</HEAD>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311046 //-->
<!-- TITLE=Linux Complete Command Reference//-->
<!-- AUTHOR=Red Hat//-->
<!-- PUBLISHER=Macmillan Computer Publishing//-->
<!-- IMPRINT=Sams//-->
<!-- CHAPTER=04 //-->
<!-- PAGES=1063-1102 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="1082-1084.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1086-1087.html">Next</A></CENTER></P>
<A NAME="PAGENUM-1085"><P>Page 1085</P></A>
<P>As mentioned, root words in any dictionary may be extended
by flags. Each flag is a single alphabetic character,
which represents a prefix or suffix that may be added to the root to form a new word. For example, in an English dictionary the
D flag can be added to bathe to make bathed. Because flags are represented as a single bit in the hashed dictionary, this
results in significant space savings. The
munchlist script will reduce an existing raw dictionary by adding flags when possible.
</P>
<P>When a word is extended with an affix, the affix
will be accepted only if it appears in the same case as the initial (prefix)
or final (suffix) letter of the word. Thus, for example, the entry
UNIX/M in the main dictionary (M means add an apostrophe
and an s to make a possessive) would accept UNIX'S but would reject UNIX's. If UNIX's is legal, it must appear as a
separate dictionary entry, and it will not be combined by
munchlist. (In general, you don't need to worry about these
things; munchlist guarantees that its output dictionary will accept the same set of words as its input, so all you have to do is
add words to the dictionary and occasionally run
munchlist to reduce its size.)
</P>
<P>As mentioned, the affix definition file describes the affixes associated with particular flags. It also describes the character
set used by the language.
</P>
<P>Although the affix-definition grammar is designed for a line-oriented layout, it is actually a free-format grammar and can
be laid out weirdly if you want. Comments are started by a pound (sharp) sign
(#), and continue to the end of the line. Backslashes are supported in the usual fashion
(\nnn, plus specials \n, \r, \t, \v, \f, \b, and the new hex format
\xnn). Any character with special meaning to the parser can be changed to an uninterpreted token by backslashing it; for example,
you can declare a flag named asterisk or colon with flag
n*: or flag n::.
</P>
<P>The grammar will be presented in a top-down fashion, with discussion of each element. An affix-definition file must
contain exactly one table:
</P>
<!-- CODE SNIP //-->
<PRE>
table :[headers][prefixes][suffixes]
</PRE>
<!-- END CODE SNIP //-->
<P>At least one of prefixes and suffixes is required. They can appear in either order.
</P>
<!-- CODE SNIP //-->
<PRE>
headers :[options ] char-sets
</PRE>
<!-- END CODE SNIP //-->
<P>The headers describe options global to this dictionary and language. These include the character sets to be used and
the formatter, and the defaults for certain ispell flags.
</P>
<!-- CODE SNIP //-->
<PRE>
options : { fmtr-stmt | opt-stmt | flag-stmt | num-stmt }
</PRE>
<!-- END CODE SNIP //-->
<P>The options statements define the defaults for certain
ispell flags and for the character sets used by the formatters.
</P>
<!-- CODE SNIP //-->
<PRE>
fmtr-stmt : { nroff-stmt | tex-stmt }
</PRE>
<!-- END CODE SNIP //-->
<P>A fmtr-stmt statement describes characters that have special meaning to a formatter. Normally, this statement is
not necessary, but some languages may have preempted the usual defaults for use as language-specific characters. In this
case, these statements may be used to redefine the special characters expected by the formatter.
</P>
<!-- CODE SNIP //-->
<PRE>
nroff-stmt : { nroffchars | troffchars } string
</PRE>
<!-- END CODE SNIP //-->
<P>The nroffchars statement allows redefinition of certain
nroff control characters. The string given must be exactly
five characters long, and must list substitutions for the left and right parentheses, the period, the backslash, and the asterisk.
(The right parenthesis is not currently used, but is included for completeness.) For example, the statement:
</P>
<!-- CODE SNIP //-->
<PRE>
nroffchars {}.\\*
</PRE>
<!-- END CODE SNIP //-->
<P>would replace the left and right parentheses with left and right curly braces for purposes of parsing
nroff/troff strings, with no effect on the others (admittedly a contrived example). Note that the backslash is escaped with a backslash.
</P>
<!-- CODE SNIP //-->
<PRE>
tex-stmt : { TeXchars | texchars } string
</PRE>
<!-- END CODE SNIP //-->
<P>The TeXchars statement allows redefinition of certain TeX/LaTeX control characters. The string given must be
exactly thirteen characters long, and must list substitutions for the left and right parentheses, the left and right square brackets,
the left and right curly braces, the left and right angle brackets, the backslash, the dollar sign, the asterisk, the period or dot,
and the percent sign. For example, the statement:
</P>
<!-- CODE SNIP //-->
<PRE>
texchars ()\[]<\><\>\\$*.%
</PRE>
<!-- END CODE SNIP //-->
<P><CENTER>
<a href="1082-1084.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="1086-1087.html">Next</A></CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?