pmsilva 0 Newbie Poster

Hi,
I need to find an expression evaluator for C/C++ able to support my own functions and my own data type definitions.
- the expression will typically be parsed once but evaluated many times
- the expression result may be of any type, not always float
- the expression arguments may be of any type
When I say "any type" I mean Boolean, String, Color, or anything.

The purpose is to parse and evaluate expressions like:
"if (boolAttr, '(0,255,0)', colorAttr)"
this expression returning a Color type value,
and '(0,255,0)' being a color type constant
and colorAttr being a color type variable

I found some open source projects in Java that fully meet my needs (e.g. the "Expression Engine" project). But until now I was not able to find any in C++

Do you know any library (preferably open source) that could help me ?

(I'm new to this forum - please tell me if this is not the right forum to post questions like this...)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.