abnf-0.3.0.0: Parse ABNF and generate parsers for the specified document

Copyright(c) Martin Zeller, 2016
LicenseBSD2
MaintainerMartin Zeller <mz.bremerhaven@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe
LanguageHaskell2010

Text.ABNF.Document.Parser

Description

This module takes a canonicalized rule to parse a document described by it. You use the function generateParser to generate an attoparsec parser.

Synopsis

Documentation

parseDocument Source

Arguments

:: Rule

Rule to parse against

-> Text

Text to parse

-> Either String (Document Text)

Return a String describing the error or the successfully parsed Document.

The format of the String is as returned by attoparsec.

Convenience function to directly parse a Document

toList :: a -> [a] Source