Skip to main content

Module recognizers

Module recognizers 

Source
Expand description

Pattern recognizer catalog — spec §10.9.5.

Each recognizer matches one syntactic shape against a predicate string and produces partial PredicateInfo data. The analyzer (super::analyzer::analyze) composes the recognizers to build the full info.

§Initial catalog (spec §10.9.5)

  • {a} OP K for OP ∈ {==, !=, <, <=, >, >=}
  • {a} OP {b} (cross-axis)
  • p1 && p2 (recursive)
  • p1 || p2 (recursive)
  • !p
  • K1 <= {a} && {a} <= K2 (range fold)
  • {a} in [K1, K2, K3] (discrete-set membership)

Patterns NOT in this catalog return Opaque(UnknownPattern). Per spec §10.9.4 property 2 (“Conservatively incomplete”): missing an optimization is acceptable; asserting a false property is not.

Functions§

extract_coord_refs
Extract {name} interpolation references from a predicate string. Mirrors the helper in validate.rs’s V3 check.
recognize
Top-level entry — try recognizers in priority order. Returns the most specific match.