Commit 1ad90d21 authored by Sylvain Schmitz's avatar Sylvain Schmitz

allow basic arithmetic and comparisons on position/last

parent 02cd183a
......@@ -21,7 +21,10 @@ default namespace = "http://www.w3.org/2005/XQueryX"
namespace xqx = "http://www.w3.org/2005/XQueryX"
# To catch equality between position() and last()
last.op = element ( eqOp | equalOp | neOp | notEqualOp ) {
last.op = element ( eqOp | equalOp | neOp | notEqualOp
| ltOp | leOp | gtOp | geOp
| lessThanOp | lessThanOrEqualOp
| greaterThanOp | greaterThanOrEqualOp ) {
element firstOperand { last.fun },
element secondOperand { last.fun }
}
......@@ -35,6 +38,10 @@ last.fun = element functionCallExpr {
},
element arguments { empty }?
}
| element ( addOp | subtractOp ) {
element firstOperand { last.fun },
element secondOperand { last.fun }
}
# Allowed axes before a [last()] predicate.
# Should be modified to a safe value when including this file.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment