Node:Syntax of Arithmetic Expressions, Next:, Previous:Syntax of Indexicals, Up:Syntax Summary



Syntax of Arithmetic Expressions


X --> variable                { domain variable }

N --> integer

LinExpr --> N                { linear expression }
  |   X
  |   N * X
  |   N * N
  |   LinExpr + LinExpr
  |   LinExpr - LinExpr

Expr --> LinExpr
  |   Expr + Expr
  |   Expr - Expr
  |   Expr * Expr
  |   Expr / Expr                { integer division }
  |   Expr mod Expr
  |   min(Expr,Expr)
  |   max(Expr,Expr)
  |   abs(Expr)

RelOp --> #= | #\= | #< | #=< | #> | #>=