[antlr-interest] Saving state on incomplete tokens
Joseph Areeda
newsreply at areeda.com
Fri Aug 7 19:09:59 PDT 2009
I'm working on an editor for the Open Office IDL in NetBeans, using
antlr for the syntax coloring, error highlighting ... Things are
working well except for the "lexing while typing" part.
Looking at the results of getState() I see a RecognizerSharedState
object when tokens are complete but null during a token such as a /*
style comment or a "quoted string" causing a "state can't be null"
exception. Even weirder all the times the lexer returns a state NB
doesn't complain if I pass back a null.
I've been searching and reading to no avail. Anybody have a suggestion
how to save and restore the lexer state for these partial token?
Thanks,
Joe
More information about the antlr-interest
mailing list