Skip to main content

Module codes

Module codes 

Source
Expand description

Diagnostic codes emitted by the PEG interpreter.

Constants§

LEFT_RECURSION
A rule was re-entered at the same input position without any progress — indicates left recursion. G-3’s GrammarCheck will catch this statically; the runtime guard is a backstop that errors out rather than hanging.
NO_TOP_TREE
Parse succeeded but the start rule never reached a super::Peg::Node, so there is no top-level ParseTree.
NULLABLE_REPEAT
A super::Peg::Repeat iteration succeeded without consuming input. The interpreter breaks the loop (per §3.5 termination guarantee); this diagnostic is attached when the min bound is also not yet met, turning the situation into a hard failure.
UNEXPECTED
Input did not match at the farthest failure position; message carries the expected set.
UNKNOWN_RULE
super::Peg::RuleRef pointed to a rule name not present in super::Grammar::rules, or super::Grammar::start itself is unresolved.