Lexer finalization: handles streaming data better and recognizes some language elements