[tex-k] inconsistent use of "eye", "mouth", "gullet" in The TeXbook

Karl Berry karl at freefriends.org
Mon May 10 19:29:58 CEST 2021


Hi Yajie,

    Date: Tue, 13 Apr 2021 17:10:41 +0800
    Subject: [tex-k] inconsistent use of "eye", "mouth", "gullet" in The TeXbook

I don't exactly see a clear inconsistency here. "eyes" convert
characters from files into tokens, "mouth" expands the expandable
tokens, "gullet" (on the way to the stomach) emphasizes the transition
from expansion to execution in the stomach. All these phases blend into
each other without sharp boundaries, as can be seen by the frequent use
of "eyes and mouth", etc. And the whole thing is an inexact metaphor. So
there isn't much use in striving for technically precise definitions.

I guess this instance (and the analogous one in the mfbook) would be
more consistent if "eyes" were also mentioned:

> Page A267, lines -16 thru -13:
> Chapter 7 has described the process by which input files are
> converted to lists of tokens in TeX's "mouth," 

If you think there is some other change to make, let me know.

    I don't know which view the opening illustrations of Appendix I takes.

It shows the parts of TeX's body labeled a, b, c, etc.
It does not explain anything.

    But tex.web and mf.web take the former view in the explanation of
    get_next.  

get_next straddles all parts of the process. I don't think there is
anything in tex/mf.web which says that the mouth is *not* expansion?

    Which view should I take if I were to write another
    article for TUGboat?  

"Gullet" is infrequently used, and I wouldn't bother using it in an
article. I mostly see eyes/mouth/stomach (and occasionally bowels), used
as I wrote above.

        What would be wrong with \def\%{\char`%}?

        The % would be treated as a comment character, because its
        category code is 14; thus, no % token or } token would get
        through to the gullet of TeX where numbers are treated.

    but I think the truth is that no % token or } token would get
    through to the _stomach_ of TeX where the definition is read. And
    numbers are not treated in the gullet anyway, according to the
    scan_int procedure in tex.web module 440.

I don't think it is wrong as written.  Although numbers are recognized,
in the sense of scanning from input characters, in the eyes(/mouth),
they are acted on by the stomach. In an assignment \catcode\`%=14, the
"14" is being considered as its numeric value, not merely the lexical
scan from the characters 1 and 4.

As for stomach vs. gullet, there is no specific distinction between them
as far as I can see, as I noted above. Here again is a case where Knuth
is using an imprecise term to emphasize what's going on, the mixture of
the different processes.

    (I want to explain that unlike TeX, METAFONT
    has two kinds of macros, one handled in the mouth/gullet and one
    handled in the stomach.)

Sounds like a good topic. --thanks, karl.


More information about the tex-k mailing list.