-
Notifications
You must be signed in to change notification settings - Fork 15
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
In XQuery, allow a semicolon at the end of the module #175
Comments
In my days writing XQuery, I would often come across modules written as
I almost never did it, and I don't recall exactly what it meant. I think the Is using semicolons that way valid according to the XQuery 4.0 syntax, and if it is, does this proposal change it at all? |
I would tend to be strict. Semicolons are illegal in many other languages, too, and it seems arbitrary to me to allow them in XQuery. We should then allow trailing commas, too, and possibly other characters (?). @ndw IIRC, the semicolon was a valid character in the XQuery Scripting Extension, with John Snelson being one of the editors. Maybe MarkLogic was inspired by it (or the other way round)? |
Could be. Thank you, @ChristianGruen. On casual inspection of the grammar, it certainly looked like an extension. Thanks for the confirmation. |
Yes, semicolon was used as a separator or terminator (I forget which) in XQuery Scripting proposals. Languages differ greatly in how strict they are about semicolons. In Java I rely heavily on the IDE to tell me when I've got it wrong, because the rules have become very arbitrary. |
Hope you mean XQuery and nor XPath? :) |
I think we shouldnt’ introduce optional semicolons. I’ve assigned »Propose Closing with No Action« (everyone: please object). |
The CG agreed to close this issue without action at meeting 040. |
A trivial little enhancement to remove an irritant: allow a semicolon after the query body in a query. Specifically, change
QueryBody ::= Expr
to
QueryBody ::= Expr Separator?
The text was updated successfully, but these errors were encountered: