Skip to content

v1.30.0

Latest

Choose a tag to compare

@yhirose yhirose released this 28 Oct 16:38

This release lets %word tell which characters start a word from which ones go on it, and fixes how the word boundary is decided for a dictionary entry and for a keyword that ignores case. The internal layout changed (abidiff reports it), so it is a minor release.

✨ New: %word of the form [A] [B]*

%word can now say which characters start a word (A) and which go on one (B). A literal is checked as a word only if it starts with a character of A, and it does not match where a character of B follows it.

%word  <-  [a-zA-Z_] [a-zA-Z0-9_$]*   # 'AS' does not match in AS$x, and '$' is not a word literal

Any other %word, such as [a-z], [a-z]+ or a reference to a rule, says both, as before, so existing grammars behave the same.

🐛 Fixed

  • A dictionary entry that does not start a word is no longer checked for a word boundary after it.
  • A keyword that ignores case ('if'i) is checked as a word if either case of its first character starts a word, and this is decided the same way in every place that looks at it.
  • The %word fast paths are kept when %word has non-ASCII characters.

⚠️ Changes to be aware of

  • The layout of some internal types changed. Programs linked against an earlier version must be rebuilt (ABI). Source code compiles unchanged.