-
Notifications
You must be signed in to change notification settings - Fork 8
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
Grammar-based approach? #7
Comments
I certainly won't deny that the algorithmic approach is painful to read (it's not pleasant to write either). But I'm unsure about switching. Traditionally, grammar-based approaches have not been very good at producing interoperability; though it could be that in this case we could make it work since we can describe the behaviour on failure rather simply. And the grammar is pretty simple:
I need to mull this over. Do you have a clearer example of what you have in mind? |
Well, I am not really familiar with the formal language stuff myself (sadly), but my impression was it would be based on parsing goals. Things like
(this is not correct in any way but meant to illustrate what I meant.) The parsing goal is then Most of what I know on this subject I learned in a 30-minute talk at JSConf EU so maybe somebody who can form the words better could step in here... |
A bit off-topic, but we could piggy-back RFC 6901 (JSON Pointer), where a grammar comes delivered free. The syntax would be a bit different. And I seem to remember, that I suggested this before, but can't find the issue, where I did. |
I think it'd be interesting, at the very least, to have a formal grammar for the names. Once you had that, you could move from the current algorithmic-parsing to one that applies different semantics to each syntactic goal. Perhaps I am too brain-damaged from reading ES specs but to me that would be easier to parse than the algorithm, and probably has other benefits in terms of guaranteed unambiguity etc.
The text was updated successfully, but these errors were encountered: