// Test expressions // expression ::= ("+" | "-")? product (("+" | "-") expression)* // product ::= term (("*" | "/" | "%") product)* // term ::= "(" expression ")" | "|" expression "|" | fn_call | simple_term // Test simple products, divisions, and mods a*1; 5/2; a%b; 1*2*3; c/d/e; 1%2%3; a*1/2%d/e*3%f; // Test simple sums and differences +1; -z; A+[10,20]; A-B; 1+A-C+d; +a+2-c-d+5-f+g; -a+b-3-d+e-f+g; // Test overriding precedence with parentheses (1); ((1)); ((((1)))); a*b+c/d; (a*b)+(c/d); a%(b+c)/d; ((a+b)/(c-d))%(e*f); // Add cardinality and fn calls |A|; |a*1|; |(a+2)*3|; (f()-G(1,2,3))%h(x,Y,|[z,w]|);