pExpression :: Parser (Expression :~ SrcPos)
pExpression = buildExpressionParser table term <?> "expression"
  where
    table = [
            [binary "^" Pow AssocLeft],
            [binary "*" Mul AssocLeft, binary "/" Div AssocLeft, binary "%" Mod AssocLeft ],
            [binary "+" Add AssocLeft, binary "-" Sub AssocLeft ],
            [binary "=" IsEQ AssocLeft, binary "!=" IsNE AssocLeft, binary ">" IsGT AssocLeft, binary "<" IsLT AssocLeft ]
          ]
    binary  name fun assoc = Infix (op name fun) assoc
    op name fun = do
      pos <- getPosition
      reservedOp name
      return $ \x y -> Annotate (Op fun x y) $ SrcPos {
        srcLine = sourceLine pos,
        srcColumn = sourceColumn pos }
pExpression :: Parser (Expression :~ SrcPos)
pExpression = buildExpressionParser table term <?> "expression"
  where
    table = [
            [binary "^" Pow AssocLeft],
            [binary "*" Mul AssocLeft, binary "/" Div AssocLeft, binary "%" Mod AssocLeft ],
            [binary "+" Add AssocLeft, binary "-" Sub AssocLeft ],
            [binary "=" IsEQ AssocLeft, binary "!=" IsNE AssocLeft, binary ">" IsGT AssocLeft, binary "<" IsLT AssocLeft ]
          ]
    binary  name fun assoc = Infix (op name fun) assoc
    op name fun = do
      pos <- getPosition
      reservedOp name
      return $ \x y -> Annotate (Op fun x y) $ SrcPos {
        srcLine = sourceLine pos,
        srcColumn = sourceColumn pos }
pExpression = buildExpressionParser table term <?> "expression"
  where
    table = [
            [binary "^" Pow AssocLeft],
            [binary "*" Mul AssocLeft, binary "/" Div AssocLeft, binary "%" Mod AssocLeft ],
            [binary "+" Add AssocLeft, binary "-" Sub AssocLeft ],
            [binary "=" IsEQ AssocLeft, binary "!=" IsNE AssocLeft, binary ">" IsGT AssocLeft, binary "<" IsLT AssocLeft ]
          ]
    binary  name fun assoc = Infix (op name fun) assoc
    op name fun = do
      pos <- getPosition
      reservedOp name
      return $ \x y -> Annotate (Op fun x y) $ SrcPos {
        srcLine = sourceLine pos,
        srcColumn = sourceColumn pos }