mw-parser.simplify

Simplify a parse tree.

simplify-determiner-condition

(simplify-determiner-condition tree)

TODO: write docs

simplify-flow

TODO: write docs

simplify-rule

(simplify-rule tree)

Simplify/canonicalise this tree. Opportunistically replace complex fragments with semantically identical simpler fragments

simplify-second-of-two

(simplify-second-of-two tree)

There are a number of possible simplifications such that if the tree has only two elements, the second is semantically sufficient.