Thanks! It does better than I expected on tricky input like [0, 1/2). It seems like there are a lot of special cases, though. It does indeed remove parentheses from the output in some cases but not others.
Probably figuring out how to write things in AsciiMath is more trouble than copying and pasting them from Wikipedia though. (The alt text on equation images is the LaTeX source preceded with \displaystyle.)
How do you do \bigg(\big((4x + 2)x + 1\big)x - 3\bigg)x + 5 in AsciiMath? (((4x + 2)x + 1)x - 3)x + 5 makes all the parens the same size.