Version 0.2.0.2-0 of gll is deprecated.
The latest version of gll is 0.4.1.1-0.

gll

Version 0.2.0.2 revision 0 uploaded by ltvanbinsbergen.

Package meta

Synopsis
GLL parser with simple combinator interface
Description

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 to the parser.

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.

Author
L. Thomas van Binsbergen
Bug reports
n/a
Category
Compilers
Copyright
n/a
Homepage
n/a
Maintainer
ltvanbinsbergen@acm.org
Package URL
n/a
Stability
n/a

Components