Formal RegExpOptimize does not sort (A2)
Sorting for simple formal regexps doesn't work.
> print "b + a" | (FormalRegExp)string::Parse @RegExp - | RegExpOptimize - | string::Compose -
b+a
See https://gitlab.fit.cvut.cz/algorithms-library-toolkit/automata-library/blob/01c82be7/alib2algo/src/regexp/simplify/RegExpOptimizeFormalPart.hpp#L122
There is a missing code. The current code only considers regexps in the form E + (F + G)
and it swaps E
and F
if (E > F)