--
I agree the best way to handle implicitly-terminated line comments is to not include the terminating newline character(s) in the token.
Â
The EOF handling was to allow additional flexibility for lexing unterminated block comments:
Â
BlockComment
   :  '/*' .*? (EOF | '*/')
;
Â
--
Sam Harwell
Owner, Lead Developer
--
Â
Â
--
Â
Â
--
Â
Â