From b1dc5587d00d3cfeddbb0f84bbb29424a6b2af96 Mon Sep 17 00:00:00 2001 From: ydah Date: Sun, 22 Dec 2024 23:06:28 +0900 Subject: [PATCH 1/2] Update NEWS.md to add support for %type declarations using %nterm in Nonterminal Symbols --- NEWS.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/NEWS.md b/NEWS.md index ac44002d..3c3cb1df 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,40 @@ # NEWS for Lrama +## Lrama 0.6.11 (2024-12-23) + +### Add support for %type declarations using %nterm in Nonterminal Symbols + +Allow to use `%nterm` in Nonterminal Symbols for `%type` declarations. + +```yacc +%nterm nonterminal… +``` + +This directive is also supported for compatibility with Bison, and only non-terminal symbols are allowed. In other words, definitions like the following will result in an error: + +```yacc +%{ +// Prologue +%} + +%token EOI 0 "EOI" +%nterm EOI + +%% + +program: /* empty */ + ; +``` + +It show an error message like the following: + +```command +❯ exe/lrama nterm.y +nterm.y:6:7: symbol EOI redeclared as a nonterminal +%nterm EOI + ^^^ +``` + ## Lrama 0.6.10 (2024-09-11) ### Aliased Named References for actions of RHS in parameterizing rules From 4cd73cf244b91ce7e8c3274604560aa6ebbe291c Mon Sep 17 00:00:00 2001 From: ydah Date: Sun, 22 Dec 2024 23:06:51 +0900 Subject: [PATCH 2/2] Bump version to 0.6.11 --- 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 d452430b..ff55e34b 100644 --- a/lib/lrama/version.rb +++ b/lib/lrama/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Lrama - VERSION = "0.6.10".freeze + VERSION = "0.6.11".freeze end