Boost logo

Boost Users :

From: Richard L. Aurbach (rick_at_[hidden])
Date: 2008-07-28 19:14:44


I am looking for some code to handle simple expression evaluation --
cases like
        "a | b | c", or "(a + b)/2",
where 'a', 'b', and 'c' are named constants that I can evaluate by
lookup. I.e., code to evaluate simple expressions to produce integer
results.

I'm looking for something light-weight and easy to use -- something
that justifies a decision to look elsewhere rather than writing the 10-
million-and-first simple evaluator. (I know that lots of folks have
written this type of code as a homework assignment in a data
structures course. As it happens, I don't have an old assignment to
look up and am hoping to spare the time doing it now :-) )

I didn't see anything in the boost library that didn't appear to be
incredible overkill, but I'm happy to be proven wrong about that.

Anyway, I would be very interested in some suggestions (using boost or
otherwise) that can help me implement run-time evaluation of simple
expressions without a major investment in the size or complexity of my
application.

Cheers,

Rick Aurbach
Aurbach & Associates, Inc.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net