Using the algorithm described in
"Feasible Algorithms for Semantics — Employing Automata and Inference Systems"
(The terms such as <1,2> are indices into the regex AST. So e.g. inside of the argument of a toplevel repetition, select the second argument of the toplevel permutation)
Syntax:
Literals (lowercase letters):
a
Sequence:
expr1.expr2.expr3
Permutation:
{expr1,expr2,expr3}
Alternative:
(expr1|expr2|expr3)
Repetition:
(expr)<2>
or
(expr)<2,3>
―
Example:
a.{x,y}.c
Example:
({(a)<2>, b})<3..4>
Non-deterministic example:
((a)<1..2>)<2>
Non-deterministic example:
((a)<1..2>)<1..2>
Regex:
a.{x,y}.c
Input:
Result: