SPITBOL-like pattern construction and matching in C++