ontodev / valve.js

VALVE in JavaScript
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Fix whitespace in expressions #12

Closed beckyjackson closed 3 years ago

beckyjackson commented 3 years ago

Switch from Nearley's builtin whitespace (_) to our own defined WS. Python likes this a lot more 🙂

jamesaoverton commented 3 years ago

I spent a bunch of time on this, but the grammar is only a little better. With this change I was able to make valve.py start parsing correctly, without the sed -e "s/parse(text))/parse(text))[0].to_dict()/g" > $@.

We've spent a huge amount of time on this Nearley -> Lark transform, and the result is still fragile. I still don't feel like I understand the problem we keep running into. Now I regret my decision to take this approach.