-- Expressions:
expr :: Parser Expr
expr = buildExpressionParser table factor
    <?> "Expression"
  where
    table = [[op "*"  (Binop Mul) AssocLeft, op "/"  (Binop Div) AssocLeft], 
             [op "+"  (Binop Add) AssocLeft, op "-"  (Binop Sub) AssocLeft],
             [op "="  (Binop Eq)  AssocLeft, op "/=" (Binop Ne)  AssocLeft,
              op ">"  (Binop Gt)  AssocLeft, op "<"  (Binop Lt)  AssocLeft,
              op ">=" (Binop Gte) AssocLeft, op "<=" (Binop Lte) AssocLeft]]
    op o f assoc = Infix (do {reservedOp o; return f} <?> "operator") assoc
    factor =   parens expr
           <|> lit
           <|> fetchVar
           <|> load
           <?> "simple Expression"
expr :: Parser Expr
expr = buildExpressionParser table factor
    <?> "Expression"
  where
    table = [[op "*"  (Binop Mul) AssocLeft, op "/"  (Binop Div) AssocLeft], 
             [op "+"  (Binop Add) AssocLeft, op "-"  (Binop Sub) AssocLeft],
             [op "="  (Binop Eq)  AssocLeft, op "/=" (Binop Ne)  AssocLeft,
              op ">"  (Binop Gt)  AssocLeft, op "<"  (Binop Lt)  AssocLeft,
              op ">=" (Binop Gte) AssocLeft, op "<=" (Binop Lte) AssocLeft]]
    op o f assoc = Infix (do {reservedOp o; return f} <?> "operator") assoc
    factor =   parens expr
           <|> lit
           <|> fetchVar
           <|> load
           <?> "simple Expression"
expr = buildExpressionParser table factor
    <?> "Expression"
  where
    table = [[op "*"  (Binop Mul) AssocLeft, op "/"  (Binop Div) AssocLeft], 
             [op "+"  (Binop Add) AssocLeft, op "-"  (Binop Sub) AssocLeft],
             [op "="  (Binop Eq)  AssocLeft, op "/=" (Binop Ne)  AssocLeft,
              op ">"  (Binop Gt)  AssocLeft, op "<"  (Binop Lt)  AssocLeft,
              op ">=" (Binop Gte) AssocLeft, op "<=" (Binop Lte) AssocLeft]]
    op o f assoc = Infix (do {reservedOp o; return f} <?> "operator") assoc
    factor =   parens expr
           <|> lit
           <|> fetchVar
           <|> load
           <?> "simple Expression"