Source code of mathematical parser?

Quote:

>Does anybody know where I can get the source code for a mathematical

>expression parser in C? I'm thinking of a C equivalent to something

>like Jep (http://www.singularsys.com/jep/index.html). Something free

>or open source is best. Thanks.

If your intent is to start writing computer languages, check the FAQ of

the newsgroup comp.compilers, published there monthly.

The GNU parser generator Bison (at gnu.org) has in its manual a small

example how to write a parser for simple math expressions using parser

henrators by hand.

Stroustrups C++ book has a by hand example for C++; you might convert it to C.

If you want multiprecison arithmetic, pick down the GNU GMP prgram.

Hans Aberg * Anti-spam: remove "remove." from email address.

* Home Page: <http://www.math.su.se/~haberg/>

* AMS member listing: <http://www.ams.org/cml/>

--