Sorting a CTreeCtrl

The CTreeCtrl supports several ways to sort its content: InsertItem allows to insert the child item alphabetically, when specifying TVI_SORT for hInsertAfter SortChildren performs an alphabetical sorting of the child items of the given parent item in a tree SortChildrenCB performs a sort with a user-defined callback (hence the CB suffix) of the children of…

Evaluating Expressions – Part 3: Building the AST

In my previous post we’ve parsed an exception verifying whether it’s correct or not syntactically. But we still have to evaluate it. To be able to do that we’ll have to build an abstract syntax tree. This can be done by modifying the previous code and inserting semantic action. That means we do something more…

Evaluating Expressions – Part 2: Parse the Expression

In my previous post I have provided some background theory for evaluating expressions with abstract syntax trees. As I was mentioning, the first step towards this goal is to parse the expression, make sure it is correct syntactically. This is what I’ll show you in this post. Having the grammar defined, we’ll make one function…