Post #2479127
2026-05-10 14:52 UTC
@olynch@mathstodon.xyz @MartinEscardo@mathstodon.xyz Another solution is to write the ambiguous grammar but disambiguate by intersecting with regular tree languages. This is a folklore idea from the formal languages world, but it thankfully got published separately at a workshop: https://michaeldadams.org/papers/disambiguating-grammars/
Most (all?) interesting grammar classes are closed under intersection with regular string and tree languages, so it shouldn't affect the rest of your generator.
Replies (1)
-
@olynch@mathstodon.xyz 2026-05-10 15:06
@zwarich@hachyderm.io @MartinEscardo@mathstodon.xyz Ooh this is with Matt Might I like that guy.