gll: GLL parser with simple combinator interface
GLL is a parser combinator library for writing generalised parsers. The parsers can correspond to arbitrary context-free grammar, accepting both non-determinism and (left-) recursion. The underlying parsing algorithm is GLL (Scott and Johnstone 2013) The library provides an interface in Control.Applicative style (although no instance of Applicative is given). Users can add arbitrary semantic with the $ combinator. There are 4 top-level functions: parse, parseString, parseWithOptions and parseStringWithOptions. They all return a list of semantic results, one for each derivation. In the case that infinite derivations are possible only 'good parse trees' are accepted (Ridge 2014). Function parse relies on a builtin Token datatype. User-defined token-types are currently not supported. parseString enables parsing character strings. The user is granted GLL.Combinators.Options to specify certain disambiguation rules. GLL.Combinators.MemInterface is a memoised version of the library. Parsers are no longer pure functions and must be built inside the IO monad, providing fresh memo-tables to each memo'ed non-terminal. See UnitTests and MemTests for examples of using both version of the library.
Modules
- GLL
- Combinators
- GLL.Combinators.Interface
- GLL.Combinators.MemInterface
- GLL.Combinators.Options
- Combinators
- MemTests
- UnitTests
Downloads
- gll-0.2.0.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
Versions [RSS] | 0.1.0.0, 0.1.0.1, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.0.3, 0.3.0.0, 0.3.0.1, 0.3.0.6, 0.3.0.7, 0.3.0.9, 0.3.0.10, 0.4.0.2, 0.4.0.3, 0.4.0.4, 0.4.0.5, 0.4.0.11, 0.4.0.12, 0.4.0.13, 0.4.1.0, 0.4.1.1 (info) |
---|---|
Dependencies | array, base (>=4.5 && <=4.8.0.0), containers (>=0.4), TypeCompose [details] |
Tested with | ghc ==7.6.3 |
License | BSD-3-Clause |
Author | L. Thomas van Binsbergen |
Maintainer | ltvanbinsbergen@acm.org |
Category | Compilers |
Uploaded | by ltvanbinsbergen at 2015-06-04T08:20:35Z |
Distributions | NixOS:0.4.1.1 |
Reverse Dependencies | 4 direct, 0 indirect [details] |
Downloads | 11454 total (4 in the last 30 days) |
Rating | 2.0 (votes: 1) [estimated by Bayesian average] |
Your Rating | |
Status | Docs not available [build log] All reported builds failed as of 2016-12-09 [all 6 reports] |