This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Here is a patch that removes the methods get/set attribute from the TokenIterator and replaces it with Token.setData & Token.getData. In order to make those methods unavailable to outside world, I have changed the Token to be abstract class. Which is fine except the *.module.lexer.swing package. Please evaluate the patch.
Created attachment 5318 [details] Token.java and other modifications
The TokenIterator was removed completely. Now the TokenUpdater is used to update the token list. It has protected methods that are responsible for getting/updating lookahead, lookback and state.