I am trying to define a basic language to build expressions which I will evaluate myself from code. Such expressions are defined recursively in run time. You may think of it as boolean expressions having elementary expressions like True and False, and also involving complex expressions like the negation of an expression and the disjunction and conjuntion of any two expressions.
As mentioned, such expressions are recursive and will be created in run time, so I guess templates are no choice. What is the most suitable way to implement typing and an evaluation function in C++ 2011 for this purpose?
Any comments will be welcome, as my knownledge on C++ patterns and features sadly does not get quite far yet.
Aucun commentaire:
Enregistrer un commentaire