From initial email: Automatic implied token definition insertion: For where you correctly spotted I've implied a token definition, it would be cool if you could go and insert the implied declaration at the "right place" in my source file (give me an action to acknowledge the warning generated and remove the cause for the warning). Pinning down "right place" will require a bit of elegance. It needs to correctly reflect the implied position viz parser and lexer rules. If the first lexer token declaration is one of a bunch (a consecutive sequence with no blank lines between them) then insert in the best-guess alphabetically sorted position (if you've got a poorly maintained sequence that started as sorted, then inserting just before the first element that is alphabetically after the insertion candidate feels a good heuristic).
From initial email: Automatic implied token definition insertion: For where you correctly spotted I've implied a token definition, it would be cool if you could go and insert the implied declaration at the "right place" in my source file (give me an action to acknowledge the warning generated and remove the cause for the warning). Pinning down "right place" will require a bit of elegance. It needs to correctly reflect the implied position viz parser and lexer rules. If the first lexer token declaration is one of a bunch (a consecutive sequence with no blank lines between them) then insert in the best-guess alphabetically sorted position (if you've got a poorly maintained sequence that started as sorted, then inserting just before the first element that is alphabetically after the insertion candidate feels a good heuristic).