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

Meta-level parser [WIP] #121

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Meta-level parser [WIP] #121

wants to merge 8 commits into from

Conversation

rossberg
Copy link
Collaborator

I have finished implementing and testing a working meta-level parser. This PR is based on #119.

It works for grammars that do not make complex use of side conditions or functions. The tests contain simple examples of using the Wasm grammar for parsing LEBs, types, or even empty modules. that already uncovered a few minor bugs in our Wasm grammar, which is good. :)

However, the main roadblock for making it fully work is that the IL (as we know) is not quite algorithmic enough for performing reduction. Hence in general, the parser barfs when it encounters non-trivial side conditions with bindings.

A possible solution would be to run the animation transformation first. I haven't tried that yet. Or of course, we make bindings more explicit in the EL already.

But it'll also require dealing with inverted functions. Given that the AL backends already jump through hoops for dealing with this, I wonder if we should have a cleaner way for supporting function inversion, one that doesn't require hardcoding, but where the user defines the inverses.

Anyway, this is just a status update to prepare everybody that I'd like to discuss this more in due time. Right now it isn't the highest priority.

Base automatically changed from iterscope to main September 4, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant