Generates a full parser from a language and offers some utility functions for immediate evaluation.
- parseSentence :: Language a -> String -> Either ParseError ParseTree
- readParseTree :: Language a -> String -> ParseTree
- readExpression :: Language a -> String -> a
Parsing and reading
parseSentence :: Language a -> String -> Either ParseError ParseTreeSource
Given a language and a string, yields the parse tree or a parse error.
readParseTree :: Language a -> String -> ParseTreeSource
Given a language and a string, yields the parse tree or throws an error.
readExpression :: Language a -> String -> aSource
Given a language and a string, parses and evaluates the string.