When creating a lexer you cannot run more than one source through it at a given time. Since the source is set the lexer is a stateful object that you call next on. The only way to get another lexer that you could run on at the same time would be to make a full lexer even though this is totally unnecessary.
Separate the runtime info from the lexer into a separate class. When setting the input on the lexer, return a runtime bound to the current input. Many of these classes should then be createable and runnable at the same time.
When creating a lexer you cannot run more than one source through it at a given time. Since the source is set the lexer is a stateful object that you call next on. The only way to get another lexer that you could run on at the same time would be to make a full lexer even though this is totally unnecessary.
Separate the runtime info from the lexer into a separate class. When setting the input on the lexer, return a runtime bound to the current input. Many of these classes should then be createable and runnable at the same time.