|
-
Jan 28th, 2002, 05:57 PM
#1
Thread Starter
Fanatic Member
Mathematical Function Parser
I'm looking at making a Function parser in C++ that will take sloppily written functions, clean them up, and evaluate them. Uses of this would include writing simple calculators, graphing calculators, and the like.
As I see it, there would be three main classes:
variables (constants, intrinsic, user defined)
functions (intrinsic, user defined, single & multi-argument, default-argument)
operators (intrinsic, user defined, precedence optionally set by user)
There should be some way to make additional evaluations of a given function (read: parse a function so that a smaller amount of work has to be done to evaluate it a second time).
Anything else you would want to add would be excellent. I am looking for people to give me ideas on what to include, and possibly people to help me code it. I will definately need some guidance on syntax. I have done a function parser in VB with some of the above capabilities, but I have a feeling C++ will be *slightly* faster. Not only that, but I have a feeling it is an excellent way to acquaint myself with the syntax used.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|