From d6022f1d80fba21ce9396a2ffb994e8cd0b5e9ea Mon Sep 17 00:00:00 2001 From: ydah Date: Wed, 11 Sep 2024 18:20:21 +0900 Subject: [PATCH 1/2] Add NEWS for v0.6.10 --- NEWS.md | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/NEWS.md b/NEWS.md index 69b2a268..0e682b46 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,116 @@ # NEWS for Lrama +## Lrama 0.6.10 (2024-09-11) + +### Aliased Named References for actions of RHS in parameterizing rules + +Allow to use aliased named references for actions of RHS in parameterizing rules. + +``` +%rule sum(X, Y): X[summand] '+' Y[addend] { $$ = $summand + $addend } + ; +``` + +https://github.com/ruby/lrama/pull/410 + + +### Named References for actions of RHS in parameterizing rules caller side + +Allow to use named references for actions of RHS in parameterizing rules caller side. + +``` +opt_nl: '\n'?[nl] { $$ = $nl; } + ; +``` + +https://github.com/ruby/lrama/pull/414 + +### Widen the definable position of parameterizing rules + +Allow to define parameterizing rules in the middle of the grammar. + +``` +%rule defined_option(X): /* empty */ + | X + ; + +%% + +program : defined_option(number) + | defined_list(number) + ; + +%rule defined_list(X): /* empty */ /* <--- here */ + | defined_list(X) number + ; +``` + +https://github.com/ruby/lrama/pull/420 + +### Report unused terminal symbols + +Support to report unused terminal symbols. +Run `exe/lrama --report=terms` to show unused terminal symbols. + +``` +❯ exe/lrama --report=terms sample/calc.y + 11 Unused Terms + 0 YYerror + 1 YYUNDEF + 2 '\\\\' + 3 '\\13' + 4 keyword_class2 + 5 tNUMBER + 6 tPLUS + 7 tMINUS + 8 tEQ + 9 tEQEQ + 10 '>' +``` +https://github.com/ruby/lrama/pull/439 + +### Report unused rules + +Support to report unused rules. +Run `exe/lrama --report=rules` to show unused rules. + +``` +❯ exe/lrama --report=rules sample/calc.y + 3 Unused Rules + 0 unused_option + 1 unused_list + 2 unused_nonempty_list +``` + +https://github.com/ruby/lrama/pull/441 + +### Ensure compatibility with Bison for `%locations` directive + +Support `%locations` directive to ensure compatibility with Bison. +Change to `%locations` directive not set by default. + +https://github.com/ruby/lrama/pull/446 + +### Diagnostics report for parameterizing rules redefine + +Support to warning redefined parameterizing rules. +Run `exe/lrama -W` or `exe/lrama --warnings` to show redefined parameterizing rules. + +``` +❯ exe/lrama -W sample/calc.y +parameterizing rule redefined: redefined_method(X) +parameterizing rule redefined: redefined_method(X) +``` + +https://github.com/ruby/lrama/pull/448 + +### Support `-v` and `--verbose` option + +Support to `-v` and `--verbose` option. +These options align with Bison behavior. So same as '--report=state' option. + +https://github.com/ruby/lrama/pull/457 + ## Lrama 0.6.9 (2024-05-02) ### Callee side tag specification of parameterizing rules From 872aa4dc23921166818e93f075d110f072613b0a Mon Sep 17 00:00:00 2001 From: ydah Date: Wed, 11 Sep 2024 18:24:35 +0900 Subject: [PATCH 2/2] v0.6.10 --- lib/lrama/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lrama/version.rb b/lib/lrama/version.rb index c454222a..d452430b 100644 --- a/lib/lrama/version.rb +++ b/lib/lrama/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lrama - VERSION = "0.6.9".freeze + VERSION = "0.6.10".freeze end