This package provides an implementation of an Earley parser. The Earley parsing algorithm allows grammars to be ambiguous. This API parses a sequence of tokens and returns a Shared Packed Parser Forest (SPPF). Individual parse trees can be obtained from the forest.
This parser is a fairly literal implementation of the parser in §5 of SPPF-Style Parsing From Earley Recognisers. It has been extended slightly to return a little more information in the SPPF and to support parses that match only a prefix of the input sequence.