sifflet-lib-1.0: Library of modules shared by sifflet and its tests and its exporters.Source codeContentsIndex
Sifflet.Language.Parser
Description
A parser for Sifflet input values. This is not a parser for all Sifflet expressions, but just those that might be input in textual form through the function call dialog that asks for the argument values. So, it is limited (deliberately) to data types of expressions: that is, Exprs using the constructors: ELit EList That means excluding Exprs constructed with EUndefined, ESymbol, EIf, and ECall.
Synopsis
parseExpr :: String -> SuccFail Expr
parseInput :: String -> SuccFail Expr
parseTest :: Show a => GenParser tok () a -> [tok] -> IO ()
parseSuccFail :: Parser a -> String -> SuccFail a
nothingBut :: Parser a -> Parser a
expr :: Parser Expr
list :: Parser a -> Parser [a]
literal :: Parser Expr
value :: Parser Value
typedValue :: VpType -> Parser Value
bool :: Parser Bool
qchar :: Parser Char
qstring :: Parser String
integer :: Parser Integer
double :: Parser Double
number :: Parser (Either Double Integer)
Documentation
parseExpr :: String -> SuccFail ExprSource
Parse a Sifflet data literal (number, string, char, bool, or list)
parseInput :: String -> SuccFail ExprSource
Parse a Sifflet input containing exactly one data expression possibly flanked by white space
parseTest :: Show a => GenParser tok () a -> [tok] -> IO ()Source
parseSuccFail :: Parser a -> String -> SuccFail aSource
nothingBut :: Parser a -> Parser aSource
'nothingBut p is like p, but consumes the entire input, so there must be no extraneous characters (except space) after whatever p parses.
expr :: Parser ExprSource
Parse a Sifflet data expression
list :: Parser a -> Parser [a]Source
literal :: Parser ExprSource
value :: Parser ValueSource
Parser for a Value of any type (any VpType), except that we cannot parse as VpTypeVar or VpTypeFunction.
typedValue :: VpType -> Parser ValueSource
Parser for a value with a specific VpType expected. Again, we cannot do this for VpTypeVar (why not?) or VpTypeFunctiopn
bool :: Parser BoolSource
qchar :: Parser CharSource
qstring :: Parser StringSource
integer :: Parser IntegerSource
double :: Parser DoubleSource
number :: Parser (Either Double Integer)Source
Produced by Haddock version 2.6.1