Wow. I was about to link to your own post about creating the expression evaluator when I realized it was already you asking the question.
I really do NOT like the new "first message" format.
You could restrict them to applying their scripts on things contained in their own Session object, then control what can and cannot be put into the session object?
Hehe, the math part of the equation was a cakewalk - now I'm getting into the logic part of the equation...which I'm still looking for inspiration on. I have some ideas:
CodeDom.Compiler - Not sure if or how I can sandbox this to prevent security issues, probably using thread.principal to verify security permissions - but then I have to worry about system security outside of the application, which to be honest, I'm not enthused about.
Custom Parser - Probably the way I will go because it's the only way I can think of to create a sandbox to prevent security issues.
Domain Specific Languages - not sure if this is a dead end or not yet, I havent finished my investigation... but so far, it's looking like more work than I wanted to put in for such a minor piece of the application.
I was just reading a nifty article about parse trees by a guy called John Kennedy at Santa Monica College and it took me back to my university days. It's definitely something that anyone trying to tackle this type of challenge should read - it's at:
http://homepage.smc.edu/kennedy_john/PARSETREES.PDF
Alas, all the code contained within is in Pascal - so probably not useful to everyone. But I found it pretty interesting...
Sadly, it only really takes me part way - the equation evaluator - and to be honest, my equation evaluator is about as advanced as it needs to be for this application, and only took half as much technical ingenuity to code it - it takes the exact same route as if you'd figured it out by hand and the pattern recognition approach a human uses. If I needed something more advanced I would pursue the parse trees and probably build something more technically advanced to cover the greater scope.
Right now though, I think it just boils down to inspiration, I've not come across anything sexy enough. All the solutions I've come across are either just ugly or are not only ugly, but far more code than I think should be necessary...