fictiveworks / CalyxSharp

Generative text processing for C# and Unity applications
Other
0 stars 0 forks source link

Fix empty branch bug in non-strict evaluations #23

Closed maetl closed 1 year ago

maetl commented 1 year ago

Fixes #21 where the result tree was not in a correct shape to be flattened due to empty string terminals being generated at the wrong level.

The test case here is adding an undefined rule to the grammar and ensuring that it gets expanded to an empty string when strict: false.

Am unsure what happened with the EmptyBranch production, but this is likely to be a bug carried over from the original implementation.

bentorkington commented 1 year ago

all looks good to me