looking for simple exp parser

Just starting out? Need help? Post your questions and find answers here.
gnasen
Enthusiast
Enthusiast
Posts: 282
Joined: Wed Sep 24, 2008 12:21 am

looking for simple exp parser

Post by gnasen »

Hey folks,
Ive seen a simple expression parser before some time and was not able to find it again :(
So if anyone knows a parser for simple math expressions (at least +-*/) with the possibility to add own functions (like mySin() ) on the fly, I would be glad if you could tell me!
pb 5.11
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: looking for simple exp parser

Post by Danilo »

gnasen wrote:Hey folks,
Ive seen a simple expression parser before some time and was not able to find it again :(
So if anyone knows a parser for simple math expressions (at least +-*/) with the possibility to add own functions (like mySin() ) on the fly, I would be glad if you could tell me!
I think you mean iostream's parser. It's in the german forum.
It is GPL if i remember correctly, don't know if that is useful for you.

My own expression parser does not support own functions, but maybe you want to add it yourself.
It is also in german forum or direct d/l @ EvaluateExpression.zip.
No license restrictions, do what you want with it.
gnasen
Enthusiast
Enthusiast
Posts: 282
Joined: Wed Sep 24, 2008 12:21 am

Re: looking for simple exp parser

Post by gnasen »

thanks a lot, the one written by iostream is what I was looking for. As long as Im in the developing stage, the license thing is okay. In the worst case I would write one by my own, but thats waste of time if there are already good ones developed.
Your parser was btw the first one I tried out today and it looks really great. Custom function callbacks would be a nice enhancement ;)
pb 5.11
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: looking for simple exp parser

Post by Danilo »

gnasen wrote:Custom function callbacks would be a nice enhancement ;)
I don't have time for that now, sorry.
(3 weeks holiday/vacation that i use for my own C# projects)
User avatar
utopiomania
Addict
Addict
Posts: 1655
Joined: Tue May 10, 2005 10:00 pm
Location: Norway

Re: looking for simple exp parser

Post by utopiomania »

del
Post Reply