on master help sign in
Parse integer SIMD types
commitcdc823a14705f3731249463b766b0cb3dd74fef4 authorBenjamin Saunders <besaunde@sfu.ca> dateFri 21 Jun 2013, 16:42 (13 years ago) parentba190ad
2 files changed+6−1
src/Core/CoreParser.hs+2−1 src/Idris/Parser.hs+4
src/Core/CoreParser.hs+2−1
@@ -36,7 +36,8 @@ idrisDef = haskellDef {
3636 "using", "namespace", "class", "instance",
3737 "public", "private", "abstract", "implicit",
3838 "Int", "Integer", "Float", "Char", "String", "Ptr",
39− "Bits8", "Bits16", "Bits32", "Bits64"]
39+ "Bits8", "Bits16", "Bits32", "Bits64",
40+ "Bits8x16", "Bits16x8", "Bits32x4", "Bits64x2"]
4041 }
4142
4243-- | The characters allowed in operator names
src/Idris/Parser.hs+4
@@ -1149,6 +1149,10 @@ pConstant = do reserved "Integer";return (AType (ATInt ITBig))
11491149 <|> do reserved "Bits16"; return (AType (ATInt (ITFixed IT16)))
11501150 <|> do reserved "Bits32"; return (AType (ATInt (ITFixed IT32)))
11511151 <|> do reserved "Bits64"; return (AType (ATInt (ITFixed IT64)))
1152+ <|> do reserved "Bits8x16"; return (AType (ATInt (ITVec IT8 16)))
1153+ <|> do reserved "Bits16x8"; return (AType (ATInt (ITVec IT16 8)))
1154+ <|> do reserved "Bits32x4"; return (AType (ATInt (ITVec IT32 4)))
1155+ <|> do reserved "Bits64x2"; return (AType (ATInt (ITVec IT64 2)))
11521156 <|> try (do f <- float; return $ Fl f)
11531157 <|> try (do i <- natural; return $ BI i)
11541158 <|> try (do s <- strlit; return $ Str s)