Because these grammars are mostly meant for highlighting, you’ll usually prefer to have an unterminated string tokenized as a string. (That does mean that you can’t use the grammar, with the strict option, to validate a script file, since it’ll also accept nonconforming programs.)