Expand description
The mouth is a thin interface over a file, responsible for reading characters and associating them with catcodes
Structs§
Enums§
Constants§
- BIB_
DATA_ LITERALS - The characters a
Mouth::with_bib_data_literalsmouth reads as data:% & #, which BibTeX’s lexer hands back as ordinary characters (OXIDIZED_DESIGN #74), and@, which the entry scaffold’s handler names (\csname bib@field@…\endcsname) carry. A document’s active@(1810.11524’s amsrefs list reads@book{…}records through it) re-entered\bibfrom inside the scaffold without end; Perl, reading the scaffold under the live catcodes (BibTeX.pool.ltxml:166), errs 24 times.
Functions§
- byte_
mouth_ pending_ tail - Byte offset in
swhere a trailing INCOMPLETE UTF-8 sequence in the byte spelling begins (s.len()when there is none). The text-run merge inDocument::open_text_internalre-decodes only from there: the bytes of one character arrive one token at a time (tex.web §1034: one char node per byte), so a run is complete only once its last continuation byte is on, and everything before the pending lead byte is already decoded (or invalid and final). Invariant relied on: a decoded character in U+00C2..U+00F4 (é, Ã) is never followed by raw continuation bytes without their own lead — well-formed input never produces that shape, so the one preceding character this looks back at is only ever re-merged when it IS the pending lead byte. - decode_
byte_ mouth_ runs - Decode raw input bytes as text when no encoding has been declared: valid UTF-8 is taken as-is, anything else is a Latin-1 passthrough (byte → char).
- decode_
input_ bytes - text_
symbol_ char - The single character
\<current encoding><cs>typesets, if it is a\DeclareTextSymbolglyph (a primitive with a one-character string body). - tokenize
- Tokenize a string under the standard catcode table — Perl
Package.pm:TokenizeL1019-1023. - tokenize_
bib_ literal - Tokenize a string under the standard catcode table, reading
% & #as ordinary characters rather than comment, alignment tab and parameter. - tokenize_
internal - Tokenize a string under the style-file catcode table — Perl
Package.pm:TokenizeInternalL1026-1030. - utf8_
c1_ catcode_ key - The value marking a C1 character (U+0080-U+009F) whose catcode TeX code assigned under
[utf8](\catcode’s setter, tex_character.rs), so a byte of a byte-decoded line stays that active character (OD #481’s addendum). - utf8_
undeclared_ error_ key - The value holding utf8.def’s undeclared-character error installed for
ch(utf8_def.rs), which only that definition matches.