PEGO

E030: Operators Rule Line Value Elision

An Operators Rule action often needs captured operands or $op text, not the line's intermediate CST. Value-free line lowering avoids that unused intermediate result.

Mechanism and Invariants

leanLine distinguishes operator actions, whose matched operator text is supplied as $op, from operand actions that may read positional body values. Named captures still build required values. A line's frame, match position and candidate-selection behavior remain owned by the Operators Rule runtime. Recognition additionally omits line actions where their results are unused.

Scope and State

Default eligible Operators Rule lines in closure, both VMs, generated Go Node, typed Go and TypeScript. This analysis is distinct from ordinary body elision and from direct line-body inlining.

Reference Control

No line-elision-only same-source control is maintained. Typed Go output has no generation option for the leanLine value decision; it is compared with the engine oracle in the internal/engine tests.

Evidence and Implementation

Record 009 combines line elision with trivia discards in example grammars, reporting JSON 50.5 to 42.8 MB and Minilang 32.8 to 23.0 MB. Those reductions are a combined historical result, not an isolated line-only estimate.

Evidence records: 009.

Source owners: LeanLine and the Operators Rule walk, Bcompiler.line, Operators Rule line emission, TypeScript line emission.

The comparison policy distinguishes same-source controls, historical changes and full checkpoints.

Related mechanisms: E010, G160, A170.

Optimization Catalog