tools/PascalParser.hs
changeset 7070 8d4189609e90
parent 7069 bcf9d8e64e92
child 7315 59b5b19e6604
equal deleted inserted replaced
7069:bcf9d8e64e92 7070:8d4189609e90
   355         , brackets pas (commaSep pas iD) >>= return . SetExpression
   355         , brackets pas (commaSep pas iD) >>= return . SetExpression
   356         , try $ natural pas >>= \i -> notFollowedBy (char '.') >> (return . NumberLiteral . show) i
   356         , try $ natural pas >>= \i -> notFollowedBy (char '.') >> (return . NumberLiteral . show) i
   357         , float pas >>= return . FloatLiteral . show
   357         , float pas >>= return . FloatLiteral . show
   358         , natural pas >>= return . NumberLiteral . show
   358         , natural pas >>= return . NumberLiteral . show
   359         , try (string "_S" >> stringLiteral pas) >>= return . StringLiteral
   359         , try (string "_S" >> stringLiteral pas) >>= return . StringLiteral
       
   360         , try (string "_P" >> stringLiteral pas) >>= return . PCharLiteral
   360         , stringLiteral pas >>= return . strOrChar
   361         , stringLiteral pas >>= return . strOrChar
   361         , try (string "#$") >> many hexDigit >>= \c -> comments >> return (HexCharCode c)
   362         , try (string "#$") >> many hexDigit >>= \c -> comments >> return (HexCharCode c)
   362         , char '#' >> many digit >>= \c -> comments >> return (CharCode c)
   363         , char '#' >> many digit >>= \c -> comments >> return (CharCode c)
   363         , char '$' >> many hexDigit >>=  \h -> comments >> return (HexNumber h)
   364         , char '$' >> many hexDigit >>=  \h -> comments >> return (HexNumber h)
   364         , char '-' >> expression >>= return . PrefixOp "-"
   365         , char '-' >> expression >>= return . PrefixOp "-"