From 52e43037f6a50b1663058e9c8d6dae5b6215fc98 Mon Sep 17 00:00:00 2001 From: ydah Date: Sun, 22 Dec 2024 23:06:28 +0900 Subject: [PATCH] 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..1ca53b47 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,40 @@ # NEWS for Lrama +## Lrama 0.6.11 (2024-12-22) + +### 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