577 initExpression = buildExpressionParser table term <?> "initialization expression" |
577 initExpression = buildExpressionParser table term <?> "initialization expression" |
578 where |
578 where |
579 term = comments >> choice [ |
579 term = comments >> choice [ |
580 liftM (uncurry BuiltInFunction) $ builtInFunction initExpression |
580 liftM (uncurry BuiltInFunction) $ builtInFunction initExpression |
581 , try $ brackets pas (commaSep pas $ initExpression) >>= return . InitSet |
581 , try $ brackets pas (commaSep pas $ initExpression) >>= return . InitSet |
582 , try $ parens pas (commaSep pas $ initExpression) >>= \ia -> when (null $ tail ia) mzero >> return (InitArray ia) |
582 , try $ parens pas (commaSep pas $ initExpression) >>= \ia -> when ((notRecord $ head ia) && (null $ tail ia)) mzero >> return (InitArray ia) |
583 , try $ parens pas (sepEndBy recField (char ';' >> comments)) >>= return . InitRecord |
583 , try $ parens pas (sepEndBy recField (char ';' >> comments)) >>= return . InitRecord |
584 , parens pas initExpression |
584 , parens pas initExpression |
585 , try $ integer pas >>= \i -> notFollowedBy (char '.') >> (return . InitNumber . show) i |
585 , try $ integer pas >>= \i -> notFollowedBy (char '.') >> (return . InitNumber . show) i |
586 , try $ float pas >>= return . InitFloat . show |
586 , try $ float pas >>= return . InitFloat . show |
587 , try $ integer pas >>= return . InitNumber . show |
587 , try $ integer pas >>= return . InitNumber . show |