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
/// Creates a linear FST from a string or a list of labels.
///
/// A shorthand for [`compile_labels`](crate::string::compile_labels) with the
/// byte token type, for the common case of a literal in a test or an example.
///
/// # Examples
/// ```
/// use sicada::{fst_linear, fst::ExpandedFst, vector_fst::StdVectorFst};
///
/// let fst = fst_linear!(StdVectorFst, "hello");
/// assert_eq!(fst.num_states(), 6);
///
/// let from_labels = fst_linear!(StdVectorFst, [1, 2, 3]);
/// assert_eq!(from_labels.num_states(), 4);
/// ```