mbeddr.core icon indicating copy to clipboard operation
mbeddr.core copied to clipboard

Grammarcells: SubstituteCell does not work with n-ary expressions

Open danielratiu opened this issue 6 years ago • 3 comments

I created an n-ary expression hierarchy and defined the editor using grammar-cells as shown in the attached screenshot. When I try to generate code for the editor definition, MPS produces a generation error (second screenshot).

I have also attached the language reproducing this error. grammar_cells_error.zip

image image

danielratiu avatar Oct 06 '18 13:10 danielratiu

I found a fix for this and committed it on the branch bugfix/#1997

@slisson please check if my fix is OK, if yes then please merge into master

danielratiu avatar Oct 06 '18 21:10 danielratiu

Child collections are currently not supported by the parser. Using ChildSymbol in the generator is not valid, because it is for child links with 0..1/1 cardinality only.

slisson avatar Oct 08 '18 08:10 slisson

@slisson thank you for the feedback. I do not understand the grammarcells framework good enough to extend ChildSymbol to deal with links with multiple cardinalities.

IMO being able to substitute N-ary expressions would be very useful ...

danielratiu avatar Oct 08 '18 20:10 danielratiu