-
Website
http://www.thefreakparade.com -
Original page
http://www.thefreakparade.com/2008/08/simple-expression-evaluator-project-now-on-codeplex/ -
Subscribe
All Comments -
Community
-
Top Commenters
-
Sriram Parthasarathy
1 comment · 1 points
-
vludy
1 comment · 1 points
-
Content Management System
1 comment · 1 points
-
karl_mcguinness
1 comment · 1 points
-
spikuenak
1 comment · 1 points
-
-
Popular Threads
Because I would solve this issue with BooParser.ParseString()
I wasn't actually aware of BooParser.ParseString until just this moment. It looks to me, though, like the method gives you an AST tree, which you could then optionally compile and run. This is fine, but I'd still either need to compile the AST tree to my own object model or do a good bit of mucking around with the Boo AST to make sure custom variables were expanded properly, custom functions, etc. I am not sure it would have been any less work at the end of the day, and probably a bit more opaque.
That being said, I'm *not* sure Simple Expression Evaluator has a strong value proposition when compared to the two already existing Expression Evaluators on CodePlex, FLEE (uses dynamic code generation) and LazyParser (uses reflection). Both probably would work as well as mine, and existed before I wrote this. But I wanted a good excuse to try out Irony.net, and I selfishly wanted full control of the API. And, of course, I like this crap, and enjoy the tinkering (something I'm sure you could never understand :) ) Whether or not it provides anybody with a new and better expression eval library (probably not) it can serve as a pretty textbook example of one common approach to turning an AST into an object model and evaluating it.
I wanted to know that you are aware of the other options.