1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! The event-name matcher of the specification's section 3.13, the
//! pseudocode's `nameMatch`, as the reference matches
//! (`Statifier.Interpreter.NameMatch`).
//!
//! A descriptor matches an event name when its tokens are a prefix of the
//! event's tokens on token boundaries: `error` matches `error.execution` and
//! not `errors.execution`. A trailing `*` token, or the empty token a
//! trailing dot leaves, is dropped before the prefix test, so `*` matches
//! every event, `a.*` matches `a` and `a.b`, and `a.` matches as `a` does. A
//! `*` anywhere else is matched as written.
//!
//! A transition's descriptors arrive split on their dots by the compiler
//! (the machine's `Transition::events`), so both sides are token lists; an
//! event name is split once per selection round by [`tokenize`].
/// Whether any of `descriptors` (one token list per descriptor of a
/// transition's `event` attribute) matches the event whose name is
/// `event_tokens`.
pub
/// Whether one descriptor's tokens, with a trailing `*` or empty token
/// dropped, are a prefix of `event_tokens`.
/// An event name split on its dots, every empty part kept: the empty name
/// is one empty token, as the reference splits it.
pub