gll-0.2.0.3: gll.cabal
-- Initial haskell-gll.cabal generated by cabal init. For further
-- documentation, see http://haskell.org/cabal/users-guide/
-- The name of the package.
name: gll
version: 0.2.0.3
synopsis: GLL parser with simple combinator interface
license: BSD3
license-file: LICENSE
author: L. Thomas van Binsbergen
maintainer: ltvanbinsbergen@acm.org
category: Compilers
build-type: Simple
cabal-version: >=1.8
tested-with: GHC == 7.6.3
description:
GLL is a parser combinator library for writing generalised parsers.
The user can write parsers for arbitrary context-free grammars, including
both non-determinism and all forms of left and right-recursion.
The underlying parsing algorithm is GLL (Scott and Johnstone 2013).
.
The library provides an interface in 'Control.Applicative' style:
it uses the combinators '<*>', '<|>', '<$>' and derivations.
With '<$>' arbitrary semantic actions are added to the parser.
.
Four functions can be used to run a parser: 'parse', 'parseString',
'parseWithOptions' and 'parseStringWithOptions'.
Function 'parse' relies on the builtin 'Token' datatype, receiving a list of
'Token' as an input string. User-defined token-types are currently not supported.
Function *parseString* enables parsing character-level parsing.
The result of aparse is a list of semantic results, one result for each derivation.
To avoid infinite recursion, only 'good parse trees' are considered (Ridge 2014).
To limit the number of accepted derivation, and therefore avoiding potential
exponential blow-up, 'GLL.Combinators.Options' are available to specify certain
disambiguation rules.
.
'GLL.Combinators.MemInterface' is a memoised version of the library.
Memoisation is used to speed up the process of applying semantic actions,
it is not necessary for generalised parsing:
'GLL.Combinators.Interface' and 'GLL.Combinators.MemInterface' are
equally general.
In the memoised version, parsers are no longer pure functions and must be
developed inside the IO monad.
.
Examples can be found in the 'GLL.Combinators.Test' directory.
library
hs-source-dirs : src
build-depends : base >=4.5 && <= 4.8.0.0
, containers >= 0.4
, array
, TypeCompose
exposed-modules : GLL.Combinators.Interface
, GLL.Combinators.MemInterface
, GLL.Combinators.BinInterface
, GLL.Combinators.MemBinInterface
, GLL.Combinators.Test.Interface
, GLL.Combinators.Test.MemInterface
, GLL.Combinators.Test.BinInterface
, GLL.Combinators.Test.MemBinInterface
other-modules : GLL.Types.Abstract
, GLL.Types.Grammar
, GLL.Parser
, GLL.Combinators.Memoisation
, GLL.Combinators.Options
extensions : TypeOperators, FlexibleInstances, ScopedTypeVariables, TypeSynonymInstances