Generate an automaton inductively from an expression.
The algo
might be:
"auto"
: same as "standard"
."standard"
generate a standard automaton.Postconditions:
"standard"
e.standard()
.See also:
Contrary to expression.standard, inductive
supports the extended expressions.
import vcsn
import sys
q = vcsn.context('lal_char(abc), q')
exp = q.expression('(<1/6>a*+<1/3>b*)*')
exp.inductive('standard')
exp.standard()
ext_exp = q.expression('[ab]*a[ab]{2} & [ab]*a[ac]{4}')
ext_exp.inductive('standard')
try:
ext_exp.standard()
except RuntimeError as e:
print(e, file=sys.stderr)