From e77bb34fe73f0714e7c95ba52970a94c6f0b49d7 Mon Sep 17 00:00:00 2001 From: Alexander Pann Date: Mon, 11 Mar 2024 08:52:51 +0100 Subject: [PATCH] grammarcells: support CellModel_ReadOnlyModelAccessor in optional cells --- CHANGELOG.md | 6 + .../grammarcells/sandboxlang/editor.mps | 79 ++++++ .../grammarcells/sandboxlang/structure.mps | 15 ++ .../generator/template/main@generator.mps | 241 ++++++++++++++++-- .../models/generatorutils.mps | 36 ++- .../mpsutil/grammarcells/tests@tests.mps | 56 ++++ 6 files changed, 400 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d80869ce..811eb3c66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project are documented in this file. Format of the log is _loosely_ based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). The project does _not_ follow Semantic Versioning and the changes are documented in reverse chronological order, grouped by calendar month. +## March 2024 + +### Added + +- com.mbeddr.mpsutil.grammarcells: Read-only model accessory cells can now also be used in places where constant cells are supported. + ## February 2024 ### Changed diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells.sandboxlang/models/com/mbeddr/mpsutil/grammarcells/sandboxlang/editor.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells.sandboxlang/models/com/mbeddr/mpsutil/grammarcells/sandboxlang/editor.mps index b5ceb661c..3c121a279 100644 --- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells.sandboxlang/models/com/mbeddr/mpsutil/grammarcells/sandboxlang/editor.mps +++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells.sandboxlang/models/com/mbeddr/mpsutil/grammarcells/sandboxlang/editor.mps @@ -17,6 +17,9 @@ + + + @@ -112,12 +115,19 @@ + + + + + + + @@ -128,6 +138,7 @@ + @@ -2908,5 +2919,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells.sandboxlang/models/com/mbeddr/mpsutil/grammarcells/sandboxlang/structure.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells.sandboxlang/models/com/mbeddr/mpsutil/grammarcells/sandboxlang/structure.mps index c39679d3b..cb266bb02 100644 --- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells.sandboxlang/models/com/mbeddr/mpsutil/grammarcells/sandboxlang/structure.mps +++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells.sandboxlang/models/com/mbeddr/mpsutil/grammarcells/sandboxlang/structure.mps @@ -1059,5 +1059,20 @@ + + + + + + + + + + + + + + + diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/generator/template/main@generator.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/generator/template/main@generator.mps index 2bd0bd1f7..6aa409bfb 100755 --- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/generator/template/main@generator.mps +++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/generator/template/main@generator.mps @@ -5158,6 +5158,20 @@ + + + + + + + + + + + + + + @@ -13250,7 +13264,6 @@ - @@ -15776,7 +15789,6 @@ - @@ -15894,10 +15906,26 @@ - + + + + + + + + + + + + + + + + + + - @@ -16393,6 +16421,23 @@ + + + + + + + + + + + + + + + + + @@ -19814,7 +19859,6 @@ - @@ -21283,6 +21327,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -21866,6 +21959,24 @@ + + + + + + + + + + + + + + + + + + @@ -21981,22 +22092,6 @@ - - - - - - - - - - - - - - - - @@ -30035,5 +30130,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/generatorutils.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/generatorutils.mps index 47a0126c6..7a4b934b9 100644 --- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/generatorutils.mps +++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/generatorutils.mps @@ -567,24 +567,36 @@ - - - + + + - - - + + + - - - + + + + + + + + + + - - - + + + + + + + + diff --git a/code/grammarcells/solutions/com.mbeddr.mpsutil.grammarcells.tests/models/com/mbeddr/mpsutil/grammarcells/tests@tests.mps b/code/grammarcells/solutions/com.mbeddr.mpsutil.grammarcells.tests/models/com/mbeddr/mpsutil/grammarcells/tests@tests.mps index 42925fb1a..7dc9c0c8c 100644 --- a/code/grammarcells/solutions/com.mbeddr.mpsutil.grammarcells.tests/models/com/mbeddr/mpsutil/grammarcells/tests@tests.mps +++ b/code/grammarcells/solutions/com.mbeddr.mpsutil.grammarcells.tests/models/com/mbeddr/mpsutil/grammarcells/tests@tests.mps @@ -58,6 +58,7 @@ + @@ -281,6 +282,9 @@ + + + @@ -4147,5 +4151,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +