GLL parser with simple combinator interface

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

BSD3 licensed by L. Thomas van Binsbergen

The package gll provides generalised top-down parsing according to the (R)GLL parsing algorithm [Scott and Johnstone 2016].

The user can either invoke the GLL parser directly by importing GLL.Parser and providing a value of the Grammar datatype in (exported by GLL.Parser). Alternatively, the user can import GLL.Combinators to write combinator expressions from which a grammar of the required form is extracted. The combinators enable applying arbitrary semantic actions to parse results. The documentation of the respective packages provides more information.

The main motivation for this package is the development of Domain Specific Languages (DSLs). More specifically: designing DSLs with minimal differences between between abstract and concrete syntax (abstract syntax is often ambiguous).

Please email any questions, comments and suggestions to the maintainer.

Changes ->
+ export maximumPivots and maximumPivotAtNt ->
+ include bit of the input string when showing an error message (without whitespace)
+ exporting <multiple/some/many>SepBy2
+ exporting within, parens, braces, brackets, angles, quotes and dquotes
+ added character literals to Token type
+ exporting <:=
+ <<<**> and <**>>> for shortest and longest match, respectively
defined some/many and variants using <**>>> and <<<**>
disambiguation remains very experimental ->
+ exporting chooses ->
+ parse option for disabling select test (lookahead) ->
+ replaced parser by reduced descriptor GLL (RGLL)
+ renamed GLL.Types.Grammar to GLL.Types.Derivations
+ renamed GLL.Types.Abstract to GLL.Types.Grammar
+ exporting GLL.Types.Grammar, GLL.Types.Derivations, GLL.Combinators.Options, GLL.Combinators.Memoisation, GLL.Flags ->
+ generalised `within`
+ different whitespace and comment handling in predefined lexer
+ predefined lexer handles (nested) comment-blocks ->
M added hex, octal and binary representation to integer literals
+ added float literals
+ exporting `preferably` and `reluctantly`
M renamed `rassoc` to shortest_match
M renamed `lassoc` to longest_match
- removed `assoc`
+ version of `chooses` that is left-biased (w.r.t. alternatives)
+ generalised arguments of longest_match and shortest_match to IsAltExpr
+ exporting `optionalWithDef` ->
+ `chooses` cannot be given an empty list (runtime error)
+ updated `base` dependency ->
+ relaxed cabal version constraint
comments powered byDisqus