Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.