SQLite Forum

operator precedence docs missing, suggested clarifications below
Login
> In https://sqlite.org/lang_expr.html section 2 BETWEEN and NOT are not placed on the list beside the other operators.

Section 2 covers the binary and unary prefix operators. So to expect BETWEEN (or NOT BETWEEN) to appear there is a mistake. If that keyword (or keyword pair) was to be considered an operator, it would be a trinary operator. This can be seen in the railroad chart of Section 1 on Syntax, where it (they) show(s) up as part of the formal expression syntax alternatives.

A close reading of Section 2 shows that the operator "lists" are either of binary operators, where NOT should **not** appear, or of unary operators, where NOT **does** appear. Hence, I do *not* understand your critique regarding NOT.

As to precedence issues: Are you claiming that you have disproven the documented precedence of any binary operator listed in Section 2. Or are you saying the grammar is ambiguous with respect to COLLATE, such that it should be given a precedence to disambiguate \[expr\]-(COLLATE)-(collation-name) when some \[expr\] is a binary expression?

Looking through your "proofs" seems like a lot more work than looking at <u>[the grammar specification](https://sqlite.org/src/file?name=src/parse.y&ci=trunk)</u>, so I would ask: Do you believe you have proven that said specification has been disproven? Or are you simply claiming something is missing from or incorrect in the docs (beyond the "missing" claims disproven above)? Either way, please be more specific. (I am too busy to see if I can interpret your post into a falsifiable assertion that is, in fact, false.)