What's a good example for Expression, and Scope?



I'm implementing a feature where end-users can type in a formula, and that formula then is used to calculate a result based on a value being received by the software, so I need to be able to have symbol values, and named functions, and thus need to subclass Scope...

I've searched the Juce codebase for examples of Expression and Scope in use, but they are all quite involved and I've gotten lost :)

Can you recommend where to look for a simple example of these classes in use?

Thank you!


TBH I'd suggest using the Javascript parser for this nowadays, instead of the Expression stuff. It's much more powerful, and easier to use.


Ah, I'm glad I asked, I'll take a look at that then!