úÎ<^8Õ     Safe!"INA context-free grammar.The type parameters are:a*: The return type of the grammar (often a ).e@: The type of names, used for example to report expected tokens.r?: The type of a non-terminal. This plays a role similar to the s in the type ST s a . Since the parser function expects the r„ to be universally quantified, there is not much to do with this parameter other than leaving it universally quantified.Most of the functionality of ,s is obtained through its instances, e.g.  and ). Note that GHC has syntactic sugar for : use {-# LANGUAGE RecursiveDo #-} and mdo instead of do. A production.The type parameters are:a$: The return type of the production.t<: The type of the terminals that the production operates on.e@: The type of names, used for example to report expected tokens.r?: The type of a non-terminal. This plays a role similar to the s in the type ST s a . Since the parser function expects the r„ to be universally quantified, there is not much to do with this parameter other than leaving it universally quantified.As an example,  r    !. is the type of a production that returns an !0, operates on (lists of) characters and reports  names.Most of the functionality of +s is obtained through its instances, e.g. ", #, and $. LMatch a token that satisfies the given predicate. Returns the matched token. 8A named production (used for reporting expected things).9Create a new non-terminal by listing its production rule. %&'()*+,    %&'()*+, None!"-INThe result of a parse.The parser ended.'The parser parsed something, namely an a. The !4 is the position in the input where it did so, the i‘ is the rest of the input, and the function is the parser continuation. This allows incrementally feeding the parser more input (e.g. when the i is empty).ÉA parsing report, which contains fields that are useful for presenting errors to the user if a parse is deemed a failure. Note however that we get a report even when we successfully parse something.CThe final position in the input (0-based) that the parser reached.7The named productions processed at the final position.HThe part of the input string that was not consumed, which may be empty.-A continuation accepting an a and producing a b..!An Earley state with result type a./+The concrete rule type that the parser uses0TStrings of non-ambiguous continuations can be optimised by removing indirections.1Interpret an abstract .2,Given a grammar, construct an initial state.3The internal parsing routine'Create a parser from the given grammar.aReturn all parses from the result of a given parser. The result may contain partial parses. The !3s are the position at which a result was produced.YReturn all parses that reached the end of the input from the result of a given parser.#4-56.789:/;<=>?@AB012CD3"States to process at this position&States to process at the next position<Computation that resets the continuation refs of productions.Named productions encountered at this position(The current position in the input stringThe input string  4-56.789:/;<=>?@AB012CD3SafeMatch a single token.7Match a single token and give it the name of the token.#Match a list of tokens in sequence.None  E      !"#!$%!"&'()'(*!"+!",!"-./0123456789:;<=6>7?@A8BCDEFGHIJKEarle_8QDdLHAJoIyAzdCAIWyRfYText.Earley.GrammarText.Earley.ParserText.Earley.Derived Text.EarleyGrammarRuleBindFixBindReturnProdTerminal NonTerminalPurePlusManyEmptyNamedsatisfyruleResultEndedParsedReportpositionexpected unconsumedparser allParses fullParsessymbol namedSymbolwordbaseGHC.BaseMonadControl.Monad.FixMonadFixStringghc-prim GHC.TypesCharIntFunctor Applicative Alternative$fMonadFixGrammar$fMonadGrammar$fApplicativeGrammar$fFunctorGrammar$fAlternativeProd$fApplicativeProd $fFunctorProd $fMonoidProdContStateRule simplifyContgrammar initialStateparseConts FinalContFinalPosProdRruleProd ruleNullable ruleContsnullable nullableProd contraMapCont contToStateunconssafeTail