I have a new-found respect for major mode authors. Writing a syntax-propertize-function is hard.