boltzmann-brain-1.4: Boltzmann sampler compiler for combinatorial systems.

Copyright(c) Maciej Bendkowski 2017-2018
LicenseBSD3
Maintainermaciej.bendkowski@tcs.uj.edu.pl
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.Boltzmann.Internal.Parser

Description

Common parser utilities and helper functions.

Synopsis

Documentation

sc :: Parser () Source #

Cut-out block and line comments parser.

lexeme :: Parser a -> Parser a Source #

Lexeme parser.

symbol :: String -> Parser String Source #

Symbol parser.

parens :: Parser a -> Parser a Source #

Parenthesis parser.

brackets :: Parser a -> Parser a Source #

Brackets parser.

integer :: Parser Int Source #

Integer parser.

double :: Parser Double Source #

Double parser.

sepBy2 :: Parser a -> Parser b -> Parser [a] Source #

Separate by two parser.

parseN :: Parser a -> Int -> Parser [a] Source #

n-fold parser application.

parseFromFile :: Parsec e String a -> String -> IO (Either (ParseError Char e) a) Source #

Uses an input file for parsing.

printError :: (ShowToken t, Ord t, ShowErrorComponent e) => ParseError t e -> IO a Source #

Prints the given parsing errors.