|
| 1 | +# grmtools 0.14.0 (2025-10-22) |
| 2 | + |
| 3 | +This release contains a number of new features and breaking changes. Most of |
| 4 | +the breaking changes are in advanced/niche parts of the API, which few users |
| 5 | +will notice. However, four breaking changes might affect a more substantial |
| 6 | +subset of users: those are highlighted in the "breaking changes (major)" |
| 7 | +section below. |
| 8 | + |
| 9 | + |
| 10 | +## New features and improvements |
| 11 | + |
| 12 | + * Lex and Yacc-like inputs can now optionally take a `%grmtools` directive |
| 13 | + which allows customisation of how grmtools treats the file. This allows |
| 14 | + users to keep together the necessary grmtools settings, rather than |
| 15 | + having to remember what is set in, for example, a `build.rs` file. See |
| 16 | + [Lex Extensions](https://softdevteam.github.io/grmtools/latest_release/book/lexextensions.html) |
| 17 | + and [Yacc Extensions](https://softdevteam.github.io/grmtools/latest_release/book/yaccextensions.html |
| 18 | + for more details) in the grmtools book for more details. `nimbleparse` is |
| 19 | + also able to use `%grmtools` directives. |
| 20 | + |
| 21 | + Note that setting options via the command-line / build script overrides |
| 22 | + `%grmtools` directives. |
| 23 | + |
| 24 | + * Many error messages have been improved, ranging from incorrect grammars |
| 25 | + to reporting the look ahead value with reduce/reduce conflicts. |
| 26 | + |
| 27 | + * lrpar uses bincode directly for generated tables, making the serde |
| 28 | + dependency optional. |
| 29 | + |
| 30 | + * `parse_map` been added as a more generic version of `parse_generictree`. The |
| 31 | + latter is marked as deprecated. |
| 32 | + |
| 33 | + * `CTTokenMapBuilder` has been added as a more flexible alternative to |
| 34 | + `ct_token_map`. The latter is marked as deprecated. |
| 35 | + |
| 36 | + * lrlex has a new flag `allow_wholeline_comments` which allows `// ...` |
| 37 | + comments to be added to lex files. This defaults to off, because it is not |
| 38 | + uncommon for Lex rules themselves to use `//`. |
| 39 | + |
| 40 | + * Support for use under WASM has been improved. |
| 41 | + |
| 42 | + |
| 43 | +## Breaking changes |
| 44 | + |
| 45 | + * `LexErrorKind is no longer `Eq`/`PartialEq`. This allows specific errors |
| 46 | + with regexes to be reported, instead of the generic error previously. |
| 47 | + |
| 48 | + * Many `struct`s and `enum`s have been marked non-exhaustive. This means that |
| 49 | + external users cannot directly construct instances of such types. In general, |
| 50 | + these are parts of the API that users would have expected to have received |
| 51 | + from grmtools, not construct themselves. |
| 52 | + |
| 53 | + * `allow_missing_tokens_in_parser` is now treated as a warning. |
| 54 | + |
| 55 | + * `RegexOptions` in lrlex has been renamed `LexFlags`. This struct was, and |
| 56 | + remains, mostly `doc(hidden)` but it cannot be fully hidden from users. |
| 57 | + |
| 58 | + |
| 59 | +## Other changes |
| 60 | + |
| 61 | + * Code generation now uses the |
| 62 | + [quote](https://crates.io/crates/quote) crate and formatted using |
| 63 | + [prettyplease](https://crates.io/crates/prettyplease). This makes dealing |
| 64 | + with the generated code more pleasant. |
| 65 | + |
| 66 | + * The signature for `ct_token_map` has been generalized to use the `Borrow` |
| 67 | + trait instead of a reference. |
| 68 | + |
| 69 | + * The lifetime of the `lrpar_config` callback has been relaxed (previously it |
| 70 | + was the onerous `'static`). |
| 71 | + |
| 72 | + |
1 | 73 | # grmtools 0.13.10 (2025-02-04) |
2 | 74 |
|
3 | 75 | * Add option for more complete POSIX lex compatible regex escapes. For |
|
0 commit comments