Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: Algorithm needed to convert a text string to a mathematical expression




Bob: what you want is a good parser or better yet, once specifically
written for equations that your computer language supports. Writing your
own is a major programming project and assumes a good knowledge of B
trees and other computer science topics. I would first check with the
developer of your specific language compilier for existing equation
parsers. Failing that, I would look into some of the 3rd party general
parser programs available that support your language and then adapt that
parser to serve your purpose. These 3rd party tools are usually
advertised in Dr. Dobbs Programming Journal, MDJ (Microsoft's Developers
Journal) etc., all of which are available from the library or newsstand.
Trust me Bob - do anything you can to avoid writing your own.

Dave McClure
Professor of Chemistry
Chemistry Department
Portland State University
h6dm@odin.cc.pdx.edu


On Fri, 1 Nov 1996 Raacc@aol.com wrote:

Does anyone have a source for an algorithm that will look at a text string
and convert it into a mathematical expression? I suspect this algorithm is
fairly standard in most spreadsheets and am looking for the code before I
re-invent the wheel.

Thanks,

Bob Carlson