performance improvement (fix) for tokenizer

my last commit caused serious performance degradation to the tokenizer because
determining the line number was counting from the start of the string every time
instead of determining the deltas.