Cactus example made more verbose

.blank = [" \t\f\b\v\r\n"]
.number :: Int = ['0'..'9']+

expr :: Expr
  = term              ::= term
  | Add(expr1,term1)  ::= expr '+' term
  | Sub(expr,term)    ::= expr '-' term ;

term
  = $1         ::= factor
  | Mul($1,$3) ::= term '*' factor
  | Div($1,$3) ::= term '/' factor ;

factor
  = Number($1) ::= number
  | $2         ::= '(' expr ')'

%data Expr
  = Add(Expr, Expr)
  | Sub(Expr, Expr)
  | Mul(Expr, Expr)
  | Div(Expr, Expr)
  | Number(Int)