Added __slots__ to RulePtr and Token, resulting in significantly lower memory consumption. As suggested by @drslump.