From f04fd2d76ff6ccdaaa319af35e1ce56fdec22711 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sat, 13 Jan 2024 17:18:01 +0900 Subject: [PATCH 1/2] Write notable changes in v0.6.1 --- NEWS.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/NEWS.md b/NEWS.md index 0af278fc..ea95c0a2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,47 @@ # NEWS for Lrama +## Lrama 0.6.1 (2024-xx-xx) + +### Nested parameterizing rules + +Allow to pass an instantiated rule to other parameterizing rules. + +``` +%rule constant(X) : X + ; + +%rule option(Y) : /* empty */ + | Y + ; + +%% + +program : option(constant(number)) // Nested rule + ; +%% +``` + +Allow to use nested parameterizing rules when define parameterizing rules. + +``` +%rule option(x) : /* empty */ + | X + ; + +%rule double(Y) : Y Y + ; + +%rule double_opt(A) : option(double(A)) // Nested rule + ; + +%% + +program : double_opt(number) + ; + +%% +``` + ## Lrama 0.6.0 (2023-12-25) ### User defined parameterizing rules From 963fec3ebe76f328bcb3a2e8771592015453f1c3 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Sat, 13 Jan 2024 17:20:16 +0900 Subject: [PATCH 2/2] Add links to PR in NEWS.md --- NEWS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index ea95c0a2..397742d2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -42,6 +42,8 @@ program : double_opt(number) %% ``` +https://github.com/ruby/lrama/pull/337 + ## Lrama 0.6.0 (2023-12-25) ### User defined parameterizing rules @@ -62,6 +64,8 @@ stmt: pair(ODD, EVEN) ; ``` +https://github.com/ruby/lrama/pull/285 + ## Lrama 0.5.11 (2023-12-02) ### Type specification of parameterizing rules