public class GllResult extends java.lang.Object implements GearleyResult
| Modifier and Type | Field and Description |
|---|---|
boolean |
success |
| Constructor and Description |
|---|
GllResult(GllParser parser,
BinarySubtree bsr) |
| Modifier and Type | Method and Description |
|---|---|
GearleyResult |
continueParsing()
After a successful prefix parse, this method continues parsing.
|
GearleyResult |
continueParsing(GearleyParser parser)
After a successful prefix parse, this method continues parsing with a new parser.
|
Arborist |
getArborist()
Get an arborist to extract trees from the forest.
|
Arborist |
getArborist(Axe axe)
Get an arborist to extract trees from the forest.
|
int |
getColumnNumber()
Returns the column number of the last character on the last line read by the parser.
|
ParseForest |
getForest()
Return the parse forest created by the parser.
|
Token |
getLastToken()
Return the last token parsed.
|
int |
getLineNumber()
Returns the line number of the last line read by the parser.
|
int |
getOffset()
Returns the last offset read by the parser.
|
GearleyParser |
getParser()
The parser used.
|
long |
getParseTime()
Returns the number of milliseconds spent parsing.
|
java.util.Set<TerminalSymbol> |
getPredictedTerminals()
Returns the symbols predicted as possibly next in the case where a parse fails.
|
int |
getTokenCount()
Return the number of tokens parsed.
|
boolean |
isAmbiguous()
Returns true if the parse was ambiguous.
|
boolean |
isInfinitelyAmbiguous()
Returns true if the parse was infinitely ambiguous.
|
boolean |
prefixSucceeded()
Returns true if the parser successfully processed a prefix of the input.
|
boolean |
succeeded()
Returns true of the parse was successful.
|
public GllResult(GllParser parser, BinarySubtree bsr)
public GearleyResult continueParsing()
GearleyResultcontinueParsing in interface GearleyResultpublic GearleyResult continueParsing(GearleyParser parser)
GearleyResultcontinueParsing in interface GearleyResultparser - The (next) parser.public ParseForest getForest()
GearleyResultThis method returns null if the parse was unsuccessful.
getForest in interface GearleyResultpublic Arborist getArborist()
GearleyResultThe default arborist is created with Arborist.getArborist(ParseForest).
getArborist in interface GearleyResultpublic Arborist getArborist(Axe axe)
GearleyResultThe arborist is created with Arborist.getArborist(ParseForest, Axe).
getArborist in interface GearleyResultaxe - the arborists axepublic boolean isAmbiguous()
GearleyResultisAmbiguous in interface GearleyResultpublic boolean isInfinitelyAmbiguous()
GearleyResultThe parse will only be infinitely ambiguous if the grqmmar contained a loop.
isInfinitelyAmbiguous in interface GearleyResultpublic int getTokenCount()
GearleyResultgetTokenCount in interface GearleyResultpublic Token getLastToken()
GearleyResultgetLastToken in interface GearleyResultpublic int getOffset()
GearleyResultgetOffset in interface GearleyResultpublic int getLineNumber()
GearleyResultgetLineNumber in interface GearleyResultpublic int getColumnNumber()
GearleyResultgetColumnNumber in interface GearleyResultpublic java.util.Set<TerminalSymbol> getPredictedTerminals()
GearleyResultgetPredictedTerminals in interface GearleyResultpublic GearleyParser getParser()
GearleyResultgetParser in interface GearleyResultpublic boolean prefixSucceeded()
GearleyResultNote that the GLL parser does not support prefix parsing.
prefixSucceeded in interface GearleyResultpublic long getParseTime()
GearleyResultgetParseTime in interface GearleyResultpublic boolean succeeded()
GearleyResultsucceeded in interface GearleyResult