Tokenizing lines of text with a syntax mode