Skip to main content

parse_intersection

Function parse_intersection 

Source
pub fn parse_intersection(spec: &str) -> Result<Intersection, String>
Expand description

Parse a focused English spec into an Intersection.

Recognised:

  • Movements: a, b, c. — an optional explicit movement set (so isolated movements appear).
  • <A> conflicts with <B>, <C> and <D>.A may not share a phase with any of B, C, D.

Movement names are everything else (articles the/a/an are dropped). Names are matched case-insensitively; the first spelling seen is the display name.