Skip to content

Commit f02b111

Browse files
committed
Prepare a 0.14.0 release.
1 parent 76d5e6b commit f02b111

File tree

6 files changed

+86
-14
lines changed

6 files changed

+86
-14
lines changed

CHANGES.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,75 @@
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+
173
# grmtools 0.13.10 (2025-02-04)
274

375
* Add option for more complete POSIX lex compatible regex escapes. For

cfgrammar/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "cfgrammar"
33
description = "Grammar manipulation"
44
repository = "https://github.com/softdevteam/grmtools"
5-
version = "0.13.10"
5+
version = "0.14.0"
66
edition = "2024"
77
readme = "README.md"
88
license = "Apache-2.0/MIT"

lrlex/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "lrlex"
33
description = "Simple lexer generator"
44
repository = "https://github.com/softdevteam/grmtools"
5-
version = "0.13.10"
5+
version = "0.14.0"
66
edition = "2024"
77
readme = "README.md"
88
license = "Apache-2.0/MIT"
@@ -24,8 +24,8 @@ _unsealed_unstable_traits = ["_unstable_api"]
2424
vergen = { version = "8", default-features = false, features = ["build"] }
2525

2626
[dependencies]
27-
cfgrammar = { path = "../cfgrammar", version = "0.13" }
28-
lrpar = { path = "../lrpar", version = "0.13" }
27+
cfgrammar = { path = "../cfgrammar", version = "0.14" }
28+
lrpar = { path = "../lrpar", version = "0.14" }
2929

3030
getopts.workspace = true
3131
regex.workspace = true

lrpar/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "lrpar"
33
description = "Yacc-compatible parser generator"
44
repository = "https://github.com/softdevteam/grmtools"
5-
version = "0.13.10"
5+
version = "0.14.0"
66
edition = "2024"
77
readme = "README.md"
88
license = "Apache-2.0/MIT"
@@ -23,8 +23,8 @@ _unsealed_unstable_traits = ["_unstable_api"]
2323
vergen = { version = "8", default-features = false, features = ["build"] }
2424

2525
[dependencies]
26-
cfgrammar = { path="../cfgrammar", version = "0.13", features = ["bincode"] }
27-
lrtable = { path="../lrtable", version = "0.13", features = ["bincode"] }
26+
cfgrammar = { path="../cfgrammar", version = "0.14", features = ["bincode"] }
27+
lrtable = { path="../lrtable", version = "0.14", features = ["bincode"] }
2828

2929
bincode = { workspace = true, features = ["derive"] }
3030
cactus.workspace = true

lrtable/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "lrtable"
33
description = "LR grammar table generation"
44
repository = "https://github.com/softdevteam/grmtools"
5-
version = "0.13.10"
5+
version = "0.14.0"
66
edition = "2024"
77
readme = "README.md"
88
license = "Apache-2.0/MIT"
@@ -17,7 +17,7 @@ name = "lrtable"
1717
path = "src/lib/mod.rs"
1818

1919
[dependencies]
20-
cfgrammar = { path="../cfgrammar", version = "0.13" }
20+
cfgrammar = { path="../cfgrammar", version = "0.14" }
2121

2222
bincode = { workspace = true, features = ["derive"], optional = true }
2323
fnv.workspace = true

nimbleparse/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "nimbleparse"
33
description = "Simple Yacc grammar debugging tool"
44
repository = "https://github.com/softdevteam/grmtools"
5-
version = "0.13.10"
5+
version = "0.14.0"
66
edition = "2024"
77
readme = "README.md"
88
license = "Apache-2.0/MIT"
@@ -13,10 +13,10 @@ doc = false
1313
name = "nimbleparse"
1414

1515
[dependencies]
16-
cfgrammar = { path="../cfgrammar", version="0.13" }
17-
lrlex = { path="../lrlex", version="0.13" }
18-
lrpar = { path="../lrpar", version="0.13" }
19-
lrtable = { path="../lrtable", version="0.13" }
16+
cfgrammar = { path="../cfgrammar", version="0.14" }
17+
lrlex = { path="../lrlex", version="0.14" }
18+
lrpar = { path="../lrpar", version="0.14" }
19+
lrtable = { path="../lrtable", version="0.14" }
2020

2121
getopts.workspace = true
2222
num-traits.workspace = true

0 commit comments

Comments
 (0)