-
Notifications
You must be signed in to change notification settings - Fork 37
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
Small fixes and typos in related to filter's grammar #191
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @fekad!
Most of these changes (in the spec) seem to be format fixes, concerning rst.
However, there are some content changes as well. To me they look completely fine, but I am not a grammar expert and would refer to @sauliusg, @rartino, @merkys or others to verify the correctness of the content. Although it seems it has already been through the meticulous mind of @sauliusg 😉
Concerning the many .out files, are these changed manually or automatically? I hope the latter.
It was more to ask also if they should be reviewed or can be taken as granted?
Thanks, @CasperWA! So all of the .out files have been patched by using the diff files which were generated during the test itself. I know it's cheating :) but I checked all of them manually. |
These changes are ok with me; Except, why do you want to collapse 'PredicateComparison'? Human readability is also important for a grammar, and looking at Also, at the point we introduce more predicates, we'd have to reintroduce that layer and everyone with parsers will need to update that part. (However, I prefer @sauliusg also looking at these changes if he has the time, so I'll hold on my approval so this isn't merged yet.) |
My previous comment was in favour of unifying PredicateComparison and LengthComparison since they are defined to be equal; I don't think having two names for the same concept helps with clarity, rather the opposite... The point is that we use one term in the definition, and another term at the point when it is used, and the reader must always keep in mind the relation between the two, which in this case is just an identity. Rather confusing. Maybe, however, we should leave 'PredicateComparison', defining it as:
and drop It would then have the clarity at the point of use as desired by @rartino and would not have the second name definition (as @fekad and myself would agree to see it). That the PredicteComparison currently has just the LENGTH predicate is evident at the point of definition. If we all agree on this change I would be happy to see this PR merged. |
I agree, but OTOH we will not be able to anticipate every possible change. And having a name "just in case" does not seem right, it is analogous to "dead code" and I would considered it bad in general. If we need a new grammar construct we can always introduce it later, at the point when it is actually functional, can't we? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, however, we should leave 'PredicateComparison', defining it as:
PredicateComparison = LENGTH, Property, Operator, Value ;
and drop LengthComparison?
It would then have the clarity at the point of use as desired by @rartino and would not have the second name definition (as @fekad and myself would agree to see it). That the PredicteComparison currently has just the LENGTH predicate is evident at the point of definition.
If we all agree on this change I would be happy to see this PR merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I'm (somewhat reluctantly) ok with this.
But, I rather see a PR that implements the end agreement (?) in #199, which just gets rid of the predicate form.
Just to clarify, you'd rather change |
My main preference is to follow the present suggestion in #199 and change the LENGTH syntax to
which completely drops predicates from the language. At that point, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This version looks good to me. Thanks for the effort with the syntax cleanup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The matter of PredicateComparison
is reverted, and issue #199 may be further addressed in (a) future PR(s).
This PR contains a few small fixes related to filter's grammar which were partly discussed in an ongoing PR (Materials-Consortia/optimade-python-tools#66). Thanks for the help of @sauliusg, these fixes have been pushed forward to merge into the main repository.