Click to See Complete Forum and Search --> : Math Parsing


nigel5
May 18th, 1999, 06:13 AM
I am trying to write a parser that will generate a function tree from a string literal like "(1 + sin(x)) * (3 + 4 * cos(y))"
I am wondering if there are any code snipets here, or at any math sites on the web.?

Nigel.

Karl Spaelti
June 1st, 1999, 07:52 AM
If your math expressions can get "ugly" (i.e. complex) you may want to look into "real" parsers. Visit the following web sites:

http://www.first.gmd.de/cogent/catalog/lexparse.html
http://www.programmar.com (commercial; I just bought it and like it).

Otherwise, hope for a better reply.... ;-)

Regards. Karl