parsimony-1: Monadic parser combinators derived from Parsec

Stabilityprovisional
Maintaineriavor.diatchki@gmail.com

Parsimony.Stream

Description

A generic way to extract tokens from a stream.

Synopsis

Documentation

class Token token whereSource

A class describing useful token operations.

Methods

updatePos :: token -> SourcePos -> SourcePosSource

How tokens affect file positions.

showToken :: token -> StringSource

How to display tokens.

Instances

class Token token => Stream stream token | stream -> token whereSource

Streams of tokens.

Methods

getToken :: PrimParser stream tokenSource

data ASCII content Source

The type of ASCII encoded content.

Instances

data UTF8 string

The type of strngs that are represented using the UTF8 encoding. The parameters is the type of the container for the representation.

Instances

Eq string => Eq (UTF8 string) 
Ord string => Ord (UTF8 string) 
UTF8Bytes string index => Show (UTF8 string) 
Stream (UTF8 [Word8]) Char 
Stream (UTF8 ByteString) Char 
Stream (UTF8 ByteString) Char 

ascii :: content -> ASCII contentSource

Specify ASCII encoding for some content.

utf8 :: content -> UTF8 contentSource

Specify UTF8 encoding for some content.