uaflex: avoid extra characters in lookahead
|Reported by:||Maxim Reznik||Owned by:||Maxim Reznik|
Description (last modified by )
There are situations when lexer generated by uaflex can avoid looking beyond right bound of the lexeme. If it's in a final state there is no transition by any next character, lexer should return result immediately.
Let's call such states 'dead-end' states and reorder them after any others. This avoid fast check is this state is dead-end.
We can also reorder other final states and place them before dead-ends, so we have continuous range of final states.