I guess my question is pretty basic:
I am using JFlex for generating my lexer:
I'm defining the following rule:
SETTING = ("blocked"|"multiple"|"more_is_better"|"less_is_better")
yybegin(NEXT_STATE); return MyTypes.SETTING;
this definition leads to the problem that the tokenizer reads a bad character if the first char is typed. This again leads to bad auto completion (see screenshot). You can see that the first typed char 'm' is not regarded by code completion and I guess it's due to the BAD_CHARACTER.
Can you please tell me how to modify the lexer to not return BAD_CHARACTER if the typed token is the start of SETTING? Especially, which TokenType can I return then? I tried it with TokenType.DUMMY_HOLDER and TokenType.CODE_FRAGMENT.
However I think that is a pretty basic problem and I was hoping for a solution that helps me to understand the Lexer-Algorithms better.
Thanks for any help,