Operator Precedence Parsing
While ad-hoc methods are sometimes used for parsing expressions, a more formal technique using operator precedence simplifies the task. For example an expression such as
(x*x + y*y)^.5
An excellent and more theoretical treatment may be found in Compilers, Principles, Techniques and Tools by Aho, Sethi, and Ullman. Right-click on the following links for additional downloads:
Permission to reproduce portions of this document is given provided the web site listed below is referenced. No additional restrictions apply. Source code, when part of a software project, may be used freely without reference to the author.