Package org.nineml.coffeegrinder.parser
The parser classes.
In outline:
- Create a
Grammar. - Use the grammar to create
NonterminalSymbols. - Use the grammar (or
Ruledirectly) to create rules and add them to the grammar. - Create an
EarleyParserfrom the grammar. - Parse a sequence of input tokens to obtain an
EarleyResult. - From the result, you can get information about the success or failure of the parse, and possibly continue parsing.
- If the parse was successful, get the
ParseForest(a shared packed parse forest) from the parse. - Use the forest to get
GenericTreeparse tree(s). - The forest will also tell you about the ambiguity of the result, the number of parse trees available, etc.
-
Interface Summary Interface Description GearleyParser The parser interface for Earley and GLL parsers.GearleyResult The result of a parse with an Earley or GLL parser.ParseListener The parser uses a ParseListener to report on its progress.ProgressMonitor The ProgressMonitor allows you to track the progress of a parse. -
Class Summary Class Description AmbiguityReport An ambiguity report.EarleyChart The chart used for Earley parsing.EarleyItem An Earley item.EarleyParser The Earley parser.EarleyPath An Earley path represents a position in the state chart.EarleyResult The results of an Earley parse.Family An internal class representing a family of nodes in the SPPF.ForestNode A node in the SPPF.ForestNodeGLL A node in the SPPF constructed by the GLL parser.ForestNodeSet A utility class for constructing forest nodes.ForestNodeWalk A tree walker.Grammar The grammar representation.GrammarConstants GrammarExporter The grammar exporter exports a parser grammar in an essentially opaque format.GrammarImporter The grammar importer reads an exported grammar and reconstructs aParserGrammarfrom it.HygieneReport A report on the hygiene of a grammar.NonterminalSymbol A nonterminal symbol in the grammar.ParseForest An SPPF is a shared packed parse forest.ParseForestGLL An SPPF is a shared packed parse forest.ParserGrammar A grammar for the parser.ParserInput Parser input.ParserOptions Options to the parser.RightHandSide A utility class for what appears on the "right hand side" of a production in a grammar.Rule A grammar rule.SourceGrammar A grammar for the parser.State States (or Earley items) in the chart.Symbol A grammar symbol.TerminalSymbol A terminal symbol. -
Enum Summary Enum Description ParserType The types of parsers.