Consider the following
If we run
tex on it, and start skipping tokens one by one, we get this:
(test.tex ! Undefined control sequence. l.1 \ERROR ? 1 l.2 a ? 1 l.2 a ? 1 )
As we see, the first
1 command skips end-of-line.
Then we see that TeX has just read
a and is about to read end-of-line character. We skip it with the second
Then we see the same picture. As if nothing happened. And only after the third
1 command we see that TeX has passed further.
Why TeX skips end-of-line after
\ERROR from the first time, but after
a only from the second time?
Also, it is strange that if after the final
*, which is not shown in the output, we say
*\end <*> \end ?
instead of terminating.
Consider the following 6 test files:
Here are results that I obtained:
control-word_at_eol.tex: space and ^^M is skipped right after reading control word
control-word_not_at_eol.tex: space is not skipped right after reading control word
non-space_at_eol.tex: space is skipped right after reading control symbol, ^^M not skipped
non-space_not_at_eol.tex: space is not skipped right after reading control symbol
space_at_eol.tex: space, ^^M and (!!!) name of control symbol are skipped right after reading control symbol
space_not_at_eol.tex: space is not skipped right after reading control symbol