Skip to content

Commit 740bbdd

Browse files
ydahyui-knk
authored andcommitted
Lrama v0.8.0
1 parent b0ee787 commit 740bbdd

File tree

3 files changed

+172
-124
lines changed

3 files changed

+172
-124
lines changed

tool/lrama/NEWS.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
11
# NEWS for Lrama
22

3-
## Lrama 0.8.0 (2026-xx-xx)
3+
## Lrama 0.8.0 (2026-03-01)
4+
5+
### Support parser generation without %union directive (Bison compatibility)
6+
7+
When writing simple parsers or prototypes, defining `%union` can be cumbersome and unnecessary.
8+
Lrama now supports generating parsers without the `%union` directive, defaulting `YYSTYPE` to `int`, the same behavior as Bison.
9+
10+
When `%union` is not defined:
11+
12+
- `YYSTYPE` defaults to `int`
13+
- Semantic value references are generated without union member access
14+
- The generated parser behaves identically to Bison-generated parsers
15+
16+
https://github.com/ruby/lrama/pull/765
17+
18+
### Allow named references on parameterized rule calls inside %rule
19+
20+
Named references (e.g. `[opt]`) can now be used with parameterized rule calls inside a `%rule` body.
21+
Previously, writing `f_opt_arg(value)[opt]` inside a `%rule` resulted in a parse error.
22+
23+
```yacc
24+
%rule example(X): f_opt_arg(X)[opt] { $$ = $opt; }
25+
;
26+
```
27+
28+
https://github.com/ruby/lrama/pull/778
29+
30+
### Fix nested parameterized rule calls in subsequent argument positions
31+
32+
Nested parameterized rule calls (e.g. `f_opt(number)`) can now appear in any argument position, not only the first one.
33+
Previously, using a nested call as the second or later argument caused a parse error.
34+
35+
```yacc
36+
%%
37+
program: args_list(f_opt(number), opt_tail(string), number)
38+
;
39+
```
40+
41+
https://github.com/ruby/lrama/pull/779
442

543
## Lrama 0.7.1 (2025-12-24)
644

0 commit comments

Comments
 (0)