Expand description
PDF object parser — Lexer tokens → Object tree.
Round-3 Commit 2: builds on crate::reader::lex to recognise
every variant the writer can emit (numbers, names, strings,
arrays, dicts, indirect references, stream objects, null).
Streams are matched by the trailing stream+EOL marker per ISO
32000-1 §7.3.8. The body is sliced verbatim from the input — no
filter decoding here; the reader’s stream object handler (round-3
commit 4) re-runs FlateDecode if the dictionary’s /Filter says
so.
Object streams (PDF 1.5+, /Type /ObjStm) are deliberately out of
scope for round 3 — the writer doesn’t emit them and parsing them
requires a full /XRef stream walker. Round-4+.
Structs§
- NoLength
Resolver - No-op
LengthResolver— every indirect/Lengthis rejected. Used byParser::parse_indirectandParser::parse_objecton code paths where the xref table isn’t built yet (the xref-stream parser, theparse_xref_stream_athelper). - Parser
- Recursive-descent parser over a
Lexer.
Traits§
- Length
Resolver - Caller-supplied hook that resolves an indirect
/Lengthreference on a stream dictionary to the underlying integer.