LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
From: Michael John Downes <[log in to unmask]>
Date: Tue, 13 Feb 2001 11:47:16 -0500
In-Reply-To: Hans Aberg's message of "Tue, 13 Feb 2001 15:10:54 +0100"
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments: text/plain (28 lines)
Hans Aberg <[log in to unmask]> writes:

> I am not a TeX guru, but I get the impression that the TeX looks like this:
>   <string of TeX tokens> <not yet gulped up ASCII (or 8-bit)>
> The string of TeX tokens buffer is normally empty, but sometimes a macro
> may insert a string of tokens (perhaps a macro expansion can be viewed as
> though the  body is first inserted in this buffer, before being evaluated).

Yes, that is quite true, but Knuth calls that buffer an input stream,
and there may be multiple nested input streams open at any given moment.
This is what one sees in the multiple levels of error context (visible
when errorcontextlines > 1).

> The <not yet gulped up ASCII (or 8-bit) buffer is read converted into
> tokens at need.

TeX reads into the buffer one line at a time. In particular, the
character at the end of the line will be whatever was the value of
\endlinechar at the point when the read was triggered. But the catcode
of the endlinechar can be changed at any point until TeX takes it from
the line buffer and turns it into a token.

> TeX does not back-track.

\futurelet, \uppercase, \lowercase, \expandafter and perhaps one or two
others do backtracking in the token stream, but yes there is no
backtracking in the line buffer.