Support for token processor. Fixes #1156