The grammar listing does not list array-index expression; and I see from the text grammar that there are a number of other productions missing -- forall, exists to name two
The formatting of the precedence listing is garbled, at least when viewed in GitHub
The precedence of if-then-else is stated as higher than that of operators. That is odd and would mean that
if a then b else c + d would parse as (if a then b else c) + d
Rather, the Agree.xtext gives if-then-else a high precedence on the left (where it doesn't matter because of the keyword) but the lowest precedence of all on the right -- since the IfThenElseExpr production ends with c=Expr, which is more or less what most would expect, but not clear from the documentation (though the example is correct)
And two questions:
a) Is <> entirely equivalent to != ?
b) Is <=> entirely equivalent to = except for precedence?
On reading the AGREE documentation in GitHub on Expressions (https://github.com/loonwerks/AGREE/blob/master/com.rockwellcollins.atc.agree.doc/src/user-guide/03.07-Expressions.markdown)
I note:
if a then b else c + d
would parse as(if a then b else c) + d
Rather, the Agree.xtext gives if-then-else a high precedence on the left (where it doesn't matter because of the keyword) but the lowest precedence of all on the right -- since the IfThenElseExpr production ends with c=Expr, which is more or less what most would expect, but not clear from the documentation (though the example is correct)And two questions: a) Is <> entirely equivalent to != ? b) Is <=> entirely equivalent to = except for precedence?
Thanks