User blog comment:Wythagoras/Dollar function: complete ruleset/@comment-25418284-20131215060242/@comment-10429372-20131215070014

The active bracket is the bracket with the lowest level. The brackets can be ordered by level in FGH, and then removing outermost bracket. Or you look to: the smallest seperator, shortest array, smallest number in array, smallest bracket type, least number of nestings, smallest number inside the bracket.