Comments on parsing steps:

From first reading, it appears that the step of "parsing embellishments"
e.g. superscripts, accents etc needs to happen *before* the operator
precedence parsing step.

Also, this will allow us to handle complex expressions appearing as
embellishments to other complex expressions correctly.

For an example, see Faa De Bruno's formula in my collection of examples,
especially the second version where the formula is rewritten with underbraces
marking off the separate chunks.

I'll append the TeX below in case you want to look at it:

\begin{equation}  \label{eq:faa-de-bruno-subst}
  D^n_xw = \sum_{0\le j\le n} \sum_{%
\atop {\scriptstyle%
\atop {\scriptstyle%
            k_1,k_2,\ldots,k_n\ge0 }}}}_{\mbox{%
\em lower constraint1\/}}}%
D^j_u w%
  \frac{\overbrace{n!  {(D^1_x u)}^{k_1} \cdots
      {(D^n_x u)}^{k_n}} ^{\mbox{\em numerator 1\/}}}
    \cdots k_n!{(n!)}^{k_n}}_{\mbox{\em denominator 1\/}}}

Best Regards,

      Adobe Systems                 Tel: 1 (415) 962 3945   (B-1 115)
      Advanced Technology Group     Fax: 1 (415) 962 6063 
      (E 1-160) 1585 Charleston Road       Email: raman@adobe.com 
      Mountain View, CA 94039 -7900  raman@cs.cornell.edu
      http://www-atg/People/Raman.html (Internal To Adobe)
      http://www.cs.cornell.edu/Info/People/raman/raman.html  (Cornell)
Disclaimer: The opinions expressed are my own and in no way should be taken
            as representative of my employer, Adobe Systems Inc.