Modernised cpp example under extras. Fixed bugs in rules::tokenise().