Move more of the function's token pattern into Rules.add_rules