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

Check non-terminals in parse-tree-to-expression conversion #15

Open
jbearer opened this issue Oct 11, 2021 · 0 comments
Open

Check non-terminals in parse-tree-to-expression conversion #15

jbearer opened this issue Oct 11, 2021 · 0 comments

Comments

@jbearer
Copy link
Owner

jbearer commented Oct 11, 2021

This was initially specified as part of #14, but has been moved to a separate issue because it depends on #6, in that simplifying the built-in grammar down to a single non-terminal will make this change much easier to implement, and would erase a lot of the work if we did this change first.

From the proposal from #14:

Since !-evaluation depends on the non-terminal of the parse tree being evaluated, the parse-tree-to-expression conversion should do so as well, for consistency. Currently, any parse tree of the right shape that ends up in the final, evaluated parse tree can be converted to an expression and evaluated. This should be changed so that only parse trees with the built-in non-terminal can be evaluated; any other parse tree would produce a BLIMP_INVALID_PARSE_TREE error. This should not pose a burden, as the user must already control which parse trees end up in the final tree in order to ensure they have the right shape; additionally ensuring that they have the right non-terminal should be no harder.

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