Tuesday, July 31, 2001 06:29 AM
Interestingly enough the InputBuffer class doesn't have a close() method, nor a method to get the Reader or InputStream it is using.
I would add an instance variable to your lexer for the Reader. Set it after you initialize the lexer. In uponEOF() you can then explicitly close it.
Yes, it's annoying that you can't handle it automatically in the initializer of the lexer, but that is something that is generated and hence difficult to change.