Adding generic constraints to base rule methods for Range and Characters.