expression.thompson
Generate the Thompson automaton from an expression.
Preconditions:
the expression is basic.
Caveats:
it is not guaranteed that
Result.is_valid()
the context of the result might be different from the original context: spontaneous-transition support is required.
Properties:
Result.proper().is_isomorphic(r.standard())
See also:
Examples
The Thompson procedure generates an automaton with spontaneous-transitions, which requires a labelset that features a "one" label. The nullableset and wordset labelsets (and their compositions) do support a "one" label.
You may, however, use a labelset which does not feature a "one", in which case the context of the automaton will be different from the one of the expression.
Weights
Weights are supported.
Note however that you may generate invalid automata (from invalid expressions):