Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inherited completeness of dispatching for closed nonterminals #867

Open
krame505 opened this issue Dec 20, 2024 · 0 comments
Open

Inherited completeness of dispatching for closed nonterminals #867

krame505 opened this issue Dec 20, 2024 · 0 comments
Assignees

Comments

@krame505
Copy link
Member

Currently, if an extension production wants to implement a host-language dispatch signature, the rule is that the extension production must forward to a host-language production implementing the signature, sharing all the same children. This is to ensure that when an inherited equation is supplied for some child of all host-language implementations of some dispatch, then the equation will exist for all extension implementations as well.

However, I realized that this requirement (ext prods must forward to a host-language implementation) doesn't really make sense in the closed nonterminal/translation pass approach, as extension productions do not need to forward. I think instead we just want to require that any non-forwarding extension implementations supply any inherited equation that is present on all host implementations (and don't exceed the host equations' dependencies in doing so.)

This means that on closed nonterminals, we can no longer project extension inherited attributes through applications of a dispatch signature, and instead they must be supplied prior to dispatching. But I think this is acceptable, as it is somewhat analogous to the restriction for extension synthesized attributes on closed nonterminals, which must have a default equation.

@krame505 krame505 self-assigned this Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant