-
Notifications
You must be signed in to change notification settings - Fork 26
[WIP] S-expression parsing of text modules #104
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
base: master
Are you sure you want to change the base?
[WIP] S-expression parsing of text modules #104
Conversation
wasm/sexpressions.py
Outdated
<typedef>* <func>* <import>* <export>* <table>? <memory>? <global>* <elem>* <data>* <start>? ;; = | ||
( module <typedef>* <func>* <import>* <export>* <table>? <memory>? <global>* <elem>* <data>* <start>? ) | ||
""" | ||
from pyparsing import ( |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
eadbb0c
to
30ef02a
Compare
Was just taking a look at this. It looks like you've written a grammar which is pretty explicit. Is there a reason you didn't go with a more generic s-expression grammar and then verify s-expression content as a kind of post-processing step? I'm wondering if that wouldn't be simpler and allow you to forgo any possible headaches relating to writing a lengthy grammar. |
Actually, reviewing the WASM spec now, it looks like the text grammar is pretty well-defined. So I guess that's probably one reason you did it that way. |
Yeah, I took their provided grammar and am converting it bit-by-bit to parsimonious. I had that thought yesterday (use a generic s-expression grammar), but I think I like the up-front validation that this explicit grammar provides. |
What was wrong?
Issue #
How was it fixed?
Summary of approach.
Cute Animal Picture