Handle end of tokens in rules.addSource