basic python classes for finding syntax groups (candidates)