Lexer

class Lexer(val reader: ByteReader)

PDF Lexer (ISO 32000-1 §7.2).

Splits the byte stream into typed tokens. Operates over a ByteReader so the higher-level parser can also seek inside the same buffer (e.g. into the body of a stream after reading "stream\n"). Whitespace and comments are skipped.

The lexer does NOT decide what's an "obj" header or what's an operator — it just classifies tokens. The parser interprets them.

Constructors

Link copied to clipboard
constructor(reader: ByteReader)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard

Read raw bytes from the current position — used by parser after a "stream" keyword.